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