blob: 2fec9e54ad0e652d102b05bc67a16a4b650aa5bb [file] [log] [blame]
Yuti Amonkar5ffc2592020-02-06 07:10:50 +01001# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: "http://devicetree.org/schemas/phy/phy-cadence-torrent.yaml#"
5$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
Swapnil Jakhade074e9912020-09-16 20:28:31 +02007title: Cadence Torrent SD0801 PHY binding
Yuti Amonkar5ffc2592020-02-06 07:10:50 +01008
9description:
10 This binding describes the Cadence SD0801 PHY (also known as Torrent PHY)
Swapnil Jakhade074e9912020-09-16 20:28:31 +020011 hardware included with the Cadence MHDP DisplayPort controller. Torrent
12 PHY also supports multilink multiprotocol combinations including protocols
13 such as PCIe, USB, SGMII, QSGMII etc.
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010014
15maintainers:
16 - Swapnil Jakhade <sjakhade@cadence.com>
17 - Yuti Amonkar <yamonkar@cadence.com>
18
19properties:
20 compatible:
21 enum:
22 - cdns,torrent-phy
23 - ti,j721e-serdes-10g
24
25 '#address-cells':
26 const: 1
27
28 '#size-cells':
29 const: 0
30
Kishon Vijay Abraham Ieaabb552021-03-10 16:57:44 +053031 '#clock-cells':
32 const: 1
33
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010034 clocks:
Kishon Vijay Abraham Ieaabb552021-03-10 16:57:44 +053035 minItems: 1
36 maxItems: 2
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010037 description:
Kishon Vijay Abraham Ieaabb552021-03-10 16:57:44 +053038 PHY reference clock for 1 item. Must contain an entry in clock-names.
39 Optional Parent to enable output reference clock.
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010040
41 clock-names:
Kishon Vijay Abraham Ieaabb552021-03-10 16:57:44 +053042 minItems: 1
43 items:
44 - const: refclk
45 - const: phy_en_refclk
46
47 assigned-clocks:
48 maxItems: 3
49
50 assigned-clock-parents:
51 maxItems: 3
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010052
53 reg:
54 minItems: 1
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010055 items:
56 - description: Offset of the Torrent PHY configuration registers.
57 - description: Offset of the DPTX PHY configuration registers.
58
59 reg-names:
60 minItems: 1
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010061 items:
62 - const: torrent_phy
63 - const: dptx_phy
64
65 resets:
Swapnil Jakhade074e9912020-09-16 20:28:31 +020066 minItems: 1
Swapnil Jakhade074e9912020-09-16 20:28:31 +020067 items:
68 - description: Torrent PHY reset.
69 - description: Torrent APB reset. This is optional.
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010070
Tomi Valkeinen4feac942020-09-18 11:37:42 +030071 reset-names:
72 minItems: 1
Tomi Valkeinen4feac942020-09-18 11:37:42 +030073 items:
74 - const: torrent_reset
75 - const: torrent_apb
76
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010077patternProperties:
Swapnil Jakhade074e9912020-09-16 20:28:31 +020078 '^phy@[0-3]$':
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010079 type: object
80 description:
81 Each group of PHY lanes with a single master lane should be represented as a sub-node.
82 properties:
83 reg:
84 description:
85 The master lane number. This is the lowest numbered lane in the lane group.
Swapnil Jakhade074e9912020-09-16 20:28:31 +020086 minimum: 0
87 maximum: 3
Yuti Amonkar5ffc2592020-02-06 07:10:50 +010088
89 resets:
90 minItems: 1
91 maxItems: 4
92 description:
93 Contains list of resets, one per lane, to get all the link lanes out of reset.
94
95 "#phy-cells":
96 const: 0
97
98 cdns,phy-type:
99 description:
100 Specifies the type of PHY for which the group of PHY lanes is used.
101 Refer include/dt-bindings/phy/phy.h. Constants from the header should be used.
Rob Herring3d21a462020-04-15 19:55:49 -0500102 $ref: /schemas/types.yaml#/definitions/uint32
Swapnil Jakhade074e9912020-09-16 20:28:31 +0200103 minimum: 1
104 maximum: 9
Yuti Amonkar5ffc2592020-02-06 07:10:50 +0100105
106 cdns,num-lanes:
107 description:
Swapnil Jakhade074e9912020-09-16 20:28:31 +0200108 Number of lanes.
Rob Herring3d21a462020-04-15 19:55:49 -0500109 $ref: /schemas/types.yaml#/definitions/uint32
Swapnil Jakhade074e9912020-09-16 20:28:31 +0200110 enum: [1, 2, 3, 4]
Yuti Amonkar5ffc2592020-02-06 07:10:50 +0100111 default: 4
112
Swapnil Jakhade962fad32020-09-16 20:28:30 +0200113 cdns,ssc-mode:
114 description:
115 Specifies the Spread Spectrum Clocking mode used. It can be NO_SSC,
116 EXTERNAL_SSC or INTERNAL_SSC.
Wan Jiabing53112212021-05-06 19:49:39 +0800117 Refer include/dt-bindings/phy/phy-cadence.h for the constants to be used.
Swapnil Jakhade962fad32020-09-16 20:28:30 +0200118 $ref: /schemas/types.yaml#/definitions/uint32
119 enum: [0, 1, 2]
120 default: 0
121
Yuti Amonkar5ffc2592020-02-06 07:10:50 +0100122 cdns,max-bit-rate:
123 description:
124 Maximum DisplayPort link bit rate to use, in Mbps
Rob Herring3d21a462020-04-15 19:55:49 -0500125 $ref: /schemas/types.yaml#/definitions/uint32
126 enum: [2160, 2430, 2700, 3240, 4320, 5400, 8100]
Yuti Amonkar5ffc2592020-02-06 07:10:50 +0100127 default: 8100
128
129 required:
130 - reg
131 - resets
132 - "#phy-cells"
133 - cdns,phy-type
Swapnil Jakhade074e9912020-09-16 20:28:31 +0200134 - cdns,num-lanes
Yuti Amonkar5ffc2592020-02-06 07:10:50 +0100135
136 additionalProperties: false
137
138required:
139 - compatible
140 - "#address-cells"
141 - "#size-cells"
142 - clocks
143 - clock-names
144 - reg
145 - reg-names
146 - resets
Tomi Valkeinen4feac942020-09-18 11:37:42 +0300147 - reset-names
Yuti Amonkar5ffc2592020-02-06 07:10:50 +0100148
149additionalProperties: false
150
151examples:
152 - |
153 #include <dt-bindings/phy/phy.h>
Rob Herringfba56182020-05-12 15:45:43 -0500154
155 bus {
156 #address-cells = <2>;
157 #size-cells = <2>;
158
159 torrent-phy@f0fb500000 {
160 compatible = "cdns,torrent-phy";
161 reg = <0xf0 0xfb500000 0x0 0x00100000>,
162 <0xf0 0xfb030a00 0x0 0x00000040>;
163 reg-names = "torrent_phy", "dptx_phy";
164 resets = <&phyrst 0>;
Tomi Valkeinen4feac942020-09-18 11:37:42 +0300165 reset-names = "torrent_reset";
Rob Herringfba56182020-05-12 15:45:43 -0500166 clocks = <&ref_clk>;
167 clock-names = "refclk";
168 #address-cells = <1>;
169 #size-cells = <0>;
170 phy@0 {
Swapnil Jakhade074e9912020-09-16 20:28:31 +0200171 reg = <0>;
172 resets = <&phyrst 1>, <&phyrst 2>,
173 <&phyrst 3>, <&phyrst 4>;
174 #phy-cells = <0>;
175 cdns,phy-type = <PHY_TYPE_DP>;
176 cdns,num-lanes = <4>;
177 cdns,max-bit-rate = <8100>;
178 };
179 };
180 };
181 - |
182 #include <dt-bindings/phy/phy.h>
Kishon Vijay Abraham Ifd7abc32021-03-19 18:11:23 +0530183 #include <dt-bindings/phy/phy-cadence.h>
Swapnil Jakhade074e9912020-09-16 20:28:31 +0200184
185 bus {
186 #address-cells = <2>;
187 #size-cells = <2>;
188
189 torrent-phy@f0fb500000 {
190 compatible = "cdns,torrent-phy";
191 reg = <0xf0 0xfb500000 0x0 0x00100000>;
192 reg-names = "torrent_phy";
193 resets = <&phyrst 0>, <&phyrst 1>;
Tomi Valkeinen4feac942020-09-18 11:37:42 +0300194 reset-names = "torrent_reset", "torrent_apb";
Swapnil Jakhade074e9912020-09-16 20:28:31 +0200195 clocks = <&ref_clk>;
196 clock-names = "refclk";
197 #address-cells = <1>;
198 #size-cells = <0>;
199 phy@0 {
200 reg = <0>;
201 resets = <&phyrst 2>, <&phyrst 3>;
202 #phy-cells = <0>;
203 cdns,phy-type = <PHY_TYPE_PCIE>;
204 cdns,num-lanes = <2>;
Swapnil Jakhade253f06c2021-12-23 07:01:25 +0100205 cdns,ssc-mode = <CDNS_SERDES_NO_SSC>;
Swapnil Jakhade074e9912020-09-16 20:28:31 +0200206 };
207
208 phy@2 {
209 reg = <2>;
210 resets = <&phyrst 4>;
211 #phy-cells = <0>;
212 cdns,phy-type = <PHY_TYPE_SGMII>;
213 cdns,num-lanes = <1>;
Swapnil Jakhade253f06c2021-12-23 07:01:25 +0100214 cdns,ssc-mode = <CDNS_SERDES_NO_SSC>;
Rob Herringfba56182020-05-12 15:45:43 -0500215 };
216 };
Yuti Amonkar5ffc2592020-02-06 07:10:50 +0100217 };
218...