xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/rk3588s-evb4-lp4x.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2021 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7#include "dt-bindings/usb/pd.h"
8#include "rk3588s.dtsi"
9#include "rk3588s-evb.dtsi"
10#include "rk3588-rk806-single.dtsi"
11
12/ {
13	combophy_avdd0v85: combophy-avdd0v85 {
14		compatible = "regulator-fixed";
15		regulator-name = "combophy_avdd0v85";
16		regulator-boot-on;
17		regulator-always-on;
18		regulator-min-microvolt = <850000>;
19		regulator-max-microvolt = <850000>;
20		vin-supply = <&vdd_0v85_s0>;
21	};
22
23	combophy_avdd1v8: combophy-avdd1v8 {
24		compatible = "regulator-fixed";
25		regulator-name = "combophy_avdd1v8";
26		regulator-boot-on;
27		regulator-always-on;
28		regulator-min-microvolt = <1800000>;
29		regulator-max-microvolt = <1800000>;
30		vin-supply = <&avcc_1v8_s0>;
31	};
32
33	es7202_sound_micarray: es7202-sound-micarray {
34		status = "okay";
35		compatible = "simple-audio-card";
36		simple-audio-card,format = "i2s";
37		simple-audio-card,name = "rockchip,sound-micarray";
38		simple-audio-card,mclk-fs = <256>;
39		simple-audio-card,dai-link@0 {
40			format = "pdm";
41			cpu {
42				sound-dai = <&pdm0>;
43			};
44			codec {
45				sound-dai = <&es7202>;
46			};
47		};
48	};
49
50	es8388_sound: es8388-sound {
51		status = "okay";
52		compatible = "rockchip,multicodecs-card";
53		rockchip,card-name = "rockchip-es8388";
54		hp-det-gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_LOW>;
55		io-channels = <&saradc 3>;
56		io-channel-names = "adc-detect";
57		keyup-threshold-microvolt = <1800000>;
58		poll-interval = <100>;
59		spk-con-gpio = <&gpio4 RK_PA5 GPIO_ACTIVE_HIGH>;
60		hp-con-gpio = <&gpio4 RK_PA4 GPIO_ACTIVE_HIGH>;
61		rockchip,format = "i2s";
62		rockchip,mclk-fs = <256>;
63		rockchip,cpu = <&i2s0_8ch>;
64		rockchip,codec = <&es8388>;
65		rockchip,audio-routing =
66			"Headphone", "LOUT1",
67			"Headphone", "ROUT1",
68			"Speaker", "LOUT2",
69			"Speaker", "ROUT2",
70			"Headphone", "Headphone Power",
71			"Headphone", "Headphone Power",
72			"Speaker", "Speaker Power",
73			"Speaker", "Speaker Power",
74			"LINPUT1", "Main Mic",
75			"LINPUT2", "Main Mic",
76			"RINPUT1", "Headset Mic",
77			"RINPUT2", "Headset Mic";
78		pinctrl-names = "default";
79		pinctrl-0 = <&hp_det>;
80		play-pause-key {
81			label = "playpause";
82			linux,code = <KEY_PLAYPAUSE>;
83			press-threshold-microvolt = <2000>;
84		};
85	};
86
87	fan: pwm-fan {
88		compatible = "pwm-fan";
89		#cooling-cells = <2>;
90		pwms = <&pwm11 0 50000 0>;
91		cooling-levels = <0 50 100 150 200 255>;
92		rockchip,temp-trips = <
93			50000	1
94			55000	2
95			60000	3
96			65000	4
97			70000	5
98		>;
99	};
100
101	vbus5v0_typec: vbus5v0-typec {
102		compatible = "regulator-fixed";
103		regulator-name = "vbus5v0_typec";
104		regulator-min-microvolt = <5000000>;
105		regulator-max-microvolt = <5000000>;
106		enable-active-high;
107		gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
108		vin-supply = <&vcc5v0_usb>;
109		pinctrl-names = "default";
110		pinctrl-0 = <&typec5v_pwren>;
111	};
112
113	vcc3v3_lcd_n: vcc3v3-lcd0-n {
114		compatible = "regulator-fixed";
115		regulator-name = "vcc3v3_lcd0_n";
116		regulator-boot-on;
117		enable-active-high;
118		gpio = <&gpio1 RK_PB2 GPIO_ACTIVE_HIGH>;
119		vin-supply = <&vcc_3v3_s0>;
120	};
121
122	vcc3v3_pcie20: vcc3v3-pcie20 {
123		compatible = "regulator-fixed";
124		regulator-name = "vcc3v3_pcie20";
125		regulator-min-microvolt = <3300000>;
126		regulator-max-microvolt = <3300000>;
127		enable-active-high;
128		gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
129		startup-delay-us = <5000>;
130		vin-supply = <&vcc12v_dcin>;
131	};
132
133	vcc5v0_host: vcc5v0-host {
134		compatible = "regulator-fixed";
135		regulator-name = "vcc5v0_host";
136		regulator-boot-on;
137		regulator-always-on;
138		regulator-min-microvolt = <5000000>;
139		regulator-max-microvolt = <5000000>;
140		enable-active-high;
141		gpio = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
142		vin-supply = <&vcc5v0_usb>;
143		pinctrl-names = "default";
144		pinctrl-0 = <&vcc5v0_host_en>;
145	};
146
147	vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
148		compatible = "regulator-fixed";
149		regulator-name = "vcc_1v1_nldo_s3";
150		regulator-always-on;
151		regulator-boot-on;
152		regulator-min-microvolt = <1100000>;
153		regulator-max-microvolt = <1100000>;
154		vin-supply = <&vcc5v0_sys>;
155	};
156
157	vcc_1v2_cam_s0: vcc-1v2-cam-s0 {
158		compatible = "regulator-fixed";
159		regulator-name = "vcc_1v2_cam_s0";
160		regulator-min-microvolt = <1200000>;
161		regulator-max-microvolt = <1200000>;
162		gpios = <&gpio1 RK_PA6 GPIO_ACTIVE_HIGH>;
163		enable-active-high;
164		vin-supply = <&vcc_3v3_s3>;
165		regulator-state-mem {
166			regulator-off-in-suspend;
167		};
168	};
169
170	vcc_1v8_cam_s0: vcc-1v8-cam-s0 {
171		compatible = "regulator-fixed";
172		regulator-name = "vcc_1v8_cam_s0";
173		regulator-min-microvolt = <1800000>;
174		regulator-max-microvolt = <1800000>;
175		vin-supply = <&vcc_3v3_s3>;
176	};
177
178	vcc_2v8_cam_s0: vcc-2v8-cam-s0 {
179		compatible = "regulator-fixed";
180		regulator-name = "vcc_2v8_cam_s0";
181		regulator-min-microvolt = <2800000>;
182		regulator-max-microvolt = <2800000>;
183		vin-supply = <&vcc_3v3_s3>;
184	};
185
186	vcc_3v3_sd_s0: vcc-3v3-sd-s0 {
187		compatible = "regulator-fixed";
188		regulator-name = "vcc_3v3_sd_s0";
189		regulator-min-microvolt = <3300000>;
190		regulator-max-microvolt = <3300000>;
191		gpios = <&gpio0 RK_PD4 GPIO_ACTIVE_LOW>;
192		enable-active-low;
193		vin-supply = <&vcc_3v3_s3>;
194			regulator-state-mem {
195			regulator-off-in-suspend;
196		};
197	};
198
199	wireless_bluetooth: wireless-bluetooth {
200		compatible = "bluetooth-platdata";
201		clocks = <&hym8563>;
202		clock-names = "ext_clock";
203		uart_rts_gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_LOW>;
204		pinctrl-names = "default", "rts_gpio";
205		pinctrl-0 = <&uart8m1_rtsn>, <&bt_reset_gpio>, <&bt_wake_gpio>, <&bt_wake_host_irq>;
206		pinctrl-1 = <&uart8_gpios>;
207		BT,reset_gpio    = <&gpio3 RK_PB7 GPIO_ACTIVE_HIGH>;
208		BT,wake_gpio     = <&gpio3 RK_PC1 GPIO_ACTIVE_HIGH>;
209		BT,wake_host_irq = <&gpio3 RK_PC0 GPIO_ACTIVE_HIGH>;
210		status = "okay";
211	};
212
213	wireless_wlan: wireless-wlan {
214		compatible = "wlan-platdata";
215		wifi_chip_type = "ap6255";
216		pinctrl-names = "default";
217		pinctrl-0 = <&wifi_host_wake_irq>, <&wifi_poweren_gpio>;
218		WIFI,host_wake_irq = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
219		WIFI,poweren_gpio = <&gpio0 RK_PC7 GPIO_ACTIVE_HIGH>;
220		status = "okay";
221	};
222};
223
224&backlight {
225	pwms = <&pwm13 0 25000 0>;
226	status = "okay";
227};
228
229&combphy0_ps {
230	status = "okay";
231};
232
233&combphy2_psu {
234	status = "okay";
235};
236
237&dp0 {
238	status = "okay";
239};
240
241&dp0_in_vp2 {
242	status = "okay";
243};
244
245/*
246 * mipi_dcphy0 needs to be enabled
247 * when dsi0 is enabled
248 */
249&dsi0 {
250	status = "okay";
251};
252
253&dsi0_in_vp2 {
254	status = "disabled";
255};
256
257&dsi0_in_vp3 {
258	status = "okay";
259};
260
261&dsi0_panel {
262	power-supply = <&vcc3v3_lcd_n>;
263	reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_LOW>;
264	pinctrl-names = "default";
265	pinctrl-0 = <&lcd_rst_gpio>;
266};
267
268/*
269 * mipi_dcphy1 needs to be enabled
270 * when dsi1 is enabled
271 */
272&dsi1 {
273	//rockchip,lane-rate = <650>;
274	pinctrl-names = "default";
275	pinctrl-0 = <&mipi_te1>;
276	status = "disabled";
277};
278
279&dsi1_in_vp2 {
280	status = "disabled";
281};
282
283&dsi1_in_vp3 {
284	status = "disabled";
285};
286
287&dsi1_panel {
288	power-supply = <&vcc3v3_lcd_n>;
289	compressed-data;
290	/*
291	 * because in hardware, the two screens share the reset pin,
292	 * so reset-gpios need only in dsi1 enable and dsi0 disabled
293	 * case.
294	 */
295
296	//reset-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_LOW>;
297	//pinctrl-names = "default";
298	//pinctrl-0 = <&lcd_rst_gpio>;
299
300	dsi,flags = <(MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
301
302	slice-width = <720>;
303	slice-height = <65>;
304	version-major = <1>;
305	version-minor = <1>;
306
307	panel-init-sequence = [
308		29 10 03 f0 5a 5a
309		/* Dsc Setting */
310		/* Compression Enable */
311		07 10 01 01
312		/* Scaler Disable */
313		15 10 02 c3 00
314		/* PPS Setting */
315		0a 31 59 10 00 00 89 30 80 0c 30 05 a0 00 41 02 d0 02 d0 02 00 02 c2 00 20 06 58 00 0a 00 0f 01 e0 01 2d 18 00 10 f0 03 0c 20 00 06 0b 0b 33 0e 1c 2a 38 46 54 62 69 70 77 79 7b 7d 7e 01 02 01 00 09 40 09 be 19 fc 19 fa 19 f8 1a 38 1a 78 1a b6 2a b6 2a f4 2a f4 4b 34 63 74 00
316		29 10 03 f0 a5 a5
317		/** Sleep Out */
318		05 00 01 11
319		/* 4. Common Setting */
320		/* 4.1 TE(Vync) ON/OFF */
321		15 00 02 35 00
322		/* 4.2 CASET/PASET Setting */
323		39 00 05 2a 00 00 05 9F
324		39 00 05 2b 00 00 0c 2f
325		/* 4.3 TSP SYNC Setting */
326		39 00 03 f0 5a 5a
327		39 00 0a B9 01 c0 3c 0b 00 00 00 11 03
328		39 00 03 f0 a5 a5
329		/* FD(Fast Discharge) Setting */
330		39 00 03 f0 5a 5a
331		15 00 02 b0 45
332		15 00 02 b5 48
333		39 00 03 f0 a5 a5
334		/* 4.6 FFC Setting (MIPI CLK 529MHz) */
335		39 00 03 f0 5a 5a
336		39 00 03 fc 5a 5a
337		15 00 02 b0 1E
338		39 00 06 c5 09 10 b4 24 fb
339		39 00 03 f0 a5 a5
340		39 00 03 fc a5 a5
341		/* OSC Spread Setting */
342		39 00 03 f0 5a 5a
343		39 00 03 fc 5a 5a
344		15 00 02 b0 37
345		/* FFC Setting; 0x04 : Disable */
346		39 00 06 c5 04 ff 00 01 64
347		39 00 03 f0 a5 a5
348		39 00 03 fc a5 a5
349		/* Dither IP Setting */
350		39 00 03 FC 5A 5A
351		15 00 02 b0 86
352		15 00 02 eb 01
353		39 00 03 FC a5 a5
354		/* 5 Brightness Control */
355		/* 5.1 Dimming Setting */
356		39 10 03 f0 5a 5a
357		15 10 02 b0 05
358		15 10 02 b1 01
359		15 10 02 b0 02
360		15 10 02 b5 d3
361		15 10 02 53 20
362		39 10 03 f0 a5 a5
363		39 10 03 51 02 ff
364		05 32 01 29
365	];
366
367	panel-exit-sequence = [
368		/* Display off */
369		05 14 01 28
370		/* Sleep In */
371		05 00 01 10
372		/* VCI stabilization setting */
373		39 00 03 f0 5a 5a
374		15 00 02 b0 05
375		15 00 02 f4 01
376		39 a0 03 f0 a5 a5
377	];
378
379	disp_timings1: display-timings {
380		native-mode = <&dsi1_timing0>;
381		dsi1_timing0: timing0 {
382			clock-frequency = <280000000>;
383			hactive = <1140>;
384			vactive = <3120>;
385			hfront-porch = <16>;
386			hsync-len = <8>;
387			hback-porch = <8>;
388			vfront-porch = <4>;
389			vsync-len = <2>;
390			vback-porch = <16>;
391			hsync-active = <0>;
392			vsync-active = <0>;
393			de-active = <0>;
394			pixelclk-active = <0>;
395		};
396	};
397};
398
399&i2c0 {
400	status = "okay";
401	pinctrl-names = "default";
402	pinctrl-0 = <&i2c0m2_xfer>;
403
404	vdd_cpu_big0_s0: vdd_cpu_big0_mem_s0: rk8602@42 {
405		compatible = "rockchip,rk8602";
406		reg = <0x42>;
407		vin-supply = <&vcc5v0_sys>;
408		regulator-compatible = "rk860x-reg";
409		regulator-name = "vdd_cpu_big0_s0";
410		regulator-min-microvolt = <550000>;
411		regulator-max-microvolt = <1050000>;
412		regulator-ramp-delay = <2300>;
413		rockchip,suspend-voltage-selector = <1>;
414		regulator-boot-on;
415		regulator-always-on;
416		regulator-state-mem {
417			regulator-off-in-suspend;
418		};
419	};
420
421	vdd_cpu_big1_s0: vdd_cpu_big1_mem_s0: rk8603@43 {
422		compatible = "rockchip,rk8603";
423		reg = <0x43>;
424		vin-supply = <&vcc5v0_sys>;
425		regulator-compatible = "rk860x-reg";
426		regulator-name = "vdd_cpu_big1_s0";
427		regulator-min-microvolt = <550000>;
428		regulator-max-microvolt = <1050000>;
429		regulator-ramp-delay = <2300>;
430		rockchip,suspend-voltage-selector = <1>;
431		regulator-boot-on;
432		regulator-always-on;
433		regulator-state-mem {
434			regulator-off-in-suspend;
435		};
436	};
437};
438
439&i2c2 {
440	status = "okay";
441
442	vdd_npu_s0: vdd_npu_mem_s0: rk8602@42 {
443		compatible = "rockchip,rk8602";
444		reg = <0x42>;
445		vin-supply = <&vcc5v0_sys>;
446		regulator-compatible = "rk860x-reg";
447		regulator-name = "vdd_npu_s0";
448		regulator-min-microvolt = <550000>;
449		regulator-max-microvolt = <950000>;
450		regulator-ramp-delay = <2300>;
451		rockchip,suspend-voltage-selector = <1>;
452		regulator-boot-on;
453		regulator-always-on;
454		regulator-state-mem {
455			regulator-off-in-suspend;
456		};
457	};
458};
459
460&i2c3 {
461	status = "okay";
462
463	es8388: es8388@11 {
464		status = "okay";
465		#sound-dai-cells = <0>;
466		compatible = "everest,es8388", "everest,es8323";
467		reg = <0x11>;
468		clocks = <&mclkout_i2s0>;
469		clock-names = "mclk";
470		pinctrl-names = "default";
471		pinctrl-0 = <&i2s0_mclk>;
472	};
473
474	es7202: es7202@32 {
475		status = "okay";
476		#sound-dai-cells = <0>;
477		compatible = "ES7202_PDM_ADC_1";
478		power-supply = <&vcc_1v8_s0>;	/* only 1v8 or 3v3, default is 3v3 */
479		reg = <0x32>;
480	};
481};
482
483&i2c4 {
484	status = "okay";
485	pinctrl-names = "default";
486	pinctrl-0 = <&i2c4m3_xfer>;
487
488	gt1x: gt1x@14 {
489		compatible = "goodix,gt1x";
490		reg = <0x14>;
491		pinctrl-names = "default";
492		pinctrl-0 = <&touch_gpio>;
493		goodix,rst-gpio = <&gpio1 RK_PB4 GPIO_ACTIVE_HIGH>;
494		goodix,irq-gpio = <&gpio1 RK_PB5 IRQ_TYPE_LEVEL_LOW>;
495		power-supply = <&vcc3v3_lcd_n>;
496	};
497};
498
499&i2c5 {
500	status = "okay";
501
502	ls_stk3332: light@47 {
503		compatible = "ls_stk3332";
504		status = "disabled";
505		reg = <0x47>;
506		type = <SENSOR_TYPE_LIGHT>;
507		irq_enable = <0>;
508		als_threshold_high = <100>;
509		als_threshold_low = <10>;
510		als_ctrl_gain = <2>; /* 0:x1 1:x4 2:x16 3:x64 */
511		poll_delay_ms = <100>;
512	};
513
514	ps_stk3332: proximity@47 {
515		compatible = "ps_stk3332";
516		status = "disabled";
517		reg = <0x47>;
518		type = <SENSOR_TYPE_PROXIMITY>;
519		//pinctrl-names = "default";
520		//pinctrl-0 = <&gpio3_c6>;
521		//irq-gpio = <&gpio3 RK_PC6 IRQ_TYPE_LEVEL_LOW>;
522		//irq_enable = <1>;
523		ps_threshold_high = <0x200>;
524		ps_threshold_low = <0x100>;
525		ps_ctrl_gain = <3>; /* 0:x1 1:x2 2:x5 3:x8 */
526		ps_led_current = <4>; /* 0:3.125mA 1:6.25mA 2:12.5mA 3:25mA 4:50mA 5:100mA*/
527		poll_delay_ms = <100>;
528	};
529
530	mpu6500_acc: mpu_acc@68 {
531		compatible = "mpu6500_acc";
532		reg = <0x68>;
533		irq-gpio = <&gpio3 RK_PB4 IRQ_TYPE_EDGE_RISING>;
534		irq_enable = <0>;
535		poll_delay_ms = <30>;
536		type = <SENSOR_TYPE_ACCEL>;
537		layout = <8>;
538	};
539
540	mpu6500_gyro: mpu_gyro@68 {
541		compatible = "mpu6500_gyro";
542		reg = <0x68>;
543		irq_enable = <0>;
544		poll_delay_ms = <30>;
545		type = <SENSOR_TYPE_GYROSCOPE>;
546		layout = <8>;
547	};
548};
549
550&i2c8 {
551	status = "okay";
552	pinctrl-names = "default";
553	pinctrl-0 = <&i2c8m2_xfer>;
554
555	usbc0: fusb302@22 {
556		compatible = "fcs,fusb302";
557		reg = <0x22>;
558		interrupt-parent = <&gpio0>;
559		interrupts = <RK_PC6 IRQ_TYPE_LEVEL_LOW>;
560		pinctrl-names = "default";
561		pinctrl-0 = <&usbc0_int>;
562		vbus-supply = <&vbus5v0_typec>;
563		status = "okay";
564
565		ports {
566			#address-cells = <1>;
567			#size-cells = <0>;
568
569			port@0 {
570				reg = <0>;
571				usbc0_role_sw: endpoint@0 {
572					remote-endpoint = <&dwc3_0_role_switch>;
573				};
574			};
575		};
576
577		usb_con: connector {
578			compatible = "usb-c-connector";
579			label = "USB-C";
580			data-role = "dual";
581			power-role = "dual";
582			try-power-role = "sink";
583			op-sink-microwatt = <1000000>;
584			sink-pdos =
585				<PDO_FIXED(5000, 1000, PDO_FIXED_USB_COMM)>;
586			source-pdos =
587				<PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>;
588
589			altmodes {
590				#address-cells = <1>;
591				#size-cells = <0>;
592
593				altmode@0 {
594					reg = <0>;
595					svid = <0xff01>;
596					vdo = <0xffffffff>;
597				};
598			};
599
600			ports {
601				#address-cells = <1>;
602				#size-cells = <0>;
603
604				port@0 {
605					reg = <0>;
606					usbc0_orien_sw: endpoint {
607						remote-endpoint = <&usbdp_phy0_orientation_switch>;
608					};
609				};
610
611				port@1 {
612					reg = <1>;
613					dp_altmode_mux: endpoint {
614						remote-endpoint = <&usbdp_phy0_dp_altmode_mux>;
615					};
616				};
617			};
618		};
619	};
620
621	hym8563: hym8563@51 {
622		compatible = "haoyu,hym8563";
623		reg = <0x51>;
624		#clock-cells = <0>;
625		clock-frequency = <32768>;
626		clock-output-names = "hym8563";
627		pinctrl-names = "default";
628		pinctrl-0 = <&hym8563_int>;
629		interrupt-parent = <&gpio0>;
630		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
631		wakeup-source;
632		status = "okay";
633	};
634};
635
636&mipi_dcphy0 {
637	status = "okay";
638};
639
640&mipi_dcphy1 {
641	status = "disabled";
642};
643
644&pdm0 {
645	status = "okay";
646};
647
648&pcie2x1l1 {
649	reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
650	vpcie3v3-supply = <&vcc3v3_pcie20>;
651	status = "okay";
652};
653
654&pcie2x1l2 {
655	reset-gpios = <&gpio4 RK_PC1 GPIO_ACTIVE_HIGH>;
656	rockchip,skip-scan-in-resume;
657	status = "okay";
658};
659
660&pinctrl {
661	headphone {
662		hp_det: hp-det {
663			rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
664		};
665	};
666
667	hym8563 {
668		hym8563_int: hym8563-int {
669			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
670		};
671	};
672
673	lcd {
674		lcd_rst_gpio: lcd-rst-gpio {
675			rockchip,pins = <1 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
676		};
677	};
678
679	sensor {
680		mpu6500_irq_gpio: mpu6500_irq_gpio {
681			rockchip,pins = <3 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
682		};
683	};
684
685	touch {
686		touch_gpio: touch-gpio {
687			rockchip,pins =
688				<1 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>,
689				<1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
690		};
691	};
692
693	usb {
694		vcc5v0_host_en: vcc5v0-host-en {
695			rockchip,pins = <1 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
696		};
697	};
698
699	usb-typec {
700		usbc0_int: usbc0-int {
701			rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
702		};
703
704		typec5v_pwren: typec5v-pwren {
705			rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
706		};
707	};
708
709	wireless-bluetooth {
710		uart8_gpios: uart8-gpios {
711			rockchip,pins = <3 RK_PA4 RK_FUNC_GPIO &pcfg_pull_none>;
712		};
713
714		bt_reset_gpio: bt-reset-gpio {
715			rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
716		};
717
718		bt_wake_gpio: bt-wake-gpio {
719			rockchip,pins = <3 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>;
720		};
721
722		bt_wake_host_irq: bt-wake-host-irq {
723			rockchip,pins = <3 RK_PC0 RK_FUNC_GPIO &pcfg_pull_down>;
724		};
725	};
726
727	wireless-wlan {
728		wifi_host_wake_irq: wifi-host-wake-irq {
729			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
730		};
731
732		wifi_poweren_gpio: wifi-poweren-gpio {
733			rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
734		};
735	};
736};
737
738&pwm11 {
739	pinctrl-0 = <&pwm11m1_pins>;
740	status = "okay";
741};
742
743&pwm13 {
744	status = "okay";
745	pinctrl-names = "active";
746	pinctrl-0 = <&pwm13m1_pins>;
747};
748
749&pwm15 {
750	compatible = "rockchip,remotectl-pwm";
751	pinctrl-names = "default";
752	pinctrl-0 = <&pwm15m0_pins>;
753	remote_pwm_id = <3>;
754	handle_cpu_id = <1>;
755	remote_support_psci = <0>;
756	status = "okay";
757
758	ir_key1 {
759		rockchip,usercode = <0x4040>;
760		rockchip,key_table =
761			<0xf2   KEY_REPLY>,
762			<0xba   KEY_BACK>,
763			<0xf4   KEY_UP>,
764			<0xf1   KEY_DOWN>,
765			<0xef   KEY_LEFT>,
766			<0xee   KEY_RIGHT>,
767			<0xbd   KEY_HOME>,
768			<0xea   KEY_VOLUMEUP>,
769			<0xe3   KEY_VOLUMEDOWN>,
770			<0xe2   KEY_SEARCH>,
771			<0xb2   KEY_POWER>,
772			<0xbc   KEY_MUTE>,
773			<0xec   KEY_MENU>,
774			<0xbf   0x190>,
775			<0xe0   0x191>,
776			<0xe1   0x192>,
777			<0xe9   183>,
778			<0xe6   248>,
779			<0xe8   185>,
780			<0xe7   186>,
781			<0xf0   388>,
782			<0xbe   0x175>;
783	};
784
785	ir_key2 {
786		rockchip,usercode = <0xff00>;
787		rockchip,key_table =
788			<0xf9   KEY_HOME>,
789			<0xbf   KEY_BACK>,
790			<0xfb   KEY_MENU>,
791			<0xaa   KEY_REPLY>,
792			<0xb9   KEY_UP>,
793			<0xe9   KEY_DOWN>,
794			<0xb8   KEY_LEFT>,
795			<0xea   KEY_RIGHT>,
796			<0xeb   KEY_VOLUMEDOWN>,
797			<0xef   KEY_VOLUMEUP>,
798			<0xf7   KEY_MUTE>,
799			<0xe7   KEY_POWER>,
800			<0xfc   KEY_POWER>,
801			<0xa9   KEY_VOLUMEDOWN>,
802			<0xa8   KEY_PLAYPAUSE>,
803			<0xe0   KEY_VOLUMEDOWN>,
804			<0xa5   KEY_VOLUMEDOWN>,
805			<0xab   183>,
806			<0xb7   388>,
807			<0xe8   388>,
808			<0xf8   184>,
809			<0xaf   185>,
810			<0xed   KEY_VOLUMEDOWN>,
811			<0xee   186>,
812			<0xb3   KEY_VOLUMEDOWN>,
813			<0xf1   KEY_VOLUMEDOWN>,
814			<0xf2   KEY_VOLUMEDOWN>,
815			<0xf3   KEY_SEARCH>,
816			<0xb4   KEY_VOLUMEDOWN>,
817			<0xa4   KEY_SETUP>,
818			<0xbe   KEY_SEARCH>;
819	};
820
821	ir_key3 {
822		rockchip,usercode = <0x1dcc>;
823		rockchip,key_table =
824			<0xee   KEY_REPLY>,
825			<0xf0   KEY_BACK>,
826			<0xf8   KEY_UP>,
827			<0xbb   KEY_DOWN>,
828			<0xef   KEY_LEFT>,
829			<0xed   KEY_RIGHT>,
830			<0xfc   KEY_HOME>,
831			<0xf1   KEY_VOLUMEUP>,
832			<0xfd   KEY_VOLUMEDOWN>,
833			<0xb7   KEY_SEARCH>,
834			<0xff   KEY_POWER>,
835			<0xf3   KEY_MUTE>,
836			<0xbf   KEY_MENU>,
837			<0xf9   0x191>,
838			<0xf5   0x192>,
839			<0xb3   388>,
840			<0xbe   KEY_1>,
841			<0xba   KEY_2>,
842			<0xb2   KEY_3>,
843			<0xbd   KEY_4>,
844			<0xf9   KEY_5>,
845			<0xb1   KEY_6>,
846			<0xfc   KEY_7>,
847			<0xf8   KEY_8>,
848			<0xb0   KEY_9>,
849			<0xb6   KEY_0>,
850			<0xb5   KEY_BACKSPACE>;
851	};
852};
853
854&route_dsi0 {
855	status = "okay";
856	connect = <&vp3_out_dsi0>;
857};
858
859&route_dsi1 {
860	status = "disabled";
861	connect = <&vp3_out_dsi1>;
862};
863
864&sdmmc {
865	status = "okay";
866	vmmc-supply = <&vcc_3v3_sd_s0>;
867};
868
869&spdif_tx1 {
870	status = "okay";
871	pinctrl-names = "default";
872	pinctrl-0 = <&spdif1m1_tx>;
873};
874
875&spdif_tx1_dc {
876	status = "okay";
877};
878
879&spdif_tx1_sound {
880	status = "okay";
881};
882
883&spi2 {
884	pinctrl-names = "default";
885	pinctrl-0 = <&spi2m2_cs0 &spi2m2_pins>;
886	num-cs = <1>;
887};
888
889&u2phy0_otg {
890	rockchip,typec-vbus-det;
891};
892
893&u2phy2_host {
894	phy-supply = <&vcc5v0_host>;
895};
896
897&u2phy3_host {
898	phy-supply = <&vcc5v0_host>;
899};
900
901&uart8 {
902	status = "okay";
903	pinctrl-names = "default";
904	pinctrl-0 = <&uart8m1_xfer &uart8m1_ctsn>;
905};
906
907&usbdp_phy0 {
908	orientation-switch;
909	svid = <0xff01>;
910	sbu1-dc-gpios = <&gpio1 RK_PB6 GPIO_ACTIVE_HIGH>;
911	sbu2-dc-gpios = <&gpio1 RK_PB7 GPIO_ACTIVE_HIGH>;
912
913	port {
914		#address-cells = <1>;
915		#size-cells = <0>;
916		usbdp_phy0_orientation_switch: endpoint@0 {
917			reg = <0>;
918			remote-endpoint = <&usbc0_orien_sw>;
919		};
920
921		usbdp_phy0_dp_altmode_mux: endpoint@1 {
922			reg = <1>;
923			remote-endpoint = <&dp_altmode_mux>;
924		};
925	};
926};
927
928&usbdrd_dwc3_0 {
929	usb-role-switch;
930	port {
931		#address-cells = <1>;
932		#size-cells = <0>;
933		dwc3_0_role_switch: endpoint@0 {
934			reg = <0>;
935			remote-endpoint = <&usbc0_role_sw>;
936		};
937	};
938};
939
940&usbhost3_0 {
941	status = "disabled";
942};
943
944&usbhost_dwc3_0 {
945	status = "disabled";
946};
947