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 Xavier NX";
8	compatible = "nvidia,p3668-0000", "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		rtc0 = "/bpmp/i2c/pmic@3c";
22		rtc1 = "/bus@0/rtc@c2a0000";
23		serial0 = &tcu;
24	};
25
26	chosen {
27		bootargs = "console=ttyS0,115200n8";
28		stdout-path = "serial0:115200n8";
29	};
30
31	bus@0 {
32		ethernet@2490000 {
33			status = "okay";
34
35			phy-reset-gpios = <&gpio TEGRA194_MAIN_GPIO(R, 1) GPIO_ACTIVE_LOW>;
36			phy-handle = <&phy>;
37			phy-mode = "rgmii-id";
38
39			mdio {
40				#address-cells = <1>;
41				#size-cells = <0>;
42
43				phy: phy@0 {
44					compatible = "ethernet-phy-ieee802.3-c22";
45					reg = <0x0>;
46					interrupt-parent = <&gpio>;
47					interrupts = <TEGRA194_MAIN_GPIO(G, 4) IRQ_TYPE_LEVEL_LOW>;
48					#phy-cells = <0>;
49				};
50			};
51		};
52
53		memory-controller@2c00000 {
54			status = "okay";
55		};
56
57		serial@3100000 {
58			status = "okay";
59		};
60
61		i2c@3160000 {
62			status = "okay";
63
64			eeprom@50 {
65				compatible = "atmel,24c02";
66				reg = <0x50>;
67
68				label = "module";
69				vcc-supply = <&vdd_1v8ls>;
70				address-width = <8>;
71				pagesize = <8>;
72				size = <256>;
73				read-only;
74			};
75		};
76
77		/* SDMMC1 (SD/MMC) */
78		mmc@3400000 {
79			status = "okay";
80			bus-width = <4>;
81			cd-gpios = <&gpio TEGRA194_MAIN_GPIO(G, 7) GPIO_ACTIVE_LOW>;
82			disable-wp;
83			vmmc-supply = <&vdd_3v3_sd>;
84		};
85
86		padctl@3520000 {
87			avdd-usb-supply = <&vdd_usb_3v3>;
88			vclamp-usb-supply = <&vdd_1v8ao>;
89
90			ports {
91				usb2-1 {
92					vbus-supply = <&vdd_5v0_sys>;
93				};
94
95				usb2-3 {
96					vbus-supply = <&vdd_5v0_sys>;
97				};
98
99				usb3-0 {
100					vbus-supply = <&vdd_5v0_sys>;
101				};
102
103				usb3-3 {
104					vbus-supply = <&vdd_5v0_sys>;
105				};
106			};
107		};
108
109		rtc@c2a0000 {
110			status = "okay";
111		};
112
113		pmc@c360000 {
114			nvidia,invert-interrupt;
115		};
116	};
117
118	bpmp {
119		i2c {
120			status = "okay";
121
122			pmic: pmic@3c {
123				compatible = "maxim,max20024";
124				reg = <0x3c>;
125
126				interrupt-parent = <&pmc>;
127				interrupts = <24 IRQ_TYPE_LEVEL_LOW>;
128				#interrupt-cells = <2>;
129				interrupt-controller;
130
131				#gpio-cells = <2>;
132				gpio-controller;
133
134				pinctrl-names = "default";
135				pinctrl-0 = <&max20024_default>;
136
137				max20024_default: pinmux {
138					gpio0 {
139						pins = "gpio0";
140						function = "gpio";
141					};
142
143					gpio1 {
144						pins = "gpio1";
145						function = "fps-out";
146						maxim,active-fps-source = <MAX77620_FPS_SRC_DEF>;
147					};
148
149					gpio2 {
150						pins = "gpio2";
151						function = "fps-out";
152						maxim,active-fps-source = <MAX77620_FPS_SRC_DEF>;
153					};
154
155					gpio3 {
156						pins = "gpio3";
157						function = "fps-out";
158						maxim,active-fps-source = <MAX77620_FPS_SRC_DEF>;
159					};
160
161					gpio4 {
162						pins = "gpio4";
163						function = "32k-out1";
164						drive-push-pull = <1>;
165					};
166
167					gpio6 {
168						pins = "gpio6";
169						function = "gpio";
170						drive-push-pull = <1>;
171					};
172
173					gpio7 {
174						pins = "gpio7";
175						function = "gpio";
176						drive-push-pull = <0>;
177					};
178				};
179
180				fps {
181					fps0 {
182						maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
183						maxim,shutdown-fps-time-period-us = <640>;
184					};
185
186					fps1 {
187						maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN1>;
188						maxim,shutdown-fps-time-period-us = <640>;
189						maxim,device-state-on-disabled-event = <MAX77620_FPS_INACTIVE_STATE_SLEEP>;
190					};
191
192					fps2 {
193						maxim,fps-event-source = <MAX77620_FPS_EVENT_SRC_EN0>;
194						maxim,shutdown-fps-time-period-us = <640>;
195					};
196				};
197
198				regulators {
199					in-sd0-supply = <&vdd_5v0_sys>;
200					in-sd1-supply = <&vdd_5v0_sys>;
201					in-sd2-supply = <&vdd_5v0_sys>;
202					in-sd3-supply = <&vdd_5v0_sys>;
203					in-sd4-supply = <&vdd_5v0_sys>;
204
205					in-ldo0-1-supply = <&vdd_5v0_sys>;
206					in-ldo2-supply = <&vdd_5v0_sys>;
207					in-ldo3-5-supply = <&vdd_5v0_sys>;
208					in-ldo4-6-supply = <&vdd_5v0_sys>;
209					in-ldo7-8-supply = <&vdd_1v8ls>;
210
211					vdd_1v0: sd0 {
212						regulator-name = "VDDIO_SYS_1V0";
213						regulator-min-microvolt = <1000000>;
214						regulator-max-microvolt = <1000000>;
215						regulator-always-on;
216						regulator-boot-on;
217					};
218
219					vdd_1v8hs: sd1 {
220						regulator-name = "VDDIO_SYS_1V8HS";
221						regulator-min-microvolt = <1800000>;
222						regulator-max-microvolt = <1800000>;
223						regulator-always-on;
224						regulator-boot-on;
225					};
226
227					vdd_1v8ls: sd2 {
228						regulator-name = "VDDIO_SYS_1V8LS";
229						regulator-min-microvolt = <1800000>;
230						regulator-max-microvolt = <1800000>;
231						regulator-always-on;
232						regulator-boot-on;
233					};
234
235					vdd_1v8ao: sd3 {
236						regulator-name = "VDDIO_AO_1V8";
237						regulator-min-microvolt = <1800000>;
238						regulator-max-microvolt = <1800000>;
239						regulator-always-on;
240						regulator-boot-on;
241					};
242
243					sd4 {
244						regulator-name = "VDD_DDR_1V1";
245						regulator-min-microvolt = <1100000>;
246						regulator-max-microvolt = <1100000>;
247						regulator-always-on;
248						regulator-boot-on;
249					};
250
251					ldo0 {
252						regulator-name = "VDD_RTC";
253						regulator-min-microvolt = <800000>;
254						regulator-max-microvolt = <800000>;
255						regulator-always-on;
256						regulator-boot-on;
257					};
258
259					ldo2 {
260						regulator-name = "VDDIO_AO_3V3";
261						regulator-min-microvolt = <3300000>;
262						regulator-max-microvolt = <3300000>;
263						regulator-always-on;
264						regulator-boot-on;
265					};
266
267					ldo3 {
268						regulator-name = "VDD_EMMC_3V3";
269						regulator-min-microvolt = <3300000>;
270						regulator-max-microvolt = <3300000>;
271					};
272
273					vdd_usb_3v3: ldo5 {
274						regulator-name = "VDD_USB_3V3";
275						regulator-min-microvolt = <3300000>;
276						regulator-max-microvolt = <3300000>;
277						regulator-always-on;
278						regulator-boot-on;
279					};
280
281					ldo6 {
282						regulator-name = "VDD_SDIO_3V3";
283						regulator-min-microvolt = <3300000>;
284						regulator-max-microvolt = <3300000>;
285					};
286
287					ldo7 {
288						regulator-name = "AVDD_CSI_1V2";
289						regulator-min-microvolt = <1200000>;
290						regulator-max-microvolt = <1200000>;
291					};
292				};
293			};
294		};
295	};
296
297	vdd_3v3_sd: regulator@0 {
298		compatible = "regulator-fixed";
299		regulator-name = "VDD_3V3_SD";
300		regulator-min-microvolt = <3300000>;
301		regulator-max-microvolt = <3300000>;
302		gpio = <&gpio TEGRA194_MAIN_GPIO(G, 2) GPIO_ACTIVE_HIGH>;
303		regulator-boot-on;
304		enable-active-high;
305	};
306};
307