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