xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/rk3566-powkiddy-x55.dts (revision a90b9d0159070121c221b966469c3e36d912bf82)
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	model = "Powkiddy x55";
14	compatible = "powkiddy,x55", "rockchip,rk3566";
15
16	aliases {
17		mmc0 = &sdhci;
18		mmc1 = &sdmmc0;
19		mmc2 = &sdmmc2;
20		mmc3 = &sdmmc1;
21	};
22
23	chosen: chosen {
24		stdout-path = "serial2:1500000n8";
25	};
26
27	adc_joystick: adc-joystick {
28		compatible = "adc-joystick";
29		io-channels = <&saradc 0>, <&saradc 1>,
30			      <&saradc 2>, <&saradc 3>;
31		poll-interval = <60>;
32		#address-cells = <1>;
33		#size-cells = <0>;
34
35		axis@0 {
36			reg = <0>;
37			abs-flat = <30>;
38			abs-fuzz = <20>;
39			abs-range = <15 1023>;
40			linux,code = <ABS_X>;
41		};
42
43		axis@1 {
44			reg = <1>;
45			abs-flat = <30>;
46			abs-fuzz = <20>;
47			abs-range = <1023 15>;
48			linux,code = <ABS_Y>;
49		};
50
51		axis@2 {
52			reg = <2>;
53			abs-flat = <30>;
54			abs-fuzz = <20>;
55			abs-range = <15 1023>;
56			linux,code = <ABS_RX>;
57		};
58
59		axis@3 {
60			reg = <3>;
61			abs-flat = <30>;
62			abs-fuzz = <20>;
63			abs-range = <1023 15>;
64			linux,code = <ABS_RY>;
65		};
66	};
67
68	backlight: backlight {
69		compatible = "pwm-backlight";
70		power-supply = <&vcc_sys>;
71		pwms = <&pwm4 0 25000 0>;
72	};
73
74	battery: battery {
75		compatible = "simple-battery";
76		charge-full-design-microamp-hours = <4000000>;
77		charge-term-current-microamp = <300000>;
78		constant-charge-current-max-microamp = <2000000>;
79		constant-charge-voltage-max-microvolt = <4300000>;
80		factory-internal-resistance-micro-ohms = <91000>;
81		voltage-max-design-microvolt = <4138000>;
82		voltage-min-design-microvolt = <3400000>;
83
84		ocv-capacity-celsius = <20>;
85		ocv-capacity-table-0 =  <4138000 100>, <4083000 95>, <4059000 90>, <4044000 85>,
86					<4030000 80>, <4020000 75>, <4006000 70>, <3972000 65>,
87					<3934000 60>, <3904000 55>, <3878000 50>, <3857000 45>,
88					<3843000 40>, <3826000 35>, <3801000 30>, <3768000 25>,
89					<3735000 20>, <3688000 15>, <3621000 10>, <3553000 5>,
90					<3400000 0>;
91	};
92
93	gpio_keys_control: gpio-keys-control {
94		compatible = "gpio-keys";
95		pinctrl-0 = <&btn_pins_ctrl>;
96		pinctrl-names = "default";
97
98		button-a {
99			gpios = <&gpio3 RK_PD3 GPIO_ACTIVE_LOW>;
100			label = "EAST";
101			linux,code = <BTN_EAST>;
102		};
103
104		button-b {
105			gpios = <&gpio3 RK_PD2 GPIO_ACTIVE_LOW>;
106			label = "SOUTH";
107			linux,code = <BTN_SOUTH>;
108		};
109
110		button-down {
111			gpios = <&gpio4 RK_PA1 GPIO_ACTIVE_LOW>;
112			label = "DPAD-DOWN";
113			linux,code = <BTN_DPAD_DOWN>;
114		};
115
116		button-l1 {
117			gpios = <&gpio3 RK_PD0 GPIO_ACTIVE_LOW>;
118			label = "TL";
119			linux,code = <BTN_TL>;
120		};
121
122		button-l2 {
123			gpios = <&gpio3 RK_PD1 GPIO_ACTIVE_LOW>;
124			label = "TL2";
125			linux,code = <BTN_TL2>;
126		};
127
128		button-left {
129			gpios = <&gpio3 RK_PD6 GPIO_ACTIVE_LOW>;
130			label = "DPAD-LEFT";
131			linux,code = <BTN_DPAD_LEFT>;
132		};
133
134		button-right {
135			gpios = <&gpio3 RK_PD7 GPIO_ACTIVE_LOW>;
136			label = "DPAD-RIGHT";
137			linux,code = <BTN_DPAD_RIGHT>;
138		};
139
140		button-select {
141			gpios = <&gpio4 RK_PA4 GPIO_ACTIVE_LOW>;
142			label = "SELECT";
143			linux,code = <BTN_SELECT>;
144		};
145
146		button-start {
147			gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_LOW>;
148			label = "START";
149			linux,code = <BTN_START>;
150		};
151
152		button-thumbl {
153			gpios = <&gpio4 RK_PA7 GPIO_ACTIVE_LOW>;
154			label = "THUMBL";
155			linux,code = <BTN_THUMBL>;
156		};
157
158		button-thumbr {
159			gpios = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
160			label = "THUMBR";
161			linux,code = <BTN_THUMBR>;
162		};
163
164		button-r1 {
165			gpios = <&gpio3 RK_PC6 GPIO_ACTIVE_LOW>;
166			label = "TR";
167			linux,code = <BTN_TR>;
168		};
169
170		button-r2 {
171			gpios = <&gpio3 RK_PC7 GPIO_ACTIVE_LOW>;
172			label = "TR2";
173			linux,code = <BTN_TR2>;
174		};
175
176		button-up {
177			gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
178			label = "DPAD-UP";
179			linux,code = <BTN_DPAD_UP>;
180		};
181
182		button-x {
183			gpios = <&gpio3 RK_PD5 GPIO_ACTIVE_LOW>;
184			label = "NORTH";
185			linux,code = <BTN_NORTH>;
186		};
187
188		button-y {
189			gpios = <&gpio3 RK_PD4 GPIO_ACTIVE_LOW>;
190			label = "WEST";
191			linux,code = <BTN_WEST>;
192		};
193	};
194
195	gpio_keys_vol: gpio-keys-vol {
196		compatible = "gpio-keys";
197		autorepeat;
198		pinctrl-0 = <&btn_pins_vol>;
199		pinctrl-names = "default";
200
201		button-voldown {
202			gpios = <&gpio4 RK_PA3 GPIO_ACTIVE_LOW>;
203			label = "VOLUMEDOWN";
204			linux,code = <KEY_VOLUMEDOWN>;
205		};
206
207		button-volup {
208			gpios = <&gpio4 RK_PA5 GPIO_ACTIVE_LOW>;
209			label = "VOLUMEUP";
210			linux,code = <KEY_VOLUMEUP>;
211		};
212	};
213
214	gpio_leds: gpio-leds {
215		compatible = "gpio-leds";
216		pinctrl-names = "default";
217		pinctrl-0 = <&led_pins>;
218
219		red_led: led-0 {
220			color = <LED_COLOR_ID_RED>;
221			default-state = "off";
222			gpios = <&gpio4 RK_PB4 GPIO_ACTIVE_HIGH>;
223			function = LED_FUNCTION_STATUS;
224		};
225
226		green_led: led-1 {
227			color = <LED_COLOR_ID_GREEN>;
228			default-state = "on";
229			gpios = <&gpio4 RK_PB5 GPIO_ACTIVE_HIGH>;
230			function = LED_FUNCTION_POWER;
231		};
232
233		amber_led: led-2 {
234			color = <LED_COLOR_ID_AMBER>;
235			gpios = <&gpio4 RK_PB6 GPIO_ACTIVE_HIGH>;
236			function = LED_FUNCTION_CHARGING;
237		};
238
239	};
240
241	hdmi-con {
242		compatible = "hdmi-connector";
243		ddc-i2c-bus = <&i2c5>;
244		type = "c";
245
246		port {
247			hdmi_con_in: endpoint {
248				remote-endpoint = <&hdmi_out_con>;
249			};
250		};
251	};
252
253	sdio_pwrseq: sdio-pwrseq {
254		compatible = "mmc-pwrseq-simple";
255		clocks = <&rk817 1>;
256		clock-names = "ext_clock";
257		pinctrl-0 = <&wifi_enable_h>;
258		pinctrl-names = "default";
259		post-power-on-delay-ms = <200>;
260		reset-gpios = <&gpio0 RK_PC0 GPIO_ACTIVE_LOW>;
261	};
262
263	/* Channels reversed for both headphones and speakers. */
264	sound {
265		compatible = "simple-audio-card";
266		pinctrl-0 = <&hp_det>;
267		pinctrl-names = "default";
268		simple-audio-card,name = "rk817_ext";
269		simple-audio-card,aux-devs = <&spk_amp>;
270		simple-audio-card,format = "i2s";
271		simple-audio-card,hp-det-gpio = <&gpio4 RK_PC6 GPIO_ACTIVE_HIGH>;
272		simple-audio-card,mclk-fs = <256>;
273		simple-audio-card,widgets =
274			"Microphone", "Mic Jack",
275			"Headphone", "Headphones",
276			"Speaker", "Internal Speakers";
277		simple-audio-card,routing =
278			"MICL", "Mic Jack",
279			"Headphones", "HPOL",
280			"Headphones", "HPOR",
281			"Internal Speakers", "Speaker Amp OUTL",
282			"Internal Speakers", "Speaker Amp OUTR",
283			"Speaker Amp INL", "HPOL",
284			"Speaker Amp INR", "HPOR";
285		simple-audio-card,pin-switches = "Internal Speakers";
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	spk_amp: audio-amplifier {
297		compatible = "simple-audio-amplifier";
298		enable-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_HIGH>;
299		pinctrl-0 = <&spk_amp_enable_h>;
300		pinctrl-names = "default";
301		sound-name-prefix = "Speaker Amp";
302	};
303
304	vcc5v0_host: regulator-vcc5v0-host {
305		compatible = "regulator-fixed";
306		enable-active-high;
307		gpio = <&gpio4 RK_PC4 GPIO_ACTIVE_HIGH>;
308		pinctrl-0 = <&vcc5v0_host_en>;
309		pinctrl-names = "default";
310		regulator-name = "vcc5v0_host";
311		vin-supply = <&dcdc_boost>;
312	};
313
314	vcc_lcd: regulator-vcc-lcd {
315		compatible = "regulator-fixed";
316		enable-active-high;
317		gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
318		pinctrl-0 = <&vcc_lcd_en>;
319		pinctrl-names = "default";
320		regulator-min-microvolt = <3300000>;
321		regulator-max-microvolt = <3300000>;
322		regulator-name = "vcc_lcd";
323	};
324
325	vcc_sys: regulator-vcc-sys {
326		compatible = "regulator-fixed";
327		regulator-always-on;
328		regulator-boot-on;
329		regulator-min-microvolt = <3800000>;
330		regulator-max-microvolt = <3800000>;
331		regulator-name = "vcc_sys";
332	};
333
334	vcc_wifi: regulator-vcc-wifi {
335		compatible = "regulator-fixed";
336		gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>;
337		pinctrl-0 = <&vcc_wifi_h>;
338		pinctrl-names = "default";
339		regulator-min-microvolt = <3300000>;
340		regulator-max-microvolt = <3300000>;
341		regulator-name = "vcc_wifi";
342	};
343};
344
345&combphy1 {
346	status = "okay";
347};
348
349&cru {
350	assigned-clocks = <&pmucru CLK_RTC_32K>, <&cru PLL_GPLL>,
351			  <&pmucru PLL_PPLL>, <&cru PLL_VPLL>;
352	assigned-clock-rates = <32768>, <1200000000>,
353			       <200000000>, <126400000>;
354};
355
356&cpu0 {
357	cpu-supply = <&vdd_cpu>;
358};
359
360&cpu1 {
361	cpu-supply = <&vdd_cpu>;
362};
363
364&cpu2 {
365	cpu-supply = <&vdd_cpu>;
366};
367
368&cpu3 {
369	cpu-supply = <&vdd_cpu>;
370};
371
372&dsi_dphy0 {
373	status = "okay";
374};
375
376&dsi0 {
377	status = "okay";
378	#address-cells = <1>;
379	#size-cells = <0>;
380
381	ports {
382		dsi0_in: port@0 {
383			reg = <0>;
384			dsi0_in_vp1: endpoint {
385				remote-endpoint = <&vp1_out_dsi0>;
386			};
387		};
388
389		dsi0_out: port@1 {
390			reg = <1>;
391			mipi_out_panel: endpoint {
392				remote-endpoint = <&mipi_in_panel>;
393			};
394		};
395	};
396
397	panel: panel@0 {
398		compatible = "powkiddy,x55-panel", "himax,hx8394";
399		reg = <0>;
400		backlight = <&backlight>;
401		iovcc-supply = <&vcc_lcd>;
402		pinctrl-names = "default";
403		pinctrl-0 = <&lcd_rst>;
404		reset-gpios = <&gpio0 RK_PD5 GPIO_ACTIVE_LOW>;
405		rotation = <270>;
406		vcc-supply = <&vcc_lcd>;
407
408		port {
409			mipi_in_panel: endpoint {
410				remote-endpoint = <&mipi_out_panel>;
411			};
412		};
413	};
414};
415
416&gpu {
417	mali-supply = <&vdd_gpu>;
418	status = "okay";
419};
420
421&hdmi {
422	ddc-i2c-bus = <&i2c5>;
423	pinctrl-0 = <&hdmitxm0_cec>;
424	pinctrl-names = "default";
425	status = "okay";
426};
427
428&hdmi_in {
429	hdmi_in_vp0: endpoint {
430		remote-endpoint = <&vp0_out_hdmi>;
431	};
432};
433
434&hdmi_out {
435	hdmi_out_con: endpoint {
436		remote-endpoint = <&hdmi_con_in>;
437	};
438};
439
440&hdmi_sound {
441	status = "okay";
442};
443
444&i2c0 {
445	status = "okay";
446
447	rk817: pmic@20 {
448		compatible = "rockchip,rk817";
449		reg = <0x20>;
450		assigned-clocks = <&cru I2S1_MCLKOUT_TX>;
451		assigned-clock-parents = <&cru CLK_I2S1_8CH_TX>;
452		clock-names = "mclk";
453		clock-output-names = "rk808-clkout1", "rk808-clkout2";
454		clocks = <&cru I2S1_MCLKOUT_TX>;
455		interrupt-parent = <&gpio0>;
456		interrupts = <RK_PA3 IRQ_TYPE_LEVEL_LOW>;
457		pinctrl-names = "default";
458		pinctrl-0 = <&i2s1m0_mclk>, <&pmic_int_l>;
459		wakeup-source;
460		#clock-cells = <1>;
461		#sound-dai-cells = <0>;
462
463		vcc1-supply = <&vcc_sys>;
464		vcc2-supply = <&vcc_sys>;
465		vcc3-supply = <&vcc_sys>;
466		vcc4-supply = <&vcc_sys>;
467		vcc5-supply = <&vcc_sys>;
468		vcc6-supply = <&vcc_sys>;
469		vcc7-supply = <&vcc_sys>;
470		vcc8-supply = <&vcc_sys>;
471		vcc9-supply = <&dcdc_boost>;
472
473		regulators {
474			vdd_logic: DCDC_REG1 {
475				regulator-always-on;
476				regulator-boot-on;
477				regulator-min-microvolt = <500000>;
478				regulator-max-microvolt = <1350000>;
479				regulator-ramp-delay = <6001>;
480				regulator-initial-mode = <0x2>;
481				regulator-name = "vdd_logic";
482				regulator-state-mem {
483					regulator-off-in-suspend;
484					regulator-suspend-microvolt = <900000>;
485				};
486			};
487
488			vdd_gpu: DCDC_REG2 {
489				regulator-always-on;
490				regulator-boot-on;
491				regulator-min-microvolt = <500000>;
492				regulator-max-microvolt = <1350000>;
493				regulator-ramp-delay = <6001>;
494				regulator-initial-mode = <0x2>;
495				regulator-name = "vdd_gpu";
496				regulator-state-mem {
497					regulator-off-in-suspend;
498				};
499			};
500
501			vcc_ddr: DCDC_REG3 {
502				regulator-always-on;
503				regulator-boot-on;
504				regulator-initial-mode = <0x2>;
505				regulator-name = "vcc_ddr";
506				regulator-state-mem {
507					regulator-on-in-suspend;
508				};
509			};
510
511			vcc_3v3: DCDC_REG4 {
512				regulator-always-on;
513				regulator-boot-on;
514				regulator-min-microvolt = <3300000>;
515				regulator-max-microvolt = <3300000>;
516				regulator-initial-mode = <0x2>;
517				regulator-name = "vcc_3v3";
518				regulator-state-mem {
519					regulator-on-in-suspend;
520					regulator-suspend-microvolt = <3300000>;
521				};
522			};
523
524			vcca1v8_pmu: LDO_REG1 {
525				regulator-always-on;
526				regulator-boot-on;
527				regulator-min-microvolt = <1800000>;
528				regulator-max-microvolt = <1800000>;
529				regulator-name = "vcca1v8_pmu";
530				regulator-state-mem {
531					regulator-on-in-suspend;
532					regulator-suspend-microvolt = <1800000>;
533				};
534			};
535
536			vdda_0v9: LDO_REG2 {
537				regulator-always-on;
538				regulator-boot-on;
539				regulator-min-microvolt = <900000>;
540				regulator-max-microvolt = <900000>;
541				regulator-name = "vdda_0v9";
542				regulator-state-mem {
543					regulator-off-in-suspend;
544				};
545			};
546
547			vdda0v9_pmu: LDO_REG3 {
548				regulator-always-on;
549				regulator-boot-on;
550				regulator-min-microvolt = <900000>;
551				regulator-max-microvolt = <900000>;
552				regulator-name = "vdda0v9_pmu";
553				regulator-state-mem {
554					regulator-on-in-suspend;
555					regulator-suspend-microvolt = <900000>;
556				};
557			};
558
559			vccio_acodec: LDO_REG4 {
560				regulator-always-on;
561				regulator-boot-on;
562				regulator-min-microvolt = <3300000>;
563				regulator-max-microvolt = <3300000>;
564				regulator-name = "vccio_acodec";
565				regulator-state-mem {
566					regulator-off-in-suspend;
567				};
568			};
569
570			vccio_sd: LDO_REG5 {
571				regulator-always-on;
572				regulator-boot-on;
573				regulator-min-microvolt = <1800000>;
574				regulator-max-microvolt = <3300000>;
575				regulator-name = "vccio_sd";
576				regulator-state-mem {
577					regulator-off-in-suspend;
578				};
579			};
580
581			vcc3v3_pmu: LDO_REG6 {
582				regulator-always-on;
583				regulator-boot-on;
584				regulator-min-microvolt = <3300000>;
585				regulator-max-microvolt = <3300000>;
586				regulator-name = "vcc3v3_pmu";
587				regulator-state-mem {
588					regulator-on-in-suspend;
589					regulator-suspend-microvolt = <3300000>;
590				};
591			};
592
593			vcc_1v8: LDO_REG7 {
594				regulator-always-on;
595				regulator-boot-on;
596				regulator-min-microvolt = <1800000>;
597				regulator-max-microvolt = <1800000>;
598				regulator-name = "vcc_1v8";
599				regulator-state-mem {
600					regulator-off-in-suspend;
601				};
602			};
603
604			vcc1v8_dvp: LDO_REG8 {
605				regulator-always-on;
606				regulator-boot-on;
607				regulator-min-microvolt = <1800000>;
608				regulator-max-microvolt = <1800000>;
609				regulator-name = "vcc1v8_dvp";
610				regulator-state-mem {
611					regulator-on-in-suspend;
612				};
613			};
614
615			vcc2v8_dvp: LDO_REG9 {
616				regulator-always-on;
617				regulator-boot-on;
618				regulator-min-microvolt = <1800000>;
619				regulator-max-microvolt = <3300000>;
620				regulator-name = "vcc2v8_dvp";
621				regulator-state-mem {
622					regulator-off-in-suspend;
623				};
624			};
625
626			dcdc_boost: BOOST {
627				regulator-min-microvolt = <4700000>;
628				regulator-max-microvolt = <5400000>;
629				regulator-name = "boost";
630				regulator-state-mem {
631					regulator-off-in-suspend;
632				};
633			};
634
635			otg_switch: OTG_SWITCH {
636				regulator-name = "otg_switch";
637				regulator-state-mem {
638					regulator-off-in-suspend;
639				};
640			};
641		};
642
643		rk817_charger: charger {
644			monitored-battery = <&battery>;
645			rockchip,resistor-sense-micro-ohms = <10000>;
646			rockchip,sleep-enter-current-microamp = <150000>;
647			rockchip,sleep-filter-current-microamp = <100000>;
648		};
649
650	};
651
652	vdd_cpu: regulator@1c {
653		compatible = "tcs,tcs4525";
654		reg = <0x1c>;
655		fcs,suspend-voltage-selector = <1>;
656		regulator-always-on;
657		regulator-boot-on;
658		regulator-min-microvolt = <712500>;
659		regulator-max-microvolt = <1390000>;
660		regulator-name = "vdd_cpu";
661		regulator-ramp-delay = <2300>;
662		vin-supply = <&vcc_sys>;
663		regulator-state-mem {
664			regulator-off-in-suspend;
665		};
666	};
667};
668
669&i2c5 {
670	pinctrl-0 = <&i2c5m1_xfer>;
671	pinctrl-names = "default";
672	status = "okay";
673};
674
675&i2s0_8ch {
676	status = "okay";
677};
678
679&i2s1_8ch {
680	pinctrl-0 = <&i2s1m0_sclktx>, <&i2s1m0_lrcktx>, <&i2s1m0_sdi0>,
681		    <&i2s1m0_sdo0>;
682	pinctrl-names = "default";
683	rockchip,trcm-sync-tx-only;
684	status = "okay";
685};
686
687&pinctrl {
688	audio-amplifier {
689		spk_amp_enable_h: spk-amp-enable-h {
690			rockchip,pins =
691				<4 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
692		};
693	};
694
695	gpio-control {
696		btn_pins_ctrl: btn-pins-ctrl {
697			rockchip,pins =
698				<3 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>,
699				<3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>,
700				<3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>,
701				<3 RK_PD1 RK_FUNC_GPIO &pcfg_pull_up>,
702				<3 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>,
703				<3 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>,
704				<3 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>,
705				<3 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>,
706				<3 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>,
707				<3 RK_PD7 RK_FUNC_GPIO &pcfg_pull_up>,
708				<4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>,
709				<4 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
710				<4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
711				<4 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>,
712				<4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>,
713				<4 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
714		};
715
716		btn_pins_vol: btn-pins-vol {
717			rockchip,pins =
718				<4 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>,
719				<4 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
720		};
721	};
722
723	gpio-lcd {
724		lcd_rst: lcd-rst {
725			rockchip,pins =
726				<0 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;
727		};
728	};
729
730	gpio-leds {
731		led_pins: led-pins {
732			rockchip,pins =
733				<4 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>,
734				<4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>,
735				<4 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
736		};
737	};
738
739	hp-detect {
740		hp_det: hp-det {
741			rockchip,pins =
742				<4 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
743		};
744	};
745
746	pmic {
747		pmic_int_l: pmic-int-l {
748			rockchip,pins =
749				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
750		};
751	};
752
753	sdio-pwrseq {
754		wifi_enable_h: wifi-enable-h {
755			rockchip,pins =
756				<0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
757		};
758	};
759
760	usb {
761		vcc5v0_host_en: vcc5v0-host-en {
762			rockchip,pins =
763				<4 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
764		};
765
766		vcc5v0_otg_en: vcc5v0-otg-en {
767			rockchip,pins =
768				<4 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
769		};
770	};
771
772	vcc-lcd {
773		vcc_lcd_en: vcc-lcd-en {
774			rockchip,pins =
775				<0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
776		};
777	};
778
779	vcc-wifi {
780		vcc_wifi_h: vcc-wifi-h {
781			rockchip,pins =
782				<0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
783		};
784	};
785};
786
787&pmu_io_domains {
788	status = "okay";
789	pmuio1-supply = <&vcc3v3_pmu>;
790	pmuio2-supply = <&vcca1v8_pmu>;
791	vccio1-supply = <&vccio_acodec>;
792	vccio3-supply = <&vccio_sd>;
793	vccio4-supply = <&vcca1v8_pmu>;
794	vccio5-supply = <&vcc2v8_dvp>;
795	vccio6-supply = <&vcc1v8_dvp>;
796	vccio7-supply = <&vcc_3v3>;
797};
798
799&pwm4 {
800	status = "okay";
801};
802
803&saradc {
804	vref-supply = <&vcc_1v8>;
805	status = "okay";
806};
807
808&sdhci {
809	bus-width = <8>;
810	mmc-hs200-1_8v;
811	non-removable;
812	pinctrl-0 = <&emmc_bus8>, <&emmc_clk>, <&emmc_cmd>,
813		    <&emmc_datastrobe>, <&emmc_rstnout>;
814	pinctrl-names = "default";
815	status = "okay";
816};
817
818&sdmmc0 {
819	bus-width = <4>;
820	cap-mmc-highspeed;
821	cap-sd-highspeed;
822	disable-wp;
823	pinctrl-0 = <&sdmmc0_bus4>, <&sdmmc0_clk>, <&sdmmc0_cmd>,
824		    <&sdmmc0_det>;
825	pinctrl-names = "default";
826	sd-uhs-sdr104;
827	vqmmc-supply = <&vccio_sd>;
828	status = "okay";
829};
830
831&sdmmc1 {
832	bus-width = <4>;
833	cap-sd-highspeed;
834	cap-sdio-irq;
835	keep-power-in-suspend;
836	mmc-pwrseq = <&sdio_pwrseq>;
837	non-removable;
838	pinctrl-0 = <&sdmmc1_bus4>, <&sdmmc1_cmd>, <&sdmmc1_clk>;
839	pinctrl-names = "default";
840	vmmc-supply = <&vcc_wifi>;
841	status = "okay";
842};
843
844&sdmmc2 {
845	bus-width = <4>;
846	cap-mmc-highspeed;
847	cap-sd-highspeed;
848	disable-wp;
849	pinctrl-0 = <&sdmmc2m1_bus4>, <&sdmmc2m1_cmd>, <&sdmmc2m1_clk>,
850		    <&sdmmc2m1_det>;
851	pinctrl-names = "default";
852	sd-uhs-sdr104;
853	vqmmc-supply = <&vcc2v8_dvp>;
854	status = "okay";
855};
856
857&tsadc {
858	rockchip,hw-tshut-mode = <1>;
859	rockchip,hw-tshut-polarity = <0>;
860	status = "okay";
861};
862
863&uart1 {
864	pinctrl-0 = <&uart1m0_xfer>, <&uart1m0_ctsn>, <&uart1m0_rtsn>;
865	pinctrl-names = "default";
866	uart-has-rtscts;
867	status = "okay";
868
869	bluetooth {
870		compatible = "realtek,rtl8821cs-bt", "realtek,rtl8723bs-bt";
871		device-wake-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
872		enable-gpios = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
873		host-wake-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
874	};
875};
876
877&uart2 {
878	status = "okay";
879};
880
881&usb_host0_xhci {
882	phys = <&usb2phy0_otg>;
883	phy-names = "usb2-phy";
884	status = "okay";
885};
886
887&usb_host1_xhci {
888	status = "okay";
889};
890
891&usb2phy0 {
892	status = "okay";
893};
894
895&usb2phy0_otg {
896	status = "okay";
897};
898
899&usb2phy0_host {
900	phy-supply = <&vcc5v0_host>;
901	status = "okay";
902};
903
904&vop {
905	assigned-clocks = <&cru DCLK_VOP0>, <&cru DCLK_VOP1>;
906	assigned-clock-parents = <&pmucru PLL_HPLL>, <&cru PLL_VPLL>;
907	status = "okay";
908};
909
910&vop_mmu {
911	status = "okay";
912};
913
914&vp0 {
915	vp0_out_hdmi: endpoint@ROCKCHIP_VOP2_EP_HDMI0 {
916		reg = <ROCKCHIP_VOP2_EP_HDMI0>;
917		remote-endpoint = <&hdmi_in_vp0>;
918	};
919};
920
921&vp1 {
922	vp1_out_dsi0: endpoint@ROCKCHIP_VOP2_EP_MIPI0 {
923		reg = <ROCKCHIP_VOP2_EP_MIPI0>;
924		remote-endpoint = <&dsi0_in_vp1>;
925	};
926};
927