xref: /linux/Documentation/devicetree/bindings/usb/nvidia,tegra-xudc.yaml (revision 0526b56cbc3c489642bd6a5fe4b718dea7ef0ee8)
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: 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          - nvidia,tegra234-xudc # For Tegra234
26
27  reg:
28    minItems: 2
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    items:
37      - const: base
38      - const: fpci
39      - const: ipfs
40
41  interrupts:
42    maxItems: 1
43    description: Must contain the XUSB device interrupt.
44
45  clocks:
46    minItems: 4
47    items:
48      - description: Clock to enable core XUSB dev clock.
49      - description: Clock to enable XUSB super speed clock.
50      - description: Clock to enable XUSB super speed dev clock.
51      - description: Clock to enable XUSB high speed dev clock.
52      - description: Clock to enable XUSB full speed dev clock.
53
54  clock-names:
55    minItems: 4
56    items:
57      - const: dev
58      - const: ss
59      - const: ss_src
60      - const: fs_src
61      - const: hs_src
62
63  interconnects:
64    items:
65      - description: memory read client
66      - description: memory write client
67
68  interconnect-names:
69    items:
70      - const: dma-mem # read
71      - const: write
72
73  iommus:
74    maxItems: 1
75
76  power-domains:
77    items:
78      - description: XUSBB(device) power-domain
79      - description: XUSBA(superspeed) power-domain
80
81  power-domain-names:
82    items:
83      - const: dev
84      - const: ss
85
86  nvidia,xusb-padctl:
87    $ref: /schemas/types.yaml#/definitions/phandle
88    description:
89      phandle to the XUSB pad controller that is used to configure the USB pads
90      used by the XUDC controller.
91
92  phys:
93    minItems: 1
94    description:
95      Must contain an entry for each entry in phy-names.
96      See ../phy/phy-bindings.txt for details.
97
98  phy-names:
99    minItems: 1
100    items:
101      - const: usb2-0
102      - const: usb2-1
103      - const: usb2-2
104      - const: usb2-3
105      - const: usb3-0
106      - const: usb3-1
107      - const: usb3-2
108      - const: usb3-3
109
110  avddio-usb-supply:
111    description: PCIe/USB3 analog logic power supply. Must supply 1.05 V.
112
113  hvdd-usb-supply:
114    description: USB controller power supply. Must supply 3.3 V.
115
116  dma-coherent: true
117
118required:
119  - compatible
120  - reg
121  - reg-names
122  - interrupts
123  - clocks
124  - clock-names
125  - power-domains
126  - power-domain-names
127  - nvidia,xusb-padctl
128  - phys
129  - phy-names
130
131allOf:
132  - if:
133      properties:
134        compatible:
135          contains:
136            enum:
137              - nvidia,tegra210-xudc
138    then:
139      properties:
140        reg:
141          minItems: 3
142        reg-names:
143          minItems: 3
144        clocks:
145          minItems: 5
146        clock-names:
147          minItems: 5
148      required:
149        - avddio-usb-supply
150        - hvdd-usb-supply
151
152  - if:
153      properties:
154        compatible:
155          contains:
156            enum:
157              - nvidia,tegra186-xudc
158              - nvidia,tegra194-xudc
159              - nvidia,tegra234-xudc
160    then:
161      properties:
162        reg:
163          maxItems: 2
164        reg-names:
165          maxItems: 2
166        clocks:
167          maxItems: 4
168        clock-names:
169          maxItems: 4
170
171  - if:
172      properties:
173        compatible:
174          contains:
175            enum:
176              - nvidia,tegra194-xudc
177              - nvidia,tegra234-xudc
178    then:
179      required:
180        - dma-coherent
181
182additionalProperties: false
183
184examples:
185  - |
186    #include <dt-bindings/clock/tegra210-car.h>
187    #include <dt-bindings/gpio/tegra-gpio.h>
188    #include <dt-bindings/interrupt-controller/arm-gic.h>
189
190    usb@700d0000 {
191        compatible = "nvidia,tegra210-xudc";
192        reg = <0x700d0000 0x8000>,
193              <0x700d8000 0x1000>,
194              <0x700d9000 0x1000>;
195        reg-names = "base", "fpci", "ipfs";
196
197        interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
198
199        clocks = <&tegra_car TEGRA210_CLK_XUSB_DEV>,
200                 <&tegra_car TEGRA210_CLK_XUSB_SS>,
201                 <&tegra_car TEGRA210_CLK_XUSB_SSP_SRC>,
202                 <&tegra_car TEGRA210_CLK_XUSB_FS_SRC>,
203                 <&tegra_car TEGRA210_CLK_XUSB_HS_SRC>;
204        clock-names = "dev", "ss", "ss_src", "fs_src", "hs_src";
205
206        power-domains = <&pd_xusbdev>, <&pd_xusbss>;
207        power-domain-names = "dev", "ss";
208
209        nvidia,xusb-padctl = <&padctl>;
210
211        phys = <&micro_b>;
212        phy-names = "usb2-0";
213
214        avddio-usb-supply = <&vdd_pex_1v05>;
215        hvdd-usb-supply = <&vdd_3v3_sys>;
216    };
217