1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/pinctrl/rockchip.h>
12#include <dt-bindings/soc/rockchip,vop2.h>
13#include <dt-bindings/usb/pd.h>
14#include "rk3588.dtsi"
15
16/ {
17	model = "Rockchip RK3588 EVB1 V10 Board";
18	compatible = "rockchip,rk3588-evb1-v10", "rockchip,rk3588";
19
20	aliases {
21		ethernet0 = &gmac0;
22		mmc0 = &sdhci;
23	};
24
25	chosen {
26		stdout-path = "serial2:1500000n8";
27	};
28
29	adc-keys {
30		compatible = "adc-keys";
31		io-channels = <&saradc 1>;
32		io-channel-names = "buttons";
33		keyup-threshold-microvolt = <1800000>;
34		poll-interval = <100>;
35
36		button-vol-up {
37			label = "Volume Up";
38			linux,code = <KEY_VOLUMEUP>;
39			press-threshold-microvolt = <17000>;
40		};
41
42		button-vol-down {
43			label = "Volume Down";
44			linux,code = <KEY_VOLUMEDOWN>;
45			press-threshold-microvolt = <417000>;
46		};
47
48		button-menu {
49			label = "Menu";
50			linux,code = <KEY_MENU>;
51			press-threshold-microvolt = <890000>;
52		};
53
54		button-escape {
55			label = "Escape";
56			linux,code = <KEY_ESC>;
57			press-threshold-microvolt = <1235000>;
58		};
59	};
60
61	analog-sound {
62		compatible = "simple-audio-card";
63		pinctrl-names = "default";
64		pinctrl-0 = <&hp_detect>;
65		simple-audio-card,name = "RK3588 EVB1 Audio";
66		simple-audio-card,aux-devs = <&amp_headphone>, <&amp_speaker>;
67		simple-audio-card,bitclock-master = <&masterdai>;
68		simple-audio-card,format = "i2s";
69		simple-audio-card,frame-master = <&masterdai>;
70		simple-audio-card,hp-det-gpios = <&gpio1 RK_PD5 GPIO_ACTIVE_LOW>;
71		simple-audio-card,mclk-fs = <256>;
72		simple-audio-card,pin-switches = "Headphones", "Speaker";
73		simple-audio-card,routing =
74			"Speaker Amplifier INL", "LOUT2",
75			"Speaker Amplifier INR", "ROUT2",
76			"Speaker", "Speaker Amplifier OUTL",
77			"Speaker", "Speaker Amplifier OUTR",
78			"Headphones Amplifier INL", "LOUT1",
79			"Headphones Amplifier INR", "ROUT1",
80			"Headphones", "Headphones Amplifier OUTL",
81			"Headphones", "Headphones Amplifier OUTR",
82			"LINPUT1", "Onboard Microphone",
83			"RINPUT1", "Onboard Microphone",
84			"LINPUT2", "Microphone Jack",
85			"RINPUT2", "Microphone Jack";
86		simple-audio-card,widgets =
87			"Microphone", "Microphone Jack",
88			"Microphone", "Onboard Microphone",
89			"Headphone", "Headphones",
90			"Speaker", "Speaker";
91
92		simple-audio-card,cpu {
93			sound-dai = <&i2s0_8ch>;
94		};
95
96		masterdai: simple-audio-card,codec {
97			sound-dai = <&es8388>;
98			system-clock-frequency = <12288000>;
99		};
100	};
101
102	amp_headphone: headphone-amplifier {
103		compatible = "simple-audio-amplifier";
104		enable-gpios = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
105		pinctrl-names = "default";
106		pinctrl-0 = <&headphone_amplifier_en>;
107		sound-name-prefix = "Headphones Amplifier";
108	};
109
110	amp_speaker: speaker-amplifier {
111		compatible = "simple-audio-amplifier";
112		enable-gpios = <&gpio1 RK_PD3 GPIO_ACTIVE_HIGH>;
113		pinctrl-names = "default";
114		pinctrl-0 = <&speaker_amplifier_en>;
115		sound-name-prefix = "Speaker Amplifier";
116	};
117
118	backlight: backlight {
119		compatible = "pwm-backlight";
120		power-supply = <&vcc12v_dcin>;
121		pwms = <&pwm2 0 25000 0>;
122	};
123
124	hdmi0-con {
125		compatible = "hdmi-connector";
126		type = "a";
127
128		port {
129			hdmi0_con_in: endpoint {
130				remote-endpoint = <&hdmi0_out_con>;
131			};
132		};
133	};
134
135	hdmi1-con {
136		compatible = "hdmi-connector";
137		type = "a";
138
139		port {
140			hdmi1_con_in: endpoint {
141				remote-endpoint = <&hdmi1_out_con>;
142			};
143		};
144	};
145
146	pcie20_avdd0v85: regulator-pcie20-avdd0v85 {
147		compatible = "regulator-fixed";
148		regulator-name = "pcie20_avdd0v85";
149		regulator-always-on;
150		regulator-boot-on;
151		regulator-min-microvolt = <850000>;
152		regulator-max-microvolt = <850000>;
153		vin-supply = <&avdd_0v85_s0>;
154	};
155
156	pcie20_avdd1v8: regulator-pcie20-avdd1v8 {
157		compatible = "regulator-fixed";
158		regulator-name = "pcie20_avdd1v8";
159		regulator-always-on;
160		regulator-boot-on;
161		regulator-min-microvolt = <1800000>;
162		regulator-max-microvolt = <1800000>;
163		vin-supply = <&avcc_1v8_s0>;
164	};
165
166	pcie30_avdd0v75: regulator-pcie30-avdd0v75 {
167		compatible = "regulator-fixed";
168		regulator-name = "pcie30_avdd0v75";
169		regulator-always-on;
170		regulator-boot-on;
171		regulator-min-microvolt = <750000>;
172		regulator-max-microvolt = <750000>;
173		vin-supply = <&avdd_0v75_s0>;
174	};
175
176	pcie30_avdd1v8: regulator-pcie30-avdd1v8 {
177		compatible = "regulator-fixed";
178		regulator-name = "pcie30_avdd1v8";
179		regulator-always-on;
180		regulator-boot-on;
181		regulator-min-microvolt = <1800000>;
182		regulator-max-microvolt = <1800000>;
183		vin-supply = <&avcc_1v8_s0>;
184	};
185
186	vbus5v0_typec: regulator-vbus5v0-typec {
187		compatible = "regulator-fixed";
188		enable-active-high;
189		gpio = <&gpio4 RK_PD0 GPIO_ACTIVE_HIGH>;
190		pinctrl-names = "default";
191		pinctrl-0 = <&typec5v_pwren>;
192		regulator-name = "vbus5v0_typec";
193		regulator-min-microvolt = <5000000>;
194		regulator-max-microvolt = <5000000>;
195		vin-supply = <&vcc5v0_usb>;
196	};
197
198	vcc12v_dcin: regulator-vcc12v-dcin {
199		compatible = "regulator-fixed";
200		regulator-name = "vcc12v_dcin";
201		regulator-always-on;
202		regulator-boot-on;
203		regulator-min-microvolt = <12000000>;
204		regulator-max-microvolt = <12000000>;
205	};
206
207	vcc3v3_pcie30: regulator-vcc3v3-pcie30 {
208		compatible = "regulator-fixed";
209		regulator-name = "vcc3v3_pcie30";
210		regulator-min-microvolt = <3300000>;
211		regulator-max-microvolt = <3300000>;
212		enable-active-high;
213		gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_HIGH>;
214		startup-delay-us = <5000>;
215		vin-supply = <&vcc12v_dcin>;
216		pinctrl-names = "default";
217		pinctrl-0 = <&vcc3v3_pcie30_en>;
218	};
219
220	vcc3v3_pciewl_vbat: regulator-vcc3v3-pciewl-vbat {
221		compatible = "regulator-fixed";
222		regulator-always-on;
223		regulator-boot-on;
224		regulator-min-microvolt = <3300000>;
225		regulator-max-microvolt = <3300000>;
226		regulator-name = "wlan-vbat";
227		vin-supply = <&vcc_3v3_s0>;
228	};
229
230	vcc3v3_wlan: regulator-vcc3v3-wlan {
231		compatible = "regulator-fixed";
232		enable-active-high;
233		gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
234		pinctrl-names = "default";
235		pinctrl-0 = <&wifi_pwren>;
236		regulator-min-microvolt = <3300000>;
237		regulator-max-microvolt = <3300000>;
238		regulator-name = "wlan-en";
239		vin-supply = <&vcc3v3_pciewl_vbat>;
240	};
241
242	vcc5v0_host: regulator-vcc5v0-host {
243		compatible = "regulator-fixed";
244		regulator-name = "vcc5v0_host";
245		regulator-boot-on;
246		regulator-always-on;
247		regulator-min-microvolt = <5000000>;
248		regulator-max-microvolt = <5000000>;
249		enable-active-high;
250		gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_HIGH>;
251		pinctrl-names = "default";
252		pinctrl-0 = <&vcc5v0_host_en>;
253		vin-supply = <&vcc5v0_usb>;
254	};
255
256	vcc5v0_sys: regulator-vcc5v0-sys {
257		compatible = "regulator-fixed";
258		regulator-name = "vcc5v0_sys";
259		regulator-always-on;
260		regulator-boot-on;
261		regulator-min-microvolt = <5000000>;
262		regulator-max-microvolt = <5000000>;
263		vin-supply = <&vcc12v_dcin>;
264	};
265
266	vcc5v0_usbdcin: regulator-vcc5v0-usbdcin {
267		compatible = "regulator-fixed";
268		regulator-name = "vcc5v0_usbdcin";
269		regulator-always-on;
270		regulator-boot-on;
271		regulator-min-microvolt = <5000000>;
272		regulator-max-microvolt = <5000000>;
273		vin-supply = <&vcc12v_dcin>;
274	};
275
276	vcc5v0_usb: regulator-vcc5v0-usb {
277		compatible = "regulator-fixed";
278		regulator-name = "vcc5v0_usb";
279		regulator-always-on;
280		regulator-boot-on;
281		regulator-min-microvolt = <5000000>;
282		regulator-max-microvolt = <5000000>;
283		vin-supply = <&vcc5v0_usbdcin>;
284	};
285
286	vccio_wl: regulator-vccio-wl {
287		compatible = "regulator-fixed";
288		regulator-always-on;
289		regulator-boot-on;
290		regulator-min-microvolt = <1800000>;
291		regulator-max-microvolt = <1800000>;
292		regulator-name = "wlan-vddio";
293		vin-supply = <&vcc_1v8_s0>;
294	};
295};
296
297&combphy0_ps {
298	status = "okay";
299};
300
301&combphy1_ps {
302	status = "okay";
303};
304
305&combphy2_psu {
306	status = "okay";
307};
308
309&cpu_b0 {
310	cpu-supply = <&vdd_cpu_big0_s0>;
311};
312
313&cpu_b1 {
314	cpu-supply = <&vdd_cpu_big0_s0>;
315};
316
317&cpu_b2 {
318	cpu-supply = <&vdd_cpu_big1_s0>;
319};
320
321&cpu_b3 {
322	cpu-supply = <&vdd_cpu_big1_s0>;
323};
324
325&cpu_l0 {
326	cpu-supply = <&vdd_cpu_lit_s0>;
327};
328
329&cpu_l1 {
330	cpu-supply = <&vdd_cpu_lit_s0>;
331};
332
333&cpu_l2 {
334	cpu-supply = <&vdd_cpu_lit_s0>;
335};
336
337&cpu_l3 {
338	cpu-supply = <&vdd_cpu_lit_s0>;
339};
340
341&gmac0 {
342	clock_in_out = "output";
343	phy-handle = <&rgmii_phy>;
344	phy-mode = "rgmii-rxid";
345	pinctrl-0 = <&gmac0_miim
346		     &gmac0_tx_bus2
347		     &gmac0_rx_bus2
348		     &gmac0_rgmii_clk
349		     &gmac0_rgmii_bus>;
350	pinctrl-names = "default";
351	rx_delay = <0x00>;
352	tx_delay = <0x43>;
353	status = "okay";
354};
355
356&gpu {
357	mali-supply = <&vdd_gpu_s0>;
358	sram-supply = <&vdd_gpu_mem_s0>;
359	status = "okay";
360};
361
362&hdmi0 {
363	status = "okay";
364};
365
366&hdmi0_in {
367	hdmi0_in_vp0: endpoint {
368		remote-endpoint = <&vp0_out_hdmi0>;
369	};
370};
371
372&hdmi0_out {
373	hdmi0_out_con: endpoint {
374		remote-endpoint = <&hdmi0_con_in>;
375	};
376};
377
378&hdmi1 {
379	status = "okay";
380};
381
382&hdmi1_in {
383	hdmi1_in_vp1: endpoint {
384		remote-endpoint = <&vp1_out_hdmi1>;
385	};
386};
387
388&hdmi1_out {
389	hdmi1_out_con: endpoint {
390		remote-endpoint = <&hdmi1_con_in>;
391	};
392};
393
394&hdptxphy0 {
395	status = "okay";
396};
397
398&hdptxphy1 {
399	status = "okay";
400};
401
402&i2c2 {
403	status = "okay";
404
405	usbc0: usb-typec@22 {
406		compatible = "fcs,fusb302";
407		reg = <0x22>;
408		interrupt-parent = <&gpio3>;
409		interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
410		pinctrl-names = "default";
411		pinctrl-0 = <&usbc0_int>;
412		vbus-supply = <&vbus5v0_typec>;
413		status = "okay";
414
415		usb_con: connector {
416			compatible = "usb-c-connector";
417			label = "USB-C";
418			data-role = "dual";
419			op-sink-microwatt = <1000000>;
420			power-role = "dual";
421			sink-pdos =
422				<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
423			source-pdos =
424				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
425			try-power-role = "source";
426
427			ports {
428				#address-cells = <1>;
429				#size-cells = <0>;
430
431				port@0 {
432					reg = <0>;
433
434					usbc0_orien_sw: endpoint {
435						remote-endpoint = <&usbdp_phy0_orientation_switch>;
436					};
437				};
438
439				port@1 {
440					reg = <1>;
441
442					usbc0_role_sw: endpoint {
443						remote-endpoint = <&dwc3_0_role_switch>;
444					};
445				};
446
447				port@2 {
448					reg = <2>;
449
450					dp_altmode_mux: endpoint {
451						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
452					};
453				};
454			};
455		};
456	};
457
458	hym8563: rtc@51 {
459		compatible = "haoyu,hym8563";
460		reg = <0x51>;
461		#clock-cells = <0>;
462		clock-output-names = "hym8563";
463		pinctrl-names = "default";
464		pinctrl-0 = <&hym8563_int>;
465		interrupt-parent = <&gpio0>;
466		interrupts = <RK_PD4 IRQ_TYPE_LEVEL_LOW>;
467		wakeup-source;
468	};
469};
470
471&i2c7 {
472	status = "okay";
473
474	es8388: audio-codec@11 {
475		compatible = "everest,es8388", "everest,es8328";
476		reg = <0x11>;
477		clocks = <&cru I2S0_8CH_MCLKOUT>;
478		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
479		assigned-clock-rates = <12288000>;
480		AVDD-supply = <&avcc_1v8_codec_s0>;
481		DVDD-supply = <&avcc_1v8_codec_s0>;
482		HPVDD-supply = <&vcc_3v3_s0>;
483		PVDD-supply = <&vcc_3v3_s0>;
484		#sound-dai-cells = <0>;
485	};
486};
487
488&i2s0_8ch {
489	pinctrl-0 = <&i2s0_lrck
490		     &i2s0_mclk
491		     &i2s0_sclk
492		     &i2s0_sdi0
493		     &i2s0_sdo0>;
494	status = "okay";
495};
496
497&mdio0 {
498	rgmii_phy: ethernet-phy@1 {
499		/* RTL8211F */
500		compatible = "ethernet-phy-id001c.c916";
501		reg = <0x1>;
502		pinctrl-names = "default";
503		pinctrl-0 = <&rtl8211f_rst>;
504		reset-assert-us = <20000>;
505		reset-deassert-us = <100000>;
506		reset-gpios = <&gpio4 RK_PB3 GPIO_ACTIVE_LOW>;
507	};
508};
509
510&pcie2x1l0 {
511	pinctrl-names = "default";
512	pinctrl-0 = <&pcie2_0_rst>, <&pcie2_0_wake>, <&pcie2_0_clkreq>, <&wifi_host_wake_irq>;
513	reset-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
514	vpcie3v3-supply = <&vcc3v3_wlan>;
515	status = "okay";
516
517	pcie@0,0 {
518		reg = <0x200000 0 0 0 0>;
519		#address-cells = <3>;
520		#size-cells = <2>;
521		ranges;
522		device_type = "pci";
523		bus-range = <0x20 0x2f>;
524
525		wifi: wifi@0,0 {
526			compatible = "pci14e4,449d";
527			reg = <0x210000 0 0 0 0>;
528			clocks = <&hym8563>;
529			clock-names = "lpo";
530		};
531	};
532};
533
534&pcie2x1l1 {
535	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
536	pinctrl-names = "default";
537	pinctrl-0 = <&pcie2_1_rst>, <&rtl8111_isolate>;
538	status = "okay";
539};
540
541&pcie30phy {
542	status = "okay";
543};
544
545&pcie3x4 {
546	pinctrl-names = "default";
547	pinctrl-0 = <&pcie3_reset>;
548	reset-gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
549	vpcie3v3-supply = <&vcc3v3_pcie30>;
550	status = "okay";
551};
552
553&pd_gpu {
554	domain-supply = <&vdd_gpu_s0>;
555};
556
557&pinctrl {
558	audio {
559		hp_detect: headphone-detect {
560			rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
561		};
562
563		headphone_amplifier_en: headphone-amplifier-en {
564			rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
565		};
566
567		speaker_amplifier_en: speaker-amplifier-en {
568			rockchip,pins = <1 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
569		};
570	};
571
572	rtl8111 {
573		rtl8111_isolate: rtl8111-isolate {
574			rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
575		};
576	};
577
578	rtl8211f {
579		rtl8211f_rst: rtl8211f-rst {
580			rockchip,pins = <4 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
581		};
582
583	};
584
585	hym8563 {
586		hym8563_int: hym8563-int {
587			rockchip,pins = <0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
588		};
589	};
590
591	pcie2 {
592		pcie2_0_rst: pcie2-0-rst {
593			rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
594		};
595
596		pcie2_0_wake: pcie2-0-wake {
597			rockchip,pins = <4 RK_PA4 4 &pcfg_pull_none>;
598		};
599
600		pcie2_0_clkreq: pcie2-0-clkreq {
601			rockchip,pins = <4 RK_PA3 4 &pcfg_pull_none>;
602		};
603
604		pcie2_1_rst: pcie2-1-rst {
605			rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
606		};
607	};
608
609	pcie3 {
610		pcie3_reset: pcie3-reset {
611			rockchip,pins = <4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
612		};
613
614		vcc3v3_pcie30_en: vcc3v3-pcie30-en {
615			rockchip,pins = <3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
616		};
617	};
618
619	usb {
620		vcc5v0_host_en: vcc5v0-host-en {
621			rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
622		};
623	};
624
625	usb-typec {
626		typec5v_pwren: typec5v-pwren {
627			rockchip,pins = <4 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
628		};
629
630		usbc0_int: usbc0-int {
631			rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
632		};
633	};
634
635	wlan {
636		wifi_host_wake_irq: wifi-host-wake-irq {
637			rockchip,pins = <3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_down>;
638		};
639
640		wifi_pwren: wifi-pwren {
641			rockchip,pins = <3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
642		};
643	};
644};
645
646&pwm2 {
647	status = "okay";
648};
649
650&saradc {
651	vref-supply = <&vcc_1v8_s0>;
652	status = "okay";
653};
654
655&sdhci {
656	bus-width = <8>;
657	no-sdio;
658	no-sd;
659	non-removable;
660	mmc-hs400-1_8v;
661	mmc-hs400-enhanced-strobe;
662	status = "okay";
663};
664
665&spi2 {
666	status = "okay";
667	assigned-clocks = <&cru CLK_SPI2>;
668	assigned-clock-rates = <200000000>;
669	num-cs = <2>;
670
671	pmic@0 {
672		compatible = "rockchip,rk806";
673		reg = <0x0>;
674		#gpio-cells = <2>;
675		gpio-controller;
676		interrupt-parent = <&gpio0>;
677		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
678		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
679			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
680		pinctrl-names = "default";
681		spi-max-frequency = <1000000>;
682		system-power-controller;
683
684		vcc1-supply = <&vcc5v0_sys>;
685		vcc2-supply = <&vcc5v0_sys>;
686		vcc3-supply = <&vcc5v0_sys>;
687		vcc4-supply = <&vcc5v0_sys>;
688		vcc5-supply = <&vcc5v0_sys>;
689		vcc6-supply = <&vcc5v0_sys>;
690		vcc7-supply = <&vcc5v0_sys>;
691		vcc8-supply = <&vcc5v0_sys>;
692		vcc9-supply = <&vcc5v0_sys>;
693		vcc10-supply = <&vcc5v0_sys>;
694		vcc11-supply = <&vcc_2v0_pldo_s3>;
695		vcc12-supply = <&vcc5v0_sys>;
696		vcc13-supply = <&vcc5v0_sys>;
697		vcc14-supply = <&vcc_1v1_nldo_s3>;
698		vcca-supply = <&vcc5v0_sys>;
699
700		rk806_dvs1_null: dvs1-null-pins {
701			pins = "gpio_pwrctrl1";
702			function = "pin_fun0";
703		};
704
705		rk806_dvs2_null: dvs2-null-pins {
706			pins = "gpio_pwrctrl2";
707			function = "pin_fun0";
708		};
709
710		rk806_dvs3_null: dvs3-null-pins {
711			pins = "gpio_pwrctrl3";
712			function = "pin_fun0";
713		};
714
715
716		regulators {
717			vdd_gpu_s0: dcdc-reg1 {
718				/* regulator coupling requires always-on */
719				regulator-always-on;
720				regulator-boot-on;
721				regulator-min-microvolt = <550000>;
722				regulator-max-microvolt = <950000>;
723				regulator-ramp-delay = <12500>;
724				regulator-name = "vdd_gpu_s0";
725				regulator-enable-ramp-delay = <400>;
726				regulator-coupled-with = <&vdd_gpu_mem_s0>;
727				regulator-coupled-max-spread = <10000>;
728				regulator-state-mem {
729					regulator-off-in-suspend;
730				};
731			};
732
733			vdd_npu_s0: dcdc-reg2 {
734				regulator-always-on;
735				regulator-boot-on;
736				regulator-min-microvolt = <550000>;
737				regulator-max-microvolt = <950000>;
738				regulator-ramp-delay = <12500>;
739				regulator-name = "vdd_npu_s0";
740				regulator-state-mem {
741					regulator-off-in-suspend;
742				};
743			};
744
745			vdd_log_s0: dcdc-reg3 {
746				regulator-always-on;
747				regulator-boot-on;
748				regulator-min-microvolt = <675000>;
749				regulator-max-microvolt = <750000>;
750				regulator-ramp-delay = <12500>;
751				regulator-name = "vdd_log_s0";
752				regulator-state-mem {
753					regulator-off-in-suspend;
754					regulator-suspend-microvolt = <750000>;
755				};
756			};
757
758			vdd_vdenc_s0: dcdc-reg4 {
759				regulator-always-on;
760				regulator-boot-on;
761				regulator-min-microvolt = <550000>;
762				regulator-max-microvolt = <950000>;
763				regulator-ramp-delay = <12500>;
764				regulator-name = "vdd_vdenc_s0";
765				regulator-state-mem {
766					regulator-off-in-suspend;
767				};
768
769			};
770
771			vdd_gpu_mem_s0: dcdc-reg5 {
772				/* regulator coupling requires always-on */
773				regulator-always-on;
774				regulator-boot-on;
775				regulator-min-microvolt = <675000>;
776				regulator-max-microvolt = <950000>;
777				regulator-ramp-delay = <12500>;
778				regulator-enable-ramp-delay = <400>;
779				regulator-name = "vdd_gpu_mem_s0";
780				regulator-coupled-with = <&vdd_gpu_s0>;
781				regulator-coupled-max-spread = <10000>;
782				regulator-state-mem {
783					regulator-off-in-suspend;
784				};
785
786			};
787
788			vdd_npu_mem_s0: dcdc-reg6 {
789				regulator-always-on;
790				regulator-boot-on;
791				regulator-min-microvolt = <675000>;
792				regulator-max-microvolt = <950000>;
793				regulator-ramp-delay = <12500>;
794				regulator-name = "vdd_npu_mem_s0";
795				regulator-state-mem {
796					regulator-off-in-suspend;
797				};
798
799			};
800
801			vcc_2v0_pldo_s3: dcdc-reg7 {
802				regulator-always-on;
803				regulator-boot-on;
804				regulator-min-microvolt = <2000000>;
805				regulator-max-microvolt = <2000000>;
806				regulator-ramp-delay = <12500>;
807				regulator-name = "vdd_2v0_pldo_s3";
808				regulator-state-mem {
809					regulator-on-in-suspend;
810					regulator-suspend-microvolt = <2000000>;
811				};
812			};
813
814			vdd_vdenc_mem_s0: dcdc-reg8 {
815				regulator-always-on;
816				regulator-boot-on;
817				regulator-min-microvolt = <675000>;
818				regulator-max-microvolt = <950000>;
819				regulator-ramp-delay = <12500>;
820				regulator-name = "vdd_vdenc_mem_s0";
821				regulator-state-mem {
822					regulator-off-in-suspend;
823				};
824			};
825
826			vdd2_ddr_s3: dcdc-reg9 {
827				regulator-always-on;
828				regulator-boot-on;
829				regulator-name = "vdd2_ddr_s3";
830				regulator-state-mem {
831					regulator-on-in-suspend;
832				};
833			};
834
835			vcc_1v1_nldo_s3: dcdc-reg10 {
836				regulator-always-on;
837				regulator-boot-on;
838				regulator-min-microvolt = <1100000>;
839				regulator-max-microvolt = <1100000>;
840				regulator-ramp-delay = <12500>;
841				regulator-name = "vcc_1v1_nldo_s3";
842				regulator-state-mem {
843					regulator-on-in-suspend;
844					regulator-suspend-microvolt = <1100000>;
845				};
846			};
847
848			avcc_1v8_s0: pldo-reg1 {
849				regulator-always-on;
850				regulator-boot-on;
851				regulator-min-microvolt = <1800000>;
852				regulator-max-microvolt = <1800000>;
853				regulator-ramp-delay = <12500>;
854				regulator-name = "avcc_1v8_s0";
855				regulator-state-mem {
856					regulator-off-in-suspend;
857				};
858			};
859
860			vdd1_1v8_ddr_s3: pldo-reg2 {
861				regulator-always-on;
862				regulator-boot-on;
863				regulator-min-microvolt = <1800000>;
864				regulator-max-microvolt = <1800000>;
865				regulator-ramp-delay = <12500>;
866				regulator-name = "vdd1_1v8_ddr_s3";
867				regulator-state-mem {
868					regulator-on-in-suspend;
869					regulator-suspend-microvolt = <1800000>;
870				};
871			};
872
873			avcc_1v8_codec_s0: pldo-reg3 {
874				regulator-always-on;
875				regulator-boot-on;
876				regulator-min-microvolt = <1800000>;
877				regulator-max-microvolt = <1800000>;
878				regulator-ramp-delay = <12500>;
879				regulator-name = "avcc_1v8_codec_s0";
880				regulator-state-mem {
881					regulator-off-in-suspend;
882				};
883			};
884
885			vcc_3v3_s3: pldo-reg4 {
886				regulator-always-on;
887				regulator-boot-on;
888				regulator-min-microvolt = <3300000>;
889				regulator-max-microvolt = <3300000>;
890				regulator-ramp-delay = <12500>;
891				regulator-name = "vcc_3v3_s3";
892				regulator-state-mem {
893					regulator-on-in-suspend;
894					regulator-suspend-microvolt = <3300000>;
895				};
896			};
897
898			vccio_sd_s0: pldo-reg5 {
899				regulator-always-on;
900				regulator-boot-on;
901				regulator-min-microvolt = <1800000>;
902				regulator-max-microvolt = <3300000>;
903				regulator-ramp-delay = <12500>;
904				regulator-name = "vccio_sd_s0";
905				regulator-state-mem {
906					regulator-off-in-suspend;
907				};
908			};
909
910			vccio_1v8_s3: pldo-reg6 {
911				regulator-always-on;
912				regulator-boot-on;
913				regulator-min-microvolt = <1800000>;
914				regulator-max-microvolt = <1800000>;
915				regulator-ramp-delay = <12500>;
916				regulator-name = "vccio_1v8_s3";
917				regulator-state-mem {
918					regulator-on-in-suspend;
919					regulator-suspend-microvolt = <1800000>;
920				};
921			};
922
923			vdd_0v75_s3: nldo-reg1 {
924				regulator-always-on;
925				regulator-boot-on;
926				regulator-min-microvolt = <750000>;
927				regulator-max-microvolt = <750000>;
928				regulator-ramp-delay = <12500>;
929				regulator-name = "vdd_0v75_s3";
930				regulator-state-mem {
931					regulator-on-in-suspend;
932					regulator-suspend-microvolt = <750000>;
933				};
934			};
935
936			vdd2l_0v9_ddr_s3: nldo-reg2 {
937				regulator-always-on;
938				regulator-boot-on;
939				regulator-min-microvolt = <900000>;
940				regulator-max-microvolt = <900000>;
941				regulator-name = "vdd2l_0v9_ddr_s3";
942				regulator-state-mem {
943					regulator-on-in-suspend;
944					regulator-suspend-microvolt = <900000>;
945				};
946			};
947
948			vdd_0v75_hdmi_edp_s0: nldo-reg3 {
949				regulator-always-on;
950				regulator-boot-on;
951				regulator-min-microvolt = <750000>;
952				regulator-max-microvolt = <750000>;
953				regulator-name = "vdd_0v75_hdmi_edp_s0";
954				regulator-state-mem {
955					regulator-off-in-suspend;
956				};
957			};
958
959			avdd_0v75_s0: nldo-reg4 {
960				regulator-always-on;
961				regulator-boot-on;
962				regulator-min-microvolt = <750000>;
963				regulator-max-microvolt = <750000>;
964				regulator-name = "avdd_0v75_s0";
965				regulator-state-mem {
966					regulator-off-in-suspend;
967				};
968			};
969
970			vdd_0v85_s0: nldo-reg5 {
971				regulator-always-on;
972				regulator-boot-on;
973				regulator-min-microvolt = <850000>;
974				regulator-max-microvolt = <850000>;
975				regulator-name = "vdd_0v85_s0";
976				regulator-state-mem {
977					regulator-off-in-suspend;
978				};
979			};
980		};
981	};
982
983	pmic@1 {
984		compatible = "rockchip,rk806";
985		reg = <0x01>;
986		#gpio-cells = <2>;
987		gpio-controller;
988		interrupt-parent = <&gpio0>;
989		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
990		pinctrl-0 = <&rk806_slave_dvs1_null>, <&rk806_slave_dvs2_null>,
991			    <&rk806_slave_dvs3_null>;
992		pinctrl-names = "default";
993		spi-max-frequency = <1000000>;
994
995		vcc1-supply = <&vcc5v0_sys>;
996		vcc2-supply = <&vcc5v0_sys>;
997		vcc3-supply = <&vcc5v0_sys>;
998		vcc4-supply = <&vcc5v0_sys>;
999		vcc5-supply = <&vcc5v0_sys>;
1000		vcc6-supply = <&vcc5v0_sys>;
1001		vcc7-supply = <&vcc5v0_sys>;
1002		vcc8-supply = <&vcc5v0_sys>;
1003		vcc9-supply = <&vcc5v0_sys>;
1004		vcc10-supply = <&vcc5v0_sys>;
1005		vcc11-supply = <&vcc_2v0_pldo_s3>;
1006		vcc12-supply = <&vcc5v0_sys>;
1007		vcc13-supply = <&vcc_1v1_nldo_s3>;
1008		vcc14-supply = <&vcc_2v0_pldo_s3>;
1009		vcca-supply = <&vcc5v0_sys>;
1010
1011		rk806_slave_dvs1_null: dvs1-null-pins {
1012			pins = "gpio_pwrctrl1";
1013			function = "pin_fun0";
1014		};
1015
1016		rk806_slave_dvs2_null: dvs2-null-pins {
1017			pins = "gpio_pwrctrl2";
1018			function = "pin_fun0";
1019		};
1020
1021		rk806_slave_dvs3_null: dvs3-null-pins {
1022			pins = "gpio_pwrctrl3";
1023			function = "pin_fun0";
1024		};
1025
1026		regulators {
1027			vdd_cpu_big1_s0: dcdc-reg1 {
1028				regulator-always-on;
1029				regulator-boot-on;
1030				regulator-coupled-with = <&vdd_cpu_big1_mem_s0>;
1031				regulator-coupled-max-spread = <10000>;
1032				regulator-min-microvolt = <550000>;
1033				regulator-max-microvolt = <1050000>;
1034				regulator-ramp-delay = <12500>;
1035				regulator-name = "vdd_cpu_big1_s0";
1036				regulator-state-mem {
1037					regulator-off-in-suspend;
1038				};
1039			};
1040
1041			vdd_cpu_big0_s0: dcdc-reg2 {
1042				regulator-always-on;
1043				regulator-boot-on;
1044				regulator-coupled-with = <&vdd_cpu_big0_mem_s0>;
1045				regulator-coupled-max-spread = <10000>;
1046				regulator-min-microvolt = <550000>;
1047				regulator-max-microvolt = <1050000>;
1048				regulator-ramp-delay = <12500>;
1049				regulator-name = "vdd_cpu_big0_s0";
1050				regulator-state-mem {
1051					regulator-off-in-suspend;
1052				};
1053			};
1054
1055			vdd_cpu_lit_s0: dcdc-reg3 {
1056				regulator-always-on;
1057				regulator-boot-on;
1058				regulator-coupled-with = <&vdd_cpu_lit_mem_s0>;
1059				regulator-coupled-max-spread = <10000>;
1060				regulator-min-microvolt = <550000>;
1061				regulator-max-microvolt = <950000>;
1062				regulator-ramp-delay = <12500>;
1063				regulator-name = "vdd_cpu_lit_s0";
1064				regulator-state-mem {
1065					regulator-off-in-suspend;
1066				};
1067			};
1068
1069			vcc_3v3_s0: dcdc-reg4 {
1070				regulator-always-on;
1071				regulator-boot-on;
1072				regulator-min-microvolt = <3300000>;
1073				regulator-max-microvolt = <3300000>;
1074				regulator-ramp-delay = <12500>;
1075				regulator-name = "vcc_3v3_s0";
1076				regulator-state-mem {
1077					regulator-off-in-suspend;
1078				};
1079			};
1080
1081			vdd_cpu_big1_mem_s0: dcdc-reg5 {
1082				regulator-always-on;
1083				regulator-boot-on;
1084				regulator-coupled-with = <&vdd_cpu_big1_s0>;
1085				regulator-coupled-max-spread = <10000>;
1086				regulator-min-microvolt = <675000>;
1087				regulator-max-microvolt = <1050000>;
1088				regulator-ramp-delay = <12500>;
1089				regulator-name = "vdd_cpu_big1_mem_s0";
1090				regulator-state-mem {
1091					regulator-off-in-suspend;
1092				};
1093			};
1094
1095
1096			vdd_cpu_big0_mem_s0: dcdc-reg6 {
1097				regulator-always-on;
1098				regulator-boot-on;
1099				regulator-coupled-with = <&vdd_cpu_big0_s0>;
1100				regulator-coupled-max-spread = <10000>;
1101				regulator-min-microvolt = <675000>;
1102				regulator-max-microvolt = <1050000>;
1103				regulator-ramp-delay = <12500>;
1104				regulator-name = "vdd_cpu_big0_mem_s0";
1105				regulator-state-mem {
1106					regulator-off-in-suspend;
1107				};
1108			};
1109
1110			vcc_1v8_s0: dcdc-reg7 {
1111				regulator-always-on;
1112				regulator-boot-on;
1113				regulator-min-microvolt = <1800000>;
1114				regulator-max-microvolt = <1800000>;
1115				regulator-ramp-delay = <12500>;
1116				regulator-name = "vcc_1v8_s0";
1117				regulator-state-mem {
1118					regulator-off-in-suspend;
1119				};
1120			};
1121
1122			vdd_cpu_lit_mem_s0: dcdc-reg8 {
1123				regulator-always-on;
1124				regulator-boot-on;
1125				regulator-coupled-with = <&vdd_cpu_lit_s0>;
1126				regulator-coupled-max-spread = <10000>;
1127				regulator-min-microvolt = <675000>;
1128				regulator-max-microvolt = <950000>;
1129				regulator-ramp-delay = <12500>;
1130				regulator-name = "vdd_cpu_lit_mem_s0";
1131				regulator-state-mem {
1132					regulator-off-in-suspend;
1133				};
1134			};
1135
1136			vddq_ddr_s0: dcdc-reg9 {
1137				regulator-always-on;
1138				regulator-boot-on;
1139				regulator-name = "vddq_ddr_s0";
1140				regulator-state-mem {
1141					regulator-off-in-suspend;
1142				};
1143			};
1144
1145			vdd_ddr_s0: dcdc-reg10 {
1146				regulator-always-on;
1147				regulator-boot-on;
1148				regulator-min-microvolt = <675000>;
1149				regulator-max-microvolt = <900000>;
1150				regulator-ramp-delay = <12500>;
1151				regulator-name = "vdd_ddr_s0";
1152				regulator-state-mem {
1153					regulator-off-in-suspend;
1154				};
1155			};
1156
1157			vcc_1v8_cam_s0: pldo-reg1 {
1158				regulator-always-on;
1159				regulator-boot-on;
1160				regulator-min-microvolt = <1800000>;
1161				regulator-max-microvolt = <1800000>;
1162				regulator-ramp-delay = <12500>;
1163				regulator-name = "vcc_1v8_cam_s0";
1164				regulator-state-mem {
1165					regulator-off-in-suspend;
1166				};
1167			};
1168
1169			avdd1v8_ddr_pll_s0: pldo-reg2 {
1170				regulator-always-on;
1171				regulator-boot-on;
1172				regulator-min-microvolt = <1800000>;
1173				regulator-max-microvolt = <1800000>;
1174				regulator-ramp-delay = <12500>;
1175				regulator-name = "avdd1v8_ddr_pll_s0";
1176				regulator-state-mem {
1177					regulator-off-in-suspend;
1178				};
1179			};
1180
1181			vdd_1v8_pll_s0: pldo-reg3 {
1182				regulator-always-on;
1183				regulator-boot-on;
1184				regulator-min-microvolt = <1800000>;
1185				regulator-max-microvolt = <1800000>;
1186				regulator-ramp-delay = <12500>;
1187				regulator-name = "vdd_1v8_pll_s0";
1188				regulator-state-mem {
1189					regulator-off-in-suspend;
1190				};
1191			};
1192
1193			vcc_3v3_sd_s0: pldo-reg4 {
1194				regulator-always-on;
1195				regulator-boot-on;
1196				regulator-min-microvolt = <3300000>;
1197				regulator-max-microvolt = <3300000>;
1198				regulator-ramp-delay = <12500>;
1199				regulator-name = "vcc_3v3_sd_s0";
1200				regulator-state-mem {
1201					regulator-off-in-suspend;
1202				};
1203			};
1204
1205			vcc_2v8_cam_s0: pldo-reg5 {
1206				regulator-always-on;
1207				regulator-boot-on;
1208				regulator-min-microvolt = <2800000>;
1209				regulator-max-microvolt = <2800000>;
1210				regulator-ramp-delay = <12500>;
1211				regulator-name = "vcc_2v8_cam_s0";
1212				regulator-state-mem {
1213					regulator-off-in-suspend;
1214				};
1215			};
1216
1217			pldo6_s3: pldo-reg6 {
1218				regulator-always-on;
1219				regulator-boot-on;
1220				regulator-min-microvolt = <1800000>;
1221				regulator-max-microvolt = <1800000>;
1222				regulator-name = "pldo6_s3";
1223				regulator-state-mem {
1224					regulator-on-in-suspend;
1225					regulator-suspend-microvolt = <1800000>;
1226				};
1227			};
1228
1229			vdd_0v75_pll_s0: nldo-reg1 {
1230				regulator-always-on;
1231				regulator-boot-on;
1232				regulator-min-microvolt = <750000>;
1233				regulator-max-microvolt = <750000>;
1234				regulator-ramp-delay = <12500>;
1235				regulator-name = "vdd_0v75_pll_s0";
1236				regulator-state-mem {
1237					regulator-off-in-suspend;
1238				};
1239			};
1240
1241			vdd_ddr_pll_s0: nldo-reg2 {
1242				regulator-always-on;
1243				regulator-boot-on;
1244				regulator-min-microvolt = <850000>;
1245				regulator-max-microvolt = <850000>;
1246				regulator-name = "vdd_ddr_pll_s0";
1247				regulator-state-mem {
1248					regulator-off-in-suspend;
1249				};
1250			};
1251
1252			avdd_0v85_s0: nldo-reg3 {
1253				regulator-always-on;
1254				regulator-boot-on;
1255				regulator-min-microvolt = <850000>;
1256				regulator-max-microvolt = <850000>;
1257				regulator-ramp-delay = <12500>;
1258				regulator-name = "avdd_0v85_s0";
1259				regulator-state-mem {
1260					regulator-off-in-suspend;
1261				};
1262			};
1263
1264			avdd_1v2_cam_s0: nldo-reg4 {
1265				regulator-always-on;
1266				regulator-boot-on;
1267				regulator-min-microvolt = <1200000>;
1268				regulator-max-microvolt = <1200000>;
1269				regulator-ramp-delay = <12500>;
1270				regulator-name = "avdd_1v2_cam_s0";
1271				regulator-state-mem {
1272					regulator-off-in-suspend;
1273				};
1274			};
1275
1276			avdd_1v2_s0: nldo-reg5 {
1277				regulator-always-on;
1278				regulator-boot-on;
1279				regulator-min-microvolt = <1200000>;
1280				regulator-max-microvolt = <1200000>;
1281				regulator-ramp-delay = <12500>;
1282				regulator-name = "avdd_1v2_s0";
1283				regulator-state-mem {
1284					regulator-off-in-suspend;
1285				};
1286			};
1287		};
1288	};
1289};
1290
1291&sata0 {
1292	status = "okay";
1293};
1294
1295&tsadc {
1296	status = "okay";
1297};
1298
1299&u2phy0 {
1300	status = "okay";
1301};
1302
1303&u2phy0_otg {
1304	status = "okay";
1305};
1306
1307&u2phy1 {
1308	status = "okay";
1309};
1310
1311&u2phy1_otg {
1312	status = "okay";
1313};
1314
1315&u2phy2 {
1316	status = "okay";
1317};
1318
1319&u2phy2_host {
1320	phy-supply = <&vcc5v0_host>;
1321	status = "okay";
1322};
1323
1324&u2phy3 {
1325	status = "okay";
1326};
1327
1328&u2phy3_host {
1329	phy-supply = <&vcc5v0_host>;
1330	status = "okay";
1331};
1332
1333&uart2 {
1334	pinctrl-0 = <&uart2m0_xfer>;
1335	status = "okay";
1336};
1337
1338&usb_host0_ehci {
1339	status = "okay";
1340};
1341
1342&usb_host0_ohci {
1343	status = "okay";
1344};
1345
1346&usb_host1_ehci {
1347	status = "okay";
1348};
1349
1350&usb_host1_ohci {
1351	status = "okay";
1352};
1353
1354&usbdp_phy0 {
1355	mode-switch;
1356	orientation-switch;
1357	sbu1-dc-gpios = <&gpio4 RK_PA6 GPIO_ACTIVE_HIGH>;
1358	sbu2-dc-gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
1359	status = "okay";
1360
1361	port {
1362		#address-cells = <1>;
1363		#size-cells = <0>;
1364
1365		usbdp_phy0_orientation_switch: endpoint@0 {
1366			reg = <0>;
1367			remote-endpoint = <&usbc0_orien_sw>;
1368		};
1369
1370		usbdp_phy0_dp_altmode_mux: endpoint@1 {
1371			reg = <1>;
1372			remote-endpoint = <&dp_altmode_mux>;
1373		};
1374	};
1375};
1376
1377&usbdp_phy1 {
1378	/*
1379	 * USBDP PHY1 is wired to a female USB3 Type-A connector. Additionally
1380	 * the differential pairs 2+3 and the aux channel are wired to a RTD2166,
1381	 * which converts the DP signal into VGA. This is exposed on the
1382	 * board via a female VGA connector.
1383	 */
1384	rockchip,dp-lane-mux = <2 3>;
1385	status = "okay";
1386};
1387
1388&usb_host0_xhci {
1389	dr_mode = "otg";
1390	usb-role-switch;
1391	status = "okay";
1392
1393	port {
1394		#address-cells = <1>;
1395		#size-cells = <0>;
1396
1397		dwc3_0_role_switch: endpoint@0 {
1398			reg = <0>;
1399			remote-endpoint = <&usbc0_role_sw>;
1400		};
1401	};
1402};
1403
1404&usb_host1_xhci {
1405	dr_mode = "host";
1406	status = "okay";
1407};
1408
1409&vop {
1410	status = "okay";
1411};
1412
1413&vop_mmu {
1414	status = "okay";
1415};
1416
1417&vp0 {
1418	vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
1419		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
1420		remote-endpoint = <&hdmi0_in_vp0>;
1421	};
1422};
1423
1424&vp1 {
1425	vp1_out_hdmi1: endpoint@ROCKCHIP_VOP2_EP_HDMI1 {
1426		reg = <ROCKCHIP_VOP2_EP_HDMI1>;
1427		remote-endpoint = <&hdmi1_in_vp1>;
1428	};
1429};
1430