blob: 6e3398399628766e820ff2a5da0ee644dcdee956 [file] [log] [blame]
Tom Rini53633a82024-02-29 12:33:36 -05001# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/phy/nvidia,tegra194-xusb-padctl.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: NVIDIA Tegra194 XUSB pad controller
8
9maintainers:
10 - Thierry Reding <thierry.reding@gmail.com>
11 - Jon Hunter <jonathanh@nvidia.com>
12
13description: |
14 The Tegra XUSB pad controller manages a set of I/O lanes (with differential
15 signals) which connect directly to pins/pads on the SoC package. Each lane
16 is controlled by a HW block referred to as a "pad" in the Tegra hardware
17 documentation. Each such "pad" may control either one or multiple lanes,
18 and thus contains any logic common to all its lanes. Each lane can be
19 separately configured and powered up.
20
21 Some of the lanes are high-speed lanes, which can be used for PCIe, SATA or
22 super-speed USB. Other lanes are for various types of low-speed, full-speed
23 or high-speed USB (such as UTMI, ULPI and HSIC). The XUSB pad controller
24 contains a software-configurable mux that sits between the I/O controller
25 ports (e.g. PCIe) and the lanes.
26
27 In addition to per-lane configuration, USB 3.0 ports may require additional
28 settings on a per-board basis.
29
30 Pads will be represented as children of the top-level XUSB pad controller
31 device tree node. Each lane exposed by the pad will be represented by its
32 own subnode and can be referenced by users of the lane using the standard
33 PHY bindings, as described by the phy-bindings.txt file in this directory.
34
35 The Tegra hardware documentation refers to the connection between the XUSB
36 pad controller and the XUSB controller as "ports". This is confusing since
37 "port" is typically used to denote the physical USB receptacle. The device
38 tree binding in this document uses the term "port" to refer to the logical
39 abstraction of the signals that are routed to a USB receptacle (i.e. a PHY
40 for the USB signal, the VBUS power supply, the USB 2.0 companion port for
41 USB 3.0 receptacles, ...).
42
43properties:
44 compatible:
45 enum:
46 - nvidia,tegra194-xusb-padctl
47 - nvidia,tegra234-xusb-padctl
48
49 reg:
50 items:
51 - description: pad controller registers
52 - description: AO registers
53
54 reg-names:
55 items:
56 - const: padctl
57 - const: ao
58
59 interrupts:
60 items:
61 - description: XUSB pad controller interrupt
62
63 resets:
64 items:
65 - description: pad controller reset
66
67 reset-names:
68 items:
69 - const: padctl
70
71 avdd-usb-supply:
72 description: USB I/Os, VBUS, ID, REXT, D+/D- power supply. Must
73 supply 3.3 V.
74
75 vclamp-usb-supply:
76 description: Bias rail for USB pad. Must supply 1.8 V.
77
78 pads:
79 description: A required child node named "pads" contains a list of
80 subnodes, one for each of the pads exposed by the XUSB pad controller.
81 Each pad may need additional resources that can be referenced in its
82 pad node.
83
84 The "status" property is used to enable or disable the use of a pad.
85 If set to "disabled", the pad will not be used on the given board. In
86 order to use the pad and any of its lanes, this property must be set
87 to "okay" or absent.
88 type: object
89 additionalProperties: false
90 properties:
91 usb2:
92 type: object
93 additionalProperties: false
94 properties:
95 clocks:
96 items:
97 - description: USB2 tracking clock
98
99 clock-names:
100 items:
101 - const: trk
102
103 lanes:
104 type: object
105 additionalProperties: false
106 properties:
107 usb2-0:
108 type: object
109 additionalProperties: false
110 properties:
111 "#phy-cells":
112 const: 0
113
114 nvidia,function:
115 description: Function selection for this lane.
116 $ref: /schemas/types.yaml#/definitions/string
117 enum: [ xusb ]
118
119 usb2-1:
120 type: object
121 additionalProperties: false
122 properties:
123 "#phy-cells":
124 const: 0
125
126 nvidia,function:
127 description: Function selection for this lane.
128 $ref: /schemas/types.yaml#/definitions/string
129 enum: [ xusb ]
130
131 usb2-2:
132 type: object
133 additionalProperties: false
134 properties:
135 "#phy-cells":
136 const: 0
137
138 nvidia,function:
139 description: Function selection for this lane.
140 $ref: /schemas/types.yaml#/definitions/string
141 enum: [ xusb ]
142
143 usb2-3:
144 type: object
145 additionalProperties: false
146 properties:
147 "#phy-cells":
148 const: 0
149
150 nvidia,function:
151 description: Function selection for this lane.
152 $ref: /schemas/types.yaml#/definitions/string
153 enum: [ xusb ]
154
155 usb3:
156 type: object
157 additionalProperties: false
158 properties:
159 lanes:
160 type: object
161 additionalProperties: false
162 properties:
163 usb3-0:
164 type: object
165 additionalProperties: false
166 properties:
167 "#phy-cells":
168 const: 0
169
170 nvidia,function:
171 description: Function selection for this lane.
172 $ref: /schemas/types.yaml#/definitions/string
173 enum: [ xusb ]
174
175 usb3-1:
176 type: object
177 additionalProperties: false
178 properties:
179 "#phy-cells":
180 const: 0
181
182 nvidia,function:
183 description: Function selection for this lane.
184 $ref: /schemas/types.yaml#/definitions/string
185 enum: [ xusb ]
186
187 usb3-2:
188 type: object
189 additionalProperties: false
190 properties:
191 "#phy-cells":
192 const: 0
193
194 nvidia,function:
195 description: Function selection for this lane.
196 $ref: /schemas/types.yaml#/definitions/string
197 enum: [ xusb ]
198
199 usb3-3:
200 type: object
201 additionalProperties: false
202 properties:
203 "#phy-cells":
204 const: 0
205
206 nvidia,function:
207 description: Function selection for this lane.
208 $ref: /schemas/types.yaml#/definitions/string
209 enum: [ xusb ]
210
211 ports:
212 description: A required child node named "ports" contains a list of
213 subnodes, one for each of the ports exposed by the XUSB pad controller.
214 Each port may need additional resources that can be referenced in its
215 port node.
216
217 The "status" property is used to enable or disable the use of a port.
218 If set to "disabled", the port will not be used on the given board. In
219 order to use the port, this property must be set to "okay".
220 type: object
221 additionalProperties: false
222 properties:
223 usb2-0:
224 type: object
225 additionalProperties: false
226 properties:
227 # no need to further describe this because the connector will
228 # match on gpio-usb-b-connector or usb-b-connector and cause
229 # that binding to be selected for the subnode
230 connector:
231 type: object
232
233 mode:
234 description: A string that determines the mode in which to
235 run the port.
236 $ref: /schemas/types.yaml#/definitions/string
237 enum: [ host, peripheral, otg ]
238
239 nvidia,internal:
240 description: A boolean property whose presence determines
241 that a port is internal. In the absence of this property
242 the port is considered to be external.
243 $ref: /schemas/types.yaml#/definitions/flag
244
245 usb-role-switch:
246 description: |
247 A boolean property whole presence indicates that the port
248 supports OTG or peripheral mode. If present, the port
249 supports switching between USB host and peripheral roles.
250 A connector must be added as a subnode in that case.
251
252 See ../connector/usb-connector.yaml.
253
254 vbus-supply:
255 description: A phandle to the regulator supplying the VBUS
256 voltage.
257
258 dependencies:
259 usb-role-switch: [ connector ]
260
261 usb2-1:
262 type: object
263 additionalProperties: false
264 properties:
265 # no need to further describe this because the connector will
266 # match on gpio-usb-b-connector or usb-b-connector and cause
267 # that binding to be selected for the subnode
268 connector:
269 type: object
270
271 mode:
272 description: A string that determines the mode in which to
273 run the port.
274 $ref: /schemas/types.yaml#/definitions/string
275 enum: [ host, peripheral, otg ]
276
277 nvidia,internal:
278 description: A boolean property whose presence determines
279 that a port is internal. In the absence of this property
280 the port is considered to be external.
281 $ref: /schemas/types.yaml#/definitions/flag
282
283 usb-role-switch:
284 description: |
285 A boolean property whole presence indicates that the port
286 supports OTG or peripheral mode. If present, the port
287 supports switching between USB host and peripheral roles.
288 A connector must be added as a subnode in that case.
289
290 See ../connector/usb-connector.yaml.
291
292 vbus-supply:
293 description: A phandle to the regulator supplying the VBUS
294 voltage.
295
296 dependencies:
297 usb-role-switch: [ connector ]
298
299 usb2-2:
300 type: object
301 additionalProperties: false
302 properties:
303 # no need to further describe this because the connector will
304 # match on gpio-usb-b-connector or usb-b-connector and cause
305 # that binding to be selected for the subnode
306 connector:
307 type: object
308
309 mode:
310 description: A string that determines the mode in which to
311 run the port.
312 $ref: /schemas/types.yaml#/definitions/string
313 enum: [ host, peripheral, otg ]
314
315 nvidia,internal:
316 description: A boolean property whose presence determines
317 that a port is internal. In the absence of this property
318 the port is considered to be external.
319 $ref: /schemas/types.yaml#/definitions/flag
320
321 usb-role-switch:
322 description: |
323 A boolean property whole presence indicates that the port
324 supports OTG or peripheral mode. If present, the port
325 supports switching between USB host and peripheral roles.
326 A connector must be added as a subnode in that case.
327
328 See ../connector/usb-connector.yaml.
329
330 vbus-supply:
331 description: A phandle to the regulator supplying the VBUS
332 voltage.
333
334 dependencies:
335 usb-role-switch: [ connector ]
336
337 usb2-3:
338 type: object
339 additionalProperties: false
340 properties:
341 # no need to further describe this because the connector will
342 # match on gpio-usb-b-connector or usb-b-connector and cause
343 # that binding to be selected for the subnode
344 connector:
345 type: object
346
347 mode:
348 description: A string that determines the mode in which to
349 run the port.
350 $ref: /schemas/types.yaml#/definitions/string
351 enum: [ host, peripheral, otg ]
352
353 nvidia,internal:
354 description: A boolean property whose presence determines
355 that a port is internal. In the absence of this property
356 the port is considered to be external.
357 $ref: /schemas/types.yaml#/definitions/flag
358
359 usb-role-switch:
360 description: |
361 A boolean property whole presence indicates that the port
362 supports OTG or peripheral mode. If present, the port
363 supports switching between USB host and peripheral roles.
364 A connector must be added as a subnode in that case.
365
366 See ../connector/usb-connector.yaml.
367
368 vbus-supply:
369 description: A phandle to the regulator supplying the VBUS
370 voltage.
371
372 dependencies:
373 usb-role-switch: [ connector ]
374
375 usb3-0:
376 type: object
377 additionalProperties: false
378 properties:
379 maximum-speed:
380 description: A string property that specifies the maximum
381 supported speed of a USB3 port.
382 $ref: /schemas/types.yaml#/definitions/string
383 oneOf:
384 - description: The USB3 port supports USB 3.1 Gen 2 speed.
385 This is the default.
386 const: super-speed-plus
387 - description: The USB3 port supports USB 3.1 Gen 1 speed
388 only.
389 const: super-speed
390
391 nvidia,internal:
392 description: A boolean property whose presence determines
393 that a port is internal. In the absence of this property
394 the port is considered to be external.
395 $ref: /schemas/types.yaml#/definitions/flag
396
397 nvidia,usb2-companion:
398 description: A single cell that specifies the physical port
399 number to map this super-speed USB port to. The range of
400 valid port numbers varies with the SoC generation.
401 $ref: /schemas/types.yaml#/definitions/uint32
402 enum: [ 0, 1, 2, 3 ]
403
404 vbus-supply:
405 description: A phandle to the regulator supplying the VBUS
406 voltage.
407
408 usb3-1:
409 type: object
410 additionalProperties: false
411 properties:
412 maximum-speed:
413 description: A string property that specifies the maximum
414 supported speed of a USB3 port.
415 $ref: /schemas/types.yaml#/definitions/string
416 oneOf:
417 - description: The USB3 port supports USB 3.1 Gen 2 speed.
418 This is the default.
419 const: super-speed-plus
420 - description: The USB3 port supports USB 3.1 Gen 1 speed
421 only.
422 const: super-speed
423
424 nvidia,internal:
425 description: A boolean property whose presence determines
426 that a port is internal. In the absence of this property
427 the port is considered to be external.
428 $ref: /schemas/types.yaml#/definitions/flag
429
430 nvidia,usb2-companion:
431 description: A single cell that specifies the physical port
432 number to map this super-speed USB port to. The range of
433 valid port numbers varies with the SoC generation.
434 $ref: /schemas/types.yaml#/definitions/uint32
435 enum: [ 0, 1, 2, 3 ]
436
437 vbus-supply:
438 description: A phandle to the regulator supplying the VBUS
439 voltage.
440
441 usb3-2:
442 type: object
443 additionalProperties: false
444 properties:
445 maximum-speed:
446 description: A string property that specifies the maximum
447 supported speed of a USB3 port.
448 $ref: /schemas/types.yaml#/definitions/string
449 oneOf:
450 - description: The USB3 port supports USB 3.1 Gen 2 speed.
451 This is the default.
452 const: super-speed-plus
453 - description: The USB3 port supports USB 3.1 Gen 1 speed
454 only.
455 const: super-speed
456
457 nvidia,internal:
458 description: A boolean property whose presence determines
459 that a port is internal. In the absence of this property
460 the port is considered to be external.
461 $ref: /schemas/types.yaml#/definitions/flag
462
463 nvidia,usb2-companion:
464 description: A single cell that specifies the physical port
465 number to map this super-speed USB port to. The range of
466 valid port numbers varies with the SoC generation.
467 $ref: /schemas/types.yaml#/definitions/uint32
468 enum: [ 0, 1, 2, 3 ]
469
470 vbus-supply:
471 description: A phandle to the regulator supplying the VBUS
472 voltage.
473
474 usb3-3:
475 type: object
476 additionalProperties: false
477 properties:
478 maximum-speed:
479 description: A string property that specifies the maximum
480 supported speed of a USB3 port.
481 $ref: /schemas/types.yaml#/definitions/string
482 oneOf:
483 - description: The USB3 port supports USB 3.1 Gen 2 speed.
484 This is the default.
485 const: super-speed-plus
486 - description: The USB3 port supports USB 3.1 Gen 1 speed
487 only.
488 const: super-speed
489
490 nvidia,internal:
491 description: A boolean property whose presence determines
492 that a port is internal. In the absence of this property
493 the port is considered to be external.
494 $ref: /schemas/types.yaml#/definitions/flag
495
496 nvidia,usb2-companion:
497 description: A single cell that specifies the physical port
498 number to map this super-speed USB port to. The range of
499 valid port numbers varies with the SoC generation.
500 $ref: /schemas/types.yaml#/definitions/uint32
501 enum: [ 0, 1, 2, 3 ]
502
503 vbus-supply:
504 description: A phandle to the regulator supplying the VBUS
505 voltage.
506
507additionalProperties: false
508
509required:
510 - compatible
511 - reg
512 - resets
513 - reset-names
514 - avdd-usb-supply
515 - vclamp-usb-supply
516
517examples:
518 - |
519 #include <dt-bindings/clock/tegra194-clock.h>
520 #include <dt-bindings/gpio/tegra194-gpio.h>
521 #include <dt-bindings/interrupt-controller/arm-gic.h>
522 #include <dt-bindings/reset/tegra194-reset.h>
523
524 padctl@3520000 {
525 compatible = "nvidia,tegra194-xusb-padctl";
526 reg = <0x03520000 0x1000>,
527 <0x03540000 0x1000>;
528 reg-names = "padctl", "ao";
529 interrupts = <GIC_SPI 167 IRQ_TYPE_LEVEL_HIGH>;
530
531 resets = <&bpmp TEGRA194_RESET_XUSB_PADCTL>;
532 reset-names = "padctl";
533
534 avdd-usb-supply = <&vdd_usb_3v3>;
535 vclamp-usb-supply = <&vdd_1v8ao>;
536
537 pads {
538 usb2 {
539 clocks = <&bpmp TEGRA194_CLK_USB2_TRK>;
540 clock-names = "trk";
541
542 lanes {
543 usb2-0 {
544 nvidia,function = "xusb";
545 status = "disabled";
546 #phy-cells = <0>;
547 };
548
549 usb2-1 {
550 nvidia,function = "xusb";
551 #phy-cells = <0>;
552 };
553
554 usb2-2 {
555 nvidia,function = "xusb";
556 status = "disabled";
557 #phy-cells = <0>;
558 };
559
560 usb2-3 {
561 nvidia,function = "xusb";
562 #phy-cells = <0>;
563 };
564 };
565 };
566
567 usb3 {
568 lanes {
569 usb3-0 {
570 nvidia,function = "xusb";
571 #phy-cells = <0>;
572 };
573
574 usb3-1 {
575 nvidia,function = "xusb";
576 status = "disabled";
577 #phy-cells = <0>;
578 };
579
580 usb3-2 {
581 nvidia,function = "xusb";
582 status = "disabled";
583 #phy-cells = <0>;
584 };
585
586 usb3-3 {
587 nvidia,function = "xusb";
588 #phy-cells = <0>;
589 };
590 };
591 };
592 };
593
594 ports {
595 usb2-0 {
596 status = "disabled";
597 };
598
599 usb2-1 {
600 vbus-supply = <&vdd_5v0_sys>;
601 mode = "host";
602 };
603
604 usb2-2 {
605 status = "disabled";
606 };
607
608 usb2-3 {
609 vbus-supply = <&vdd_5v_sata>;
610 mode = "host";
611 };
612
613 usb3-0 {
614 vbus-supply = <&vdd_5v0_sys>;
615 nvidia,usb2-companion = <1>;
616 };
617
618 usb3-1 {
619 status = "disabled";
620 };
621
622 usb3-2 {
623 status = "disabled";
624 };
625
626 usb3-3 {
627 maximum-speed = "super-speed";
628 vbus-supply = <&vdd_5v0_sys>;
629 nvidia,usb2-companion = <3>;
630 };
631 };
632 };