Linux-libre 5.7.3-gnu
[librecmc/linux-libre.git] / arch / arm64 / boot / dts / nvidia / tegra186-p2771-0000.dts
1 // SPDX-License-Identifier: GPL-2.0
2 /dts-v1/;
3
4 #include <dt-bindings/input/linux-event-codes.h>
5 #include <dt-bindings/input/gpio-keys.h>
6
7 #include "tegra186-p3310.dtsi"
8
9 / {
10         model = "NVIDIA Jetson TX2 Developer Kit";
11         compatible = "nvidia,p2771-0000", "nvidia,tegra186";
12
13         aconnect {
14                 status = "okay";
15
16                 dma-controller@2930000 {
17                         status = "okay";
18                 };
19
20                 interrupt-controller@2a40000 {
21                         status = "okay";
22                 };
23         };
24
25         i2c@3160000 {
26                 power-monitor@42 {
27                         compatible = "ti,ina3221";
28                         reg = <0x42>;
29                         #address-cells = <1>;
30                         #size-cells = <0>;
31
32                         channel@0 {
33                                 reg = <0x0>;
34                                 label = "VDD_MUX";
35                                 shunt-resistor-micro-ohms = <20000>;
36                         };
37
38                         channel@1 {
39                                 reg = <0x1>;
40                                 label = "VDD_5V0_IO_SYS";
41                                 shunt-resistor-micro-ohms = <5000>;
42                         };
43
44                         channel@2 {
45                                 reg = <0x2>;
46                                 label = "VDD_3V3_SYS";
47                                 shunt-resistor-micro-ohms = <10000>;
48                         };
49                 };
50
51                 power-monitor@43 {
52                         compatible = "ti,ina3221";
53                         reg = <0x43>;
54                         #address-cells = <1>;
55                         #size-cells = <0>;
56
57                         channel@0 {
58                                 reg = <0x0>;
59                                 label = "VDD_3V3_IO_SLP";
60                                 shunt-resistor-micro-ohms = <10000>;
61                         };
62
63                         channel@1 {
64                                 reg = <0x1>;
65                                 label = "VDD_1V8_IO";
66                                 shunt-resistor-micro-ohms = <10000>;
67                         };
68
69                         channel@2 {
70                                 reg = <0x2>;
71                                 label = "VDD_M2_IN";
72                                 shunt-resistor-micro-ohms = <10000>;
73                         };
74                 };
75
76                 exp1: gpio@74 {
77                         compatible = "ti,tca9539";
78                         reg = <0x74>;
79
80                         interrupt-parent = <&gpio>;
81                         interrupts = <TEGRA186_MAIN_GPIO(Y, 0)
82                                       GPIO_ACTIVE_LOW>;
83
84                         #gpio-cells = <2>;
85                         gpio-controller;
86
87                         vcc-supply = <&vdd_3v3_sys>;
88                 };
89
90                 exp2: gpio@77 {
91                         compatible = "ti,tca9539";
92                         reg = <0x77>;
93
94                         interrupt-parent = <&gpio>;
95                         interrupts = <TEGRA186_MAIN_GPIO(Y, 6)
96                                       GPIO_ACTIVE_LOW>;
97
98                         #gpio-cells = <2>;
99                         gpio-controller;
100
101                         vcc-supply = <&vdd_1v8>;
102                 };
103         };
104
105         /* SDMMC1 (SD/MMC) */
106         sdhci@3400000 {
107                 status = "okay";
108
109                 vmmc-supply = <&vdd_sd>;
110         };
111
112         hda@3510000 {
113                 nvidia,model = "jetson-tx2-hda";
114                 status = "okay";
115         };
116
117         padctl@3520000 {
118                 status = "okay";
119
120                 avdd-pll-erefeut-supply = <&vdd_1v8_pll>;
121                 avdd-usb-supply = <&vdd_3v3_sys>;
122                 dvdd-pex-supply = <&vdd_pex>;
123                 dvdd-pex-pll-supply = <&vdd_pex>;
124                 hvdd-pex-supply = <&vdd_1v8>;
125                 hvdd-pex-pll-supply = <&vdd_1v8>;
126                 vclamp-usb-supply = <&vdd_1v8>;
127                 vddio-hsic-supply = <&gnd>;
128
129                 pads {
130                         usb2 {
131                                 status = "okay";
132
133                                 lanes {
134                                         micro_b: usb2-0 {
135                                                 nvidia,function = "xusb";
136                                                 status = "okay";
137                                         };
138
139                                         usb2-1 {
140                                                 nvidia,function = "xusb";
141                                                 status = "okay";
142                                         };
143
144                                         usb2-2 {
145                                                 nvidia,function = "xusb";
146                                                 status = "okay";
147                                         };
148                                 };
149                         };
150
151                         usb3 {
152                                 status = "okay";
153
154                                 lanes {
155                                         usb3-0 {
156                                                 nvidia,function = "xusb";
157                                                 status = "okay";
158                                         };
159
160                                         usb3-1 {
161                                                 nvidia,function = "xusb";
162                                                 status = "okay";
163                                         };
164
165                                         usb3-2 {
166                                                 nvidia,function = "xusb";
167                                                 status = "okay";
168                                         };
169                                 };
170                         };
171                 };
172
173                 ports {
174                         usb2-0 {
175                                 status = "okay";
176                                 mode = "otg";
177                                 vbus-supply = <&vdd_usb0>;
178
179                                 usb-role-switch;
180                                 connector {
181                                         compatible = "usb-b-connector",
182                                                      "gpio-usb-b-connector";
183                                         label = "micro-USB";
184                                         type = "micro";
185                                         vbus-gpio = <&gpio
186                                                      TEGRA186_MAIN_GPIO(X, 7)
187                                                      GPIO_ACTIVE_LOW>;
188                                         id-gpio = <&pmic 0 GPIO_ACTIVE_HIGH>;
189                                 };
190
191                         };
192
193                         usb2-1 {
194                                 status = "okay";
195                                 mode = "host";
196
197                                 vbus-supply = <&vdd_usb1>;
198                         };
199
200                         usb3-0 {
201                                 nvidia,usb2-companion = <1>;
202                                 status = "okay";
203                         };
204                 };
205         };
206
207         usb@3530000 {
208                 status = "okay";
209
210                 phys = <&{/padctl@3520000/pads/usb2/lanes/usb2-0}>,
211                        <&{/padctl@3520000/pads/usb2/lanes/usb2-1}>,
212                        <&{/padctl@3520000/pads/usb3/lanes/usb3-0}>;
213                 phy-names = "usb2-0", "usb2-1", "usb3-0";
214         };
215
216         usb@3550000 {
217                 status = "okay";
218
219                 phys = <&micro_b>;
220                 phy-names = "usb2-0";
221         };
222
223         i2c@c250000 {
224                 /* carrier board ID EEPROM */
225                 eeprom@57 {
226                         compatible = "atmel,24c02";
227                         reg = <0x57>;
228
229                         vcc-supply = <&vdd_1v8>;
230                         address-bits = <8>;
231                         page-size = <8>;
232                         size = <256>;
233                         read-only;
234                 };
235         };
236
237         pcie@10003000 {
238                 status = "okay";
239
240                 dvdd-pex-supply = <&vdd_pex>;
241                 hvdd-pex-pll-supply = <&vdd_1v8>;
242                 hvdd-pex-supply = <&vdd_1v8>;
243                 vddio-pexctl-aud-supply = <&vdd_1v8>;
244
245                 pci@1,0 {
246                         nvidia,num-lanes = <4>;
247                         status = "okay";
248                 };
249
250                 pci@2,0 {
251                         nvidia,num-lanes = <0>;
252                         status = "disabled";
253                 };
254
255                 pci@3,0 {
256                         nvidia,num-lanes = <1>;
257                         status = "disabled";
258                 };
259         };
260
261         host1x@13e00000 {
262                 status = "okay";
263
264                 dpaux@15040000 {
265                         status = "okay";
266                 };
267
268                 display-hub@15200000 {
269                         status = "okay";
270                 };
271
272                 dsi@15300000 {
273                         status = "disabled";
274                 };
275
276                 /* DP on E3320 */
277                 sor@15540000 {
278                         status = "okay";
279
280                         avdd-io-hdmi-dp-supply = <&vdd_hdmi_1v05>;
281                         vdd-hdmi-dp-pll-supply = <&vdd_1v8_ap>;
282
283                         nvidia,dpaux = <&dpaux>;
284                 };
285
286                 sor@15580000 {
287                         status = "okay";
288
289                         avdd-io-supply = <&vdd_hdmi_1v05>;
290                         vdd-pll-supply = <&vdd_1v8_ap>;
291                         hdmi-supply = <&vdd_hdmi>;
292
293                         nvidia,ddc-i2c-bus = <&ddc>;
294                         nvidia,hpd-gpio = <&gpio TEGRA186_MAIN_GPIO(P, 1)
295                                                  GPIO_ACTIVE_LOW>;
296                 };
297
298                 dpaux@155c0000 {
299                         status = "okay";
300                 };
301         };
302
303         gpio-keys {
304                 compatible = "gpio-keys";
305
306                 power {
307                         label = "Power";
308                         gpios = <&gpio_aon TEGRA186_AON_GPIO(FF, 0)
309                                            GPIO_ACTIVE_LOW>;
310                         linux,input-type = <EV_KEY>;
311                         linux,code = <KEY_POWER>;
312                         debounce-interval = <10>;
313                         wakeup-event-action = <EV_ACT_ASSERTED>;
314                         wakeup-source;
315                 };
316
317                 volume-up {
318                         label = "Volume Up";
319                         gpios = <&gpio_aon TEGRA186_AON_GPIO(FF, 1)
320                                            GPIO_ACTIVE_LOW>;
321                         linux,input-type = <EV_KEY>;
322                         linux,code = <KEY_VOLUMEUP>;
323                         debounce-interval = <10>;
324                 };
325
326                 volume-down {
327                         label = "Volume Down";
328                         gpios = <&gpio_aon TEGRA186_AON_GPIO(FF, 2)
329                                            GPIO_ACTIVE_LOW>;
330                         linux,input-type = <EV_KEY>;
331                         linux,code = <KEY_VOLUMEDOWN>;
332                         debounce-interval = <10>;
333                 };
334         };
335
336         regulators {
337                 vdd_sd: regulator@100 {
338                         compatible = "regulator-fixed";
339                         reg = <100>;
340
341                         regulator-name = "SD_CARD_SW_PWR";
342                         regulator-min-microvolt = <3300000>;
343                         regulator-max-microvolt = <3300000>;
344
345                         gpio = <&gpio TEGRA186_MAIN_GPIO(P, 6)
346                                       GPIO_ACTIVE_HIGH>;
347                         enable-active-high;
348
349                         vin-supply = <&vdd_3v3_sys>;
350                 };
351
352                 vdd_hdmi: regulator@101 {
353                         compatible = "regulator-fixed";
354                         reg = <101>;
355
356                         regulator-name = "VDD_HDMI_5V0";
357                         regulator-min-microvolt = <5000000>;
358                         regulator-max-microvolt = <5000000>;
359
360                         gpio = <&exp1 14 GPIO_ACTIVE_HIGH>;
361                         enable-active-high;
362
363                         vin-supply = <&vdd_5v0_sys>;
364                 };
365
366                 vdd_usb0: regulator@102 {
367                         compatible = "regulator-fixed";
368                         reg = <102>;
369
370                         regulator-name = "VDD_USB0";
371                         regulator-min-microvolt = <5000000>;
372                         regulator-max-microvolt = <5000000>;
373
374                         gpio = <&gpio TEGRA186_MAIN_GPIO(L, 4) GPIO_ACTIVE_HIGH>;
375                         enable-active-high;
376
377                         vin-supply = <&vdd_5v0_sys>;
378                 };
379
380                 vdd_usb1: regulator@103 {
381                         compatible = "regulator-fixed";
382                         reg = <103>;
383
384                         regulator-name = "VDD_USB1";
385                         regulator-min-microvolt = <5000000>;
386                         regulator-max-microvolt = <5000000>;
387
388                         gpio = <&gpio TEGRA186_MAIN_GPIO(L, 5) GPIO_ACTIVE_HIGH>;
389                         enable-active-high;
390
391                         vin-supply = <&vdd_5v0_sys>;
392                 };
393         };
394 };