xref: /linux/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml (revision 0d3b051adbb72ed81956447d0d1e54d5943ee6f5)
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: "http://devicetree.org/schemas/usb/nvidia,tegra-xudc.yaml#"
5$schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
7title: Device tree binding for NVIDIA Tegra XUSB device mode controller (XUDC)
8
9description:
10  The Tegra XUDC controller supports both USB 2.0 HighSpeed/FullSpeed and
11  USB 3.0 SuperSpeed protocols.
12
13maintainers:
14  - Nagarjuna Kristam <nkristam@nvidia.com>
15  - JC Kuo <jckuo@nvidia.com>
16  - Thierry Reding <treding@nvidia.com>
17
18properties:
19  compatible:
20    items:
21      - enum:
22          - nvidia,tegra210-xudc # For Tegra210
23          - nvidia,tegra186-xudc # For Tegra186
24          - nvidia,tegra194-xudc # For Tegra194
25
26  reg:
27    minItems: 2
28    maxItems: 3
29    items:
30      - description: XUSB device controller registers
31      - description: XUSB device PCI Config registers
32      - description: XUSB device registers.
33
34  reg-names:
35    minItems: 2
36    maxItems: 3
37    items:
38      - const: base
39      - const: fpci
40      - const: ipfs
41
42  interrupts:
43    maxItems: 1
44    description: Must contain the XUSB device interrupt.
45
46  clocks:
47    minItems: 4
48    maxItems: 5
49    items:
50      - description: Clock to enable core XUSB dev clock.
51      - description: Clock to enable XUSB super speed clock.
52      - description: Clock to enable XUSB super speed dev clock.
53      - description: Clock to enable XUSB high speed dev clock.
54      - description: Clock to enable XUSB full speed dev clock.
55
56  clock-names:
57    minItems: 4
58    maxItems: 5
59    items:
60      - const: dev
61      - const: ss
62      - const: ss_src
63      - const: fs_src
64      - const: hs_src
65
66  power-domains:
67    items:
68      - description: XUSBB(device) power-domain
69      - description: XUSBA(superspeed) power-domain
70
71  power-domain-names:
72    items:
73      - const: dev
74      - const: ss
75
76  nvidia,xusb-padctl:
77    $ref: /schemas/types.yaml#/definitions/phandle-array
78    description:
79      phandle to the XUSB pad controller that is used to configure the USB pads
80      used by the XUDC controller.
81
82  phys:
83    minItems: 1
84    description:
85      Must contain an entry for each entry in phy-names.
86      See ../phy/phy-bindings.txt for details.
87
88  phy-names:
89    minItems: 1
90    items:
91      - const: usb2-0
92      - const: usb2-1
93      - const: usb2-2
94      - const: usb2-3
95      - const: usb3-0
96      - const: usb3-1
97      - const: usb3-2
98      - const: usb3-3
99
100  avddio-usb-supply:
101    description: PCIe/USB3 analog logic power supply. Must supply 1.05 V.
102
103  hvdd-usb-supply:
104    description: USB controller power supply. Must supply 3.3 V.
105
106required:
107  - compatible
108  - reg
109  - reg-names
110  - interrupts
111  - clocks
112  - clock-names
113  - power-domains
114  - power-domain-names
115  - nvidia,xusb-padctl
116  - phys
117  - phy-names
118
119allOf:
120  - if:
121      properties:
122        compatible:
123          contains:
124            enum:
125              - nvidia,tegra210-xudc
126    then:
127      properties:
128        reg:
129          minItems: 3
130        reg-names:
131          minItems: 3
132        clocks:
133          minItems: 5
134        clock-names:
135          minItems: 5
136      required:
137        - avddio-usb-supply
138        - hvdd-usb-supply
139
140  - if:
141      properties:
142        compatible:
143          contains:
144            enum:
145              - nvidia,tegra186-xudc
146              - nvidia,tegra194-xudc
147    then:
148      properties:
149        reg:
150          maxItems: 2
151        reg-names:
152          maxItems: 2
153        clocks:
154          maxItems: 4
155        clock-names:
156          maxItems: 4
157
158additionalProperties: false
159
160examples:
161  - |
162    #include <dt-bindings/clock/tegra210-car.h>
163    #include <dt-bindings/gpio/tegra-gpio.h>
164    #include <dt-bindings/interrupt-controller/arm-gic.h>
165
166    usb@700d0000 {
167        compatible = "nvidia,tegra210-xudc";
168        reg = <0x700d0000 0x8000>,
169              <0x700d8000 0x1000>,
170              <0x700d9000 0x1000>;
171        reg-names = "base", "fpci", "ipfs";
172
173        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
174
175        clocks = <&tegra_car TEGRA210_CLK_XUSB_DEV>,
176                 <&tegra_car TEGRA210_CLK_XUSB_SS>,
177                 <&tegra_car TEGRA210_CLK_XUSB_SSP_SRC>,
178                 <&tegra_car TEGRA210_CLK_XUSB_FS_SRC>,
179                 <&tegra_car TEGRA210_CLK_XUSB_HS_SRC>;
180        clock-names = "dev", "ss", "ss_src", "fs_src", "hs_src";
181
182        power-domains = <&pd_xusbdev>, <&pd_xusbss>;
183        power-domain-names = "dev", "ss";
184
185        nvidia,xusb-padctl = <&padctl>;
186
187        phys = <&micro_b>;
188        phy-names = "usb2-0";
189
190        avddio-usb-supply = <&vdd_pex_1v05>;
191        hvdd-usb-supply = <&vdd_3v3_sys>;
192    };
193