xref: /linux/arch/arm64/boot/dts/rockchip/rk3399-rockpro64.dtsi (revision be239684b18e1cdcafcf8c7face4a2f562c745ad)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd.
4 * Copyright (c) 2018 Akash Gajjar <Akash_Gajjar@mentor.com>
5 */
6
7#include <dt-bindings/input/linux-event-codes.h>
8#include <dt-bindings/pwm/pwm.h>
9#include "rk3399.dtsi"
10#include "rk3399-opp.dtsi"
11
12/ {
13	aliases {
14		ethernet0 = &gmac;
15		mmc0 = &sdio0;
16		mmc1 = &sdmmc;
17		mmc2 = &sdhci;
18	};
19
20	chosen {
21		stdout-path = "serial2:1500000n8";
22	};
23
24	/* enable for panel backlight support */
25	backlight: backlight {
26		compatible = "pwm-backlight";
27		brightness-levels = <0 4 8 16 32 64 128 255>;
28		default-brightness-level = <5>;
29		pwms = <&pwm0 0 1000000 0>;
30		status = "disabled";
31	};
32
33	clkin_gmac: external-gmac-clock {
34		compatible = "fixed-clock";
35		clock-frequency = <125000000>;
36		clock-output-names = "clkin_gmac";
37		#clock-cells = <0>;
38	};
39
40	gpio-keys {
41		compatible = "gpio-keys";
42		autorepeat;
43		pinctrl-names = "default";
44		pinctrl-0 = <&pwrbtn>;
45
46		key-power {
47			debounce-interval = <100>;
48			gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
49			label = "GPIO Key Power";
50			linux,code = <KEY_POWER>;
51			wakeup-source;
52		};
53	};
54
55	ir-receiver {
56		compatible = "gpio-ir-receiver";
57		gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
58		pinctrl-0 = <&ir_int>;
59		pinctrl-names = "default";
60	};
61
62	leds {
63		compatible = "gpio-leds";
64		pinctrl-names = "default";
65		pinctrl-0 = <&work_led_pin>, <&diy_led_pin>;
66
67		work_led: led-0 {
68			label = "work";
69			default-state = "on";
70			gpios = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
71		};
72
73		diy_led: led-1 {
74			label = "diy";
75			default-state = "off";
76			gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
77		};
78	};
79
80	fan: pwm-fan {
81		compatible = "pwm-fan";
82		cooling-levels = <0 100 150 200 255>;
83		#cooling-cells = <2>;
84		fan-supply = <&vcc12v_dcin>;
85		pwms = <&pwm1 0 50000 0>;
86	};
87
88	sdio_pwrseq: sdio-pwrseq {
89		compatible = "mmc-pwrseq-simple";
90		clocks = <&rk808 1>;
91		clock-names = "ext_clock";
92		pinctrl-names = "default";
93		pinctrl-0 = <&wifi_enable_h>;
94		reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
95	};
96
97	sound {
98		compatible = "audio-graph-card";
99		label = "Analog";
100		dais = <&i2s1_p0>;
101	};
102
103	sound-dit {
104		compatible = "audio-graph-card";
105		label = "SPDIF";
106		dais = <&spdif_p0>;
107	};
108
109	spdif-dit {
110		compatible = "linux,spdif-dit";
111		#sound-dai-cells = <0>;
112
113		port {
114			dit_p0_0: endpoint {
115				remote-endpoint = <&spdif_p0_0>;
116			};
117		};
118	};
119
120	avdd: avdd-regulator {
121		compatible = "regulator-fixed";
122		regulator-name = "avdd";
123		regulator-min-microvolt = <11000000>;
124		regulator-max-microvolt = <11000000>;
125		vin-supply = <&vcc3v3_s0>;
126	};
127
128	vcc12v_dcin: vcc12v-dcin {
129		compatible = "regulator-fixed";
130		regulator-name = "vcc12v_dcin";
131		regulator-always-on;
132		regulator-boot-on;
133		regulator-min-microvolt = <12000000>;
134		regulator-max-microvolt = <12000000>;
135	};
136
137	/* switched by pmic_sleep */
138	vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
139		compatible = "regulator-fixed";
140		regulator-name = "vcc1v8_s3";
141		regulator-always-on;
142		regulator-boot-on;
143		regulator-min-microvolt = <1800000>;
144		regulator-max-microvolt = <1800000>;
145		vin-supply = <&vcc_1v8>;
146	};
147
148	/* micro SD card power */
149	vcc3v0_sd: vcc3v0-sd {
150		compatible = "regulator-fixed";
151		enable-active-high;
152		gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
153		pinctrl-names = "default";
154		pinctrl-0 = <&sdmmc0_pwr_h>;
155		regulator-name = "vcc3v0_sd";
156		regulator-always-on;
157		regulator-min-microvolt = <3000000>;
158		regulator-max-microvolt = <3000000>;
159		vin-supply = <&vcc3v3_sys>;
160
161		regulator-state-mem {
162			regulator-off-in-suspend;
163		};
164	};
165
166	vcc3v3_pcie: vcc3v3-pcie-regulator {
167		compatible = "regulator-fixed";
168		enable-active-high;
169		gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
170		pinctrl-names = "default";
171		pinctrl-0 = <&pcie_pwr_en>;
172		regulator-name = "vcc3v3_pcie";
173		regulator-always-on;
174		regulator-boot-on;
175		vin-supply = <&vcc12v_dcin>;
176	};
177
178	vcc3v3_sys: vcc3v3-sys {
179		compatible = "regulator-fixed";
180		regulator-name = "vcc3v3_sys";
181		regulator-always-on;
182		regulator-boot-on;
183		regulator-min-microvolt = <3300000>;
184		regulator-max-microvolt = <3300000>;
185		vin-supply = <&vcc5v0_sys>;
186	};
187
188	/* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
189	vcc5v0_host: vcc5v0-host-regulator {
190		compatible = "regulator-fixed";
191		enable-active-high;
192		gpio = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
193		pinctrl-names = "default";
194		pinctrl-0 = <&vcc5v0_host_en>;
195		regulator-name = "vcc5v0_host";
196		regulator-always-on;
197		vin-supply = <&vcc5v0_usb>;
198	};
199
200	vcc5v0_typec: vcc5v0-typec-regulator {
201		compatible = "regulator-fixed";
202		enable-active-high;
203		gpio = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
204		pinctrl-names = "default";
205		pinctrl-0 = <&vcc5v0_typec_en>;
206		regulator-name = "vcc5v0_typec";
207		regulator-always-on;
208		vin-supply = <&vcc5v0_usb>;
209	};
210
211	vcc5v0_sys: vcc5v0-sys {
212		compatible = "regulator-fixed";
213		regulator-name = "vcc5v0_sys";
214		regulator-always-on;
215		regulator-boot-on;
216		regulator-min-microvolt = <5000000>;
217		regulator-max-microvolt = <5000000>;
218		vin-supply = <&vcc12v_dcin>;
219	};
220
221	vcc5v0_usb: vcc5v0-usb {
222		compatible = "regulator-fixed";
223		regulator-name = "vcc5v0_usb";
224		regulator-always-on;
225		regulator-boot-on;
226		regulator-min-microvolt = <5000000>;
227		regulator-max-microvolt = <5000000>;
228		vin-supply = <&vcc12v_dcin>;
229	};
230
231	vdd_log: vdd-log {
232		compatible = "pwm-regulator";
233		pwms = <&pwm2 0 25000 1>;
234		pwm-supply = <&vcc5v0_sys>;
235		regulator-name = "vdd_log";
236		regulator-always-on;
237		regulator-boot-on;
238		regulator-min-microvolt = <800000>;
239		regulator-max-microvolt = <1700000>;
240	};
241};
242
243&cpu_l0 {
244	cpu-supply = <&vdd_cpu_l>;
245};
246
247&cpu_l1 {
248	cpu-supply = <&vdd_cpu_l>;
249};
250
251&cpu_l2 {
252	cpu-supply = <&vdd_cpu_l>;
253};
254
255&cpu_l3 {
256	cpu-supply = <&vdd_cpu_l>;
257};
258
259&cpu_b0 {
260	cpu-supply = <&vdd_cpu_b>;
261};
262
263&cpu_b1 {
264	cpu-supply = <&vdd_cpu_b>;
265};
266
267&cpu_thermal {
268	trips {
269		cpu_warm: cpu_warm {
270			temperature = <55000>;
271			hysteresis = <2000>;
272			type = "active";
273		};
274
275		cpu_hot: cpu_hot {
276			temperature = <65000>;
277			hysteresis = <2000>;
278			type = "active";
279		};
280	};
281
282	cooling-maps {
283		map2 {
284			trip = <&cpu_warm>;
285			cooling-device = <&fan THERMAL_NO_LIMIT 1>;
286		};
287
288		map3 {
289			trip = <&cpu_hot>;
290			cooling-device = <&fan 2 THERMAL_NO_LIMIT>;
291		};
292	};
293};
294
295&emmc_phy {
296	status = "okay";
297};
298
299&gmac {
300	assigned-clocks = <&cru SCLK_RMII_SRC>;
301	assigned-clock-parents = <&clkin_gmac>;
302	clock_in_out = "input";
303	phy-supply = <&vcc_lan>;
304	phy-mode = "rgmii";
305	pinctrl-names = "default";
306	pinctrl-0 = <&rgmii_pins>;
307	snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
308	snps,reset-active-low;
309	snps,reset-delays-us = <0 10000 50000>;
310	tx_delay = <0x28>;
311	rx_delay = <0x11>;
312	status = "okay";
313};
314
315&hdmi {
316	ddc-i2c-bus = <&i2c3>;
317	pinctrl-names = "default";
318	pinctrl-0 = <&hdmi_cec>;
319	status = "okay";
320};
321
322&hdmi_sound {
323	status = "okay";
324};
325
326&gpu {
327	mali-supply = <&vdd_gpu>;
328	status = "okay";
329};
330
331&i2c0 {
332	clock-frequency = <400000>;
333	i2c-scl-rising-time-ns = <168>;
334	i2c-scl-falling-time-ns = <4>;
335	status = "okay";
336
337	rk808: pmic@1b {
338		compatible = "rockchip,rk808";
339		reg = <0x1b>;
340		interrupt-parent = <&gpio3>;
341		interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
342		#clock-cells = <1>;
343		clock-output-names = "xin32k", "rk808-clkout2";
344		pinctrl-names = "default";
345		pinctrl-0 = <&pmic_int_l>;
346		rockchip,system-power-controller;
347		wakeup-source;
348
349		vcc1-supply = <&vcc5v0_sys>;
350		vcc2-supply = <&vcc5v0_sys>;
351		vcc3-supply = <&vcc5v0_sys>;
352		vcc4-supply = <&vcc5v0_sys>;
353		vcc6-supply = <&vcc5v0_sys>;
354		vcc7-supply = <&vcc5v0_sys>;
355		vcc8-supply = <&vcc3v3_sys>;
356		vcc9-supply = <&vcc5v0_sys>;
357		vcc10-supply = <&vcc5v0_sys>;
358		vcc11-supply = <&vcc5v0_sys>;
359		vcc12-supply = <&vcc3v3_sys>;
360		vddio-supply = <&vcca_1v8>;
361
362		regulators {
363			vdd_center: DCDC_REG1 {
364				regulator-name = "vdd_center";
365				regulator-always-on;
366				regulator-boot-on;
367				regulator-min-microvolt = <750000>;
368				regulator-max-microvolt = <1350000>;
369				regulator-ramp-delay = <6001>;
370				regulator-state-mem {
371					regulator-off-in-suspend;
372				};
373			};
374
375			vdd_cpu_l: DCDC_REG2 {
376				regulator-name = "vdd_cpu_l";
377				regulator-always-on;
378				regulator-boot-on;
379				regulator-min-microvolt = <750000>;
380				regulator-max-microvolt = <1350000>;
381				regulator-ramp-delay = <6001>;
382				regulator-state-mem {
383					regulator-off-in-suspend;
384				};
385			};
386
387			vcc_ddr: DCDC_REG3 {
388				regulator-name = "vcc_ddr";
389				regulator-always-on;
390				regulator-boot-on;
391				regulator-state-mem {
392					regulator-on-in-suspend;
393				};
394			};
395
396			vcc_1v8: DCDC_REG4 {
397				regulator-name = "vcc_1v8";
398				regulator-always-on;
399				regulator-boot-on;
400				regulator-min-microvolt = <1800000>;
401				regulator-max-microvolt = <1800000>;
402				regulator-state-mem {
403					regulator-on-in-suspend;
404					regulator-suspend-microvolt = <1800000>;
405				};
406			};
407
408			vcc1v8_dvp: LDO_REG1 {
409				regulator-name = "vcc1v8_dvp";
410				regulator-always-on;
411				regulator-boot-on;
412				regulator-min-microvolt = <1800000>;
413				regulator-max-microvolt = <1800000>;
414				regulator-state-mem {
415					regulator-off-in-suspend;
416				};
417			};
418
419			vcc3v0_touch: LDO_REG2 {
420				regulator-name = "vcc3v0_touch";
421				regulator-min-microvolt = <3000000>;
422				regulator-max-microvolt = <3000000>;
423				regulator-state-mem {
424					regulator-off-in-suspend;
425				};
426			};
427
428			vcca_1v8: LDO_REG3 {
429				regulator-name = "vcca_1v8";
430				regulator-always-on;
431				regulator-boot-on;
432				regulator-min-microvolt = <1800000>;
433				regulator-max-microvolt = <1800000>;
434				regulator-state-mem {
435					regulator-on-in-suspend;
436					regulator-suspend-microvolt = <1800000>;
437				};
438			};
439
440			vcc_sdio: LDO_REG4 {
441				regulator-name = "vcc_sdio";
442				regulator-always-on;
443				regulator-boot-on;
444				regulator-min-microvolt = <1800000>;
445				regulator-max-microvolt = <3000000>;
446				regulator-state-mem {
447					regulator-on-in-suspend;
448					regulator-suspend-microvolt = <3000000>;
449				};
450			};
451
452			vcca3v0_codec: LDO_REG5 {
453				regulator-name = "vcca3v0_codec";
454				regulator-always-on;
455				regulator-boot-on;
456				regulator-min-microvolt = <3000000>;
457				regulator-max-microvolt = <3000000>;
458				regulator-state-mem {
459					regulator-off-in-suspend;
460				};
461			};
462
463			vcc_1v5: LDO_REG6 {
464				regulator-name = "vcc_1v5";
465				regulator-always-on;
466				regulator-boot-on;
467				regulator-min-microvolt = <1500000>;
468				regulator-max-microvolt = <1500000>;
469				regulator-state-mem {
470					regulator-on-in-suspend;
471					regulator-suspend-microvolt = <1500000>;
472				};
473			};
474
475			vcca1v8_codec: LDO_REG7 {
476				regulator-name = "vcca1v8_codec";
477				regulator-always-on;
478				regulator-boot-on;
479				regulator-min-microvolt = <1800000>;
480				regulator-max-microvolt = <1800000>;
481				regulator-state-mem {
482					regulator-off-in-suspend;
483				};
484			};
485
486			vcc_3v0: LDO_REG8 {
487				regulator-name = "vcc_3v0";
488				regulator-always-on;
489				regulator-boot-on;
490				regulator-min-microvolt = <3000000>;
491				regulator-max-microvolt = <3000000>;
492				regulator-state-mem {
493					regulator-on-in-suspend;
494					regulator-suspend-microvolt = <3000000>;
495				};
496			};
497
498			vcc3v3_s3: vcc_lan: SWITCH_REG1 {
499				regulator-name = "vcc3v3_s3";
500				regulator-always-on;
501				regulator-boot-on;
502				regulator-state-mem {
503					regulator-off-in-suspend;
504				};
505			};
506
507			vcc3v3_s0: SWITCH_REG2 {
508				regulator-name = "vcc3v3_s0";
509				regulator-state-mem {
510					regulator-off-in-suspend;
511				};
512			};
513		};
514	};
515
516	vdd_cpu_b: regulator@40 {
517		compatible = "silergy,syr827";
518		reg = <0x40>;
519		fcs,suspend-voltage-selector = <1>;
520		pinctrl-names = "default";
521		pinctrl-0 = <&vsel1_pin>;
522		regulator-name = "vdd_cpu_b";
523		regulator-min-microvolt = <712500>;
524		regulator-max-microvolt = <1500000>;
525		regulator-ramp-delay = <1000>;
526		regulator-always-on;
527		regulator-boot-on;
528		vin-supply = <&vcc5v0_sys>;
529
530		regulator-state-mem {
531			regulator-off-in-suspend;
532		};
533	};
534
535	vdd_gpu: regulator@41 {
536		compatible = "silergy,syr828";
537		reg = <0x41>;
538		fcs,suspend-voltage-selector = <1>;
539		pinctrl-names = "default";
540		pinctrl-0 = <&vsel2_pin>;
541		regulator-name = "vdd_gpu";
542		regulator-min-microvolt = <712500>;
543		regulator-max-microvolt = <1500000>;
544		regulator-ramp-delay = <1000>;
545		regulator-always-on;
546		regulator-boot-on;
547		vin-supply = <&vcc5v0_sys>;
548
549		regulator-state-mem {
550			regulator-off-in-suspend;
551		};
552	};
553};
554
555&i2c1 {
556	i2c-scl-rising-time-ns = <300>;
557	i2c-scl-falling-time-ns = <15>;
558	status = "okay";
559};
560
561&i2c3 {
562	i2c-scl-rising-time-ns = <450>;
563	i2c-scl-falling-time-ns = <15>;
564	status = "okay";
565};
566
567&i2c4 {
568	i2c-scl-rising-time-ns = <600>;
569	i2c-scl-falling-time-ns = <20>;
570	status = "okay";
571
572	fusb0: typec-portc@22 {
573		compatible = "fcs,fusb302";
574		reg = <0x22>;
575		interrupt-parent = <&gpio1>;
576		interrupts = <RK_PA2 IRQ_TYPE_LEVEL_LOW>;
577		pinctrl-names = "default";
578		pinctrl-0 = <&fusb0_int>;
579		vbus-supply = <&vcc5v0_typec>;
580		status = "okay";
581	};
582
583	/* enable for pine64 touch screen support */
584	touch: touchscreen@5d {
585		compatible = "goodix,gt911";
586		reg = <0x5d>;
587		interrupt-parent = <&gpio4>;
588		interrupts = <RK_PD5 IRQ_TYPE_EDGE_FALLING>;
589		AVDD28-supply = <&vcc3v0_touch>;
590		VDDIO-supply = <&vcc3v0_touch>;
591		irq-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
592		reset-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
593		status = "disabled";
594	};
595};
596
597&i2s0 {
598	rockchip,playback-channels = <8>;
599	rockchip,capture-channels = <8>;
600	status = "okay";
601};
602
603&i2s1 {
604	rockchip,playback-channels = <2>;
605	rockchip,capture-channels = <2>;
606	status = "okay";
607
608	i2s1_p0: port {
609		i2s1_p0_0: endpoint {
610			dai-format = "i2s";
611			mclk-fs = <256>;
612			remote-endpoint = <&es8316_p0_0>;
613		};
614	};
615};
616
617&i2s2 {
618	status = "okay";
619};
620
621&io_domains {
622	status = "okay";
623
624	bt656-supply = <&vcc1v8_dvp>;
625	audio-supply = <&vcc_3v0>;
626	sdmmc-supply = <&vcc_sdio>;
627	gpio1830-supply = <&vcc_3v0>;
628};
629
630/* enable for pine64 panel display support */
631&mipi_dsi {
632	clock-master;
633	status = "disabled";
634
635	ports {
636		mipi_out: port@1 {
637			reg = <1>;
638
639			mipi_out_panel: endpoint {
640				remote-endpoint = <&mipi_in_panel>;
641			};
642		};
643	};
644
645	mipi_panel: panel@0 {
646		compatible = "feiyang,fy07024di26a30d";
647		reg = <0>;
648		avdd-supply = <&avdd>;
649		backlight = <&backlight>;
650		dvdd-supply = <&vcc3v3_s0>;
651
652		port {
653			mipi_in_panel: endpoint {
654				remote-endpoint = <&mipi_out_panel>;
655			};
656		};
657	};
658};
659
660&pcie0 {
661	ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
662	num-lanes = <4>;
663	pinctrl-names = "default";
664	pinctrl-0 = <&pcie_perst>;
665	vpcie12v-supply = <&vcc12v_dcin>;
666	vpcie3v3-supply = <&vcc3v3_pcie>;
667	status = "okay";
668};
669
670&pcie_phy {
671	status = "okay";
672};
673
674&pmu_io_domains {
675	pmu1830-supply = <&vcc_3v0>;
676	status = "okay";
677};
678
679&pinctrl {
680	bt {
681		bt_enable_h: bt-enable-h {
682			rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
683		};
684
685		bt_host_wake_l: bt-host-wake-l {
686			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_down>;
687		};
688
689		bt_wake_l: bt-wake-l {
690			rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
691		};
692	};
693
694	buttons {
695		pwrbtn: pwrbtn {
696			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
697		};
698	};
699
700	fusb302x {
701		fusb0_int: fusb0-int {
702			rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
703		};
704	};
705
706	ir {
707		ir_int: ir-int {
708			rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
709		};
710	};
711
712	leds {
713		work_led_pin: work-led-pin {
714			rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
715		};
716
717		diy_led_pin: diy-led-pin {
718			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
719		};
720	};
721
722	pcie {
723		pcie_perst: pcie-perst {
724			rockchip,pins = <2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_none>;
725		};
726
727		pcie_pwr_en: pcie-pwr-en {
728			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
729		};
730	};
731
732	pmic {
733		pmic_int_l: pmic-int-l {
734			rockchip,pins = <3 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>;
735		};
736
737		vsel1_pin: vsel1-pin {
738			rockchip,pins = <1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
739		};
740
741		vsel2_pin: vsel2-pin {
742			rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
743		};
744	};
745
746	sdcard {
747		sdmmc0_pwr_h: sdmmc0-pwr-h {
748			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
749		};
750
751	};
752
753	sdio-pwrseq {
754		wifi_enable_h: wifi-enable-h {
755			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
756		};
757	};
758
759	usb-typec {
760		vcc5v0_typec_en: vcc5v0_typec_en {
761			rockchip,pins = <1 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
762		};
763	};
764
765	usb2 {
766		vcc5v0_host_en: vcc5v0-host-en {
767			rockchip,pins = <4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
768		};
769	};
770};
771
772&pwm0 {
773	status = "okay";
774};
775
776&pwm1 {
777	status = "okay";
778};
779
780&pwm2 {
781	status = "okay";
782};
783
784&saradc {
785	vref-supply = <&vcca1v8_s3>;
786	status = "okay";
787};
788
789&sdio0 {
790	bus-width = <4>;
791	cap-sd-highspeed;
792	cap-sdio-irq;
793	disable-wp;
794	keep-power-in-suspend;
795	mmc-pwrseq = <&sdio_pwrseq>;
796	non-removable;
797	pinctrl-names = "default";
798	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
799	sd-uhs-sdr104;
800	status = "okay";
801};
802
803&sdmmc {
804	bus-width = <4>;
805	cap-sd-highspeed;
806	cd-gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
807	disable-wp;
808	max-frequency = <150000000>;
809	pinctrl-names = "default";
810	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
811	vmmc-supply = <&vcc3v0_sd>;
812	vqmmc-supply = <&vcc_sdio>;
813	status = "okay";
814};
815
816&sdhci {
817	bus-width = <8>;
818	mmc-hs200-1_8v;
819	non-removable;
820	status = "okay";
821};
822
823&spdif {
824	pinctrl-0 = <&spdif_bus_1>;
825
826	spdif_p0: port {
827		spdif_p0_0: endpoint {
828			remote-endpoint = <&dit_p0_0>;
829		};
830	};
831};
832
833&spi1 {
834	status = "okay";
835
836	flash@0 {
837		compatible = "jedec,spi-nor";
838		reg = <0>;
839		spi-max-frequency = <10000000>;
840	};
841};
842
843&tcphy0 {
844	status = "okay";
845};
846
847&tcphy1 {
848	status = "okay";
849};
850
851&tsadc {
852	/* tshut mode 0:CRU 1:GPIO */
853	rockchip,hw-tshut-mode = <1>;
854	/* tshut polarity 0:LOW 1:HIGH */
855	rockchip,hw-tshut-polarity = <1>;
856	status = "okay";
857};
858
859&u2phy0 {
860	status = "okay";
861
862	u2phy0_otg: otg-port {
863		status = "okay";
864	};
865
866	u2phy0_host: host-port {
867		phy-supply = <&vcc5v0_host>;
868		status = "okay";
869	};
870};
871
872&u2phy1 {
873	status = "okay";
874
875	u2phy1_otg: otg-port {
876		status = "okay";
877	};
878
879	u2phy1_host: host-port {
880		phy-supply = <&vcc5v0_host>;
881		status = "okay";
882	};
883};
884
885&uart0 {
886	pinctrl-names = "default";
887	pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
888	status = "okay";
889
890	bluetooth {
891		compatible = "brcm,bcm43438-bt";
892		clocks = <&rk808 1>;
893		clock-names = "lpo";
894		device-wakeup-gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
895		host-wakeup-gpios = <&gpio0 RK_PA4 GPIO_ACTIVE_HIGH>;
896		shutdown-gpios = <&gpio0 RK_PB1 GPIO_ACTIVE_HIGH>;
897		pinctrl-names = "default";
898		pinctrl-0 = <&bt_host_wake_l &bt_wake_l &bt_enable_h>;
899		vbat-supply = <&vcc3v3_sys>;
900		vddio-supply = <&vcc_1v8>;
901	};
902};
903
904&uart2 {
905	status = "okay";
906};
907
908&usb_host0_ehci {
909	status = "okay";
910};
911
912&usb_host0_ohci {
913	status = "okay";
914};
915
916&usb_host1_ehci {
917	status = "okay";
918};
919
920&usb_host1_ohci {
921	status = "okay";
922};
923
924&usbdrd3_0 {
925	status = "okay";
926};
927
928&usbdrd_dwc3_0 {
929	status = "okay";
930	dr_mode = "host";
931};
932
933&usbdrd3_1 {
934	status = "okay";
935};
936
937&usbdrd_dwc3_1 {
938	status = "okay";
939	dr_mode = "host";
940};
941
942&vopb {
943	status = "okay";
944};
945
946&vopb_mmu {
947	status = "okay";
948};
949
950&vopl {
951	status = "okay";
952};
953
954&vopl_mmu {
955	status = "okay";
956};
957