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&hdptxphy0 {
282	status = "okay";
283};
284
285&i2c0 {
286	pinctrl-0 = <&i2c0m2_xfer>;
287	pinctrl-names = "default";
288	status = "okay";
289
290	vdd_cpu_big0_s0: regulator@42 {
291		compatible = "rockchip,rk8602";
292		reg = <0x42>;
293		regulator-always-on;
294		regulator-boot-on;
295		regulator-max-microvolt = <1050000>;
296		regulator-min-microvolt = <550000>;
297		regulator-name = "vdd_cpu_big0_s0";
298		regulator-ramp-delay = <2300>;
299		fcs,suspend-voltage-selector = <1>;
300		vin-supply = <&vcc5v0_sys>;
301
302		regulator-state-mem {
303			regulator-off-in-suspend;
304		};
305	};
306
307	vdd_cpu_big1_s0: regulator@43 {
308		compatible = "rockchip,rk8603", "rockchip,rk8602";
309		reg = <0x43>;
310		regulator-always-on;
311		regulator-boot-on;
312		regulator-max-microvolt = <1050000>;
313		regulator-min-microvolt = <550000>;
314		regulator-name = "vdd_cpu_big1_s0";
315		regulator-ramp-delay = <2300>;
316		fcs,suspend-voltage-selector = <1>;
317		vin-supply = <&vcc5v0_sys>;
318
319		regulator-state-mem {
320			regulator-off-in-suspend;
321		};
322	};
323};
324
325&i2c2 {
326	status = "okay";
327
328	vdd_npu_s0: regulator@42 {
329		compatible = "rockchip,rk8602";
330		reg = <0x42>;
331		regulator-always-on;
332		regulator-boot-on;
333		regulator-max-microvolt = <950000>;
334		regulator-min-microvolt = <550000>;
335		regulator-name = "vdd_npu_s0";
336		regulator-ramp-delay = <2300>;
337		fcs,suspend-voltage-selector = <1>;
338		vin-supply = <&vcc5v0_sys>;
339
340		regulator-state-mem {
341			regulator-off-in-suspend;
342		};
343	};
344};
345
346&i2c6 {
347	pinctrl-0 = <&i2c6m3_xfer>;
348	status = "okay";
349
350	fusb302: typec-portc@22 {
351		compatible = "fcs,fusb302";
352		reg = <0x22>;
353		interrupt-parent = <&gpio0>;
354		interrupts = <RK_PC4 IRQ_TYPE_LEVEL_LOW>;
355		pinctrl-0 = <&usbc0_int>;
356		pinctrl-names = "default";
357		vbus-supply = <&vbus5v0_typec>;
358
359		usb_con: connector {
360			compatible = "usb-c-connector";
361			data-role = "dual";
362			label = "USB-C";
363			power-role = "dual";
364			try-power-role = "sink";
365			source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
366			sink-pdos = <PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
367			op-sink-microwatt = <1000000>;
368
369			ports {
370				#address-cells = <1>;
371				#size-cells = <0>;
372
373				port@0 {
374					reg = <0>;
375					usbc0_orien_sw: endpoint {
376						remote-endpoint = <&usbdp_phy0_orientation_switch>;
377					};
378				};
379
380				port@1 {
381					reg = <1>;
382					usbc0_role_sw: endpoint {
383						remote-endpoint = <&dwc3_0_role_switch>;
384					};
385				};
386
387				port@2 {
388					reg = <2>;
389					dp_altmode_mux: endpoint {
390						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
391					};
392				};
393			};
394		};
395	};
396
397	rtc_hym8563: rtc@51 {
398		compatible = "haoyu,hym8563";
399		reg = <0x51>;
400		#clock-cells = <0>;
401		clock-output-names = "hym8563";
402		interrupt-parent = <&gpio0>;
403		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
404		pinctrl-0 = <&hym8563_int>;
405		pinctrl-names = "default";
406		wakeup-source;
407	};
408};
409
410&i2c7 {
411	pinctrl-0 = <&i2c7m0_xfer>;
412	status = "okay";
413
414	es8388: audio-codec@11 {
415		compatible = "everest,es8388", "everest,es8328";
416		reg = <0x11>;
417		assigned-clock-rates = <12288000>;
418		assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
419		AVDD-supply = <&vcc_3v3_s3>;
420		clocks = <&cru I2S0_8CH_MCLKOUT>;
421		DVDD-supply = <&vcc_1v8_s3>;
422		HPVDD-supply = <&vcc_3v3_s3>;
423		PVDD-supply = <&vcc_1v8_s3>;
424		#sound-dai-cells = <0>;
425
426		port {
427			es8388_p0_0: endpoint {
428				remote-endpoint = <&i2s0_8ch_p0_0>;
429			};
430		};
431	};
432};
433
434&i2s0_8ch {
435	pinctrl-names = "default";
436	pinctrl-0 = <&i2s0_lrck
437		     &i2s0_mclk
438		     &i2s0_sclk
439		     &i2s0_sdi0
440		     &i2s0_sdo0>;
441	status = "okay";
442
443	i2s0_8ch_p0: port {
444		i2s0_8ch_p0_0: endpoint {
445			dai-format = "i2s";
446			mclk-fs = <256>;
447			remote-endpoint = <&es8388_p0_0>;
448		};
449	};
450};
451
452&pcie2x1l2 {
453	pinctrl-0 = <&rtl8111_perstb>;
454	pinctrl-names = "default";
455	status = "okay";
456};
457
458&pd_gpu {
459	domain-supply = <&vdd_gpu_s0>;
460};
461
462&pinctrl {
463	bluetooth-pins {
464		bt_reset: bt-reset {
465			rockchip,pins =
466				<0 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
467		};
468
469		bt_wake_dev: bt-wake-dev {
470			rockchip,pins =
471				<0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
472		};
473
474		bt_wake_host: bt-wake-host {
475			rockchip,pins =
476				<0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_down>;
477		};
478	};
479
480	ethernet-pins {
481		rtl8111_perstb: rtl8111-perstb {
482			rockchip,pins = <3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>;
483		};
484	};
485
486	hym8563 {
487
488		hym8563_int: hym8563-int {
489			rockchip,pins =
490				<0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
491		};
492	};
493
494	sdio-pwrseq {
495		wifi_enable_h: wifi-enable-h {
496			rockchip,pins =
497				<0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
498		};
499	};
500
501	usb-typec {
502		usbc0_int: usbc0-int {
503			rockchip,pins =
504				<0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
505		};
506
507		typec5v_pwren: typec5v-pwren {
508			rockchip,pins =
509				<4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_none>;
510		};
511	};
512};
513
514&saradc {
515	vref-supply = <&vcca_1v8_s0>;
516	status = "okay";
517};
518
519/* HS400 modes seemed to cause io errors. */
520&sdhci {
521	bus-width = <8>;
522	no-mmc-hs400;
523	no-sd;
524	no-sdio;
525	non-removable;
526	vmmc-supply = <&vcc_3v3_s0>;
527	vqmmc-supply = <&vcc_1v8_s3>;
528	status = "okay";
529};
530
531&sdio {
532	bus-width = <4>;
533	cap-sd-highspeed;
534	cap-sdio-irq;
535	disable-wp;
536	keep-power-in-suspend;
537	max-frequency = <100000000>;
538	mmc-pwrseq = <&sdio_pwrseq>;
539	no-mmc;
540	no-sd;
541	non-removable;
542	sd-uhs-sdr104;
543	vmmc-supply = <&vcc_3v3_s3>;
544	vqmmc-supply = <&vcc_1v8_s3>;
545	status = "okay";
546};
547
548&sdmmc {
549	bus-width = <4>;
550	cap-mmc-highspeed;
551	cap-sd-highspeed;
552	disable-wp;
553	no-sdio;
554	no-mmc;
555	sd-uhs-sdr104;
556	vmmc-supply = <&vcc_3v3_s3>;
557	vqmmc-supply = <&vccio_sd_s0>;
558	status = "okay";
559};
560
561&spi2 {
562	#address-cells = <1>;
563	assigned-clocks = <&cru CLK_SPI2>;
564	assigned-clock-rates = <200000000>;
565	num-cs = <1>;
566	pinctrl-0 = <&spi2m2_pins>, <&spi2m2_cs0>;
567	pinctrl-names = "default";
568	#size-cells = <0>;
569	status = "okay";
570
571	pmic@0 {
572		compatible = "rockchip,rk806";
573		reg = <0x0>;
574		#gpio-cells = <2>;
575		gpio-controller;
576		interrupt-parent = <&gpio0>;
577		interrupts = <RK_PA7 IRQ_TYPE_LEVEL_LOW>;
578		pinctrl-0 = <&pmic_pins>, <&rk806_dvs1_null>,
579			    <&rk806_dvs2_null>, <&rk806_dvs3_null>;
580		pinctrl-names = "default";
581		spi-max-frequency = <1000000>;
582
583		vcc1-supply = <&vcc5v0_sys>;
584		vcc2-supply = <&vcc5v0_sys>;
585		vcc3-supply = <&vcc5v0_sys>;
586		vcc4-supply = <&vcc5v0_sys>;
587		vcc5-supply = <&vcc5v0_sys>;
588		vcc6-supply = <&vcc5v0_sys>;
589		vcc7-supply = <&vcc5v0_sys>;
590		vcc8-supply = <&vcc5v0_sys>;
591		vcc9-supply = <&vcc5v0_sys>;
592		vcc10-supply = <&vcc5v0_sys>;
593		vcc11-supply = <&vcc_2v0_pldo_s3>;
594		vcc12-supply = <&vcc5v0_sys>;
595		vcc13-supply = <&vcc_1v1_nldo_s3>;
596		vcc14-supply = <&vcc_1v1_nldo_s3>;
597		vcca-supply = <&vcc5v0_sys>;
598
599		rk806_dvs1_null: dvs1-null-pins {
600			pins = "gpio_pwrctrl1";
601			function = "pin_fun0";
602		};
603
604		rk806_dvs2_null: dvs2-null-pins {
605			pins = "gpio_pwrctrl2";
606			function = "pin_fun0";
607		};
608
609		rk806_dvs3_null: dvs3-null-pins {
610			pins = "gpio_pwrctrl3";
611			function = "pin_fun0";
612		};
613
614		regulators {
615			vdd_gpu_s0: dcdc-reg1 {
616				regulator-boot-on;
617				regulator-enable-ramp-delay = <400>;
618				regulator-max-microvolt = <950000>;
619				regulator-min-microvolt = <550000>;
620				regulator-name = "vdd_gpu_s0";
621				regulator-ramp-delay = <12500>;
622				regulator-state-mem {
623					regulator-off-in-suspend;
624				};
625			};
626
627			vdd_cpu_lit_s0: dcdc-reg2 {
628				regulator-always-on;
629				regulator-boot-on;
630				regulator-max-microvolt = <950000>;
631				regulator-min-microvolt = <550000>;
632				regulator-ramp-delay = <12500>;
633				regulator-name = "vdd_cpu_lit_s0";
634				regulator-state-mem {
635					regulator-off-in-suspend;
636				};
637			};
638
639			vdd_logic_s0: dcdc-reg3 {
640				regulator-always-on;
641				regulator-boot-on;
642				regulator-max-microvolt = <750000>;
643				regulator-min-microvolt = <675000>;
644				regulator-name = "vdd_logic_s0";
645				regulator-ramp-delay = <12500>;
646				regulator-state-mem {
647					regulator-on-in-suspend;
648					regulator-suspend-microvolt = <750000>;
649				};
650			};
651
652			vdd_vdenc_s0: dcdc-reg4 {
653				regulator-always-on;
654				regulator-boot-on;
655				regulator-max-microvolt = <950000>;
656				regulator-min-microvolt = <550000>;
657				regulator-name = "vdd_vdenc_s0";
658				regulator-ramp-delay = <12500>;
659				regulator-state-mem {
660					regulator-off-in-suspend;
661				};
662			};
663
664			vdd_ddr_s0: dcdc-reg5 {
665				regulator-always-on;
666				regulator-boot-on;
667				regulator-min-microvolt = <750000>;
668				regulator-max-microvolt = <850000>;
669				regulator-ramp-delay = <12500>;
670				regulator-name = "vdd_ddr_s0";
671				regulator-state-mem {
672					regulator-off-in-suspend;
673					regulator-suspend-microvolt = <850000>;
674				};
675			};
676
677			vdd2_ddr_s3: dcdc-reg6 {
678				regulator-always-on;
679				regulator-boot-on;
680				regulator-max-microvolt = <1100000>;
681				regulator-min-microvolt = <1100000>;
682				regulator-name = "vdd2_ddr_s3";
683				regulator-state-mem {
684					regulator-on-in-suspend;
685				};
686			};
687
688			vcc_2v0_pldo_s3: dcdc-reg7 {
689				regulator-always-on;
690				regulator-boot-on;
691				regulator-max-microvolt = <2000000>;
692				regulator-min-microvolt = <2000000>;
693				regulator-name = "vdd_2v0_pldo_s3";
694				regulator-state-mem {
695					regulator-on-in-suspend;
696					regulator-suspend-microvolt = <2000000>;
697				};
698			};
699
700			vcc_3v3_s3: dcdc-reg8 {
701				regulator-always-on;
702				regulator-boot-on;
703				regulator-max-microvolt = <3300000>;
704				regulator-min-microvolt = <3300000>;
705				regulator-name = "vcc_3v3_s3";
706				regulator-state-mem {
707					regulator-on-in-suspend;
708					regulator-suspend-microvolt = <3300000>;
709				};
710			};
711
712			vddq_ddr_s0: dcdc-reg9 {
713				regulator-always-on;
714				regulator-boot-on;
715				regulator-max-microvolt = <600000>;
716				regulator-min-microvolt = <600000>;
717				regulator-name = "vddq_ddr_s0";
718				regulator-state-mem {
719					regulator-off-in-suspend;
720				};
721			};
722
723			vcc_1v8_s3: dcdc-reg10 {
724				regulator-always-on;
725				regulator-boot-on;
726				regulator-max-microvolt = <1800000>;
727				regulator-min-microvolt = <1800000>;
728				regulator-name = "vcc_1v8_s3";
729				regulator-state-mem {
730					regulator-on-in-suspend;
731					regulator-suspend-microvolt = <1800000>;
732				};
733			};
734
735			vcc_1v8_s0: pldo-reg1 {
736				regulator-always-on;
737				regulator-boot-on;
738				regulator-max-microvolt = <1800000>;
739				regulator-min-microvolt = <1800000>;
740				regulator-name = "vcc_1v8_s0";
741				regulator-state-mem {
742					regulator-off-in-suspend;
743				};
744			};
745
746			vcca_1v8_s0: pldo-reg2 {
747				regulator-always-on;
748				regulator-boot-on;
749				regulator-max-microvolt = <1800000>;
750				regulator-min-microvolt = <1800000>;
751				regulator-name = "vcca_1v8_s0";
752				regulator-state-mem {
753					regulator-off-in-suspend;
754					regulator-suspend-microvolt = <1800000>;
755				};
756			};
757
758			vdda_1v2_s0: pldo-reg3 {
759				regulator-always-on;
760				regulator-boot-on;
761				regulator-max-microvolt = <1200000>;
762				regulator-min-microvolt = <1200000>;
763				regulator-name = "vdda_1v2_s0";
764				regulator-state-mem {
765					regulator-off-in-suspend;
766				};
767			};
768
769			vcca_3v3_s0: pldo-reg4 {
770				regulator-always-on;
771				regulator-boot-on;
772				regulator-max-microvolt = <3300000>;
773				regulator-min-microvolt = <3300000>;
774				regulator-name = "vcca_3v3_s0";
775				regulator-state-mem {
776					regulator-off-in-suspend;
777				};
778			};
779
780			vccio_sd_s0: pldo-reg5 {
781				regulator-always-on;
782				regulator-boot-on;
783				regulator-max-microvolt = <3300000>;
784				regulator-min-microvolt = <1800000>;
785				regulator-name = "vccio_sd_s0";
786				regulator-state-mem {
787					regulator-off-in-suspend;
788				};
789			};
790
791			vcc_1v8_s3_pldo6: pldo-reg6 {
792				regulator-always-on;
793				regulator-boot-on;
794				regulator-max-microvolt = <1800000>;
795				regulator-min-microvolt = <1800000>;
796				regulator-name = "vcc_1v8_s3_pldo6";
797				regulator-state-mem {
798					regulator-on-in-suspend;
799					regulator-suspend-microvolt = <1800000>;
800				};
801			};
802
803			vdd_0v75_s3: nldo-reg1 {
804				regulator-always-on;
805				regulator-boot-on;
806				regulator-max-microvolt = <750000>;
807				regulator-min-microvolt = <750000>;
808				regulator-name = "vdd_0v75_s3";
809				regulator-state-mem {
810					regulator-on-in-suspend;
811					regulator-suspend-microvolt = <750000>;
812				};
813			};
814
815			vdda_ddr_pll_s0: nldo-reg2 {
816				regulator-always-on;
817				regulator-boot-on;
818				regulator-max-microvolt = <850000>;
819				regulator-min-microvolt = <850000>;
820				regulator-name = "vdda_ddr_pll_s0";
821				regulator-state-mem {
822					regulator-off-in-suspend;
823					regulator-suspend-microvolt = <850000>;
824				};
825			};
826
827			avdd_0v75_s0: nldo-reg3 {
828				regulator-always-on;
829				regulator-boot-on;
830				regulator-max-microvolt = <750000>;
831				regulator-min-microvolt = <750000>;
832				regulator-name = "avdd_0v75_s0";
833				regulator-state-mem {
834					regulator-off-in-suspend;
835				};
836			};
837
838			vdda_0v85_s0: nldo-reg4 {
839				regulator-always-on;
840				regulator-boot-on;
841				regulator-min-microvolt = <850000>;
842				regulator-max-microvolt = <850000>;
843				regulator-name = "vdda_0v85_s0";
844				regulator-state-mem {
845					regulator-off-in-suspend;
846				};
847			};
848
849			/* Schematics show not in use */
850			nldo-reg5 {
851			};
852		};
853	};
854};
855
856&tsadc {
857	status = "okay";
858};
859
860&u2phy0 {
861	status = "okay";
862};
863
864&u2phy0_otg {
865	status = "okay";
866};
867
868&u2phy2 {
869	status = "okay";
870};
871
872&u2phy2_host {
873	phy-supply = <&vcc5v0_usb>;
874	status = "okay";
875};
876
877&u2phy3 {
878	status = "okay";
879};
880
881&u2phy3_host {
882	phy-supply = <&vcc5v0_usb>;
883	status = "okay";
884};
885
886&uart2 {
887	pinctrl-0 = <&uart2m0_xfer>;
888	status = "okay";
889};
890
891/* DMA seems to interfere with bluetooth device normal operation. */
892&uart9 {
893	pinctrl-0 = <&uart9m2_xfer>, <&uart9m2_ctsn>, <&uart9m2_rtsn>;
894	pinctrl-names = "default";
895	/delete-property/ dma-names;
896	/delete-property/ dmas;
897	uart-has-rtscts;
898	status = "okay";
899
900	bluetooth {
901		compatible = "realtek,rtl8821cs-bt",
902			     "realtek,rtl8723bs-bt";
903		device-wake-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_HIGH>;
904		enable-gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_HIGH>;
905		host-wake-gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
906		pinctrl-0 = <&bt_reset>, <&bt_wake_dev>, <&bt_wake_host>;
907		pinctrl-names = "default";
908	};
909};
910
911&usb_host0_ehci {
912	status = "okay";
913};
914
915&usb_host0_ohci {
916	status = "okay";
917};
918
919&usb_host0_xhci {
920	usb-role-switch;
921	status = "okay";
922
923	port {
924		dwc3_0_role_switch: endpoint {
925			remote-endpoint = <&usbc0_role_sw>;
926		};
927	};
928};
929
930&usb_host1_ehci {
931	status = "okay";
932};
933
934&usb_host1_ohci {
935	status = "okay";
936};
937
938&usb_host2_xhci {
939	status = "okay";
940};
941
942&usbdp_phy0 {
943	orientation-switch;
944	mode-switch;
945	sbu1-dc-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_HIGH>;
946	sbu2-dc-gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_HIGH>;
947	rockchip,dp-lane-mux = <2 3>;
948	status = "okay";
949
950	port {
951		#address-cells = <1>;
952		#size-cells = <0>;
953
954		usbdp_phy0_orientation_switch: endpoint@0 {
955			reg = <0>;
956			remote-endpoint = <&usbc0_orien_sw>;
957		};
958
959		usbdp_phy0_dp_altmode_mux: endpoint@1 {
960			reg = <1>;
961			remote-endpoint = <&dp_altmode_mux>;
962		};
963	};
964};
965
966&vop {
967	status = "okay";
968};
969
970&vop_mmu {
971	status = "okay";
972};
973
974&vp0 {
975	vp0_out_hdmi0: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
976		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
977		remote-endpoint = <&hdmi0_in_vp0>;
978	};
979};
980