xref: /linux/arch/arm64/boot/dts/nvidia/tegra234-p3737-0000+p3701.dtsi (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1// SPDX-License-Identifier: GPL-2.0
2
3#include <dt-bindings/clock/tegra234-clock.h>
4#include <dt-bindings/gpio/tegra234-gpio.h>
5#include <dt-bindings/input/linux-event-codes.h>
6#include <dt-bindings/input/gpio-keys.h>
7#include <dt-bindings/sound/rt5640.h>
8
9/ {
10	aliases {
11		serial0 = &tcu;
12		serial1 = &uarta;
13	};
14
15	chosen {
16		bootargs = "console=ttyTCU0,115200n8";
17		stdout-path = "serial0:115200n8";
18	};
19
20	bus@0 {
21		aconnect@2900000 {
22			ahub@2900800 {
23				i2s@2901000 {
24					ports {
25						port@1 {
26							endpoint {
27								dai-format = "i2s";
28								remote-endpoint = <&rt5640_ep>;
29							};
30						};
31					};
32				};
33			};
34		};
35
36		serial@3100000 {
37			compatible = "nvidia,tegra194-hsuart";
38			reset-names = "serial";
39			status = "okay";
40		};
41
42		i2c@3160000 {
43			status = "okay";
44
45			eeprom@56 {
46				compatible = "atmel,24c02";
47				reg = <0x56>;
48
49				label = "system";
50				vcc-supply = <&vdd_1v8_sys>;
51				address-width = <8>;
52				pagesize = <8>;
53				size = <256>;
54				read-only;
55			};
56		};
57
58		serial@31d0000 {
59			current-speed = <115200>;
60			status = "okay";
61		};
62
63		i2c@31e0000 {
64			status = "okay";
65
66			audio-codec@1c {
67				compatible = "realtek,rt5640";
68				reg = <0x1c>;
69				interrupt-parent = <&gpio>;
70				interrupts = <TEGRA234_MAIN_GPIO(AC, 5) GPIO_ACTIVE_HIGH>;
71				clocks = <&bpmp TEGRA234_CLK_AUD_MCLK>;
72				clock-names = "mclk";
73				realtek,dmic1-data-pin = <RT5640_DMIC1_DATA_PIN_NONE>;
74				realtek,dmic2-data-pin = <RT5640_DMIC2_DATA_PIN_NONE>;
75				realtek,jack-detect-source = <RT5640_JD_SRC_HDA_HEADER>;
76				sound-name-prefix = "CVB-RT";
77
78				port {
79					rt5640_ep: endpoint {
80						remote-endpoint = <&i2s1_dap>;
81						mclk-fs = <256>;
82					};
83				};
84			};
85		};
86
87		pwm@3280000 {
88			status = "okay";
89		};
90
91		pwm@32a0000 {
92			assigned-clocks = <&bpmp TEGRA234_CLK_PWM3>;
93			assigned-clock-parents = <&bpmp TEGRA234_CLK_PLLP_OUT0>;
94			status = "okay";
95		};
96
97		pwm@32c0000 {
98			status = "okay";
99		};
100
101		pwm@32f0000 {
102			status = "okay";
103		};
104
105		mmc@3400000 {
106			status = "okay";
107			bus-width = <4>;
108			cd-gpios = <&gpio TEGRA234_MAIN_GPIO(G, 7) GPIO_ACTIVE_LOW>;
109			disable-wp;
110		};
111
112		hda@3510000 {
113			nvidia,model = "NVIDIA Jetson AGX Orin HDA";
114			status = "okay";
115		};
116
117		padctl@3520000 {
118			status = "okay";
119
120			pads {
121				usb2 {
122					lanes {
123						usb2-0 {
124							status = "okay";
125						};
126
127						usb2-1 {
128							status = "okay";
129						};
130
131						usb2-2 {
132							status = "okay";
133						};
134
135						usb2-3 {
136							status = "okay";
137						};
138					};
139				};
140
141				usb3 {
142					lanes {
143						usb3-0 {
144							status = "okay";
145						};
146
147						usb3-1 {
148							status = "okay";
149						};
150
151						usb3-2 {
152							status = "okay";
153						};
154					};
155				};
156			};
157
158			ports {
159				usb2-0 {
160					mode = "otg";
161					usb-role-switch;
162					status = "okay";
163
164					port {
165						hs_typec_p1: endpoint {
166							remote-endpoint = <&hs_ucsi_ccg_p1>;
167						};
168					};
169				};
170
171				usb2-1 {
172					mode = "host";
173					status = "okay";
174
175					port {
176						hs_typec_p0: endpoint {
177							remote-endpoint = <&hs_ucsi_ccg_p0>;
178						};
179					};
180				};
181
182				usb2-2 {
183					mode = "host";
184					status = "okay";
185				};
186
187				usb2-3 {
188					mode = "host";
189					status = "okay";
190				};
191
192				usb3-0 {
193					nvidia,usb2-companion = <1>;
194					status = "okay";
195
196					port {
197						ss_typec_p0: endpoint {
198							remote-endpoint = <&ss_ucsi_ccg_p0>;
199						};
200					};
201				};
202
203				usb3-1 {
204					nvidia,usb2-companion = <0>;
205					status = "okay";
206
207					port {
208						ss_typec_p1: endpoint {
209							remote-endpoint = <&ss_ucsi_ccg_p1>;
210						};
211					};
212				};
213
214				usb3-2 {
215					nvidia,usb2-companion = <3>;
216					status = "okay";
217				};
218			};
219		};
220
221		usb@3550000 {
222			status = "okay";
223
224			phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>,
225			       <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>;
226			phy-names = "usb2-0", "usb3-0";
227		};
228
229		usb@3610000 {
230			status = "okay";
231
232			phys = <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-0}>,
233			       <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-1}>,
234			       <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-2}>,
235			       <&{/bus@0/padctl@3520000/pads/usb2/lanes/usb2-3}>,
236			       <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-0}>,
237			       <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-1}>,
238			       <&{/bus@0/padctl@3520000/pads/usb3/lanes/usb3-2}>;
239			phy-names = "usb2-0", "usb2-1", "usb2-2", "usb2-3",
240				    "usb3-0", "usb3-1", "usb3-2";
241		};
242
243		ethernet@6800000 {
244			status = "okay";
245
246			phy-handle = <&mgbe0_phy>;
247			phy-mode = "10gbase-r";
248
249			mdio {
250				#address-cells = <1>;
251				#size-cells = <0>;
252
253				mgbe0_phy: phy@0 {
254					compatible = "ethernet-phy-ieee802.3-c45";
255					reg = <0x0>;
256
257					#phy-cells = <0>;
258				};
259			};
260		};
261
262		i2c@c240000 {
263			status = "okay";
264
265			typec@8 {
266				compatible = "cypress,cypd4226";
267				reg = <0x08>;
268				interrupt-parent = <&gpio>;
269				interrupts = <TEGRA234_MAIN_GPIO(Y, 4) IRQ_TYPE_LEVEL_LOW>;
270				firmware-name = "nvidia,jetson-agx-xavier";
271				status = "okay";
272
273				#address-cells = <1>;
274				#size-cells = <0>;
275
276				ccg_typec_con0: connector@0 {
277					compatible = "usb-c-connector";
278					reg = <0>;
279					label = "USB-C";
280					data-role = "host";
281
282					ports {
283						#address-cells = <1>;
284						#size-cells = <0>;
285
286						port@0 {
287							reg = <0>;
288
289							hs_ucsi_ccg_p0: endpoint {
290								remote-endpoint = <&hs_typec_p0>;
291							};
292						};
293
294						port@1 {
295							reg = <1>;
296
297							ss_ucsi_ccg_p0: endpoint {
298								remote-endpoint = <&ss_typec_p0>;
299							};
300						};
301					};
302				};
303
304				ccg_typec_con1: connector@1 {
305					compatible = "usb-c-connector";
306					reg = <1>;
307					label = "USB-C";
308					data-role = "dual";
309
310					ports {
311						#address-cells = <1>;
312						#size-cells = <0>;
313
314						port@0 {
315							reg = <0>;
316
317							hs_ucsi_ccg_p1: endpoint {
318								remote-endpoint = <&hs_typec_p1>;
319							};
320						};
321
322						port@1 {
323							reg = <1>;
324
325							ss_ucsi_ccg_p1: endpoint {
326								remote-endpoint = <&ss_typec_p1>;
327							};
328						};
329					};
330				};
331			};
332		};
333
334		pcie@14100000 {
335			status = "okay";
336
337			vddio-pex-ctl-supply = <&vdd_1v8_ao>;
338
339			phys = <&p2u_hsio_3>;
340			phy-names = "p2u-0";
341		};
342
343		pcie@14160000 {
344			status = "okay";
345
346			vddio-pex-ctl-supply = <&vdd_1v8_ao>;
347
348			phys = <&p2u_hsio_4>, <&p2u_hsio_5>, <&p2u_hsio_6>,
349			       <&p2u_hsio_7>;
350			phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3";
351		};
352
353		pcie@141a0000 {
354			status = "okay";
355
356			vddio-pex-ctl-supply = <&vdd_1v8_ls>;
357			vpcie3v3-supply = <&vdd_3v3_pcie>;
358			vpcie12v-supply = <&vdd_12v_pcie>;
359
360			phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
361			       <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
362			       <&p2u_nvhs_6>, <&p2u_nvhs_7>;
363			phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
364				    "p2u-5", "p2u-6", "p2u-7";
365		};
366
367		pcie-ep@141a0000 {
368			status = "disabled";
369
370			vddio-pex-ctl-supply = <&vdd_1v8_ls>;
371
372			reset-gpios = <&gpio TEGRA234_MAIN_GPIO(AF, 1) GPIO_ACTIVE_LOW>;
373
374			nvidia,refclk-select-gpios = <&gpio_aon
375						      TEGRA234_AON_GPIO(AA, 4)
376						      GPIO_ACTIVE_HIGH>;
377
378			phys = <&p2u_nvhs_0>, <&p2u_nvhs_1>, <&p2u_nvhs_2>,
379			       <&p2u_nvhs_3>, <&p2u_nvhs_4>, <&p2u_nvhs_5>,
380			       <&p2u_nvhs_6>, <&p2u_nvhs_7>;
381			phy-names = "p2u-0", "p2u-1", "p2u-2", "p2u-3", "p2u-4",
382				    "p2u-5", "p2u-6", "p2u-7";
383		};
384	};
385
386	gpio-keys {
387		compatible = "gpio-keys";
388		status = "okay";
389
390		key-force-recovery {
391			label = "Force Recovery";
392			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 0) GPIO_ACTIVE_LOW>;
393			linux,input-type = <EV_KEY>;
394			linux,code = <BTN_1>;
395		};
396
397		key-power {
398			label = "Power";
399			gpios = <&gpio_aon TEGRA234_AON_GPIO(EE, 4) GPIO_ACTIVE_LOW>;
400			linux,input-type = <EV_KEY>;
401			linux,code = <KEY_POWER>;
402			wakeup-event-action = <EV_ACT_ASSERTED>;
403			wakeup-source;
404		};
405
406		key-suspend {
407			label = "Suspend";
408			gpios = <&gpio TEGRA234_MAIN_GPIO(G, 2) GPIO_ACTIVE_LOW>;
409			linux,input-type = <EV_KEY>;
410			linux,code = <KEY_SLEEP>;
411		};
412	};
413
414	fan: pwm-fan {
415		compatible = "pwm-fan";
416		cooling-levels = <66 215 255>;
417		pwms = <&pwm3 0 45334>;
418		#cooling-cells = <2>;
419	};
420
421	serial {
422		status = "okay";
423	};
424
425	sound {
426		compatible = "nvidia,tegra186-audio-graph-card";
427		status = "okay";
428
429		dais = /* ADMAIF (FE) Ports */
430		       <&admaif0_port>, <&admaif1_port>, <&admaif2_port>, <&admaif3_port>,
431		       <&admaif4_port>, <&admaif5_port>, <&admaif6_port>, <&admaif7_port>,
432		       <&admaif8_port>, <&admaif9_port>, <&admaif10_port>, <&admaif11_port>,
433		       <&admaif12_port>, <&admaif13_port>, <&admaif14_port>, <&admaif15_port>,
434		       <&admaif16_port>, <&admaif17_port>, <&admaif18_port>, <&admaif19_port>,
435		       /* XBAR Ports */
436		       <&xbar_i2s1_port>, <&xbar_i2s2_port>, <&xbar_i2s4_port>,
437		       <&xbar_i2s6_port>, <&xbar_dmic3_port>,
438		       <&xbar_sfc1_in_port>, <&xbar_sfc2_in_port>,
439		       <&xbar_sfc3_in_port>, <&xbar_sfc4_in_port>,
440		       <&xbar_mvc1_in_port>, <&xbar_mvc2_in_port>,
441		       <&xbar_amx1_in1_port>, <&xbar_amx1_in2_port>,
442		       <&xbar_amx1_in3_port>, <&xbar_amx1_in4_port>,
443		       <&xbar_amx2_in1_port>, <&xbar_amx2_in2_port>,
444		       <&xbar_amx2_in3_port>, <&xbar_amx2_in4_port>,
445		       <&xbar_amx3_in1_port>, <&xbar_amx3_in2_port>,
446		       <&xbar_amx3_in3_port>, <&xbar_amx3_in4_port>,
447		       <&xbar_amx4_in1_port>, <&xbar_amx4_in2_port>,
448		       <&xbar_amx4_in3_port>, <&xbar_amx4_in4_port>,
449		       <&xbar_adx1_in_port>, <&xbar_adx2_in_port>,
450		       <&xbar_adx3_in_port>, <&xbar_adx4_in_port>,
451		       <&xbar_mix_in1_port>, <&xbar_mix_in2_port>,
452		       <&xbar_mix_in3_port>, <&xbar_mix_in4_port>,
453		       <&xbar_mix_in5_port>, <&xbar_mix_in6_port>,
454		       <&xbar_mix_in7_port>, <&xbar_mix_in8_port>,
455		       <&xbar_mix_in9_port>, <&xbar_mix_in10_port>,
456		       <&xbar_asrc_in1_port>, <&xbar_asrc_in2_port>,
457		       <&xbar_asrc_in3_port>, <&xbar_asrc_in4_port>,
458		       <&xbar_asrc_in5_port>, <&xbar_asrc_in6_port>,
459		       <&xbar_asrc_in7_port>,
460		       <&xbar_ope1_in_port>,
461		       /* HW accelerators */
462		       <&sfc1_out_port>, <&sfc2_out_port>,
463		       <&sfc3_out_port>, <&sfc4_out_port>,
464		       <&mvc1_out_port>, <&mvc2_out_port>,
465		       <&amx1_out_port>, <&amx2_out_port>,
466		       <&amx3_out_port>, <&amx4_out_port>,
467		       <&adx1_out1_port>, <&adx1_out2_port>,
468		       <&adx1_out3_port>, <&adx1_out4_port>,
469		       <&adx2_out1_port>, <&adx2_out2_port>,
470		       <&adx2_out3_port>, <&adx2_out4_port>,
471		       <&adx3_out1_port>, <&adx3_out2_port>,
472		       <&adx3_out3_port>, <&adx3_out4_port>,
473		       <&adx4_out1_port>, <&adx4_out2_port>,
474		       <&adx4_out3_port>, <&adx4_out4_port>,
475		       <&mix_out1_port>, <&mix_out2_port>, <&mix_out3_port>,
476		       <&mix_out4_port>, <&mix_out5_port>,
477		       <&asrc_out1_port>, <&asrc_out2_port>, <&asrc_out3_port>,
478		       <&asrc_out4_port>, <&asrc_out5_port>, <&asrc_out6_port>,
479		       <&ope1_out_port>,
480		       /* BE I/O Ports */
481		       <&i2s1_port>, <&i2s2_port>, <&i2s4_port>, <&i2s6_port>,
482		       <&dmic3_port>;
483
484		label = "NVIDIA Jetson AGX Orin APE";
485
486		widgets = "Microphone",	"CVB-RT MIC Jack",
487			  "Microphone",	"CVB-RT MIC",
488			  "Headphone",	"CVB-RT HP Jack",
489			  "Speaker",	"CVB-RT SPK";
490
491		routing = /* I2S1 <-> RT5640 */
492			  "CVB-RT AIF1 Playback",	"I2S1 DAP-Playback",
493			  "I2S1 DAP-Capture",		"CVB-RT AIF1 Capture",
494			  /* RT5640 codec controls */
495			  "CVB-RT HP Jack",		"CVB-RT HPOL",
496			  "CVB-RT HP Jack",		"CVB-RT HPOR",
497			  "CVB-RT IN1P",		"CVB-RT MIC Jack",
498			  "CVB-RT IN2P",		"CVB-RT MIC Jack",
499			  "CVB-RT SPK",			"CVB-RT SPOLP",
500			  "CVB-RT SPK",			"CVB-RT SPORP",
501			  "CVB-RT DMIC1",		"CVB-RT MIC",
502			  "CVB-RT DMIC2",		"CVB-RT MIC";
503	};
504
505	thermal-zones {
506		tj-thermal {
507			cooling-maps {
508				map-active-0 {
509					cooling-device = <&fan 0 1>;
510					trip = <&tj_trip_active0>;
511				};
512
513				map-active-1 {
514					cooling-device = <&fan 1 2>;
515					trip = <&tj_trip_active1>;
516				};
517			};
518		};
519	};
520
521	vdd_1v8_sys: regulator-vdd-1v8-sys {
522		compatible = "regulator-fixed";
523		regulator-name = "VDD_1V8_SYS";
524		regulator-min-microvolt = <1800000>;
525		regulator-max-microvolt = <1800000>;
526		regulator-always-on;
527	};
528
529	vdd_3v3_pcie: regulator-vdd-3v3-pcie {
530		compatible = "regulator-fixed";
531		regulator-name = "VDD_3V3_PCIE";
532		regulator-min-microvolt = <3300000>;
533		regulator-max-microvolt = <3300000>;
534		gpio = <&gpio TEGRA234_MAIN_GPIO(H, 4) GPIO_ACTIVE_HIGH>;
535		regulator-boot-on;
536		enable-active-high;
537	};
538
539	vdd_12v_pcie: regulator-vdd-12v-pcie {
540		compatible = "regulator-fixed";
541		regulator-name = "VDD_12V_PCIE";
542		regulator-min-microvolt = <12000000>;
543		regulator-max-microvolt = <12000000>;
544		gpio = <&gpio TEGRA234_MAIN_GPIO(A, 1) GPIO_ACTIVE_LOW>;
545		regulator-boot-on;
546	};
547};
548