1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2024 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/usb/pd.h>
13#include "rk3588s.dtsi"
14
15/ {
16	model = "Rockchip RK3588S EVB1 V10 Board";
17	compatible = "rockchip,rk3588s-evb1-v10", "rockchip,rk3588s";
18
19	aliases {
20		mmc0 = &sdhci;
21		mmc1 = &sdmmc;
22	};
23
24	chosen {
25		stdout-path = "serial2:1500000n8";
26	};
27
28	adc-keys {
29		compatible = "adc-keys";
30		io-channels = <&saradc 1>;
31		io-channel-names = "buttons";
32		keyup-threshold-microvolt = <1800000>;
33		poll-interval = <100>;
34
35		button-escape {
36			label = "Escape";
37			linux,code = <KEY_ESC>;
38			press-threshold-microvolt = <1235000>;
39		};
40
41		button-menu {
42			label = "Menu";
43			linux,code = <KEY_MENU>;
44			press-threshold-microvolt = <890000>;
45		};
46
47		button-vol-up {
48			label = "Volume Up";
49			linux,code = <KEY_VOLUMEUP>;
50			press-threshold-microvolt = <17000>;
51		};
52
53		button-vol-down {
54			label = "Volume Down";
55			linux,code = <KEY_VOLUMEDOWN>;
56			press-threshold-microvolt = <417000>;
57		};
58	};
59
60	amp_headphone: amplifier-headphone {
61		compatible = "simple-audio-amplifier";
62		enable-gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
63		pinctrl-names = "default";
64		pinctrl-0 = <&headphone_amplifier_en>;
65		sound-name-prefix = "Headphones Amplifier";
66	};
67
68	amp_speaker: amplifier-speaker {
69		compatible = "simple-audio-amplifier";
70		enable-gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
71		pinctrl-names = "default";
72		pinctrl-0 = <&speaker_amplifier_en>;
73		sound-name-prefix = "Speaker Amplifier";
74	};
75
76	analog-sound {
77		compatible = "simple-audio-card";
78		pinctrl-names = "default";
79		pinctrl-0 = <&hp_detect>;
80		simple-audio-card,name = "RK3588 EVB1 Audio";
81		simple-audio-card,aux-devs = <&amp_headphone>, <&amp_speaker>;
82		simple-audio-card,bitclock-master = <&masterdai>;
83		simple-audio-card,format = "i2s";
84		simple-audio-card,frame-master = <&masterdai>;
85		simple-audio-card,hp-det-gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
86		simple-audio-card,mclk-fs = <256>;
87		simple-audio-card,pin-switches = "Headphones", "Speaker";
88		simple-audio-card,routing =
89			"Speaker Amplifier INL", "LOUT2",
90			"Speaker Amplifier INR", "ROUT2",
91			"Speaker", "Speaker Amplifier OUTL",
92			"Speaker", "Speaker Amplifier OUTR",
93			"Headphones Amplifier INL", "LOUT1",
94			"Headphones Amplifier INR", "ROUT1",
95			"Headphones", "Headphones Amplifier OUTL",
96			"Headphones", "Headphones Amplifier OUTR",
97			"LINPUT1", "Onboard Microphone",
98			"RINPUT1", "Onboard Microphone",
99			"LINPUT2", "Microphone Jack",
100			"RINPUT2", "Microphone Jack";
101		simple-audio-card,widgets =
102			"Microphone", "Microphone Jack",
103			"Microphone", "Onboard Microphone",
104			"Headphone", "Headphones",
105			"Speaker", "Speaker";
106
107		simple-audio-card,cpu {
108			sound-dai = <&i2s0_8ch>;
109		};
110
111		masterdai: simple-audio-card,codec {
112			sound-dai = <&es8388>;
113			system-clock-frequency = <12288000>;
114		};
115	};
116
117	backlight: backlight {
118		compatible = "pwm-backlight";
119		power-supply = <&vcc3v3_lcd_edp>;
120		pwms = <&pwm12 0 25000 0>;
121	};
122
123	combophy_avdd0v85: regulator-combophy-avdd0v85 {
124		compatible = "regulator-fixed";
125		regulator-name = "combophy_avdd0v85";
126		regulator-always-on;
127		regulator-boot-on;
128		regulator-min-microvolt = <850000>;
129		regulator-max-microvolt = <850000>;
130		vin-supply = <&vdd_0v85_s0>;
131	};
132
133	combophy_avdd1v8: regulator-combophy-avdd1v8 {
134		compatible = "regulator-fixed";
135		regulator-name = "combophy_avdd1v8";
136		regulator-always-on;
137		regulator-boot-on;
138		regulator-min-microvolt = <1800000>;
139		regulator-max-microvolt = <1800000>;
140		vin-supply = <&avcc_1v8_s0>;
141	};
142
143	vbus5v0_typec: regulator-vbus5v0-typec {
144		compatible = "regulator-fixed";
145		enable-active-high;
146		gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
147		pinctrl-names = "default";
148		pinctrl-0 = <&typec5v_pwren>;
149		regulator-name = "vbus5v0_typec";
150		regulator-min-microvolt = <5000000>;
151		regulator-max-microvolt = <5000000>;
152		vin-supply = <&vcc5v0_usb>;
153	};
154
155	vcc12v_dcin: regulator-vcc12v-dcin {
156		compatible = "regulator-fixed";
157		regulator-name = "vcc12v_dcin";
158		regulator-always-on;
159		regulator-boot-on;
160		regulator-min-microvolt = <12000000>;
161		regulator-max-microvolt = <12000000>;
162	};
163
164	vcc3v3_lcd_edp: regulator-vcc3v3-lcd-edp {
165		compatible = "regulator-fixed";
166		enable-active-high;
167		gpios = <&gpio1 RK_PA5 GPIO_ACTIVE_HIGH>;
168		pinctrl-names = "default";
169		pinctrl-0 = <&vcc3v3_lcd_edp_en>;
170		regulator-name = "vcc3v3_lcd_edp";
171		regulator-boot-on;
172		vin-supply = <&vcc_3v3_s3>;
173	};
174
175	vcc3v3_pcie20: regulator-vcc3v3-pcie20 {
176		compatible = "regulator-fixed";
177		enable-active-high;
178		gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
179		pinctrl-names = "default";
180		pinctrl-0 = <&vcc3v3_pcie20_en>;
181		regulator-name = "vcc3v3_pcie20";
182		regulator-min-microvolt = <3300000>;
183		regulator-max-microvolt = <3300000>;
184		startup-delay-us = <5000>;
185		vin-supply = <&vcc12v_dcin>;
186	};
187
188	vcc5v0_host: regulator-vcc5v0-host {
189		compatible = "regulator-fixed";
190		enable-active-high;
191		gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
192		pinctrl-names = "default";
193		pinctrl-0 = <&vcc5v0_host_en>;
194		regulator-name = "vcc5v0_host";
195		regulator-always-on;
196		regulator-boot-on;
197		regulator-min-microvolt = <5000000>;
198		regulator-max-microvolt = <5000000>;
199		vin-supply = <&vcc5v0_usb>;
200	};
201
202	vcc5v0_sys: regulator-vcc5v0-sys {
203		compatible = "regulator-fixed";
204		regulator-name = "vcc5v0_sys";
205		regulator-always-on;
206		regulator-boot-on;
207		regulator-min-microvolt = <5000000>;
208		regulator-max-microvolt = <5000000>;
209		vin-supply = <&vcc12v_dcin>;
210	};
211
212	vcc5v0_usb: regulator-vcc5v0-usb {
213		compatible = "regulator-fixed";
214		regulator-name = "vcc5v0_usb";
215		regulator-always-on;
216		regulator-boot-on;
217		regulator-min-microvolt = <5000000>;
218		regulator-max-microvolt = <5000000>;
219		vin-supply = <&vcc5v0_usbdcin>;
220	};
221
222	vcc5v0_usbdcin: regulator-vcc5v0-usbdcin {
223		compatible = "regulator-fixed";
224		regulator-name = "vcc5v0_usbdcin";
225		regulator-always-on;
226		regulator-boot-on;
227		regulator-min-microvolt = <5000000>;
228		regulator-max-microvolt = <5000000>;
229		vin-supply = <&vcc12v_dcin>;
230	};
231};
232
233&combphy0_ps {
234	status = "okay";
235};
236
237&combphy2_psu {
238	status = "okay";
239};
240
241&i2c3 {
242	status = "okay";
243
244	es8388: audio-codec@11 {
245		compatible = "everest,es8388", "everest,es8328";
246		reg = <0x11>;
247		clocks = <&cru I2S0_8CH_MCLKOUT>;
248		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
249		assigned-clock-rates = <12288000>;
250		AVDD-supply = <&avcc_1v8_s0>;
251		DVDD-supply = <&avcc_1v8_s0>;
252		HPVDD-supply = <&vcc_3v3_s0>;
253		PVDD-supply = <&vcc_3v3_s0>;
254		#sound-dai-cells = <0>;
255	};
256};
257
258&i2c8 {
259	pinctrl-names = "default";
260	pinctrl-0 = <&i2c8m2_xfer>;
261	status = "okay";
262
263	usbc0: usb-typec@22 {
264		compatible = "fcs,fusb302";
265		reg = <0x22>;
266		interrupt-parent = <&gpio0>;
267		interrupts = <RK_PD3 IRQ_TYPE_LEVEL_LOW>;
268		pinctrl-names = "default";
269		pinctrl-0 = <&usbc0_int>;
270		vbus-supply = <&vbus5v0_typec>;
271
272		usb_con: connector {
273			compatible = "usb-c-connector";
274			label = "USB-C";
275			data-role = "dual";
276			op-sink-microwatt = <1000000>;
277			power-role = "dual";
278			sink-pdos =
279				<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
280			source-pdos =
281				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
282			try-power-role = "source";
283
284			ports {
285				#address-cells = <1>;
286				#size-cells = <0>;
287
288				port@0 {
289					reg = <0>;
290
291					usbc0_orien_sw: endpoint {
292						remote-endpoint = <&usbdp_phy0_orientation_switch>;
293					};
294				};
295
296				port@1 {
297					reg = <1>;
298
299					usbc0_role_sw: endpoint {
300						remote-endpoint = <&dwc3_0_role_switch>;
301					};
302				};
303
304				port@2 {
305					reg = <2>;
306
307					dp_altmode_mux: endpoint {
308						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
309					};
310				};
311			};
312		};
313	};
314
315	hym8563: rtc@51 {
316		compatible = "haoyu,hym8563";
317		reg = <0x51>;
318		#clock-cells = <0>;
319		clock-output-names = "hym8563";
320		pinctrl-names = "default";
321		pinctrl-0 = <&hym8563_int>;
322		interrupt-parent = <&gpio0>;
323		interrupts = <RK_PC4 IRQ_TYPE_LEVEL_LOW>;
324		wakeup-source;
325	};
326};
327
328&pcie2x1l1 {
329	pinctrl-names = "default";
330	pinctrl-0 = <&pcie2_1_rst>;
331	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
332	vpcie3v3-supply = <&vcc3v3_pcie20>;
333	status = "okay";
334};
335
336&pcie2x1l2 {
337	pinctrl-names = "default";
338	pinctrl-0 = <&pcie2_2_rst>;
339	reset-gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>;
340	status = "okay";
341};
342
343&pd_gpu {
344	domain-supply = <&vdd_gpu_s0>;
345};
346
347&pinctrl {
348	audio {
349		hp_detect: headphone-detect {
350			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
351		};
352
353		headphone_amplifier_en: headphone-amplifier-en {
354			rockchip,pins = <4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
355		};
356
357		speaker_amplifier_en: speaker-amplifier-en {
358			rockchip,pins = <4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
359		};
360	};
361
362	hym8563 {
363		hym8563_int: hym8563-int {
364			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
365		};
366	};
367
368	lcd-edp {
369		vcc3v3_lcd_edp_en: vcc3v3-lcd-edp-en {
370			rockchip,pins = <1 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
371		};
372	};
373
374	pcie2 {
375		pcie2_1_rst: pcie2-1-rst {
376			rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
377		};
378
379		pcie2_2_rst: pcie2-2-rst {
380			rockchip,pins = <4 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
381		};
382
383		vcc3v3_pcie20_en: vcc3v3-pcie20-en {
384			rockchip,pins = <4 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
385		};
386	};
387
388	usb {
389		vcc5v0_host_en: vcc5v0-host-en {
390			rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
391		};
392	};
393
394	usb-typec {
395		typec5v_pwren: typec5v-pwren {
396			rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
397		};
398
399		usbc0_int: usbc0-int {
400			rockchip,pins = <0 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>;
401		};
402	};
403};
404
405&pwm12 {
406	status = "okay";
407};
408
409&saradc {
410	vref-supply = <&vcc_1v8_s0>;
411	status = "okay";
412};
413
414&sdhci {
415	bus-width = <8>;
416	mmc-hs400-1_8v;
417	mmc-hs400-enhanced-strobe;
418	no-sdio;
419	no-sd;
420	non-removable;
421	status = "okay";
422};
423
424&sdmmc {
425	bus-width = <4>;
426	cap-mmc-highspeed;
427	cap-sd-highspeed;
428	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
429	disable-wp;
430	max-frequency = <150000000>;
431	no-mmc;
432	no-sdio;
433	sd-uhs-sdr104;
434	vmmc-supply = <&vcc_3v3_sd_s0>;
435	vqmmc-supply = <&vccio_sd_s0>;
436	status = "okay";
437};
438
439&spi2 {
440	assigned-clocks = <&cru CLK_SPI2>;
441	assigned-clock-rates = <200000000>;
442	num-cs = <2>;
443	status = "okay";
444
445	pmic@0 {
446		compatible = "rockchip,rk806";
447		reg = <0x0>;
448		#gpio-cells = <2>;
449		gpio-controller;
450		interrupt-parent = <&gpio0>;
451		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
452		pinctrl-names = "default";
453		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
454			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
455		spi-max-frequency = <1000000>;
456		system-power-controller;
457
458		vcc1-supply = <&vcc5v0_sys>;
459		vcc2-supply = <&vcc5v0_sys>;
460		vcc3-supply = <&vcc5v0_sys>;
461		vcc4-supply = <&vcc5v0_sys>;
462		vcc5-supply = <&vcc5v0_sys>;
463		vcc6-supply = <&vcc5v0_sys>;
464		vcc7-supply = <&vcc5v0_sys>;
465		vcc8-supply = <&vcc5v0_sys>;
466		vcc9-supply = <&vcc5v0_sys>;
467		vcc10-supply = <&vcc5v0_sys>;
468		vcc11-supply = <&vcc_2v0_pldo_s3>;
469		vcc12-supply = <&vcc5v0_sys>;
470		vcc13-supply = <&vcc5v0_sys>;
471		vcc14-supply = <&vcc_1v1_nldo_s3>;
472		vcca-supply = <&vcc5v0_sys>;
473
474		rk806_dvs1_null: dvs1-null-pins {
475			pins = "gpio_pwrctrl1";
476			function = "pin_fun0";
477		};
478
479		rk806_dvs2_null: dvs2-null-pins {
480			pins = "gpio_pwrctrl2";
481			function = "pin_fun0";
482		};
483
484		rk806_dvs3_null: dvs3-null-pins {
485			pins = "gpio_pwrctrl3";
486			function = "pin_fun0";
487		};
488
489		regulators {
490			vdd_gpu_s0: dcdc-reg1 {
491				regulator-name = "vdd_gpu_s0";
492				regulator-boot-on;
493				regulator-min-microvolt = <550000>;
494				regulator-max-microvolt = <950000>;
495				regulator-ramp-delay = <12500>;
496				regulator-enable-ramp-delay = <400>;
497
498				regulator-state-mem {
499					regulator-off-in-suspend;
500				};
501			};
502
503			vdd_npu_s0: dcdc-reg2 {
504				regulator-name = "vdd_npu_s0";
505				regulator-always-on;
506				regulator-boot-on;
507				regulator-min-microvolt = <550000>;
508				regulator-max-microvolt = <950000>;
509				regulator-ramp-delay = <12500>;
510
511				regulator-state-mem {
512					regulator-off-in-suspend;
513				};
514			};
515
516			vdd_log_s0: dcdc-reg3 {
517				regulator-name = "vdd_log_s0";
518				regulator-always-on;
519				regulator-boot-on;
520				regulator-min-microvolt = <675000>;
521				regulator-max-microvolt = <800000>;
522				regulator-ramp-delay = <12500>;
523
524				regulator-state-mem {
525					regulator-off-in-suspend;
526					regulator-suspend-microvolt = <750000>;
527				};
528			};
529
530			vdd_vdenc_s0: dcdc-reg4 {
531				regulator-name = "vdd_vdenc_s0";
532				regulator-always-on;
533				regulator-boot-on;
534				regulator-min-microvolt = <550000>;
535				regulator-max-microvolt = <950000>;
536				regulator-ramp-delay = <12500>;
537
538				regulator-state-mem {
539					regulator-off-in-suspend;
540				};
541			};
542
543			vdd_gpu_mem_s0: dcdc-reg5 {
544				regulator-name = "vdd_gpu_mem_s0";
545				regulator-boot-on;
546				regulator-min-microvolt = <675000>;
547				regulator-max-microvolt = <950000>;
548				regulator-ramp-delay = <12500>;
549				regulator-enable-ramp-delay = <400>;
550
551				regulator-state-mem {
552					regulator-off-in-suspend;
553				};
554			};
555
556			vdd_npu_mem_s0: dcdc-reg6 {
557				regulator-name = "vdd_npu_mem_s0";
558				regulator-always-on;
559				regulator-boot-on;
560				regulator-min-microvolt = <675000>;
561				regulator-max-microvolt = <950000>;
562				regulator-ramp-delay = <12500>;
563
564				regulator-state-mem {
565					regulator-off-in-suspend;
566				};
567			};
568
569			vcc_2v0_pldo_s3: dcdc-reg7 {
570				regulator-name = "vdd_2v0_pldo_s3";
571				regulator-always-on;
572				regulator-boot-on;
573				regulator-min-microvolt = <2000000>;
574				regulator-max-microvolt = <2000000>;
575				regulator-ramp-delay = <12500>;
576
577				regulator-state-mem {
578					regulator-on-in-suspend;
579					regulator-suspend-microvolt = <2000000>;
580				};
581			};
582
583			vdd_vdenc_mem_s0: dcdc-reg8 {
584				regulator-name = "vdd_vdenc_mem_s0";
585				regulator-always-on;
586				regulator-boot-on;
587				regulator-min-microvolt = <675000>;
588				regulator-max-microvolt = <950000>;
589				regulator-ramp-delay = <12500>;
590
591				regulator-state-mem {
592					regulator-off-in-suspend;
593				};
594			};
595
596			vdd2_ddr_s3: dcdc-reg9 {
597				regulator-name = "vdd2_ddr_s3";
598				regulator-always-on;
599				regulator-boot-on;
600
601				regulator-state-mem {
602					regulator-on-in-suspend;
603				};
604			};
605
606			vcc_1v1_nldo_s3: dcdc-reg10 {
607				regulator-name = "vcc_1v1_nldo_s3";
608				regulator-always-on;
609				regulator-boot-on;
610				regulator-min-microvolt = <1100000>;
611				regulator-max-microvolt = <1100000>;
612				regulator-ramp-delay = <12500>;
613
614				regulator-state-mem {
615					regulator-on-in-suspend;
616					regulator-suspend-microvolt = <1100000>;
617				};
618			};
619
620			avcc_1v8_s0: pldo-reg1 {
621				regulator-name = "avcc_1v8_s0";
622				regulator-always-on;
623				regulator-boot-on;
624				regulator-min-microvolt = <1800000>;
625				regulator-max-microvolt = <1800000>;
626				regulator-ramp-delay = <12500>;
627
628				regulator-state-mem {
629					regulator-off-in-suspend;
630				};
631			};
632
633			vdd1_1v8_ddr_s3: pldo-reg2 {
634				regulator-name = "vdd1_1v8_ddr_s3";
635				regulator-always-on;
636				regulator-boot-on;
637				regulator-min-microvolt = <1800000>;
638				regulator-max-microvolt = <1800000>;
639				regulator-ramp-delay = <12500>;
640
641				regulator-state-mem {
642					regulator-on-in-suspend;
643					regulator-suspend-microvolt = <1800000>;
644				};
645			};
646
647			vcc_1v8_s3: pldo-reg3 {
648				regulator-name = "vcc_1v8_s3";
649				regulator-always-on;
650				regulator-boot-on;
651				regulator-min-microvolt = <1800000>;
652				regulator-max-microvolt = <1800000>;
653				regulator-ramp-delay = <12500>;
654
655				regulator-state-mem {
656					regulator-on-in-suspend;
657					regulator-suspend-microvolt = <1800000>;
658				};
659			};
660
661			vcc_3v3_s0: pldo-reg4 {
662				regulator-name = "vcc_3v3_s0";
663				regulator-always-on;
664				regulator-boot-on;
665				regulator-min-microvolt = <3300000>;
666				regulator-max-microvolt = <3300000>;
667				regulator-ramp-delay = <12500>;
668
669				regulator-state-mem {
670					regulator-off-in-suspend;
671				};
672			};
673
674			vccio_sd_s0: pldo-reg5 {
675				regulator-name = "vccio_sd_s0";
676				regulator-always-on;
677				regulator-boot-on;
678				regulator-min-microvolt = <1800000>;
679				regulator-max-microvolt = <3300000>;
680				regulator-ramp-delay = <12500>;
681
682				regulator-state-mem {
683					regulator-off-in-suspend;
684				};
685			};
686
687			master_pldo6_s3: pldo-reg6 {
688				regulator-name = "master_pldo6_s3";
689				regulator-always-on;
690				regulator-boot-on;
691				regulator-min-microvolt = <1800000>;
692				regulator-max-microvolt = <1800000>;
693
694				regulator-state-mem {
695					regulator-on-in-suspend;
696					regulator-suspend-microvolt = <1800000>;
697				};
698			};
699
700			vdd_0v75_s3: nldo-reg1 {
701				regulator-name = "vdd_0v75_s3";
702				regulator-always-on;
703				regulator-boot-on;
704				regulator-min-microvolt = <750000>;
705				regulator-max-microvolt = <750000>;
706				regulator-ramp-delay = <12500>;
707
708				regulator-state-mem {
709					regulator-on-in-suspend;
710					regulator-suspend-microvolt = <750000>;
711				};
712			};
713
714			vdd2l_0v9_ddr_s3: nldo-reg2 {
715				regulator-name = "vdd2l_0v9_ddr_s3";
716				regulator-always-on;
717				regulator-boot-on;
718				regulator-min-microvolt = <900000>;
719				regulator-max-microvolt = <900000>;
720
721				regulator-state-mem {
722					regulator-on-in-suspend;
723					regulator-suspend-microvolt = <900000>;
724				};
725			};
726
727			master_nldo3: nldo-reg3 {
728				regulator-name = "master_nldo3";
729
730				regulator-state-mem {
731					regulator-off-in-suspend;
732				};
733			};
734
735			avdd_0v75_s0: nldo-reg4 {
736				regulator-name = "avdd_0v75_s0";
737				regulator-always-on;
738				regulator-boot-on;
739				regulator-min-microvolt = <750000>;
740				regulator-max-microvolt = <750000>;
741
742				regulator-state-mem {
743					regulator-off-in-suspend;
744				};
745			};
746
747			vdd_0v85_s0: nldo-reg5 {
748				regulator-name = "vdd_0v85_s0";
749				regulator-always-on;
750				regulator-boot-on;
751				regulator-min-microvolt = <850000>;
752				regulator-max-microvolt = <850000>;
753
754				regulator-state-mem {
755					regulator-off-in-suspend;
756				};
757			};
758		};
759	};
760
761	pmic@1 {
762		compatible = "rockchip,rk806";
763		reg = <0x01>;
764		#gpio-cells = <2>;
765		gpio-controller;
766		interrupt-parent = <&gpio0>;
767		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
768		pinctrl-names = "default";
769		pinctrl-0 = <&rk806_slave_dvs1_null>, <&rk806_slave_dvs2_null>,
770			    <&rk806_slave_dvs3_null>;
771		spi-max-frequency = <1000000>;
772
773		vcc1-supply = <&vcc5v0_sys>;
774		vcc2-supply = <&vcc5v0_sys>;
775		vcc3-supply = <&vcc5v0_sys>;
776		vcc4-supply = <&vcc5v0_sys>;
777		vcc5-supply = <&vcc5v0_sys>;
778		vcc6-supply = <&vcc5v0_sys>;
779		vcc7-supply = <&vcc5v0_sys>;
780		vcc8-supply = <&vcc5v0_sys>;
781		vcc9-supply = <&vcc5v0_sys>;
782		vcc10-supply = <&vcc5v0_sys>;
783		vcc11-supply = <&vcc_2v0_pldo_s3>;
784		vcc12-supply = <&vcc5v0_sys>;
785		vcc13-supply = <&vcc_1v1_nldo_s3>;
786		vcc14-supply = <&vcc_2v0_pldo_s3>;
787		vcca-supply = <&vcc5v0_sys>;
788
789		rk806_slave_dvs1_null: dvs1-null-pins {
790			pins = "gpio_pwrctrl1";
791			function = "pin_fun0";
792		};
793
794		rk806_slave_dvs2_null: dvs2-null-pins {
795			pins = "gpio_pwrctrl2";
796			function = "pin_fun0";
797		};
798
799		rk806_slave_dvs3_null: dvs3-null-pins {
800			pins = "gpio_pwrctrl3";
801			function = "pin_fun0";
802		};
803
804		regulators {
805			vdd_cpu_big1_s0: dcdc-reg1 {
806				regulator-name = "vdd_cpu_big1_s0";
807				regulator-always-on;
808				regulator-boot-on;
809				regulator-coupled-with = <&vdd_cpu_big1_mem_s0>;
810				regulator-coupled-max-spread = <10000>;
811				regulator-min-microvolt = <550000>;
812				regulator-max-microvolt = <1050000>;
813				regulator-ramp-delay = <12500>;
814
815				regulator-state-mem {
816					regulator-off-in-suspend;
817				};
818			};
819
820			vdd_cpu_big0_s0: dcdc-reg2 {
821				regulator-name = "vdd_cpu_big0_s0";
822				regulator-always-on;
823				regulator-boot-on;
824				regulator-coupled-with = <&vdd_cpu_big0_mem_s0>;
825				regulator-coupled-max-spread = <10000>;
826				regulator-min-microvolt = <550000>;
827				regulator-max-microvolt = <1050000>;
828				regulator-ramp-delay = <12500>;
829
830				regulator-state-mem {
831					regulator-off-in-suspend;
832				};
833			};
834
835			vdd_cpu_lit_s0: dcdc-reg3 {
836				regulator-name = "vdd_cpu_lit_s0";
837				regulator-always-on;
838				regulator-boot-on;
839				regulator-coupled-with = <&vdd_cpu_lit_mem_s0>;
840				regulator-coupled-max-spread = <10000>;
841				regulator-min-microvolt = <550000>;
842				regulator-max-microvolt = <950000>;
843				regulator-ramp-delay = <12500>;
844
845				regulator-state-mem {
846					regulator-off-in-suspend;
847				};
848			};
849
850			vcc_3v3_s3: dcdc-reg4 {
851				regulator-name = "vcc_3v3_s3";
852				regulator-always-on;
853				regulator-boot-on;
854				regulator-min-microvolt = <3300000>;
855				regulator-max-microvolt = <3300000>;
856				regulator-ramp-delay = <12500>;
857
858				regulator-state-mem {
859					regulator-on-in-suspend;
860					regulator-suspend-microvolt = <3300000>;
861				};
862			};
863
864			vdd_cpu_big1_mem_s0: dcdc-reg5 {
865				regulator-name = "vdd_cpu_big1_mem_s0";
866				regulator-always-on;
867				regulator-boot-on;
868				regulator-coupled-with = <&vdd_cpu_big1_s0>;
869				regulator-coupled-max-spread = <10000>;
870				regulator-min-microvolt = <675000>;
871				regulator-max-microvolt = <1050000>;
872				regulator-ramp-delay = <12500>;
873
874				regulator-state-mem {
875					regulator-off-in-suspend;
876				};
877			};
878
879
880			vdd_cpu_big0_mem_s0: dcdc-reg6 {
881				regulator-name = "vdd_cpu_big0_mem_s0";
882				regulator-always-on;
883				regulator-boot-on;
884				regulator-coupled-with = <&vdd_cpu_big0_s0>;
885				regulator-coupled-max-spread = <10000>;
886				regulator-min-microvolt = <675000>;
887				regulator-max-microvolt = <1050000>;
888				regulator-ramp-delay = <12500>;
889
890				regulator-state-mem {
891					regulator-off-in-suspend;
892				};
893			};
894
895			vcc_1v8_s0: dcdc-reg7 {
896				regulator-name = "vcc_1v8_s0";
897				regulator-always-on;
898				regulator-boot-on;
899				regulator-min-microvolt = <1800000>;
900				regulator-max-microvolt = <1800000>;
901				regulator-ramp-delay = <12500>;
902
903				regulator-state-mem {
904					regulator-off-in-suspend;
905				};
906			};
907
908			vdd_cpu_lit_mem_s0: dcdc-reg8 {
909				regulator-name = "vdd_cpu_lit_mem_s0";
910				regulator-always-on;
911				regulator-boot-on;
912				regulator-coupled-with = <&vdd_cpu_lit_s0>;
913				regulator-coupled-max-spread = <10000>;
914				regulator-min-microvolt = <675000>;
915				regulator-max-microvolt = <950000>;
916				regulator-ramp-delay = <12500>;
917
918				regulator-state-mem {
919					regulator-off-in-suspend;
920				};
921			};
922
923			vddq_ddr_s0: dcdc-reg9 {
924				regulator-name = "vddq_ddr_s0";
925				regulator-always-on;
926				regulator-boot-on;
927
928				regulator-state-mem {
929					regulator-off-in-suspend;
930				};
931			};
932
933			vdd_ddr_s0: dcdc-reg10 {
934				regulator-name = "vdd_ddr_s0";
935				regulator-always-on;
936				regulator-boot-on;
937				regulator-min-microvolt = <675000>;
938				regulator-max-microvolt = <900000>;
939				regulator-ramp-delay = <12500>;
940
941				regulator-state-mem {
942					regulator-off-in-suspend;
943				};
944			};
945
946			vcc_1v8_cam_s0: pldo-reg1 {
947				regulator-name = "vcc_1v8_cam_s0";
948				regulator-always-on;
949				regulator-boot-on;
950				regulator-min-microvolt = <1800000>;
951				regulator-max-microvolt = <1800000>;
952				regulator-ramp-delay = <12500>;
953
954				regulator-state-mem {
955					regulator-off-in-suspend;
956				};
957			};
958
959			avdd1v8_ddr_pll_s0: pldo-reg2 {
960				regulator-name = "avdd1v8_ddr_pll_s0";
961				regulator-always-on;
962				regulator-boot-on;
963				regulator-min-microvolt = <1800000>;
964				regulator-max-microvolt = <1800000>;
965				regulator-ramp-delay = <12500>;
966
967				regulator-state-mem {
968					regulator-off-in-suspend;
969				};
970			};
971
972			vdd_1v8_pll_s0: pldo-reg3 {
973				regulator-name = "vdd_1v8_pll_s0";
974				regulator-always-on;
975				regulator-boot-on;
976				regulator-min-microvolt = <1800000>;
977				regulator-max-microvolt = <1800000>;
978				regulator-ramp-delay = <12500>;
979
980				regulator-state-mem {
981					regulator-off-in-suspend;
982				};
983			};
984
985			vcc_3v3_sd_s0: pldo-reg4 {
986				regulator-name = "vcc_3v3_sd_s0";
987				regulator-always-on;
988				regulator-boot-on;
989				regulator-min-microvolt = <3300000>;
990				regulator-max-microvolt = <3300000>;
991				regulator-ramp-delay = <12500>;
992
993				regulator-state-mem {
994					regulator-off-in-suspend;
995				};
996			};
997
998			vcc_2v8_cam_s0: pldo-reg5 {
999				regulator-name = "vcc_2v8_cam_s0";
1000				regulator-always-on;
1001				regulator-boot-on;
1002				regulator-min-microvolt = <2800000>;
1003				regulator-max-microvolt = <2800000>;
1004				regulator-ramp-delay = <12500>;
1005
1006				regulator-state-mem {
1007					regulator-off-in-suspend;
1008				};
1009			};
1010
1011			pldo6_s3: pldo-reg6 {
1012				regulator-name = "pldo6_s3";
1013				regulator-always-on;
1014				regulator-boot-on;
1015				regulator-min-microvolt = <1800000>;
1016				regulator-max-microvolt = <1800000>;
1017
1018				regulator-state-mem {
1019					regulator-on-in-suspend;
1020					regulator-suspend-microvolt = <1800000>;
1021				};
1022			};
1023
1024			vdd_0v75_pll_s0: nldo-reg1 {
1025				regulator-name = "vdd_0v75_pll_s0";
1026				regulator-always-on;
1027				regulator-boot-on;
1028				regulator-min-microvolt = <750000>;
1029				regulator-max-microvolt = <750000>;
1030				regulator-ramp-delay = <12500>;
1031
1032				regulator-state-mem {
1033					regulator-off-in-suspend;
1034				};
1035			};
1036
1037			vdd_ddr_pll_s0: nldo-reg2 {
1038				regulator-name = "vdd_ddr_pll_s0";
1039				regulator-always-on;
1040				regulator-boot-on;
1041				regulator-min-microvolt = <850000>;
1042				regulator-max-microvolt = <850000>;
1043
1044				regulator-state-mem {
1045					regulator-off-in-suspend;
1046				};
1047			};
1048
1049			slave_nldo3: nldo-reg3 {
1050				regulator-name = "slave_nldo3";
1051
1052				regulator-state-mem {
1053					regulator-off-in-suspend;
1054				};
1055			};
1056
1057			avdd_1v2_cam_s0: nldo-reg4 {
1058				regulator-always-on;
1059				regulator-boot-on;
1060				regulator-min-microvolt = <1200000>;
1061				regulator-max-microvolt = <1200000>;
1062				regulator-ramp-delay = <12500>;
1063				regulator-name = "avdd_1v2_cam_s0";
1064
1065				regulator-state-mem {
1066					regulator-off-in-suspend;
1067				};
1068			};
1069
1070			avdd_1v2_s0: nldo-reg5 {
1071				regulator-always-on;
1072				regulator-boot-on;
1073				regulator-min-microvolt = <1200000>;
1074				regulator-max-microvolt = <1200000>;
1075				regulator-ramp-delay = <12500>;
1076				regulator-name = "avdd_1v2_s0";
1077
1078				regulator-state-mem {
1079					regulator-off-in-suspend;
1080				};
1081			};
1082		};
1083	};
1084};
1085
1086&tsadc {
1087	status = "okay";
1088};
1089
1090&u2phy0 {
1091	status = "okay";
1092};
1093
1094&u2phy2 {
1095	status = "okay";
1096};
1097
1098&u2phy3 {
1099	status = "okay";
1100};
1101
1102&u2phy0_otg {
1103	status = "okay";
1104};
1105
1106&u2phy2_host {
1107	phy-supply = <&vcc5v0_host>;
1108	status = "okay";
1109};
1110
1111&u2phy3_host {
1112	phy-supply = <&vcc5v0_host>;
1113	status = "okay";
1114};
1115
1116&uart2 {
1117	pinctrl-names = "default";
1118	pinctrl-0 = <&uart2m0_xfer>;
1119	status = "okay";
1120};
1121
1122&usb_host0_ehci {
1123	status = "okay";
1124};
1125
1126&usb_host0_ohci {
1127	status = "okay";
1128};
1129
1130&usb_host0_xhci {
1131	usb-role-switch;
1132	status = "okay";
1133
1134	port {
1135		#address-cells = <1>;
1136		#size-cells = <0>;
1137
1138		dwc3_0_role_switch: endpoint@0 {
1139			reg = <0>;
1140			remote-endpoint = <&usbc0_role_sw>;
1141		};
1142	};
1143};
1144
1145&usb_host1_ehci {
1146	status = "okay";
1147};
1148
1149&usb_host1_ohci {
1150	status = "okay";
1151};
1152
1153&usbdp_phy0 {
1154	mode-switch;
1155	orientation-switch;
1156	sbu1-dc-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
1157	sbu2-dc-gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_HIGH>;
1158	status = "okay";
1159
1160	port {
1161		#address-cells = <1>;
1162		#size-cells = <0>;
1163
1164		usbdp_phy0_orientation_switch: endpoint@0 {
1165			reg = <0>;
1166			remote-endpoint = <&usbc0_orien_sw>;
1167		};
1168
1169		usbdp_phy0_dp_altmode_mux: endpoint@1 {
1170			reg = <1>;
1171			remote-endpoint = <&dp_altmode_mux>;
1172		};
1173	};
1174};
1175