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