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