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