xref: /linux/arch/arm64/boot/dts/rockchip/rk3588s-indiedroid-nova.dts (revision e78f70bad29c5ae1e1076698b690b15794e9b81e)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2
3/dts-v1/;
4
5#include <dt-bindings/gpio/gpio.h>
6#include <dt-bindings/input/linux-event-codes.h>
7#include <dt-bindings/pinctrl/rockchip.h>
8#include <dt-bindings/soc/rockchip,vop2.h>
9#include <dt-bindings/usb/pd.h>
10#include "rk3588s.dtsi"
11
12/ {
13	model = "Indiedroid Nova";
14	compatible = "indiedroid,nova", "rockchip,rk3588s";
15
16	adc-keys-0 {
17		compatible = "adc-keys";
18		io-channel-names = "buttons";
19		io-channels = <&saradc 0>;
20		keyup-threshold-microvolt = <1800000>;
21		poll-interval = <100>;
22
23		button-boot {
24			label = "boot";
25			linux,code = <KEY_PROG1>;
26			press-threshold-microvolt = <18000>;
27		};
28	};
29
30	adc-keys-1 {
31		compatible = "adc-keys";
32		io-channel-names = "buttons";
33		io-channels = <&saradc 1>;
34		keyup-threshold-microvolt = <1800000>;
35		poll-interval = <100>;
36
37		button-recovery {
38			label = "recovery";
39			linux,code = <KEY_PROG2>;
40			press-threshold-microvolt = <18000>;
41		};
42	};
43
44	aliases {
45		mmc0 = &sdhci;
46		mmc1 = &sdmmc;
47		mmc2 = &sdio;
48	};
49
50	chosen {
51		stdout-path = "serial2:1500000n8";
52	};
53
54	hdmi0-con {
55		compatible = "hdmi-connector";
56		type = "d";
57
58		port {
59			hdmi0_con_in: endpoint {
60				remote-endpoint = <&hdmi0_out_con>;
61			};
62		};
63	};
64
65	sdio_pwrseq: sdio-pwrseq {
66		compatible = "mmc-pwrseq-simple";
67		clock-names = "ext_clock";
68		clocks = <&rtc_hym8563>;
69		pinctrl-0 = <&wifi_enable_h>;
70		pinctrl-names = "default";
71		post-power-on-delay-ms = <200>;
72		reset-gpios = <&gpio0 RK_PC7 GPIO_ACTIVE_LOW>;
73	};
74
75	sound {
76		compatible = "audio-graph-card";
77		label = "rockchip,es8388";
78		widgets = "Microphone", "Mic Jack",
79			  "Headphone", "Headphones";
80		routing = "LINPUT2", "Mic Jack",
81			  "Headphones", "LOUT1",
82			  "Headphones", "ROUT1";
83		dais = <&i2s0_8ch_p0>;
84	};
85
86	vbus5v0_typec: regulator-vbus5v0-typec {
87		compatible = "regulator-fixed";
88		enable-active-high;
89		gpio = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
90		pinctrl-0 = <&typec5v_pwren>;
91		pinctrl-names = "default";
92		regulator-name = "vbus5v0_typec";
93		regulator-min-microvolt = <5000000>;
94		regulator-max-microvolt = <5000000>;
95		vin-supply = <&vcc5v0_usb>;
96	};
97
98	vcc_1v1_nldo_s3: regulator-vcc-1v1-nldo-s3 {
99		compatible = "regulator-fixed";
100		regulator-always-on;
101		regulator-boot-on;
102		regulator-max-microvolt = <1100000>;
103		regulator-min-microvolt = <1100000>;
104		regulator-name = "vcc_1v1_nldo_s3";
105		vin-supply = <&vcc5v0_sys>;
106	};
107
108	/* Regulator is enabled whenever vcc_1v8_s0 is above 1.6v */
109	vcc_3v3_s0: regulator-vcc-3v3-s0 {
110		compatible = "regulator-fixed";
111		regulator-always-on;
112		regulator-boot-on;
113		regulator-max-microvolt = <3300000>;
114		regulator-min-microvolt = <3300000>;
115		regulator-name = "vcc_3v3_s0";
116		vin-supply = <&vcc_3v3_s3>;
117
118		regulator-state-mem {
119			regulator-off-in-suspend;
120		};
121	};
122
123	vcc5v0_sys: regulator-vcc5v0-sys {
124		compatible = "regulator-fixed";
125		regulator-always-on;
126		regulator-boot-on;
127		regulator-max-microvolt = <5000000>;
128		regulator-min-microvolt = <5000000>;
129		regulator-name = "vcc5v0_sys";
130	};
131
132	vcc5v0_usb: regulator-vcc5v0-usb {
133		compatible = "regulator-fixed";
134		regulator-always-on;
135		regulator-boot-on;
136		regulator-max-microvolt = <5000000>;
137		regulator-min-microvolt = <5000000>;
138		regulator-name = "vcc5v0_usb";
139		vin-supply = <&vcc5v0_usbdcin>;
140	};
141
142	vcc5v0_usbdcin: regulator-vcc5v0-usbdcin {
143		compatible = "regulator-fixed";
144		regulator-always-on;
145		regulator-boot-on;
146		regulator-max-microvolt = <5000000>;
147		regulator-min-microvolt = <5000000>;
148		regulator-name = "vcc5v0_usbdcin";
149	};
150};
151
152&combphy0_ps {
153	status = "okay";
154};
155
156&combphy2_psu {
157	status = "okay";
158};
159
160&cpu_l0 {
161	cpu-supply = <&vdd_cpu_lit_s0>;
162};
163
164&cpu_l1 {
165	cpu-supply = <&vdd_cpu_lit_s0>;
166};
167
168&cpu_l2 {
169	cpu-supply = <&vdd_cpu_lit_s0>;
170};
171
172&cpu_l3 {
173	cpu-supply = <&vdd_cpu_lit_s0>;
174};
175
176&cpu_b0 {
177	cpu-supply = <&vdd_cpu_big0_s0>;
178};
179
180&cpu_b1 {
181	cpu-supply = <&vdd_cpu_big0_s0>;
182};
183
184&cpu_b2 {
185	cpu-supply = <&vdd_cpu_big1_s0>;
186};
187
188&cpu_b3 {
189	cpu-supply = <&vdd_cpu_big1_s0>;
190};
191
192/*
193 * Add labels for each GPIO pin exposed on the 40 pin header. Note that
194 * voltage of each GPIO pin could be either 3.3v or 1.8v (as noted by
195 * label).
196 */
197&gpio0 {
198	gpio-line-names = /* GPIO0 A0-A7 */
199			  "", "", "", "",
200			  "", "", "", "",
201			  /* GPIO0 B0-B7 */
202			  "", "", "", "",
203			  "", "", "", "",
204			  /* GPIO0 C0-C7 */
205			  "", "", "", "",
206			  "", "", "", "",
207			  /* GPIO0 D0-D7 */
208			  "HEADER_12_1v8", "", "", "HEADER_24_1v8",
209			  "", "", "", "";
210};
211
212&gpio1 {
213	gpio-line-names = /* GPIO1 A0-A7 */
214			  "HEADER_27_3v3", "", "", "",
215			  "HEADER_29_1v8", "", "HEADER_7_1v8", "",
216			  /* GPIO1 B0-B7 */
217			  "", "HEADER_31_1v8", "HEADER_33_1v8", "",
218			  "HEADER_11_1v8", "HEADER_13_1v8", "", "",
219			  /* GPIO1 C0-C7 */
220			  "", "HEADER_28_3v3", "", "",
221			  "", "", "", "",
222			  /* GPIO1 D0-D7 */
223			  "", "", "", "",
224			  "", "", "HEADER_5_3v3", "HEADER_3_3v3";
225};
226
227&gpio3 {
228	gpio-line-names = /* GPIO3 A0-A7 */
229			  "", "", "", "",
230			  "", "", "", "",
231			  /* GPIO3 B0-B7 */
232			  "HEADER_16_1v8", "HEADER_18_1v8", "", "",
233			  "", "", "", "HEADER_19_1v8",
234			  /* GPIO3 C0-C7 */
235			  "HEADER_21_1v8", "HEADER_23_1v8", "", "HEADER_26_1v8",
236			  "HEADER_15_1v8", "HEADER_22_1v8", "", "",
237			  /* GPIO3 D0-D7 */
238			  "", "", "", "",
239			  "", "", "", "";
240};
241
242&gpio4 {
243	gpio-line-names = /* GPIO4 A0-A7 */
244			  "", "", "HEADER_37_3v3", "HEADER_8_3v3",
245			  "HEADER_10_3v3", "", "HEADER_32_3v3", "HEADER_35_3v3",
246			  /* GPIO4 B0-B7 */
247			  "", "", "", "HEADER_40_3v3",
248			  "HEADER_38_3v3", "HEADER_36_3v3", "", "",
249			  /* GPIO4 C0-C7 */
250			  "", "", "", "",
251			  "", "", "", "",
252			  /* GPIO4 D0-D7 */
253			  "", "", "", "",
254			  "", "", "", "";
255};
256
257&gpu {
258	mali-supply = <&vdd_gpu_s0>;
259	status = "okay";
260};
261
262&hdmi0 {
263	pinctrl-0 = <&hdmim0_tx0_scl>, <&hdmim0_tx0_sda>,
264		    <&hdmim0_tx0_hpd>, <&hdmim0_tx0_cec>;
265	pinctrl-names = "default";
266	status = "okay";
267};
268
269&hdmi0_in {
270	hdmi0_in_vp0: endpoint {
271		remote-endpoint = <&vp0_out_hdmi0>;
272	};
273};
274
275&hdmi0_out {
276	hdmi0_out_con: endpoint {
277		remote-endpoint = <&hdmi0_con_in>;
278	};
279};
280
281&hdmi0_sound {
282	status = "okay";
283};
284
285&hdptxphy0 {
286	status = "okay";
287};
288
289&i2c0 {
290	pinctrl-0 = <&i2c0m2_xfer>;
291	pinctrl-names = "default";
292	status = "okay";
293
294	vdd_cpu_big0_s0: regulator@42 {
295		compatible = "rockchip,rk8602";
296		reg = <0x42>;
297		regulator-always-on;
298		regulator-boot-on;
299		regulator-max-microvolt = <1050000>;
300		regulator-min-microvolt = <550000>;
301		regulator-name = "vdd_cpu_big0_s0";
302		regulator-ramp-delay = <2300>;
303		fcs,suspend-voltage-selector = <1>;
304		vin-supply = <&vcc5v0_sys>;
305
306		regulator-state-mem {
307			regulator-off-in-suspend;
308		};
309	};
310
311	vdd_cpu_big1_s0: regulator@43 {
312		compatible = "rockchip,rk8603", "rockchip,rk8602";
313		reg = <0x43>;
314		regulator-always-on;
315		regulator-boot-on;
316		regulator-max-microvolt = <1050000>;
317		regulator-min-microvolt = <550000>;
318		regulator-name = "vdd_cpu_big1_s0";
319		regulator-ramp-delay = <2300>;
320		fcs,suspend-voltage-selector = <1>;
321		vin-supply = <&vcc5v0_sys>;
322
323		regulator-state-mem {
324			regulator-off-in-suspend;
325		};
326	};
327};
328
329&i2c2 {
330	status = "okay";
331
332	vdd_npu_s0: regulator@42 {
333		compatible = "rockchip,rk8602";
334		reg = <0x42>;
335		regulator-always-on;
336		regulator-boot-on;
337		regulator-max-microvolt = <950000>;
338		regulator-min-microvolt = <550000>;
339		regulator-name = "vdd_npu_s0";
340		regulator-ramp-delay = <2300>;
341		fcs,suspend-voltage-selector = <1>;
342		vin-supply = <&vcc5v0_sys>;
343
344		regulator-state-mem {
345			regulator-off-in-suspend;
346		};
347	};
348};
349
350&i2c6 {
351	pinctrl-0 = <&i2c6m3_xfer>;
352	status = "okay";
353
354	fusb302: typec-portc@22 {
355		compatible = "fcs,fusb302";
356		reg = <0x22>;
357		interrupt-parent = <&gpio0>;
358		interrupts = <RK_PC4 IRQ_TYPE_LEVEL_LOW>;
359		pinctrl-0 = <&usbc0_int>;
360		pinctrl-names = "default";
361		vbus-supply = <&vbus5v0_typec>;
362
363		usb_con: connector {
364			compatible = "usb-c-connector";
365			data-role = "dual";
366			label = "USB-C";
367			power-role = "dual";
368			try-power-role = "sink";
369			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
370			sink-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
371			op-sink-microwatt = <1000000>;
372
373			ports {
374				#address-cells = <1>;
375				#size-cells = <0>;
376
377				port@0 {
378					reg = <0>;
379					usbc0_orien_sw: endpoint {
380						remote-endpoint = <&usbdp_phy0_orientation_switch>;
381					};
382				};
383
384				port@1 {
385					reg = <1>;
386					usbc0_role_sw: endpoint {
387						remote-endpoint = <&dwc3_0_role_switch>;
388					};
389				};
390
391				port@2 {
392					reg = <2>;
393					dp_altmode_mux: endpoint {
394						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
395					};
396				};
397			};
398		};
399	};
400
401	rtc_hym8563: rtc@51 {
402		compatible = "haoyu,hym8563";
403		reg = <0x51>;
404		#clock-cells = <0>;
405		clock-output-names = "hym8563";
406		interrupt-parent = <&gpio0>;
407		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
408		pinctrl-0 = <&hym8563_int>;
409		pinctrl-names = "default";
410		wakeup-source;
411	};
412};
413
414&i2c7 {
415	pinctrl-0 = <&i2c7m0_xfer>;
416	status = "okay";
417
418	es8388: audio-codec@11 {
419		compatible = "everest,es8388", "everest,es8328";
420		reg = <0x11>;
421		assigned-clock-rates = <12288000>;
422		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
423		AVDD-supply = <&vcc_3v3_s3>;
424		clocks = <&cru I2S0_8CH_MCLKOUT>;
425		DVDD-supply = <&vcc_1v8_s3>;
426		HPVDD-supply = <&vcc_3v3_s3>;
427		PVDD-supply = <&vcc_1v8_s3>;
428		#sound-dai-cells = <0>;
429
430		port {
431			es8388_p0_0: endpoint {
432				remote-endpoint = <&i2s0_8ch_p0_0>;
433			};
434		};
435	};
436};
437
438&i2s0_8ch {
439	pinctrl-names = "default";
440	pinctrl-0 = <&i2s0_lrck
441		     &i2s0_mclk
442		     &i2s0_sclk
443		     &i2s0_sdi0
444		     &i2s0_sdo0>;
445	status = "okay";
446
447	i2s0_8ch_p0: port {
448		i2s0_8ch_p0_0: endpoint {
449			dai-format = "i2s";
450			mclk-fs = <256>;
451			remote-endpoint = <&es8388_p0_0>;
452		};
453	};
454};
455
456&i2s5_8ch {
457	status = "okay";
458};
459
460&pcie2x1l2 {
461	pinctrl-0 = <&rtl8111_perstb>;
462	pinctrl-names = "default";
463	status = "okay";
464};
465
466&pd_gpu {
467	domain-supply = <&vdd_gpu_s0>;
468};
469
470&pinctrl {
471	bluetooth-pins {
472		bt_reset: bt-reset {
473			rockchip,pins =
474				<0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
475		};
476
477		bt_wake_dev: bt-wake-dev {
478			rockchip,pins =
479				<0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
480		};
481
482		bt_wake_host: bt-wake-host {
483			rockchip,pins =
484				<0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_down>;
485		};
486	};
487
488	ethernet-pins {
489		rtl8111_perstb: rtl8111-perstb {
490			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
491		};
492	};
493
494	hym8563 {
495
496		hym8563_int: hym8563-int {
497			rockchip,pins =
498				<0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
499		};
500	};
501
502	sdio-pwrseq {
503		wifi_enable_h: wifi-enable-h {
504			rockchip,pins =
505				<0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
506		};
507	};
508
509	usb-typec {
510		usbc0_int: usbc0-int {
511			rockchip,pins =
512				<0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
513		};
514
515		typec5v_pwren: typec5v-pwren {
516			rockchip,pins =
517				<4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
518		};
519	};
520};
521
522&saradc {
523	vref-supply = <&vcca_1v8_s0>;
524	status = "okay";
525};
526
527/* HS400 modes seemed to cause io errors. */
528&sdhci {
529	bus-width = <8>;
530	no-mmc-hs400;
531	no-sd;
532	no-sdio;
533	non-removable;
534	vmmc-supply = <&vcc_3v3_s0>;
535	vqmmc-supply = <&vcc_1v8_s3>;
536	status = "okay";
537};
538
539&sdio {
540	bus-width = <4>;
541	cap-sd-highspeed;
542	cap-sdio-irq;
543	disable-wp;
544	keep-power-in-suspend;
545	max-frequency = <100000000>;
546	mmc-pwrseq = <&sdio_pwrseq>;
547	no-mmc;
548	no-sd;
549	non-removable;
550	sd-uhs-sdr104;
551	vmmc-supply = <&vcc_3v3_s3>;
552	vqmmc-supply = <&vcc_1v8_s3>;
553	status = "okay";
554};
555
556&sdmmc {
557	bus-width = <4>;
558	cap-mmc-highspeed;
559	cap-sd-highspeed;
560	disable-wp;
561	no-sdio;
562	no-mmc;
563	sd-uhs-sdr104;
564	vmmc-supply = <&vcc_3v3_s3>;
565	vqmmc-supply = <&vccio_sd_s0>;
566	status = "okay";
567};
568
569&spi2 {
570	#address-cells = <1>;
571	assigned-clocks = <&cru CLK_SPI2>;
572	assigned-clock-rates = <200000000>;
573	num-cs = <1>;
574	pinctrl-0 = <&spi2m2_pins>, <&spi2m2_cs0>;
575	pinctrl-names = "default";
576	#size-cells = <0>;
577	status = "okay";
578
579	pmic@0 {
580		compatible = "rockchip,rk806";
581		reg = <0x0>;
582		#gpio-cells = <2>;
583		gpio-controller;
584		interrupt-parent = <&gpio0>;
585		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
586		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
587			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
588		pinctrl-names = "default";
589		spi-max-frequency = <1000000>;
590
591		vcc1-supply = <&vcc5v0_sys>;
592		vcc2-supply = <&vcc5v0_sys>;
593		vcc3-supply = <&vcc5v0_sys>;
594		vcc4-supply = <&vcc5v0_sys>;
595		vcc5-supply = <&vcc5v0_sys>;
596		vcc6-supply = <&vcc5v0_sys>;
597		vcc7-supply = <&vcc5v0_sys>;
598		vcc8-supply = <&vcc5v0_sys>;
599		vcc9-supply = <&vcc5v0_sys>;
600		vcc10-supply = <&vcc5v0_sys>;
601		vcc11-supply = <&vcc_2v0_pldo_s3>;
602		vcc12-supply = <&vcc5v0_sys>;
603		vcc13-supply = <&vcc_1v1_nldo_s3>;
604		vcc14-supply = <&vcc_1v1_nldo_s3>;
605		vcca-supply = <&vcc5v0_sys>;
606
607		rk806_dvs1_null: dvs1-null-pins {
608			pins = "gpio_pwrctrl1";
609			function = "pin_fun0";
610		};
611
612		rk806_dvs2_null: dvs2-null-pins {
613			pins = "gpio_pwrctrl2";
614			function = "pin_fun0";
615		};
616
617		rk806_dvs3_null: dvs3-null-pins {
618			pins = "gpio_pwrctrl3";
619			function = "pin_fun0";
620		};
621
622		regulators {
623			vdd_gpu_s0: dcdc-reg1 {
624				regulator-boot-on;
625				regulator-enable-ramp-delay = <400>;
626				regulator-max-microvolt = <950000>;
627				regulator-min-microvolt = <550000>;
628				regulator-name = "vdd_gpu_s0";
629				regulator-ramp-delay = <12500>;
630				regulator-state-mem {
631					regulator-off-in-suspend;
632				};
633			};
634
635			vdd_cpu_lit_s0: dcdc-reg2 {
636				regulator-always-on;
637				regulator-boot-on;
638				regulator-max-microvolt = <950000>;
639				regulator-min-microvolt = <550000>;
640				regulator-ramp-delay = <12500>;
641				regulator-name = "vdd_cpu_lit_s0";
642				regulator-state-mem {
643					regulator-off-in-suspend;
644				};
645			};
646
647			vdd_logic_s0: dcdc-reg3 {
648				regulator-always-on;
649				regulator-boot-on;
650				regulator-max-microvolt = <750000>;
651				regulator-min-microvolt = <675000>;
652				regulator-name = "vdd_logic_s0";
653				regulator-ramp-delay = <12500>;
654				regulator-state-mem {
655					regulator-on-in-suspend;
656					regulator-suspend-microvolt = <750000>;
657				};
658			};
659
660			vdd_vdenc_s0: dcdc-reg4 {
661				regulator-always-on;
662				regulator-boot-on;
663				regulator-max-microvolt = <950000>;
664				regulator-min-microvolt = <550000>;
665				regulator-name = "vdd_vdenc_s0";
666				regulator-ramp-delay = <12500>;
667				regulator-state-mem {
668					regulator-off-in-suspend;
669				};
670			};
671
672			vdd_ddr_s0: dcdc-reg5 {
673				regulator-always-on;
674				regulator-boot-on;
675				regulator-min-microvolt = <750000>;
676				regulator-max-microvolt = <850000>;
677				regulator-ramp-delay = <12500>;
678				regulator-name = "vdd_ddr_s0";
679				regulator-state-mem {
680					regulator-off-in-suspend;
681					regulator-suspend-microvolt = <850000>;
682				};
683			};
684
685			vdd2_ddr_s3: dcdc-reg6 {
686				regulator-always-on;
687				regulator-boot-on;
688				regulator-max-microvolt = <1100000>;
689				regulator-min-microvolt = <1100000>;
690				regulator-name = "vdd2_ddr_s3";
691				regulator-state-mem {
692					regulator-on-in-suspend;
693				};
694			};
695
696			vcc_2v0_pldo_s3: dcdc-reg7 {
697				regulator-always-on;
698				regulator-boot-on;
699				regulator-max-microvolt = <2000000>;
700				regulator-min-microvolt = <2000000>;
701				regulator-name = "vdd_2v0_pldo_s3";
702				regulator-state-mem {
703					regulator-on-in-suspend;
704					regulator-suspend-microvolt = <2000000>;
705				};
706			};
707
708			vcc_3v3_s3: dcdc-reg8 {
709				regulator-always-on;
710				regulator-boot-on;
711				regulator-max-microvolt = <3300000>;
712				regulator-min-microvolt = <3300000>;
713				regulator-name = "vcc_3v3_s3";
714				regulator-state-mem {
715					regulator-on-in-suspend;
716					regulator-suspend-microvolt = <3300000>;
717				};
718			};
719
720			vddq_ddr_s0: dcdc-reg9 {
721				regulator-always-on;
722				regulator-boot-on;
723				regulator-max-microvolt = <600000>;
724				regulator-min-microvolt = <600000>;
725				regulator-name = "vddq_ddr_s0";
726				regulator-state-mem {
727					regulator-off-in-suspend;
728				};
729			};
730
731			vcc_1v8_s3: dcdc-reg10 {
732				regulator-always-on;
733				regulator-boot-on;
734				regulator-max-microvolt = <1800000>;
735				regulator-min-microvolt = <1800000>;
736				regulator-name = "vcc_1v8_s3";
737				regulator-state-mem {
738					regulator-on-in-suspend;
739					regulator-suspend-microvolt = <1800000>;
740				};
741			};
742
743			vcc_1v8_s0: pldo-reg1 {
744				regulator-always-on;
745				regulator-boot-on;
746				regulator-max-microvolt = <1800000>;
747				regulator-min-microvolt = <1800000>;
748				regulator-name = "vcc_1v8_s0";
749				regulator-state-mem {
750					regulator-off-in-suspend;
751				};
752			};
753
754			vcca_1v8_s0: pldo-reg2 {
755				regulator-always-on;
756				regulator-boot-on;
757				regulator-max-microvolt = <1800000>;
758				regulator-min-microvolt = <1800000>;
759				regulator-name = "vcca_1v8_s0";
760				regulator-state-mem {
761					regulator-off-in-suspend;
762					regulator-suspend-microvolt = <1800000>;
763				};
764			};
765
766			vdda_1v2_s0: pldo-reg3 {
767				regulator-always-on;
768				regulator-boot-on;
769				regulator-max-microvolt = <1200000>;
770				regulator-min-microvolt = <1200000>;
771				regulator-name = "vdda_1v2_s0";
772				regulator-state-mem {
773					regulator-off-in-suspend;
774				};
775			};
776
777			vcca_3v3_s0: pldo-reg4 {
778				regulator-always-on;
779				regulator-boot-on;
780				regulator-max-microvolt = <3300000>;
781				regulator-min-microvolt = <3300000>;
782				regulator-name = "vcca_3v3_s0";
783				regulator-state-mem {
784					regulator-off-in-suspend;
785				};
786			};
787
788			vccio_sd_s0: pldo-reg5 {
789				regulator-always-on;
790				regulator-boot-on;
791				regulator-max-microvolt = <3300000>;
792				regulator-min-microvolt = <1800000>;
793				regulator-name = "vccio_sd_s0";
794				regulator-state-mem {
795					regulator-off-in-suspend;
796				};
797			};
798
799			vcc_1v8_s3_pldo6: pldo-reg6 {
800				regulator-always-on;
801				regulator-boot-on;
802				regulator-max-microvolt = <1800000>;
803				regulator-min-microvolt = <1800000>;
804				regulator-name = "vcc_1v8_s3_pldo6";
805				regulator-state-mem {
806					regulator-on-in-suspend;
807					regulator-suspend-microvolt = <1800000>;
808				};
809			};
810
811			vdd_0v75_s3: nldo-reg1 {
812				regulator-always-on;
813				regulator-boot-on;
814				regulator-max-microvolt = <750000>;
815				regulator-min-microvolt = <750000>;
816				regulator-name = "vdd_0v75_s3";
817				regulator-state-mem {
818					regulator-on-in-suspend;
819					regulator-suspend-microvolt = <750000>;
820				};
821			};
822
823			vdda_ddr_pll_s0: nldo-reg2 {
824				regulator-always-on;
825				regulator-boot-on;
826				regulator-max-microvolt = <850000>;
827				regulator-min-microvolt = <850000>;
828				regulator-name = "vdda_ddr_pll_s0";
829				regulator-state-mem {
830					regulator-off-in-suspend;
831					regulator-suspend-microvolt = <850000>;
832				};
833			};
834
835			avdd_0v75_s0: nldo-reg3 {
836				regulator-always-on;
837				regulator-boot-on;
838				regulator-max-microvolt = <750000>;
839				regulator-min-microvolt = <750000>;
840				regulator-name = "avdd_0v75_s0";
841				regulator-state-mem {
842					regulator-off-in-suspend;
843				};
844			};
845
846			vdda_0v85_s0: nldo-reg4 {
847				regulator-always-on;
848				regulator-boot-on;
849				regulator-min-microvolt = <850000>;
850				regulator-max-microvolt = <850000>;
851				regulator-name = "vdda_0v85_s0";
852				regulator-state-mem {
853					regulator-off-in-suspend;
854				};
855			};
856
857			/* Schematics show not in use */
858			nldo-reg5 {
859			};
860		};
861	};
862};
863
864&tsadc {
865	status = "okay";
866};
867
868&u2phy0 {
869	status = "okay";
870};
871
872&u2phy0_otg {
873	status = "okay";
874};
875
876&u2phy2 {
877	status = "okay";
878};
879
880&u2phy2_host {
881	phy-supply = <&vcc5v0_usb>;
882	status = "okay";
883};
884
885&u2phy3 {
886	status = "okay";
887};
888
889&u2phy3_host {
890	phy-supply = <&vcc5v0_usb>;
891	status = "okay";
892};
893
894&uart2 {
895	pinctrl-0 = <&uart2m0_xfer>;
896	status = "okay";
897};
898
899/* DMA seems to interfere with bluetooth device normal operation. */
900&uart9 {
901	pinctrl-0 = <&uart9m2_xfer>, <&uart9m2_ctsn>, <&uart9m2_rtsn>;
902	pinctrl-names = "default";
903	/delete-property/ dma-names;
904	/delete-property/ dmas;
905	uart-has-rtscts;
906	status = "okay";
907
908	bluetooth {
909		compatible = "realtek,rtl8821cs-bt",
910			     "realtek,rtl8723bs-bt";
911		device-wake-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
912		enable-gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
913		host-wake-gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
914		pinctrl-0 = <&bt_reset>, <&bt_wake_dev>, <&bt_wake_host>;
915		pinctrl-names = "default";
916	};
917};
918
919&usb_host0_ehci {
920	status = "okay";
921};
922
923&usb_host0_ohci {
924	status = "okay";
925};
926
927&usb_host0_xhci {
928	usb-role-switch;
929	status = "okay";
930
931	port {
932		dwc3_0_role_switch: endpoint {
933			remote-endpoint = <&usbc0_role_sw>;
934		};
935	};
936};
937
938&usb_host1_ehci {
939	status = "okay";
940};
941
942&usb_host1_ohci {
943	status = "okay";
944};
945
946&usb_host2_xhci {
947	status = "okay";
948};
949
950&usbdp_phy0 {
951	orientation-switch;
952	mode-switch;
953	sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
954	sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
955	rockchip,dp-lane-mux = <2 3>;
956	status = "okay";
957
958	port {
959		#address-cells = <1>;
960		#size-cells = <0>;
961
962		usbdp_phy0_orientation_switch: endpoint@0 {
963			reg = <0>;
964			remote-endpoint = <&usbc0_orien_sw>;
965		};
966
967		usbdp_phy0_dp_altmode_mux: endpoint@1 {
968			reg = <1>;
969			remote-endpoint = <&dp_altmode_mux>;
970		};
971	};
972};
973
974&vop {
975	status = "okay";
976};
977
978&vop_mmu {
979	status = "okay";
980};
981
982&vp0 {
983	vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
984		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
985		remote-endpoint = <&hdmi0_in_vp0>;
986	};
987};
988