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/leds/common.h>
8#include <dt-bindings/pinctrl/rockchip.h>
9#include <dt-bindings/soc/rockchip,vop2.h>
10#include "rk3566.dtsi"
11
12/ {
13	aliases {
14		mmc1 = &sdmmc0;
15		mmc2 = &sdmmc1;
16		mmc3 = &sdmmc2;
17	};
18
19	adc-joystick {
20		compatible = "adc-joystick";
21		io-channels = <&adc_mux 0>,
22			      <&adc_mux 1>,
23			      <&adc_mux 2>,
24			      <&adc_mux 3>;
25		pinctrl-0 = <&joy_mux_en>;
26		pinctrl-names = "default";
27		poll-interval = <60>;
28		#address-cells = <1>;
29		#size-cells = <0>;
30
31		axis@0 {
32			reg = <0>;
33			abs-flat = <32>;
34			abs-fuzz = <32>;
35			abs-range = <1023 15>;
36			linux,code = <ABS_X>;
37		};
38
39		axis@1 {
40			reg = <1>;
41			abs-flat = <32>;
42			abs-fuzz = <32>;
43			abs-range = <15 1023>;
44			linux,code = <ABS_RX>;
45		};
46
47		axis@2 {
48			reg = <2>;
49			abs-flat = <32>;
50			abs-fuzz = <32>;
51			abs-range = <15 1023>;
52			linux,code = <ABS_Y>;
53		};
54
55		axis@3 {
56			reg = <3>;
57			abs-flat = <32>;
58			abs-fuzz = <32>;
59			abs-range = <1023 15>;
60			linux,code = <ABS_RY>;
61		};
62	};
63
64	adc_mux: adc-mux {
65		compatible = "io-channel-mux";
66		channels = "left_x", "right_x", "left_y", "right_y";
67		#io-channel-cells = <1>;
68		io-channels = <&saradc 3>;
69		io-channel-names = "parent";
70		mux-controls = <&gpio_mux>;
71		settle-time-us = <100>;
72	};
73
74	backlight: backlight {
75		compatible = "pwm-backlight";
76		power-supply = <&vcc_sys>;
77		pwms = <&pwm4 0 25000 0>;
78	};
79
80	battery: battery {
81		compatible = "simple-battery";
82		charge-full-design-microamp-hours = <3151000>;
83		charge-term-current-microamp = <300000>;
84		constant-charge-current-max-microamp = <2000000>;
85		constant-charge-voltage-max-microvolt = <4250000>;
86		factory-internal-resistance-micro-ohms = <117000>;
87		voltage-max-design-microvolt = <4172000>;
88		voltage-min-design-microvolt = <3400000>;
89
90		ocv-capacity-celsius = <20>;
91		ocv-capacity-table-0 =  <4172000 100>, <4092000 95>, <4035000 90>, <3990000 85>,
92					<3939000 80>, <3895000 75>, <3852000 70>, <3807000 65>,
93					<3762000 60>, <3713000 55>, <3672000 50>, <3647000 45>,
94					<3629000 40>, <3613000 35>, <3598000 30>, <3578000 25>,
95					<3550000 20>, <3519000 15>, <3479000 10>, <3438000 5>,
96					<3400000 0>;
97	};
98
99	gpio_keys_control: gpio-keys-control {
100		compatible = "gpio-keys";
101		pinctrl-0 = <&btn_pins_ctrl>;
102		pinctrl-names = "default";
103
104		button-a {
105			gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
106			label = "EAST";
107			linux,code = <BTN_EAST>;
108		};
109
110		button-b {
111			gpios = <&gpio3 RK_PC3 GPIO_ACTIVE_LOW>;
112			label = "SOUTH";
113			linux,code = <BTN_SOUTH>;
114		};
115
116		button-down {
117			gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
118			label = "DPAD-DOWN";
119			linux,code = <BTN_DPAD_DOWN>;
120		};
121
122		button-l1 {
123			gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_LOW>;
124			label = "TL";
125			linux,code = <BTN_TL>;
126		};
127
128		button-l2 {
129			gpios = <&gpio3 RK_PB2 GPIO_ACTIVE_LOW>;
130			label = "TL2";
131			linux,code = <BTN_TL2>;
132		};
133
134		button-left {
135			gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_LOW>;
136			label = "DPAD-LEFT";
137			linux,code = <BTN_DPAD_LEFT>;
138		};
139
140		button-r1 {
141			gpios = <&gpio3 RK_PB3 GPIO_ACTIVE_LOW>;
142			label = "TR";
143			linux,code = <BTN_TR>;
144		};
145
146		button-r2 {
147			gpios = <&gpio3 RK_PB4 GPIO_ACTIVE_LOW>;
148			label = "TR2";
149			linux,code = <BTN_TR2>;
150		};
151
152		button-right {
153			gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_LOW>;
154			label = "DPAD-RIGHT";
155			linux,code = <BTN_DPAD_RIGHT>;
156		};
157
158		button-select {
159			gpios = <&gpio3 RK_PB6 GPIO_ACTIVE_LOW>;
160			label = "SELECT";
161			linux,code = <BTN_SELECT>;
162		};
163
164		button-start {
165			gpios = <&gpio3 RK_PB5 GPIO_ACTIVE_LOW>;
166			label = "START";
167			linux,code = <BTN_START>;
168		};
169
170		button-thumbl {
171			gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
172			label = "THUMBL";
173			linux,code = <BTN_THUMBL>;
174		};
175
176		button-thumbr {
177			gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
178			label = "THUMBR";
179			linux,code = <BTN_THUMBR>;
180		};
181
182		button-up {
183			gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
184			label = "DPAD-UP";
185			linux,code = <BTN_DPAD_UP>;
186		};
187
188		button-x {
189			gpios = <&gpio3 RK_PC0 GPIO_ACTIVE_LOW>;
190			label = "NORTH";
191			linux,code = <BTN_NORTH>;
192		};
193
194		button-y {
195			gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
196			label = "WEST";
197			linux,code = <BTN_WEST>;
198		};
199	};
200
201	gpio_keys_vol: gpio-keys-vol {
202		compatible = "gpio-keys";
203		autorepeat;
204		pinctrl-0 = <&btn_pins_vol>;
205		pinctrl-names = "default";
206
207		button-vol-down {
208			gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_LOW>;
209			label = "VOLUMEDOWN";
210			linux,code = <KEY_VOLUMEDOWN>;
211		};
212
213		button-vol-up {
214			gpios = <&gpio3 RK_PA7 GPIO_ACTIVE_LOW>;
215			label = "VOLUMEUP";
216			linux,code = <KEY_VOLUMEUP>;
217		};
218	};
219
220	gpio_mux: mux-controller {
221		compatible = "gpio-mux";
222		mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
223			    <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
224		#mux-control-cells = <0>;
225	};
226
227	hdmi-con {
228		compatible = "hdmi-connector";
229		ddc-i2c-bus = <&i2c5>;
230		type = "c";
231
232		port {
233			hdmi_con_in: endpoint {
234				remote-endpoint = <&hdmi_out_con>;
235			};
236		};
237	};
238
239	/*
240	 * Device also includes an always on LED that is wired to the 5V input
241	 * voltage and is on when the device is plugged in.
242	 */
243	leds: pwm-leds {
244		compatible = "pwm-leds";
245
246		green_led: led-0 {
247			color = <LED_COLOR_ID_GREEN>;
248			function = LED_FUNCTION_STATUS;
249			max-brightness = <255>;
250			pwms = <&pwm6 0 25000 0>;
251		};
252
253		red_led: led-1 {
254			color = <LED_COLOR_ID_RED>;
255			function = LED_FUNCTION_CHARGING;
256			max-brightness = <255>;
257			pwms = <&pwm7 0 25000 0>;
258		};
259	};
260
261	sdio_pwrseq: sdio-pwrseq {
262		compatible = "mmc-pwrseq-simple";
263		clocks = <&rk817 1>;
264		clock-names = "ext_clock";
265		pinctrl-0 = <&wifi_enable_h>;
266		pinctrl-names = "default";
267		post-power-on-delay-ms = <200>;
268		reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
269	};
270
271	/*
272	 * Channels reversed for speakers. Headphones automatically switch via hardware when
273	 * detected with no ability to control output in software. Headphones appear to be mono
274	 * (each output channel receives all audio). No microphone support on 3.5mm jack.
275	 */
276	sound {
277		compatible = "simple-audio-card";
278		simple-audio-card,name = "rk817_ext";
279		simple-audio-card,format = "i2s";
280		simple-audio-card,mclk-fs = <256>;
281		simple-audio-card,widgets =
282			"Headphone", "Headphones";
283		simple-audio-card,routing =
284			"Headphones", "HPOL",
285			"Headphones", "HPOR";
286
287		simple-audio-card,codec {
288			sound-dai = <&rk817>;
289		};
290
291		simple-audio-card,cpu {
292			sound-dai = <&i2s1_8ch>;
293		};
294	};
295
296	vcc3v3_lcd0_n: regulator-vcc3v3-lcd0 {
297		compatible = "regulator-fixed";
298		gpio = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
299		enable-active-high;
300		pinctrl-0 = <&vcc_lcd_h>;
301		pinctrl-names = "default";
302		regulator-boot-on;
303		regulator-min-microvolt = <3300000>;
304		regulator-max-microvolt = <3300000>;
305		regulator-name = "vcc3v3_lcd0_n";
306		vin-supply = <&vcc_3v3>;
307		regulator-state-mem {
308			regulator-off-in-suspend;
309		};
310	};
311
312	vcc_sys: regulator-vcc-sys {
313		compatible = "regulator-fixed";
314		regulator-always-on;
315		regulator-boot-on;
316		regulator-min-microvolt = <3800000>;
317		regulator-max-microvolt = <3800000>;
318		regulator-name = "vcc_sys";
319	};
320
321	vcc_wifi: regulator-vcc-wifi {
322		compatible = "regulator-fixed";
323		enable-active-high;
324		gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
325		pinctrl-0 = <&vcc_wifi_h>;
326		pinctrl-names = "default";
327		regulator-always-on;
328		regulator-boot-on;
329		regulator-min-microvolt = <3300000>;
330		regulator-max-microvolt = <3300000>;
331		regulator-name = "vcc_wifi";
332	};
333};
334
335&combphy1 {
336	status = "okay";
337};
338
339&cpu0 {
340	cpu-supply = <&vdd_cpu>;
341};
342
343&cpu1 {
344	cpu-supply = <&vdd_cpu>;
345};
346
347&cpu2 {
348	cpu-supply = <&vdd_cpu>;
349};
350
351&cpu3 {
352	cpu-supply = <&vdd_cpu>;
353};
354
355&dsi0 {
356	status = "okay";
357	#address-cells = <1>;
358	#size-cells = <0>;
359
360	ports {
361		dsi0_in: port@0 {
362			reg = <0>;
363			dsi0_in_vp1: endpoint {
364				remote-endpoint = <&vp1_out_dsi0>;
365			};
366		};
367
368		dsi0_out: port@1 {
369			reg = <1>;
370			mipi_out_panel: endpoint {
371				remote-endpoint = <&mipi_in_panel>;
372			};
373		};
374	};
375};
376
377&dsi_dphy0 {
378	status = "okay";
379};
380
381&gpu {
382	mali-supply = <&vdd_gpu>;
383	status = "okay";
384};
385
386&hdmi {
387	ddc-i2c-bus = <&i2c5>;
388	pinctrl-0 = <&hdmitxm0_cec>;
389	pinctrl-names = "default";
390	status = "okay";
391};
392
393&hdmi_in {
394	hdmi_in_vp0: endpoint {
395		remote-endpoint = <&vp0_out_hdmi>;
396	};
397};
398
399&hdmi_out {
400	hdmi_out_con: endpoint {
401		remote-endpoint = <&hdmi_con_in>;
402	};
403};
404
405&hdmi_sound {
406	status = "okay";
407};
408
409&i2c0 {
410	status = "okay";
411
412	rk817: pmic@20 {
413		compatible = "rockchip,rk817";
414		reg = <0x20>;
415		interrupt-parent = <&gpio0>;
416		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
417		clock-output-names = "rk808-clkout1", "rk808-clkout2";
418		clock-names = "mclk";
419		clocks = <&cru I2S1_MCLKOUT_TX>;
420		assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
421		assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
422		#clock-cells = <1>;
423		#sound-dai-cells = <0>;
424		pinctrl-names = "default";
425		pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
426		wakeup-source;
427
428		vcc1-supply = <&vcc_sys>;
429		vcc2-supply = <&vcc_sys>;
430		vcc3-supply = <&vcc_sys>;
431		vcc4-supply = <&vcc_sys>;
432		vcc5-supply = <&vcc_sys>;
433		vcc6-supply = <&vcc_sys>;
434		vcc7-supply = <&vcc_sys>;
435		vcc8-supply = <&vcc_sys>;
436		vcc9-supply = <&dcdc_boost>;
437
438		regulators {
439			vdd_logic: DCDC_REG1 {
440				regulator-always-on;
441				regulator-boot-on;
442				regulator-min-microvolt = <500000>;
443				regulator-max-microvolt = <1350000>;
444				regulator-ramp-delay = <6001>;
445				regulator-initial-mode = <0x2>;
446				regulator-name = "vdd_logic";
447				regulator-state-mem {
448					regulator-off-in-suspend;
449					regulator-suspend-microvolt = <900000>;
450				};
451			};
452
453			vdd_gpu: DCDC_REG2 {
454				regulator-always-on;
455				regulator-boot-on;
456				regulator-min-microvolt = <500000>;
457				regulator-max-microvolt = <1350000>;
458				regulator-ramp-delay = <6001>;
459				regulator-initial-mode = <0x2>;
460				regulator-name = "vdd_gpu";
461				regulator-state-mem {
462					regulator-off-in-suspend;
463				};
464			};
465
466			vcc_ddr: DCDC_REG3 {
467				regulator-always-on;
468				regulator-boot-on;
469				regulator-initial-mode = <0x2>;
470				regulator-name = "vcc_ddr";
471				regulator-state-mem {
472					regulator-on-in-suspend;
473				};
474			};
475
476			vcc_3v3: DCDC_REG4 {
477				regulator-always-on;
478				regulator-boot-on;
479				regulator-min-microvolt = <3300000>;
480				regulator-max-microvolt = <3300000>;
481				regulator-initial-mode = <0x2>;
482				regulator-name = "vcc_3v3";
483				regulator-state-mem {
484					regulator-on-in-suspend;
485					regulator-suspend-microvolt = <3300000>;
486				};
487			};
488
489			vcca1v8_pmu: LDO_REG1 {
490				regulator-always-on;
491				regulator-boot-on;
492				regulator-min-microvolt = <1800000>;
493				regulator-max-microvolt = <1800000>;
494				regulator-name = "vcca1v8_pmu";
495				regulator-state-mem {
496					regulator-on-in-suspend;
497					regulator-suspend-microvolt = <1800000>;
498				};
499			};
500
501			vdda_0v9: LDO_REG2 {
502				regulator-always-on;
503				regulator-boot-on;
504				regulator-min-microvolt = <900000>;
505				regulator-max-microvolt = <900000>;
506				regulator-name = "vdda_0v9";
507				regulator-state-mem {
508					regulator-off-in-suspend;
509				};
510			};
511
512			vdda0v9_pmu: LDO_REG3 {
513				regulator-always-on;
514				regulator-boot-on;
515				regulator-min-microvolt = <900000>;
516				regulator-max-microvolt = <900000>;
517				regulator-name = "vdda0v9_pmu";
518				regulator-state-mem {
519					regulator-on-in-suspend;
520					regulator-suspend-microvolt = <900000>;
521				};
522			};
523
524			vccio_acodec: LDO_REG4 {
525				regulator-always-on;
526				regulator-boot-on;
527				regulator-min-microvolt = <3300000>;
528				regulator-max-microvolt = <3300000>;
529				regulator-name = "vccio_acodec";
530				regulator-state-mem {
531					regulator-off-in-suspend;
532				};
533			};
534
535			vccio_sd: LDO_REG5 {
536				regulator-always-on;
537				regulator-boot-on;
538				regulator-min-microvolt = <1800000>;
539				regulator-max-microvolt = <3300000>;
540				regulator-name = "vccio_sd";
541				regulator-state-mem {
542					regulator-off-in-suspend;
543				};
544			};
545
546			vcc3v3_pmu: LDO_REG6 {
547				regulator-always-on;
548				regulator-boot-on;
549				regulator-min-microvolt = <3300000>;
550				regulator-max-microvolt = <3300000>;
551				regulator-name = "vcc3v3_pmu";
552				regulator-state-mem {
553					regulator-on-in-suspend;
554					regulator-suspend-microvolt = <3300000>;
555				};
556			};
557
558			vcc_1v8: LDO_REG7 {
559				regulator-always-on;
560				regulator-boot-on;
561				regulator-min-microvolt = <1800000>;
562				regulator-max-microvolt = <1800000>;
563				regulator-name = "vcc_1v8";
564				regulator-state-mem {
565					regulator-off-in-suspend;
566				};
567			};
568
569			vcc1v8_dvp: LDO_REG8 {
570				regulator-always-on;
571				regulator-boot-on;
572				regulator-min-microvolt = <1800000>;
573				regulator-max-microvolt = <3300000>;
574				regulator-name = "vcc1v8_dvp";
575				regulator-state-mem {
576					regulator-off-in-suspend;
577				};
578			};
579
580			vcc2v8_dvp: LDO_REG9 {
581				regulator-always-on;
582				regulator-boot-on;
583				regulator-min-microvolt = <2800000>;
584				regulator-max-microvolt = <2800000>;
585				regulator-name = "vcc2v8_dvp";
586				regulator-state-mem {
587					regulator-off-in-suspend;
588				};
589			};
590
591			dcdc_boost: BOOST {
592				regulator-always-on;
593				regulator-boot-on;
594				regulator-min-microvolt = <4700000>;
595				regulator-max-microvolt = <5400000>;
596				regulator-name = "boost";
597				regulator-state-mem {
598					regulator-off-in-suspend;
599				};
600			};
601
602			otg_switch: OTG_SWITCH {
603				regulator-name = "otg_switch";
604				regulator-state-mem {
605					regulator-off-in-suspend;
606				};
607			};
608		};
609
610		rk817_charger: charger {
611			monitored-battery = <&battery>;
612			rockchip,resistor-sense-micro-ohms = <10000>;
613			rockchip,sleep-enter-current-microamp = <300000>;
614			rockchip,sleep-filter-current-microamp = <100000>;
615		};
616	};
617};
618
619&i2c5 {
620	pinctrl-0 = <&i2c5m1_xfer>;
621	pinctrl-names = "default";
622	status = "okay";
623};
624
625&i2s0_8ch {
626	status = "okay";
627};
628
629&i2s1_8ch {
630	pinctrl-0 = <&i2s1m0_sclktx
631		     &i2s1m0_lrcktx
632		     &i2s1m0_sdi0
633		     &i2s1m0_sdo0>;
634	pinctrl-names = "default";
635	rockchip,trcm-sync-tx-only;
636	status = "okay";
637};
638
639&pinctrl {
640	gpio-btns {
641		btn_pins_ctrl: btn-pins-ctrl {
642			rockchip,pins =
643				<3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
644				<3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
645				<3 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
646				<3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
647				<3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
648				<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
649				<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
650				<3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
651				<3 RK_PB3 RK_FUNC_GPIO &pcfg_pull_up>,
652				<3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
653				<3 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
654				<3 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>,
655				<3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>,
656				<3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
657				<3 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>,
658				<3 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
659		};
660
661		btn_pins_vol: btn-pins-vol {
662			rockchip,pins =
663				<3 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
664				<3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
665		};
666	};
667
668	joy-mux {
669		joy_mux_en: joy-mux-en {
670			rockchip,pins =
671				<0 RK_PB5 RK_FUNC_GPIO &pcfg_output_low>;
672		};
673	};
674
675	gpio-lcd {
676		lcd_rst: lcd-rst {
677			rockchip,pins =
678				<4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
679		};
680	};
681
682	pmic {
683		pmic_int_l: pmic-int-l {
684			rockchip,pins =
685				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
686		};
687	};
688
689	sdio-pwrseq {
690		wifi_enable_h: wifi-enable-h {
691			rockchip,pins =
692				<4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
693		};
694	};
695
696	vcc3v3-lcd {
697		vcc_lcd_h: vcc-lcd-h {
698			rockchip,pins =
699				<0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
700		};
701	};
702
703	vcc-wifi {
704		vcc_wifi_h: vcc-wifi-h {
705			rockchip,pins =
706				<0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
707		};
708	};
709};
710
711&pmu_io_domains {
712	status = "okay";
713	pmuio1-supply = <&vcc3v3_pmu>;
714	pmuio2-supply = <&vcc3v3_pmu>;
715	vccio1-supply = <&vccio_acodec>;
716	vccio3-supply = <&vccio_sd>;
717	vccio4-supply = <&vcc_1v8>;
718	vccio5-supply = <&vcc_3v3>;
719	vccio6-supply = <&vcc1v8_dvp>;
720	vccio7-supply = <&vcc_3v3>;
721};
722
723&pwm4 {
724	status = "okay";
725};
726
727&pwm6 {
728	status = "okay";
729};
730
731&pwm7 {
732	status = "okay";
733};
734
735&saradc {
736	vref-supply = <&vcc_1v8>;
737	status = "okay";
738};
739
740&sdmmc0 {
741	bus-width = <4>;
742	cap-sd-highspeed;
743	cd-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_LOW>;
744	disable-wp;
745	pinctrl-0 = <&sdmmc0_bus4 &sdmmc0_clk &sdmmc0_cmd &sdmmc0_det>;
746	pinctrl-names = "default";
747	sd-uhs-sdr104;
748	vmmc-supply = <&vcc_3v3>;
749	vqmmc-supply = <&vccio_sd>;
750	status = "okay";
751};
752
753&sdmmc1 {
754	bus-width = <4>;
755	cap-sd-highspeed;
756	cd-gpios = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;
757	disable-wp;
758	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk &sdmmc1_det>;
759	pinctrl-names = "default";
760	sd-uhs-sdr104;
761	vmmc-supply = <&vcc_3v3>;
762	vqmmc-supply = <&vcc1v8_dvp>;
763	status = "okay";
764};
765
766&sdmmc2 {
767	bus-width = <4>;
768	cap-sd-highspeed;
769	cap-sdio-irq;
770	keep-power-in-suspend;
771	mmc-pwrseq = <&sdio_pwrseq>;
772	non-removable;
773	pinctrl-0 = <&sdmmc2m0_bus4 &sdmmc2m0_cmd &sdmmc2m0_clk>;
774	pinctrl-names = "default";
775	vmmc-supply = <&vcc_wifi>;
776	vqmmc-supply = <&vcca1v8_pmu>;
777	status = "okay";
778};
779
780&tsadc {
781	rockchip,hw-tshut-mode = <1>;
782	rockchip,hw-tshut-polarity = <0>;
783	status = "okay";
784};
785
786&uart1 {
787	pinctrl-0 = <&uart1m1_xfer &uart1m1_ctsn &uart1m1_rtsn>;
788	pinctrl-names = "default";
789	uart-has-rtscts;
790	status = "okay";
791
792	bluetooth: bluetooth {
793		compatible = "realtek,rtl8821cs-bt", "realtek,rtl8723bs-bt";
794		device-wake-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
795		enable-gpios = <&gpio4 3 GPIO_ACTIVE_HIGH>;
796		host-wake-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>;
797	};
798};
799
800&usb_host0_xhci {
801	dr_mode = "peripheral";
802	phys = <&usb2phy0_otg>;
803	phy-names = "usb2-phy";
804	status = "okay";
805};
806
807&usb_host1_ehci {
808	status = "okay";
809};
810
811&usb_host1_ohci {
812	status = "okay";
813};
814
815&usb_host1_xhci {
816	phy-names = "usb2-phy", "usb3-phy";
817	phys = <&usb2phy1_host>, <&combphy1 PHY_TYPE_USB3>;
818	status = "okay";
819};
820
821&usb2phy0 {
822	status = "okay";
823};
824
825&usb2phy0_otg {
826	status = "okay";
827};
828
829&usb2phy1 {
830	status = "okay";
831};
832
833&usb2phy1_host {
834	status = "okay";
835};
836
837&vop {
838	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
839	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
840	status = "okay";
841};
842
843&vop_mmu {
844	status = "okay";
845};
846
847&vp0 {
848	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
849		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
850		remote-endpoint = <&hdmi_in_vp0>;
851	};
852};
853
854&vp1 {
855	vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
856		reg = <ROCKCHIP_VOP2_EP_MIPI0>;
857		remote-endpoint = <&dsi0_in_vp1>;
858	};
859};
860