xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3588-nanopc-t6.dtsi (revision 69ed3df4f588860308677cda76cbcce1f19a54c9)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2023 Thomas McKahan
5 *
6 */
7
8/dts-v1/;
9
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/pinctrl/rockchip.h>
13#include <dt-bindings/soc/rockchip,vop2.h>
14#include <dt-bindings/thermal/thermal.h>
15#include <dt-bindings/usb/pd.h>
16#include "rk3588.dtsi"
17
18/ {
19	model = "FriendlyElec NanoPC-T6";
20	compatible = "friendlyarm,nanopc-t6", "rockchip,rk3588";
21
22	aliases {
23		mmc0 = &sdhci;
24		mmc1 = &sdmmc;
25	};
26
27	adc-keys-0 {
28		compatible = "adc-keys";
29		io-channels = <&saradc 0>;
30		io-channel-names = "buttons";
31		keyup-threshold-microvolt = <1800000>;
32		poll-interval = <100>;
33
34		button-maskrom {
35			label = "Mask Rom";
36			linux,code = <KEY_SETUP>;
37			press-threshold-microvolt = <2000>;
38		};
39	};
40
41	chosen {
42		stdout-path = "serial2:1500000n8";
43	};
44
45	hdmi0-con {
46		compatible = "hdmi-connector";
47		type = "a";
48
49		port {
50			hdmi0_con_in: endpoint {
51				remote-endpoint = <&hdmi0_out_con>;
52			};
53		};
54	};
55
56	hdmi1-con {
57		compatible = "hdmi-connector";
58		type = "a";
59
60		port {
61			hdmi1_con_in: endpoint {
62				remote-endpoint = <&hdmi1_out_con>;
63			};
64		};
65	};
66
67	ir-receiver {
68		compatible = "gpio-ir-receiver";
69		gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_LOW>;
70		pinctrl-names = "default";
71		pinctrl-0 = <&ir_receiver_pin>;
72	};
73
74	leds {
75		compatible = "gpio-leds";
76
77		sys_led: led-0 {
78			gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
79			label = "system-led";
80			linux,default-trigger = "heartbeat";
81			pinctrl-names = "default";
82			pinctrl-0 = <&sys_led_pin>;
83		};
84
85		usr_led: led-1 {
86			gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
87			label = "user-led";
88			pinctrl-names = "default";
89			pinctrl-0 = <&usr_led_pin>;
90		};
91	};
92
93	fan: pwm-fan {
94		compatible = "pwm-fan";
95		cooling-levels = <0 35 64 100 150 255>;
96		fan-supply = <&vcc5v0_sys>;
97		pwms = <&pwm1 0 50000 0>;
98		#cooling-cells = <2>;
99	};
100
101	sound {
102		compatible = "simple-audio-card";
103		pinctrl-names = "default";
104		pinctrl-0 = <&hp_det>;
105
106		simple-audio-card,name = "realtek,rt5616-codec";
107		simple-audio-card,format = "i2s";
108		simple-audio-card,mclk-fs = <256>;
109
110		simple-audio-card,hp-det-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_LOW>;
111
112		simple-audio-card,widgets =
113			"Headphone", "Headphones",
114			"Microphone", "Microphone Jack";
115		simple-audio-card,routing =
116			"Headphones", "HPOL",
117			"Headphones", "HPOR",
118			"MIC1", "Microphone Jack",
119			"Microphone Jack", "micbias1";
120
121		simple-audio-card,cpu {
122			sound-dai = <&i2s0_8ch>;
123		};
124		simple-audio-card,codec {
125			sound-dai = <&rt5616>;
126		};
127	};
128
129	vcc12v_dcin: regulator-vcc12v-dcin {
130		compatible = "regulator-fixed";
131		regulator-name = "vcc12v_dcin";
132		regulator-always-on;
133		regulator-boot-on;
134		regulator-min-microvolt = <12000000>;
135		regulator-max-microvolt = <12000000>;
136	};
137
138	/* vcc5v0_sys powers peripherals */
139	vcc5v0_sys: regulator-vcc5v0-sys {
140		compatible = "regulator-fixed";
141		regulator-name = "vcc5v0_sys";
142		regulator-always-on;
143		regulator-boot-on;
144		regulator-min-microvolt = <5000000>;
145		regulator-max-microvolt = <5000000>;
146		vin-supply = <&vcc12v_dcin>;
147	};
148
149	/* vcc4v0_sys powers the RK806, RK860's */
150	vcc4v0_sys: regulator-vcc4v0-sys {
151		compatible = "regulator-fixed";
152		regulator-name = "vcc4v0_sys";
153		regulator-always-on;
154		regulator-boot-on;
155		regulator-min-microvolt = <4000000>;
156		regulator-max-microvolt = <4000000>;
157		vin-supply = <&vcc12v_dcin>;
158	};
159
160	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
161		compatible = "regulator-fixed";
162		regulator-name = "vcc-1v1-nldo-s3";
163		regulator-always-on;
164		regulator-boot-on;
165		regulator-min-microvolt = <1100000>;
166		regulator-max-microvolt = <1100000>;
167		vin-supply = <&vcc4v0_sys>;
168	};
169
170	vcc_3v3_pcie20: regulator-vcc3v3-pcie20 {
171		compatible = "regulator-fixed";
172		regulator-name = "vcc_3v3_pcie20";
173		regulator-always-on;
174		regulator-boot-on;
175		regulator-min-microvolt = <3300000>;
176		regulator-max-microvolt = <3300000>;
177		vin-supply = <&vcc_3v3_s3>;
178	};
179
180	vbus5v0_typec: regulator-vbus5v0-typec {
181		compatible = "regulator-fixed";
182		enable-active-high;
183		gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
184		pinctrl-names = "default";
185		pinctrl-0 = <&typec5v_pwren>;
186		regulator-name = "vbus5v0_typec";
187		regulator-min-microvolt = <5000000>;
188		regulator-max-microvolt = <5000000>;
189		vin-supply = <&vcc5v0_sys>;
190	};
191
192	vbus5v0_usb: regulator-vbus5v0-usb {
193		compatible = "regulator-fixed";
194		enable-active-high;
195		gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
196		pinctrl-names = "default";
197		pinctrl-0 = <&usb5v_pwren>;
198		regulator-name = "vbus5v0_usb";
199		regulator-min-microvolt = <5000000>;
200		regulator-max-microvolt = <5000000>;
201		vin-supply = <&vcc5v0_sys>;
202	};
203
204	vcc3v3_pcie2x1l0: regulator-vcc3v3-pcie2x1l0 {
205		compatible = "regulator-fixed";
206		enable-active-high;
207		gpio = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
208		pinctrl-names = "default";
209		pinctrl-0 = <&pcie_m2_1_pwren>;
210		regulator-name = "vcc3v3_pcie2x1l0";
211		regulator-min-microvolt = <3300000>;
212		regulator-max-microvolt = <3300000>;
213		vin-supply = <&vcc5v0_sys>;
214	};
215
216	vcc3v3_pcie30: regulator-vcc3v3-pcie30 {
217		compatible = "regulator-fixed";
218		enable-active-high;
219		gpios = <&gpio2 RK_PC5 GPIO_ACTIVE_HIGH>;
220		pinctrl-names = "default";
221		pinctrl-0 = <&pcie_m2_0_pwren>;
222		regulator-name = "vcc3v3_pcie30";
223		regulator-min-microvolt = <3300000>;
224		regulator-max-microvolt = <3300000>;
225		vin-supply = <&vcc5v0_sys>;
226	};
227
228	vcc3v3_sd_s0: regulator-vcc3v3-sd-s0 {
229		compatible = "regulator-fixed";
230		gpio = <&gpio4 RK_PA5 GPIO_ACTIVE_LOW>;
231		regulator-boot-on;
232		regulator-max-microvolt = <3300000>;
233		regulator-min-microvolt = <3300000>;
234		regulator-name = "vcc3v3_sd_s0";
235		vin-supply = <&vcc_3v3_s3>;
236	};
237};
238
239&combphy0_ps {
240	status = "okay";
241};
242
243&combphy1_ps {
244	status = "okay";
245};
246
247&combphy2_psu {
248	status = "okay";
249};
250
251&cpu_l0 {
252	cpu-supply = <&vdd_cpu_lit_s0>;
253};
254
255&cpu_l1 {
256	cpu-supply = <&vdd_cpu_lit_s0>;
257};
258
259&cpu_l2 {
260	cpu-supply = <&vdd_cpu_lit_s0>;
261};
262
263&cpu_l3 {
264	cpu-supply = <&vdd_cpu_lit_s0>;
265};
266
267&cpu_b0 {
268	cpu-supply = <&vdd_cpu_big0_s0>;
269};
270
271&cpu_b1 {
272	cpu-supply = <&vdd_cpu_big0_s0>;
273};
274
275&cpu_b2 {
276	cpu-supply = <&vdd_cpu_big1_s0>;
277};
278
279&cpu_b3 {
280	cpu-supply = <&vdd_cpu_big1_s0>;
281};
282
283&gpio0 {
284	gpio-line-names = /* GPIO0 A0-A7 */
285			  "", "", "", "",
286			  "", "", "", "",
287			  /* GPIO0 B0-B7 */
288			  "", "", "", "",
289			  "", "", "", "",
290			  /* GPIO0 C0-C7 */
291			  "", "", "", "",
292			  "HEADER_10", "HEADER_08", "HEADER_32", "",
293			  /* GPIO0 D0-D7 */
294			  "", "", "", "",
295			  "IR receiver [PWM3_IR_M0]", "", "", "";
296};
297
298&gpio1 {
299	gpio-line-names = /* GPIO1 A0-A7 */
300			  "HEADER_27", "HEADER_28", "", "",
301			  "", "", "", "HEADER_15",
302			  /* GPIO1 B0-B7 */
303			  "HEADER_26", "HEADER_21", "HEADER_19", "HEADER_23",
304			  "HEADER_24", "HEADER_22", "", "",
305			  /* GPIO1 C0-C7 */
306			  "", "", "", "",
307			  "", "", "", "",
308			  /* GPIO1 D0-D7 */
309			  "", "", "", "",
310			  "", "", "HEADER_05", "HEADER_03";
311};
312
313&gpio2 {
314	gpio-line-names = /* GPIO2 A0-A7 */
315			  "", "", "", "",
316			  "", "", "", "",
317			  /* GPIO2 B0-B7 */
318			  "", "", "", "",
319			  "", "", "", "",
320			  /* GPIO2 C0-C7 */
321			  "", "CSI1_11", "CSI1_12", "",
322			  "", "", "", "",
323			  /* GPIO2 D0-D7 */
324			  "", "", "", "",
325			  "", "", "", "";
326};
327
328&gpio3 {
329	gpio-line-names = /* GPIO3 A0-A7 */
330			  "HEADER_35", "HEADER_38", "HEADER_40", "HEADER_36",
331			  "HEADER_37", "", "DSI0_12", "",
332			  /* GPIO3 B0-B7 */
333			  "HEADER_33", "DSI0_10", "HEADER_07", "HEADER_16",
334			  "HEADER_18", "HEADER_29", "HEADER_31", "HEADER_12",
335			  /* GPIO3 C0-C7 */
336			  "DSI0_08", "DSI0_14", "HEADER_11", "HEADER_13",
337			  "", "", "", "",
338			  /* GPIO3 D0-D7 */
339			  "", "", "", "",
340			  "", "DSI1_10", "", "";
341};
342
343&gpio4 {
344	gpio-line-names = /* GPIO4 A0-A7 */
345			  "DSI1_08", "DSI1_14", "", "DSI1_12",
346			  "", "", "", "",
347			  /* GPIO4 B0-B7 */
348			  "", "", "", "",
349			  "", "", "", "",
350			  /* GPIO4 C0-C7 */
351			  "", "", "", "",
352			  "CSI0_11", "CSI0_12", "", "",
353			  /* GPIO4 D0-D7 */
354			  "", "", "", "",
355			  "", "", "", "";
356};
357
358&gpu {
359	mali-supply = <&vdd_gpu_s0>;
360	status = "okay";
361};
362
363&hdmi0 {
364	status = "okay";
365};
366
367&hdmi0_in {
368	hdmi0_in_vp0: endpoint {
369		remote-endpoint = <&vp0_out_hdmi0>;
370	};
371};
372
373&hdmi0_out {
374	hdmi0_out_con: endpoint {
375		remote-endpoint = <&hdmi0_con_in>;
376	};
377};
378
379&hdmi0_sound {
380	status = "okay";
381};
382
383&hdmi1 {
384	status = "okay";
385};
386
387&hdmi1_in {
388	hdmi1_in_vp1: endpoint {
389		remote-endpoint = <&vp1_out_hdmi1>;
390	};
391};
392
393&hdmi1_out {
394	hdmi1_out_con: endpoint {
395		remote-endpoint = <&hdmi1_con_in>;
396	};
397};
398
399&hdmi1_sound {
400	status = "okay";
401};
402
403&hdmi_receiver_cma {
404	status = "okay";
405};
406
407&hdmi_receiver {
408	hpd-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
409	pinctrl-0 = <&hdmim1_rx_cec &hdmim1_rx_hpdin &hdmim1_rx_scl &hdmim1_rx_sda &hdmirx_hpd>;
410	pinctrl-names = "default";
411	status = "okay";
412};
413
414&hdptxphy0 {
415	status = "okay";
416};
417
418&hdptxphy1 {
419	status = "okay";
420};
421
422&i2c0 {
423	pinctrl-names = "default";
424	pinctrl-0 = <&i2c0m2_xfer>;
425	status = "okay";
426
427	vdd_cpu_big0_s0: regulator@42 {
428		compatible = "rockchip,rk8602";
429		reg = <0x42>;
430		fcs,suspend-voltage-selector = <1>;
431		regulator-name = "vdd_cpu_big0_s0";
432		regulator-always-on;
433		regulator-boot-on;
434		regulator-min-microvolt = <550000>;
435		regulator-max-microvolt = <1050000>;
436		regulator-ramp-delay = <2300>;
437		vin-supply = <&vcc4v0_sys>;
438
439		regulator-state-mem {
440			regulator-off-in-suspend;
441		};
442	};
443
444	vdd_cpu_big1_s0: regulator@43 {
445		compatible = "rockchip,rk8603", "rockchip,rk8602";
446		reg = <0x43>;
447		fcs,suspend-voltage-selector = <1>;
448		regulator-name = "vdd_cpu_big1_s0";
449		regulator-always-on;
450		regulator-boot-on;
451		regulator-min-microvolt = <550000>;
452		regulator-max-microvolt = <1050000>;
453		regulator-ramp-delay = <2300>;
454		vin-supply = <&vcc4v0_sys>;
455
456		regulator-state-mem {
457			regulator-off-in-suspend;
458		};
459	};
460};
461
462&i2c2 {
463	status = "okay";
464
465	vdd_npu_s0: regulator@42 {
466		compatible = "rockchip,rk8602";
467		reg = <0x42>;
468		fcs,suspend-voltage-selector = <1>;
469		regulator-name = "vdd_npu_s0";
470		regulator-boot-on;
471		regulator-min-microvolt = <550000>;
472		regulator-max-microvolt = <950000>;
473		regulator-ramp-delay = <2300>;
474		vin-supply = <&vcc4v0_sys>;
475
476		regulator-state-mem {
477			regulator-off-in-suspend;
478		};
479	};
480};
481
482&i2c6 {
483	status = "okay";
484
485	usbc0: usb-typec@22 {
486		compatible = "fcs,fusb302";
487		reg = <0x22>;
488		interrupt-parent = <&gpio0>;
489		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
490		pinctrl-names = "default";
491		pinctrl-0 = <&usbc0_int>;
492		vbus-supply = <&vbus5v0_typec>;
493		status = "okay";
494
495		connector {
496			compatible = "usb-c-connector";
497			data-role = "dual";
498			label = "USB-C";
499			op-sink-microwatt = <1000000>;
500			/* fusb302 supports PD Rev 2.0 Ver 1.2 */
501			pd-revision = /bits/ 8 <0x2 0x0 0x1 0x2>;
502			power-role = "dual";
503			sink-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
504			source-pdos = <PDO_FIXED(5000, 2000, PDO_FIXED_USB_COMM)>;
505			try-power-role = "source";
506			typec-power-opmode = "1.5A";
507
508			ports {
509				#address-cells = <1>;
510				#size-cells = <0>;
511
512				port@0 {
513					reg = <0>;
514					usbc0_hs: endpoint {
515						remote-endpoint = <&usb_host0_xhci_drd_sw>;
516					};
517				};
518
519				port@1 {
520					reg = <1>;
521					usbc0_ss: endpoint {
522						remote-endpoint = <&usbdp_phy0_typec_ss>;
523					};
524				};
525
526				port@2 {
527					reg = <2>;
528					usbc0_sbu: endpoint {
529						remote-endpoint = <&usbdp_phy0_typec_sbu>;
530					};
531				};
532			};
533		};
534	};
535
536	hym8563: rtc@51 {
537		compatible = "haoyu,hym8563";
538		reg = <0x51>;
539		#clock-cells = <0>;
540		clock-output-names = "hym8563";
541		pinctrl-names = "default";
542		pinctrl-0 = <&hym8563_int>;
543		interrupt-parent = <&gpio0>;
544		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
545		wakeup-source;
546	};
547};
548
549&i2c7 {
550	clock-frequency = <200000>;
551	status = "okay";
552
553	rt5616: codec@1b {
554		compatible = "realtek,rt5616";
555		reg = <0x1b>;
556		clocks = <&cru I2S0_8CH_MCLKOUT>;
557		clock-names = "mclk";
558		#sound-dai-cells = <0>;
559		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
560		assigned-clock-rates = <12288000>;
561
562		port {
563			rt5616_p0_0: endpoint {
564				remote-endpoint = <&i2s0_8ch_p0_0>;
565			};
566		};
567	};
568
569	/* connected with MIPI-CSI1 */
570};
571
572&i2c8 {
573	pinctrl-0 = <&i2c8m2_xfer>;
574};
575
576&i2s0_8ch {
577	pinctrl-names = "default";
578	pinctrl-0 = <&i2s0_lrck
579		     &i2s0_mclk
580		     &i2s0_sclk
581		     &i2s0_sdi0
582		     &i2s0_sdo0>;
583	status = "okay";
584
585	i2s0_8ch_p0: port {
586		i2s0_8ch_p0_0: endpoint {
587			dai-format = "i2s";
588			mclk-fs = <256>;
589			remote-endpoint = <&rt5616_p0_0>;
590		};
591	};
592};
593
594&i2s5_8ch {
595	status = "okay";
596};
597
598&i2s6_8ch {
599	status = "okay";
600};
601
602&package_thermal {
603	polling-delay = <1000>;
604
605	trips {
606		package_warm: package-warm {
607			temperature = <55000>;
608			hysteresis = <2000>;
609			type = "active";
610		};
611
612		package_hot: package-hot {
613			temperature = <65000>;
614			hysteresis = <2000>;
615			type = "active";
616		};
617	};
618
619	cooling-maps {
620		map0 {
621			trip = <&package_warm>;
622			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
623		};
624
625		map1 {
626			trip = <&package_hot>;
627			cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
628		};
629	};
630};
631
632&pcie2x1l0 {
633	reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_HIGH>;
634	vpcie3v3-supply = <&vcc_3v3_pcie20>;
635	pinctrl-names = "default";
636	pinctrl-0 = <&pcie2_0_rst>;
637	status = "okay";
638};
639
640&pcie2x1l1 {
641	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
642	vpcie3v3-supply = <&vcc3v3_pcie2x1l0>;
643	pinctrl-names = "default";
644	pinctrl-0 = <&pcie2_1_rst>;
645	status = "okay";
646};
647
648&pcie2x1l2 {
649	reset-gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
650	vpcie3v3-supply = <&vcc_3v3_pcie20>;
651	pinctrl-names = "default";
652	pinctrl-0 = <&pcie2_2_rst>;
653	status = "okay";
654};
655
656&pcie30phy {
657	status = "okay";
658};
659
660&pcie3x4 {
661	reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
662	vpcie3v3-supply = <&vcc3v3_pcie30>;
663	status = "okay";
664};
665
666&pd_gpu {
667	domain-supply = <&vdd_gpu_s0>;
668};
669
670&pd_npu {
671	domain-supply = <&vdd_npu_s0>;
672};
673
674&pinctrl {
675	gpio-leds {
676		sys_led_pin: sys-led-pin {
677			rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
678		};
679
680		usr_led_pin: usr-led-pin {
681			rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
682		};
683	};
684
685	hdmirx {
686		hdmirx_hpd: hdmirx-5v-detection {
687			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
688		};
689	};
690
691	headphone {
692		hp_det: hp-det {
693			rockchip,pins = <1 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
694		};
695	};
696
697	hym8563 {
698		hym8563_int: hym8563-int {
699			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
700		};
701	};
702
703	ir-receiver {
704		ir_receiver_pin: ir-receiver-pin {
705			rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
706		};
707	};
708
709	pcie {
710		pcie2_0_rst: pcie2-0-rst {
711			rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
712		};
713
714		pcie2_1_rst: pcie2-1-rst {
715			rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
716		};
717
718		pcie2_2_rst: pcie2-2-rst {
719			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
720		};
721
722		pcie_m2_0_pwren: pcie-m20-pwren {
723			rockchip,pins = <2 RK_PC5 RK_FUNC_GPIO &pcfg_pull_none>;
724		};
725
726		pcie_m2_1_pwren: pcie-m21-pwren {
727			rockchip,pins = <4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
728		};
729	};
730
731	usb {
732		typec5v_pwren: typec5v-pwren {
733			rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
734		};
735
736		usb5v_pwren: usb5v_pwren {
737			rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
738		};
739
740		usbc0_int: usbc0-int {
741			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
742		};
743	};
744};
745
746&pwm1 {
747	pinctrl-0 = <&pwm1m1_pins>;
748	status = "okay";
749};
750
751&rknn_core_0 {
752	npu-supply = <&vdd_npu_s0>;
753	sram-supply = <&vdd_npu_s0>;
754	status = "okay";
755};
756
757&rknn_core_1 {
758	npu-supply = <&vdd_npu_s0>;
759	sram-supply = <&vdd_npu_s0>;
760	status = "okay";
761};
762
763&rknn_core_2 {
764	npu-supply = <&vdd_npu_s0>;
765	sram-supply = <&vdd_npu_s0>;
766	status = "okay";
767};
768
769&rknn_mmu_0 {
770	status = "okay";
771};
772
773&rknn_mmu_1 {
774	status = "okay";
775};
776
777&rknn_mmu_2 {
778	status = "okay";
779};
780
781
782&saradc {
783	vref-supply = <&avcc_1v8_s0>;
784	status = "okay";
785};
786
787&sdhci {
788	bus-width = <8>;
789	no-sdio;
790	no-sd;
791	non-removable;
792	max-frequency = <200000000>;
793	mmc-hs400-1_8v;
794	mmc-hs400-enhanced-strobe;
795	status = "okay";
796};
797
798&sdmmc {
799	bus-width = <4>;
800	cap-mmc-highspeed;
801	cap-sd-highspeed;
802	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
803	disable-wp;
804	no-mmc;
805	no-sdio;
806	sd-uhs-sdr104;
807	vmmc-supply = <&vcc3v3_sd_s0>;
808	vqmmc-supply = <&vccio_sd_s0>;
809	status = "okay";
810};
811
812/* optional on non-LTS, populated on LTS version */
813&sfc {
814	pinctrl-names = "default";
815	pinctrl-0 = <&fspim1_pins>;
816	status = "okay";
817
818	flash@0 {
819		compatible = "jedec,spi-nor";
820		reg = <0>;
821		spi-max-frequency = <104000000>;
822		spi-rx-bus-width = <4>;
823		spi-tx-bus-width = <1>;
824		vcc-supply = <&vcc_1v8_s3>;
825	};
826};
827
828&spi2 {
829	status = "okay";
830	assigned-clocks = <&cru CLK_SPI2>;
831	assigned-clock-rates = <200000000>;
832	pinctrl-names = "default";
833	pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
834	num-cs = <1>;
835
836	pmic@0 {
837		compatible = "rockchip,rk806";
838		spi-max-frequency = <1000000>;
839		reg = <0x0>;
840
841		interrupt-parent = <&gpio0>;
842		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
843
844		pinctrl-names = "default";
845		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
846			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
847
848		system-power-controller;
849
850		vcc1-supply = <&vcc4v0_sys>;
851		vcc2-supply = <&vcc4v0_sys>;
852		vcc3-supply = <&vcc4v0_sys>;
853		vcc4-supply = <&vcc4v0_sys>;
854		vcc5-supply = <&vcc4v0_sys>;
855		vcc6-supply = <&vcc4v0_sys>;
856		vcc7-supply = <&vcc4v0_sys>;
857		vcc8-supply = <&vcc4v0_sys>;
858		vcc9-supply = <&vcc4v0_sys>;
859		vcc10-supply = <&vcc4v0_sys>;
860		vcc11-supply = <&vcc_2v0_pldo_s3>;
861		vcc12-supply = <&vcc4v0_sys>;
862		vcc13-supply = <&vcc_1v1_nldo_s3>;
863		vcc14-supply = <&vcc_1v1_nldo_s3>;
864		vcca-supply = <&vcc4v0_sys>;
865
866		gpio-controller;
867		#gpio-cells = <2>;
868
869		rk806_dvs1_null: dvs1-null-pins {
870			pins = "gpio_pwrctrl1";
871			function = "pin_fun0";
872		};
873
874		rk806_dvs2_null: dvs2-null-pins {
875			pins = "gpio_pwrctrl2";
876			function = "pin_fun0";
877		};
878
879		rk806_dvs3_null: dvs3-null-pins {
880			pins = "gpio_pwrctrl3";
881			function = "pin_fun0";
882		};
883
884		regulators {
885			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
886				regulator-boot-on;
887				regulator-min-microvolt = <550000>;
888				regulator-max-microvolt = <950000>;
889				regulator-ramp-delay = <12500>;
890				regulator-name = "vdd_gpu_s0";
891				regulator-enable-ramp-delay = <400>;
892
893				regulator-state-mem {
894					regulator-off-in-suspend;
895				};
896			};
897
898			vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
899				regulator-always-on;
900				regulator-boot-on;
901				regulator-min-microvolt = <550000>;
902				regulator-max-microvolt = <950000>;
903				regulator-ramp-delay = <12500>;
904				regulator-name = "vdd_cpu_lit_s0";
905
906				regulator-state-mem {
907					regulator-off-in-suspend;
908				};
909			};
910
911			vdd_log_s0: dcdc-reg3 {
912				regulator-always-on;
913				regulator-boot-on;
914				regulator-min-microvolt = <675000>;
915				regulator-max-microvolt = <750000>;
916				regulator-ramp-delay = <12500>;
917				regulator-name = "vdd_log_s0";
918
919				regulator-state-mem {
920					regulator-off-in-suspend;
921					regulator-suspend-microvolt = <750000>;
922				};
923			};
924
925			vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
926				regulator-always-on;
927				regulator-boot-on;
928				regulator-min-microvolt = <550000>;
929				regulator-max-microvolt = <950000>;
930				regulator-ramp-delay = <12500>;
931				regulator-name = "vdd_vdenc_s0";
932
933				regulator-state-mem {
934					regulator-off-in-suspend;
935				};
936			};
937
938			vdd_ddr_s0: dcdc-reg5 {
939				regulator-always-on;
940				regulator-boot-on;
941				regulator-min-microvolt = <675000>;
942				regulator-max-microvolt = <900000>;
943				regulator-ramp-delay = <12500>;
944				regulator-name = "vdd_ddr_s0";
945
946				regulator-state-mem {
947					regulator-off-in-suspend;
948					regulator-suspend-microvolt = <850000>;
949				};
950			};
951
952			vdd2_ddr_s3: dcdc-reg6 {
953				regulator-always-on;
954				regulator-boot-on;
955				regulator-name = "vdd2_ddr_s3";
956
957				regulator-state-mem {
958					regulator-on-in-suspend;
959				};
960			};
961
962			vcc_2v0_pldo_s3: dcdc-reg7 {
963				regulator-always-on;
964				regulator-boot-on;
965				regulator-min-microvolt = <2000000>;
966				regulator-max-microvolt = <2000000>;
967				regulator-ramp-delay = <12500>;
968				regulator-name = "vdd_2v0_pldo_s3";
969
970				regulator-state-mem {
971					regulator-on-in-suspend;
972					regulator-suspend-microvolt = <2000000>;
973				};
974			};
975
976			vcc_3v3_s3: dcdc-reg8 {
977				regulator-always-on;
978				regulator-boot-on;
979				regulator-min-microvolt = <3300000>;
980				regulator-max-microvolt = <3300000>;
981				regulator-name = "vcc_3v3_s3";
982
983				regulator-state-mem {
984					regulator-on-in-suspend;
985					regulator-suspend-microvolt = <3300000>;
986				};
987			};
988
989			vddq_ddr_s0: dcdc-reg9 {
990				regulator-always-on;
991				regulator-boot-on;
992				regulator-name = "vddq_ddr_s0";
993
994				regulator-state-mem {
995					regulator-off-in-suspend;
996				};
997			};
998
999			vcc_1v8_s3: dcdc-reg10 {
1000				regulator-always-on;
1001				regulator-boot-on;
1002				regulator-min-microvolt = <1800000>;
1003				regulator-max-microvolt = <1800000>;
1004				regulator-name = "vcc_1v8_s3";
1005
1006				regulator-state-mem {
1007					regulator-on-in-suspend;
1008					regulator-suspend-microvolt = <1800000>;
1009				};
1010			};
1011
1012			avcc_1v8_s0: pldo-reg1 {
1013				regulator-always-on;
1014				regulator-boot-on;
1015				regulator-min-microvolt = <1800000>;
1016				regulator-max-microvolt = <1800000>;
1017				regulator-name = "avcc_1v8_s0";
1018
1019				regulator-state-mem {
1020					regulator-off-in-suspend;
1021				};
1022			};
1023
1024			vcc_1v8_s0: pldo-reg2 {
1025				regulator-always-on;
1026				regulator-boot-on;
1027				regulator-min-microvolt = <1800000>;
1028				regulator-max-microvolt = <1800000>;
1029				regulator-name = "vcc_1v8_s0";
1030
1031				regulator-state-mem {
1032					regulator-off-in-suspend;
1033					regulator-suspend-microvolt = <1800000>;
1034				};
1035			};
1036
1037			avdd_1v2_s0: pldo-reg3 {
1038				regulator-always-on;
1039				regulator-boot-on;
1040				regulator-min-microvolt = <1200000>;
1041				regulator-max-microvolt = <1200000>;
1042				regulator-name = "avdd_1v2_s0";
1043
1044				regulator-state-mem {
1045					regulator-off-in-suspend;
1046				};
1047			};
1048
1049			vcc_3v3_s0: pldo-reg4 {
1050				regulator-always-on;
1051				regulator-boot-on;
1052				regulator-min-microvolt = <3300000>;
1053				regulator-max-microvolt = <3300000>;
1054				regulator-ramp-delay = <12500>;
1055				regulator-name = "vcc_3v3_s0";
1056
1057				regulator-state-mem {
1058					regulator-off-in-suspend;
1059				};
1060			};
1061
1062			vccio_sd_s0: pldo-reg5 {
1063				regulator-always-on;
1064				regulator-boot-on;
1065				regulator-min-microvolt = <1800000>;
1066				regulator-max-microvolt = <3300000>;
1067				regulator-ramp-delay = <12500>;
1068				regulator-name = "vccio_sd_s0";
1069
1070				regulator-state-mem {
1071					regulator-off-in-suspend;
1072				};
1073			};
1074
1075			pldo6_s3: pldo-reg6 {
1076				regulator-always-on;
1077				regulator-boot-on;
1078				regulator-min-microvolt = <1800000>;
1079				regulator-max-microvolt = <1800000>;
1080				regulator-name = "pldo6_s3";
1081
1082				regulator-state-mem {
1083					regulator-on-in-suspend;
1084					regulator-suspend-microvolt = <1800000>;
1085				};
1086			};
1087
1088			vdd_0v75_s3: nldo-reg1 {
1089				regulator-always-on;
1090				regulator-boot-on;
1091				regulator-min-microvolt = <750000>;
1092				regulator-max-microvolt = <750000>;
1093				regulator-name = "vdd_0v75_s3";
1094
1095				regulator-state-mem {
1096					regulator-on-in-suspend;
1097					regulator-suspend-microvolt = <750000>;
1098				};
1099			};
1100
1101			vdd_ddr_pll_s0: nldo-reg2 {
1102				regulator-always-on;
1103				regulator-boot-on;
1104				regulator-min-microvolt = <850000>;
1105				regulator-max-microvolt = <850000>;
1106				regulator-name = "vdd_ddr_pll_s0";
1107
1108				regulator-state-mem {
1109					regulator-off-in-suspend;
1110					regulator-suspend-microvolt = <850000>;
1111				};
1112			};
1113
1114			avdd_0v75_s0: nldo-reg3 {
1115				regulator-always-on;
1116				regulator-boot-on;
1117				regulator-min-microvolt = <750000>;
1118				regulator-max-microvolt = <750000>;
1119				regulator-name = "avdd_0v75_s0";
1120
1121				regulator-state-mem {
1122					regulator-off-in-suspend;
1123				};
1124			};
1125
1126			vdd_0v85_s0: nldo-reg4 {
1127				regulator-always-on;
1128				regulator-boot-on;
1129				regulator-min-microvolt = <850000>;
1130				regulator-max-microvolt = <850000>;
1131				regulator-name = "vdd_0v85_s0";
1132
1133				regulator-state-mem {
1134					regulator-off-in-suspend;
1135				};
1136			};
1137
1138			vdd_0v75_s0: nldo-reg5 {
1139				regulator-always-on;
1140				regulator-boot-on;
1141				regulator-min-microvolt = <750000>;
1142				regulator-max-microvolt = <750000>;
1143				regulator-name = "vdd_0v75_s0";
1144
1145				regulator-state-mem {
1146					regulator-off-in-suspend;
1147				};
1148			};
1149		};
1150	};
1151};
1152
1153&tsadc {
1154	status = "okay";
1155};
1156
1157&uart2 {
1158	pinctrl-0 = <&uart2m0_xfer>;
1159	status = "okay";
1160};
1161
1162&u2phy0 {
1163	status = "okay";
1164};
1165
1166&u2phy0_otg {
1167	status = "okay";
1168};
1169
1170&u2phy1 {
1171	status = "okay";
1172};
1173
1174&u2phy1_otg {
1175	status = "okay";
1176};
1177
1178&u2phy2_host {
1179	status = "okay";
1180};
1181
1182&u2phy3_host {
1183	status = "okay";
1184};
1185
1186&u2phy2 {
1187	status = "okay";
1188};
1189
1190&u2phy3 {
1191	status = "okay";
1192};
1193
1194&usbdp_phy0 {
1195	mode-switch;
1196	orientation-switch;
1197	sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
1198	sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
1199	status = "okay";
1200
1201	port {
1202		#address-cells = <1>;
1203		#size-cells = <0>;
1204
1205		usbdp_phy0_typec_ss: endpoint@0 {
1206			reg = <0>;
1207			remote-endpoint = <&usbc0_ss>;
1208		};
1209
1210		usbdp_phy0_typec_sbu: endpoint@1 {
1211			reg = <1>;
1212			remote-endpoint = <&usbc0_sbu>;
1213		};
1214	};
1215};
1216
1217&usbdp_phy1 {
1218	phy-supply = <&vbus5v0_usb>;
1219	status = "okay";
1220};
1221
1222&usb_host0_ehci {
1223	status = "okay";
1224};
1225
1226&usb_host0_ohci {
1227	status = "okay";
1228};
1229
1230&usb_host0_xhci {
1231	usb-role-switch;
1232	status = "okay";
1233
1234	port {
1235		usb_host0_xhci_drd_sw: endpoint {
1236			remote-endpoint = <&usbc0_hs>;
1237		};
1238	};
1239};
1240
1241&usb_host1_xhci {
1242	dr_mode = "host";
1243	status = "okay";
1244};
1245
1246&usb_host1_ehci {
1247	status = "okay";
1248};
1249
1250&usb_host1_ohci {
1251	status = "okay";
1252};
1253
1254&vop_mmu {
1255	status = "okay";
1256};
1257
1258&vop {
1259	status = "okay";
1260};
1261
1262&vp0 {
1263	vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
1264		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
1265		remote-endpoint = <&hdmi0_in_vp0>;
1266	};
1267};
1268
1269&vp1 {
1270	vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
1271		reg = <ROCKCHIP_VOP2_EP_HDMI1>;
1272		remote-endpoint = <&hdmi1_in_vp1>;
1273	};
1274};
1275