1// SPDX-License-Identifier: GPL-2.0
2#include "tegra194.dtsi"
3
4#include <dt-bindings/mfd/max77620.h>
5
6/ {
7	model = "NVIDIA Jetson AGX Xavier";
8	compatible = "nvidia,p2888", "nvidia,tegra194";
9
10	aliases {
11		ethernet0 = "/bus@0/ethernet@2490000";
12		i2c0 = "/bpmp/i2c";
13		i2c1 = "/bus@0/i2c@3160000";
14		i2c2 = "/bus@0/i2c@c240000";
15		i2c3 = "/bus@0/i2c@3180000";
16		i2c4 = "/bus@0/i2c@3190000";
17		i2c5 = "/bus@0/i2c@31c0000";
18		i2c6 = "/bus@0/i2c@c250000";
19		i2c7 = "/bus@0/i2c@31e0000";
20		mmc0 = "/bus@0/mmc@3460000";
21		mmc1 = "/bus@0/mmc@3400000";
22		serial0 = &tcu;
23	};
24
25	chosen {
26		bootargs = "console=ttyS0,115200n8";
27		stdout-path = "serial0:115200n8";
28	};
29
30	bus@0 {
31		ethernet@2490000 {
32			status = "okay";
33
34			phy-reset-gpios = <&gpio TEGRA194_MAIN_GPIO(G, 5) GPIO_ACTIVE_LOW>;
35			phy-handle = <&phy>;
36			phy-mode = "rgmii-id";
37
38			mdio {
39				#address-cells = <1>;
40				#size-cells = <0>;
41
42				phy: phy@0 {
43					compatible = "ethernet-phy-ieee802.3-c22";
44					reg = <0x0>;
45					interrupt-parent = <&gpio>;
46					interrupts = <TEGRA194_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
47					#phy-cells = <0>;
48				};
49			};
50		};
51
52		memory-controller@2c00000 {
53			status = "okay";
54		};
55
56		serial@3110000 {
57			status = "okay";
58		};
59
60		i2c@3160000 {
61			status = "okay";
62
63			eeprom@50 {
64				compatible = "atmel,24c02";
65				reg = <0x50>;
66
67				label = "module";
68				vcc-supply = <&vdd_1v8ls>;
69				address-width = <8>;
70				pagesize = <8>;
71				size = <256>;
72				read-only;
73			};
74		};
75
76		/* SDMMC1 (SD/MMC) */
77		mmc@3400000 {
78			cd-gpios = <&gpio TEGRA194_MAIN_GPIO(A, 0) GPIO_ACTIVE_LOW>;
79		};
80
81		/* SDMMC4 (eMMC) */
82		mmc@3460000 {
83			status = "okay";
84			bus-width = <8>;
85			non-removable;
86
87			vqmmc-supply = <&vdd_1v8ls>;
88			vmmc-supply = <&vdd_emmc_3v3>;
89		};
90
91		padctl@3520000 {
92			avdd-usb-supply = <&vdd_usb_3v3>;
93			vclamp-usb-supply = <&vdd_1v8ao>;
94
95			ports {
96				usb2-0 {
97					vbus-supply = <&vdd_5v0_sys>;
98				};
99
100				usb2-1 {
101					vbus-supply = <&vdd_5v0_sys>;
102				};
103
104				usb2-3 {
105					vbus-supply = <&vdd_5v_sata>;
106				};
107
108				usb3-0 {
109					vbus-supply = <&vdd_5v0_sys>;
110				};
111
112				usb3-2 {
113					vbus-supply = <&vdd_5v0_sys>;
114				};
115
116				usb3-3 {
117					vbus-supply = <&vdd_5v0_sys>;
118				};
119			};
120		};
121
122		rtc@c2a0000 {
123			status = "okay";
124		};
125
126		pmc@c360000 {
127			nvidia,invert-interrupt;
128		};
129	};
130
131	bpmp {
132		i2c {
133			status = "okay";
134
135			pmic: pmic@3c {
136				compatible = "maxim,max20024";
137				reg = <0x3c>;
138
139				interrupt-parent = <&pmc>;
140				interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
141				#interrupt-cells = <2>;
142				interrupt-controller;
143
144				#gpio-cells = <2>;
145				gpio-controller;
146
147				pinctrl-names = "default";
148				pinctrl-0 = <&max20024_default>;
149
150				max20024_default: pinmux {
151					gpio0 {
152						pins = "gpio0";
153						function = "gpio";
154					};
155
156					gpio1 {
157						pins = "gpio1";
158						function = "fps-out";
159						maxim,active-fps-source = <MAX77620_FPS_SRC_DEF>;
160					};
161
162					gpio2 {
163						pins = "gpio2";
164						function = "fps-out";
165						maxim,active-fps-source = <MAX77620_FPS_SRC_DEF>;
166					};
167
168					gpio3 {
169						pins = "gpio3";
170						function = "fps-out";
171						maxim,active-fps-source = <MAX77620_FPS_SRC_DEF>;
172					};
173
174					gpio4 {
175						pins = "gpio4";
176						function = "32k-out1";
177						drive-push-pull = <1>;
178					};
179
180					gpio6 {
181						pins = "gpio6";
182						function = "gpio";
183						drive-push-pull = <1>;
184					};
185
186					gpio7 {
187						pins = "gpio7";
188						function = "gpio";
189						drive-push-pull = <0>;
190					};
191				};
192
193				fps {
194					fps0 {
195						maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
196						maxim,shutdown-fps-time-period-us = <640>;
197					};
198
199					fps1 {
200						maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
201						maxim,shutdown-fps-time-period-us = <640>;
202						maxim,device-state-on-disabled-event = <MAX77620_FPS_INACTIVE_STATE_SLEEP>;
203					};
204
205					fps2 {
206						maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
207						maxim,shutdown-fps-time-period-us = <640>;
208					};
209				};
210
211				regulators {
212					in-sd0-supply = <&vdd_5v0_sys>;
213					in-sd1-supply = <&vdd_5v0_sys>;
214					in-sd2-supply = <&vdd_5v0_sys>;
215					in-sd3-supply = <&vdd_5v0_sys>;
216					in-sd4-supply = <&vdd_5v0_sys>;
217
218					in-ldo0-1-supply = <&vdd_5v0_sys>;
219					in-ldo2-supply = <&vdd_5v0_sys>;
220					in-ldo3-5-supply = <&vdd_5v0_sys>;
221					in-ldo4-6-supply = <&vdd_5v0_sys>;
222					in-ldo7-8-supply = <&vdd_1v8ls>;
223
224					vdd_1v0: sd0 {
225						regulator-name = "VDDIO_SYS_1V0";
226						regulator-min-microvolt = <1000000>;
227						regulator-max-microvolt = <1000000>;
228						regulator-always-on;
229						regulator-boot-on;
230					};
231
232					vdd_1v8hs: sd1 {
233						regulator-name = "VDDIO_SYS_1V8HS";
234						regulator-min-microvolt = <1800000>;
235						regulator-max-microvolt = <1800000>;
236						regulator-always-on;
237						regulator-boot-on;
238					};
239
240					vdd_1v8ls: sd2 {
241						regulator-name = "VDDIO_SYS_1V8LS";
242						regulator-min-microvolt = <1800000>;
243						regulator-max-microvolt = <1800000>;
244						regulator-always-on;
245						regulator-boot-on;
246					};
247
248					vdd_1v8ao: sd3 {
249						regulator-name = "VDDIO_AO_1V8";
250						regulator-min-microvolt = <1800000>;
251						regulator-max-microvolt = <1800000>;
252						regulator-always-on;
253						regulator-boot-on;
254					};
255
256					sd4 {
257						regulator-name = "VDD_DDR_1V1";
258						regulator-min-microvolt = <1100000>;
259						regulator-max-microvolt = <1100000>;
260						regulator-always-on;
261						regulator-boot-on;
262					};
263
264					ldo0 {
265						regulator-name = "VDD_RTC";
266						regulator-min-microvolt = <800000>;
267						regulator-max-microvolt = <800000>;
268						regulator-always-on;
269						regulator-boot-on;
270					};
271
272					ldo2 {
273						regulator-name = "VDDIO_AO_3V3";
274						regulator-min-microvolt = <3300000>;
275						regulator-max-microvolt = <3300000>;
276						regulator-always-on;
277						regulator-boot-on;
278					};
279
280					vdd_emmc_3v3: ldo3 {
281						regulator-name = "VDD_EMMC_3V3";
282						regulator-min-microvolt = <3300000>;
283						regulator-max-microvolt = <3300000>;
284					};
285
286					vdd_usb_3v3: ldo5 {
287						regulator-name = "VDD_USB_3V3";
288						regulator-min-microvolt = <3300000>;
289						regulator-max-microvolt = <3300000>;
290					};
291
292					ldo6 {
293						regulator-name = "VDD_SDIO_3V3";
294						regulator-min-microvolt = <3300000>;
295						regulator-max-microvolt = <3300000>;
296					};
297
298					ldo7 {
299						regulator-name = "AVDD_CSI_1V2";
300						regulator-min-microvolt = <1200000>;
301						regulator-max-microvolt = <1200000>;
302					};
303				};
304			};
305
306			temperature-sensor@4c {
307				compatible = "ti,tmp451";
308				reg = <0x4c>;
309
310				interrupt-parent = <&gpio>;
311				interrupts = <TEGRA194_MAIN_GPIO(H, 2)
312					      IRQ_TYPE_EDGE_FALLING>;
313				vcc-supply = <&vdd_1v8ls>;
314
315				#thermal-sensor-cells = <1>;
316			};
317		};
318	};
319
320	vdd_5v0_sys: regulator@0 {
321		compatible = "regulator-fixed";
322		regulator-name = "VIN_SYS_5V0";
323		regulator-min-microvolt = <5000000>;
324		regulator-max-microvolt = <5000000>;
325		regulator-always-on;
326		regulator-boot-on;
327	};
328
329	vdd_hdmi: regulator@1 {
330		compatible = "regulator-fixed";
331		regulator-name = "VDD_5V0_HDMI_CON";
332		regulator-min-microvolt = <5000000>;
333		regulator-max-microvolt = <5000000>;
334		gpio = <&gpio TEGRA194_MAIN_GPIO(A, 3) GPIO_ACTIVE_HIGH>;
335		enable-active-high;
336	};
337
338	vdd_3v3_pcie: regulator@2 {
339		compatible = "regulator-fixed";
340		regulator-name = "PEX_3V3";
341		regulator-min-microvolt = <3300000>;
342		regulator-max-microvolt = <3300000>;
343		gpio = <&gpio TEGRA194_MAIN_GPIO(Z, 2) GPIO_ACTIVE_HIGH>;
344		regulator-boot-on;
345		enable-active-high;
346	};
347
348	vdd_12v_pcie: regulator@3 {
349		compatible = "regulator-fixed";
350		regulator-name = "VDD_12V";
351		regulator-min-microvolt = <1200000>;
352		regulator-max-microvolt = <1200000>;
353		gpio = <&gpio TEGRA194_MAIN_GPIO(A, 1) GPIO_ACTIVE_HIGH>;
354		regulator-boot-on;
355	};
356
357	vdd_5v_sata: regulator@4 {
358		compatible = "regulator-fixed";
359		regulator-name = "VDD_5V_SATA";
360		regulator-min-microvolt = <5000000>;
361		regulator-max-microvolt = <5000000>;
362		gpio = <&gpio TEGRA194_MAIN_GPIO(Z, 1) GPIO_ACTIVE_HIGH>;
363		enable-active-high;
364	};
365};
366