xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3588-nanopc-t6.dtsi (revision 9978553d0199e7ec0bdd1c44fc7f6c7b0c11e43b)
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		vcc-supply = <&vcc_1v8_s3>;
735	};
736};
737
738&spi2 {
739	status = "okay";
740	assigned-clocks = <&cru CLK_SPI2>;
741	assigned-clock-rates = <200000000>;
742	pinctrl-names = "default";
743	pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
744	num-cs = <1>;
745
746	pmic@0 {
747		compatible = "rockchip,rk806";
748		spi-max-frequency = <1000000>;
749		reg = <0x0>;
750
751		interrupt-parent = <&gpio0>;
752		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
753
754		pinctrl-names = "default";
755		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
756			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
757
758		system-power-controller;
759
760		vcc1-supply = <&vcc4v0_sys>;
761		vcc2-supply = <&vcc4v0_sys>;
762		vcc3-supply = <&vcc4v0_sys>;
763		vcc4-supply = <&vcc4v0_sys>;
764		vcc5-supply = <&vcc4v0_sys>;
765		vcc6-supply = <&vcc4v0_sys>;
766		vcc7-supply = <&vcc4v0_sys>;
767		vcc8-supply = <&vcc4v0_sys>;
768		vcc9-supply = <&vcc4v0_sys>;
769		vcc10-supply = <&vcc4v0_sys>;
770		vcc11-supply = <&vcc_2v0_pldo_s3>;
771		vcc12-supply = <&vcc4v0_sys>;
772		vcc13-supply = <&vcc_1v1_nldo_s3>;
773		vcc14-supply = <&vcc_1v1_nldo_s3>;
774		vcca-supply = <&vcc4v0_sys>;
775
776		gpio-controller;
777		#gpio-cells = <2>;
778
779		rk806_dvs1_null: dvs1-null-pins {
780			pins = "gpio_pwrctrl1";
781			function = "pin_fun0";
782		};
783
784		rk806_dvs2_null: dvs2-null-pins {
785			pins = "gpio_pwrctrl2";
786			function = "pin_fun0";
787		};
788
789		rk806_dvs3_null: dvs3-null-pins {
790			pins = "gpio_pwrctrl3";
791			function = "pin_fun0";
792		};
793
794		regulators {
795			vdd_gpu_s0: vdd_gpu_mem_s0: dcdc-reg1 {
796				regulator-boot-on;
797				regulator-min-microvolt = <550000>;
798				regulator-max-microvolt = <950000>;
799				regulator-ramp-delay = <12500>;
800				regulator-name = "vdd_gpu_s0";
801				regulator-enable-ramp-delay = <400>;
802
803				regulator-state-mem {
804					regulator-off-in-suspend;
805				};
806			};
807
808			vdd_cpu_lit_s0: vdd_cpu_lit_mem_s0: dcdc-reg2 {
809				regulator-always-on;
810				regulator-boot-on;
811				regulator-min-microvolt = <550000>;
812				regulator-max-microvolt = <950000>;
813				regulator-ramp-delay = <12500>;
814				regulator-name = "vdd_cpu_lit_s0";
815
816				regulator-state-mem {
817					regulator-off-in-suspend;
818				};
819			};
820
821			vdd_log_s0: dcdc-reg3 {
822				regulator-always-on;
823				regulator-boot-on;
824				regulator-min-microvolt = <675000>;
825				regulator-max-microvolt = <750000>;
826				regulator-ramp-delay = <12500>;
827				regulator-name = "vdd_log_s0";
828
829				regulator-state-mem {
830					regulator-off-in-suspend;
831					regulator-suspend-microvolt = <750000>;
832				};
833			};
834
835			vdd_vdenc_s0: vdd_vdenc_mem_s0: dcdc-reg4 {
836				regulator-always-on;
837				regulator-boot-on;
838				regulator-min-microvolt = <550000>;
839				regulator-max-microvolt = <950000>;
840				regulator-ramp-delay = <12500>;
841				regulator-name = "vdd_vdenc_s0";
842
843				regulator-state-mem {
844					regulator-off-in-suspend;
845				};
846			};
847
848			vdd_ddr_s0: dcdc-reg5 {
849				regulator-always-on;
850				regulator-boot-on;
851				regulator-min-microvolt = <675000>;
852				regulator-max-microvolt = <900000>;
853				regulator-ramp-delay = <12500>;
854				regulator-name = "vdd_ddr_s0";
855
856				regulator-state-mem {
857					regulator-off-in-suspend;
858					regulator-suspend-microvolt = <850000>;
859				};
860			};
861
862			vdd2_ddr_s3: dcdc-reg6 {
863				regulator-always-on;
864				regulator-boot-on;
865				regulator-name = "vdd2_ddr_s3";
866
867				regulator-state-mem {
868					regulator-on-in-suspend;
869				};
870			};
871
872			vcc_2v0_pldo_s3: dcdc-reg7 {
873				regulator-always-on;
874				regulator-boot-on;
875				regulator-min-microvolt = <2000000>;
876				regulator-max-microvolt = <2000000>;
877				regulator-ramp-delay = <12500>;
878				regulator-name = "vdd_2v0_pldo_s3";
879
880				regulator-state-mem {
881					regulator-on-in-suspend;
882					regulator-suspend-microvolt = <2000000>;
883				};
884			};
885
886			vcc_3v3_s3: dcdc-reg8 {
887				regulator-always-on;
888				regulator-boot-on;
889				regulator-min-microvolt = <3300000>;
890				regulator-max-microvolt = <3300000>;
891				regulator-name = "vcc_3v3_s3";
892
893				regulator-state-mem {
894					regulator-on-in-suspend;
895					regulator-suspend-microvolt = <3300000>;
896				};
897			};
898
899			vddq_ddr_s0: dcdc-reg9 {
900				regulator-always-on;
901				regulator-boot-on;
902				regulator-name = "vddq_ddr_s0";
903
904				regulator-state-mem {
905					regulator-off-in-suspend;
906				};
907			};
908
909			vcc_1v8_s3: dcdc-reg10 {
910				regulator-always-on;
911				regulator-boot-on;
912				regulator-min-microvolt = <1800000>;
913				regulator-max-microvolt = <1800000>;
914				regulator-name = "vcc_1v8_s3";
915
916				regulator-state-mem {
917					regulator-on-in-suspend;
918					regulator-suspend-microvolt = <1800000>;
919				};
920			};
921
922			avcc_1v8_s0: pldo-reg1 {
923				regulator-always-on;
924				regulator-boot-on;
925				regulator-min-microvolt = <1800000>;
926				regulator-max-microvolt = <1800000>;
927				regulator-name = "avcc_1v8_s0";
928
929				regulator-state-mem {
930					regulator-off-in-suspend;
931				};
932			};
933
934			vcc_1v8_s0: pldo-reg2 {
935				regulator-always-on;
936				regulator-boot-on;
937				regulator-min-microvolt = <1800000>;
938				regulator-max-microvolt = <1800000>;
939				regulator-name = "vcc_1v8_s0";
940
941				regulator-state-mem {
942					regulator-off-in-suspend;
943					regulator-suspend-microvolt = <1800000>;
944				};
945			};
946
947			avdd_1v2_s0: pldo-reg3 {
948				regulator-always-on;
949				regulator-boot-on;
950				regulator-min-microvolt = <1200000>;
951				regulator-max-microvolt = <1200000>;
952				regulator-name = "avdd_1v2_s0";
953
954				regulator-state-mem {
955					regulator-off-in-suspend;
956				};
957			};
958
959			vcc_3v3_s0: pldo-reg4 {
960				regulator-always-on;
961				regulator-boot-on;
962				regulator-min-microvolt = <3300000>;
963				regulator-max-microvolt = <3300000>;
964				regulator-ramp-delay = <12500>;
965				regulator-name = "vcc_3v3_s0";
966
967				regulator-state-mem {
968					regulator-off-in-suspend;
969				};
970			};
971
972			vccio_sd_s0: pldo-reg5 {
973				regulator-always-on;
974				regulator-boot-on;
975				regulator-min-microvolt = <1800000>;
976				regulator-max-microvolt = <3300000>;
977				regulator-ramp-delay = <12500>;
978				regulator-name = "vccio_sd_s0";
979
980				regulator-state-mem {
981					regulator-off-in-suspend;
982				};
983			};
984
985			pldo6_s3: pldo-reg6 {
986				regulator-always-on;
987				regulator-boot-on;
988				regulator-min-microvolt = <1800000>;
989				regulator-max-microvolt = <1800000>;
990				regulator-name = "pldo6_s3";
991
992				regulator-state-mem {
993					regulator-on-in-suspend;
994					regulator-suspend-microvolt = <1800000>;
995				};
996			};
997
998			vdd_0v75_s3: nldo-reg1 {
999				regulator-always-on;
1000				regulator-boot-on;
1001				regulator-min-microvolt = <750000>;
1002				regulator-max-microvolt = <750000>;
1003				regulator-name = "vdd_0v75_s3";
1004
1005				regulator-state-mem {
1006					regulator-on-in-suspend;
1007					regulator-suspend-microvolt = <750000>;
1008				};
1009			};
1010
1011			vdd_ddr_pll_s0: nldo-reg2 {
1012				regulator-always-on;
1013				regulator-boot-on;
1014				regulator-min-microvolt = <850000>;
1015				regulator-max-microvolt = <850000>;
1016				regulator-name = "vdd_ddr_pll_s0";
1017
1018				regulator-state-mem {
1019					regulator-off-in-suspend;
1020					regulator-suspend-microvolt = <850000>;
1021				};
1022			};
1023
1024			avdd_0v75_s0: nldo-reg3 {
1025				regulator-always-on;
1026				regulator-boot-on;
1027				regulator-min-microvolt = <750000>;
1028				regulator-max-microvolt = <750000>;
1029				regulator-name = "avdd_0v75_s0";
1030
1031				regulator-state-mem {
1032					regulator-off-in-suspend;
1033				};
1034			};
1035
1036			vdd_0v85_s0: nldo-reg4 {
1037				regulator-always-on;
1038				regulator-boot-on;
1039				regulator-min-microvolt = <850000>;
1040				regulator-max-microvolt = <850000>;
1041				regulator-name = "vdd_0v85_s0";
1042
1043				regulator-state-mem {
1044					regulator-off-in-suspend;
1045				};
1046			};
1047
1048			vdd_0v75_s0: nldo-reg5 {
1049				regulator-always-on;
1050				regulator-boot-on;
1051				regulator-min-microvolt = <750000>;
1052				regulator-max-microvolt = <750000>;
1053				regulator-name = "vdd_0v75_s0";
1054
1055				regulator-state-mem {
1056					regulator-off-in-suspend;
1057				};
1058			};
1059		};
1060	};
1061};
1062
1063&tsadc {
1064	status = "okay";
1065};
1066
1067&uart2 {
1068	pinctrl-0 = <&uart2m0_xfer>;
1069	status = "okay";
1070};
1071
1072&u2phy0 {
1073	status = "okay";
1074};
1075
1076&u2phy0_otg {
1077	status = "okay";
1078};
1079
1080&u2phy1 {
1081	status = "okay";
1082};
1083
1084&u2phy1_otg {
1085	status = "okay";
1086};
1087
1088&u2phy2_host {
1089	status = "okay";
1090};
1091
1092&u2phy3_host {
1093	status = "okay";
1094};
1095
1096&u2phy2 {
1097	status = "okay";
1098};
1099
1100&u2phy3 {
1101	status = "okay";
1102};
1103
1104&usbdp_phy0 {
1105	mode-switch;
1106	orientation-switch;
1107	sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
1108	sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
1109	status = "okay";
1110
1111	port {
1112		#address-cells = <1>;
1113		#size-cells = <0>;
1114
1115		usbdp_phy0_typec_ss: endpoint@0 {
1116			reg = <0>;
1117			remote-endpoint = <&usbc0_ss>;
1118		};
1119
1120		usbdp_phy0_typec_sbu: endpoint@1 {
1121			reg = <1>;
1122			remote-endpoint = <&usbc0_sbu>;
1123		};
1124	};
1125};
1126
1127&usbdp_phy1 {
1128	phy-supply = <&vbus5v0_usb>;
1129	status = "okay";
1130};
1131
1132&usb_host0_ehci {
1133	status = "okay";
1134};
1135
1136&usb_host0_ohci {
1137	status = "okay";
1138};
1139
1140&usb_host0_xhci {
1141	usb-role-switch;
1142	status = "okay";
1143
1144	port {
1145		usb_host0_xhci_drd_sw: endpoint {
1146			remote-endpoint = <&usbc0_hs>;
1147		};
1148	};
1149};
1150
1151&usb_host1_xhci {
1152	dr_mode = "host";
1153	status = "okay";
1154};
1155
1156&usb_host1_ehci {
1157	status = "okay";
1158};
1159
1160&usb_host1_ohci {
1161	status = "okay";
1162};
1163
1164&vop_mmu {
1165	status = "okay";
1166};
1167
1168&vop {
1169	status = "okay";
1170};
1171
1172&vp0 {
1173	vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
1174		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
1175		remote-endpoint = <&hdmi0_in_vp0>;
1176	};
1177};
1178
1179&vp1 {
1180	vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
1181		reg = <ROCKCHIP_VOP2_EP_HDMI1>;
1182		remote-endpoint = <&hdmi1_in_vp1>;
1183	};
1184};
1185