xref: /OK3568_Linux_fs/kernel/scripts/dtc/include-prefixes/arm64/rockchip/rk3399-tve1205g.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2022 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7/dts-v1/;
8#include <dt-bindings/pinctrl/rockchip.h>
9#include "rk3399.dtsi"
10#include "rk3399-android.dtsi"
11#include "rk3399-opp.dtsi"
12#include <dt-bindings/sensor-dev.h>
13#include <dt-bindings/pwm/pwm.h>
14
15/ {
16	compatible = "rockchip,rk3399-mid", "rockchip,rk3399";
17
18	edp_panel: edp-panel {
19		compatible = "auo,b125han03";
20		backlight = <&backlight>;
21		power-supply = <&vcc3v3_s0>;
22		enable-gpios = <&gpio3 RK_PA0 GPIO_ACTIVE_HIGH>;
23		bus-format = <MEDIA_BUS_FMT_RGB666_1X18>;
24		bpc = <6>;
25		prepare-delay-ms = <50>;
26		ports {
27			panel_in_edp: endpoint {
28				remote-endpoint = <&edp_out_panel>;
29			};
30		};
31	};
32
33	usb_cam_gpio: usb-cam-gpio {
34		compatible = "usb-cam-gpio";
35		pinctrl-names = "default";
36		pinctrl-0 = <&usb_cam_on_gpio>;
37		hd-cam-gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_HIGH>;
38		ir-cam-gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_HIGH>;
39		status = "okay";
40	};
41
42	vcc_sys: vcc-sys {
43		compatible = "regulator-fixed";
44		regulator-name = "vcc_sys";
45		regulator-always-on;
46		regulator-boot-on;
47		regulator-min-microvolt = <3900000>;
48		regulator-max-microvolt = <3900000>;
49	};
50
51	vcc3v3_sys: vcc3v3-sys {
52		compatible = "regulator-fixed";
53		regulator-name = "vcc3v3_sys";
54		regulator-always-on;
55		regulator-boot-on;
56		regulator-min-microvolt = <3300000>;
57		regulator-max-microvolt = <3300000>;
58	};
59
60	vcc5v0_host: vcc5v0-host-regulator {
61		compatible = "regulator-fixed";
62		enable-active-high;
63		gpio = <&gpio4 25 GPIO_ACTIVE_HIGH>;
64		pinctrl-names = "default";
65		pinctrl-0 = <&host_vbus_drv>;
66		regulator-name = "vcc5v0_host";
67		regulator-always-on;
68	};
69
70	vdd_log: vdd-log {
71		compatible = "pwm-regulator";
72		pwms = <&pwm2 0 25000 1>;
73		rockchip,pwm_id= <2>;
74		rockchip,pwm_voltage = <900000>;
75		regulator-name = "vdd_log";
76		regulator-min-microvolt = <750000>;
77		regulator-max-microvolt = <1350000>;
78		regulator-always-on;
79		regulator-boot-on;
80	};
81
82	xin32k: xin32k {
83		compatible = "fixed-clock";
84		clock-frequency = <32768>;
85		clock-output-names = "xin32k";
86		#clock-cells = <0>;
87	};
88
89	backlight: backlight {
90		compatible = "pwm-backlight";
91		pwms = <&pwm0 0 25000 0>;
92		brightness-levels = <
93			0   1   51  52  52  53  53  54
94			54  55  55  56  56  57  57  58
95			58  59  59  60  61  61  62  63
96			63  64  65  65  66  67  67  68
97			69  69  70  71  71  72  73  73
98			74  75  75  76  77  77  78  79
99			79  80  80  81  81  82  83  83
100			84  85  86  86  87  88  89  89
101			90  91  92  92  93  94  95  95
102			96  97  98  98  99 100 101  101
103			102 103 104 104 105 106 107 107
104			108 109 110 110 111 112 113 113
105			114 115 116 116 117 118 119 119
106			120 121 122 122 123 124 125 125
107			126 127 128 128 129 130 131 131
108			132 133 134 134 135 136 137 137
109			138 139 140 140 141 142 143 143
110			144 145 146 146 147 148 149 149
111			150 151 152 152 153 154 155 155
112			156 157 158 158 159 160 161 161
113			162 163 164 164 165 166 167 167
114			168 169 170 170 171 172 173 173
115			174 175 176 176 177 178 179 179
116			180 181 182 182 183 184 185 185
117			186 187 188 188 189 190 191 191
118			216 217 218 218 219 220 221 221
119			222 223 224 224 225 226 227 227
120			228 229 230 230 231 232 233 233
121			234 235 236 236 237 238 239 239
122			240 241 242 242 243 244 245 245
123			246 247 248 248 249 250 251 251
124			252 253 254 254 255 255 255 255>;
125		default-brightness-level = <200>;
126		enable-gpios = <&gpio3 RK_PA4 GPIO_ACTIVE_HIGH>;
127	};
128
129	vcc_phy: vcc-phy-regulator {
130		compatible = "regulator-fixed";
131		regulator-name = "vcc_phy";
132		regulator-always-on;
133		regulator-boot-on;
134	};
135
136	cx2072x-sound {
137		compatible = "simple-audio-card";
138		simple-audio-card,format = "i2s";
139		simple-audio-card,name = "rockchip,cx2072x-codec";
140		simple-audio-card,mclk-fs = <256>;
141		simple-audio-card,widgets =
142			"Microphone", "Microphone Jack",
143			"Line", "Microphone Headset",
144			"Headphone", "Headphone Jack",
145			"Speaker", "Speaker External";
146		simple-audio-card,routing =
147			"PORTC", "Microphone Jack",
148			"PortD Mic Bias", "Microphone Headset",
149			"Headphone Jack", "PORTA",
150			"Speaker External", "PORTG";
151		simple-audio-card,cpu {
152			sound-dai = <&i2s0>;
153		};
154		simple-audio-card,codec {
155			sound-dai = <&cx2072x>;
156		};
157	};
158
159	sound {
160		compatible = "rockchip,cdndp-sound";
161		rockchip,cpu = <&i2s2>;
162		rockchip,codec = <&cdn_dp>;
163		status = "okay";
164	};
165
166	bt-sound {
167		compatible = "simple-audio-card";
168		simple-audio-card,format = "dsp_b";
169		simple-audio-card,bitclock-inversion = <1>;
170		simple-audio-card,mclk-fs = <256>;
171		simple-audio-card,name = "rockchip,bt";
172		simple-audio-card,cpu {
173			sound-dai = <&i2s1>;
174		};
175		simple-audio-card,codec {
176			sound-dai = <&bt_sco>;
177		};
178	};
179
180	bt_sco: bt-sco {
181		compatible = "delta,dfbmcs320";
182		#sound-dai-cells = <0>;
183	};
184
185	sdio_pwrseq: sdio-pwrseq {
186		compatible = "mmc-pwrseq-simple";
187		clocks = <&rk808 1>;
188		clock-names = "ext_clock";
189		pinctrl-names = "default";
190		pinctrl-0 = <&wifi_enable_h>;
191
192		/*
193		 * On the module itself this is one of these (depending
194		 * on the actual card populated):
195		 * - SDIO_RESET_L_WL_REG_ON
196		 * - PDN (power down when low)
197		 */
198		reset-gpios = <&gpio0 10 GPIO_ACTIVE_LOW>; /* GPIO0_B2 */
199	};
200
201	leds: gpio-leds {
202		compatible = "gpio-leds";
203		pinctrl-names = "default";
204		pinctrl-0 =<&leds_gpio>;
205
206		led@1 {
207			gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
208			label = "battery_led_amber";
209			retain-state-suspended;
210		};
211
212		led@2 {
213			gpios = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
214			label = "battery_led_white";
215			retain-state-suspended;
216		};
217
218		led@3 {
219			gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
220			label = "call_answer_led";
221		};
222
223		led@4 {
224			gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
225			label = "call_decline_led";
226		};
227
228		led@5 {
229			gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
230			label = "rec_mute_led";
231		};
232
233		led@6 {
234			gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
235			label = "play_mute_led";
236		};
237
238		led@7 {
239			gpios = <&gpio4 RK_PD2 GPIO_ACTIVE_HIGH>;
240			label = "wl_led";
241		};
242	};
243
244	wireless-wlan {
245		compatible = "wlan-platdata";
246		rockchip,grf = <&grf>;
247		wifi_chip_type = "ap6354";
248		sdio_vref = <1800>;
249		WIFI,host_wake_irq = <&gpio0 3 GPIO_ACTIVE_HIGH>; /* GPIO0_a3 */
250		status = "okay";
251	};
252
253	wireless-bluetooth {
254		compatible = "bluetooth-platdata";
255		clocks = <&rk808 1>;
256		clock-names = "ext_clock";
257		//wifi-bt-power-toggle;
258		uart_rts_gpios = <&gpio2 19 GPIO_ACTIVE_LOW>; /* GPIO2_C3 */
259		pinctrl-names = "default", "rts_gpio";
260		pinctrl-0 = <&uart0_rts>;
261		pinctrl-1 = <&uart0_gpios>;
262		//BT,power_gpio  = <&gpio3 19 GPIO_ACTIVE_HIGH>; /* GPIOx_xx */
263		BT,reset_gpio    = <&gpio0 9 GPIO_ACTIVE_HIGH>; /* GPIO0_B1 */
264		BT,wake_gpio     = <&gpio2 26 GPIO_ACTIVE_HIGH>; /* GPIO2_D2 */
265		BT,wake_host_irq = <&gpio0 4 GPIO_ACTIVE_HIGH>; /* GPIO0_A4 */
266		status = "okay";
267	};
268
269	uboot-charge {
270		compatible = "rockchip,uboot-charge";
271		rockchip,uboot-charge-on = <1>;
272		rockchip,android-charge-on = <0>;
273		rockchip,uboot-exit-charge-level = <2>;
274		rockchip,uboot-low-power-level = <1>;
275		rockchip,uboot-charge-brightness = <0>;
276		max-input-voltage = <20000>;
277		max-input-current = <6000>;
278	};
279
280	vibrator {
281		compatible = "rk-vibrator-gpio";
282		vibrator-gpio = <&gpio4 30 GPIO_ACTIVE_LOW>;
283		status = "okay";
284	};
285
286	rk_headset: rk-headset {
287		compatible = "rockchip_headset";
288		headset_gpio = <&gpio4 28 GPIO_ACTIVE_HIGH>;
289		pinctrl-names = "default";
290		pinctrl-0 = <&hp_det>;
291		io-channels = <&saradc 2>;
292	};
293
294	hall_sensor: hall-mh248 {
295		compatible = "hall-mh248";
296		pinctrl-names = "default";
297		pinctrl-0 = <&mh248_irq_gpio>;
298		irq-gpio = <&gpio0 RK_PA1 IRQ_TYPE_EDGE_BOTH>;
299		hall-active = <1>;
300		status = "okay";
301	};
302};
303
304&rk_key {
305	compatible = "rockchip,key";
306	status = "okay";
307
308	io-channels = <&saradc 1>;
309
310	vol-up-key {
311		linux,code = <114>;
312		label = "volume up";
313		rockchip,adc_value = <1>;
314	};
315
316	vol-down-key {
317		linux,code = <115>;
318		label = "volume down";
319		rockchip,adc_value = <170>;
320	};
321
322	power-key {
323		gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
324		linux,code = <116>;
325		label = "power";
326		gpio-key,wakeup;
327	};
328
329	menu-key {
330		linux,code = <59>;
331		label = "menu";
332		rockchip,adc_value = <746>;
333	};
334
335	home-key {
336		linux,code = <102>;
337		label = "home";
338		rockchip,adc_value = <355>;
339	};
340
341	back-key {
342		linux,code = <158>;
343		label = "back";
344		rockchip,adc_value = <560>;
345	};
346
347	camera-key {
348		linux,code = <212>;
349		label = "camera";
350		rockchip,adc_value = <450>;
351	};
352};
353
354&cpu_l0 {
355	cpu-supply = <&vdd_cpu_l>;
356};
357
358&cpu_l1 {
359	cpu-supply = <&vdd_cpu_l>;
360};
361
362&cpu_l2 {
363	cpu-supply = <&vdd_cpu_l>;
364};
365
366&cpu_l3 {
367	cpu-supply = <&vdd_cpu_l>;
368};
369
370&cpu_b0 {
371	cpu-supply = <&vdd_cpu_b>;
372};
373
374&cpu_b1 {
375	cpu-supply = <&vdd_cpu_b>;
376};
377
378&edp {
379	status = "okay";
380	pinctrl-names = "default";
381	pinctrl-0 = <&edp_hpd>;
382
383	ports {
384		edp_out: port@1 {
385			reg = <1>;
386			#address-cells = <1>;
387			#size-cells = <0>;
388			edp_out_panel: endpoint@0 {
389				reg = <0>;
390				remote-endpoint = <&panel_in_edp>;
391			};
392		};
393	};
394};
395
396&edp_in_vopl {
397	status = "disabled";
398};
399
400&emmc_phy {
401	status = "okay";
402};
403
404&firmware_android {
405	compatible = "android,firmware";
406	fstab {
407		compatible = "android,fstab";
408		system {
409			compatible = "android,system";
410			dev = "/dev/block/by-name/system";
411			type = "ext4";
412			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
413			fsmgr_flags = "wait,verify";
414		};
415		vendor {
416			compatible = "android,vendor";
417			dev = "/dev/block/by-name/vendor";
418			type = "ext4";
419			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
420			fsmgr_flags = "wait,verify";
421		};
422	};
423};
424
425&gpu {
426	status = "okay";
427	mali-supply = <&vdd_gpu>;
428};
429
430&hdmi {
431	status = "disabled";
432};
433
434&cdn_dp {
435	status = "okay";
436	extcon = <&fusb0>, <&fusb1>;
437};
438
439&dp_in_vopb {
440	status = "disabled";
441};
442
443&i2s0 {
444	status = "okay";
445	rockchip,i2s-broken-burst-len;
446	rockchip,playback-channels = <8>;
447	rockchip,capture-channels = <8>;
448	rockchip,bclk-fs = <32>;
449	#sound-dai-cells = <0>;
450};
451
452&i2s1 {
453	status = "okay";
454	rockchip,i2s-broken-burst-len;
455	rockchip,playback-channels = <2>;
456	rockchip,capture-channels = <2>;
457	#sound-dai-cells = <0>;
458};
459
460&i2s2 {
461	status = "okay";
462	#sound-dai-cells = <0>;
463};
464
465&i2c0 {
466	status = "okay";
467	i2c-scl-rising-time-ns = <180>;
468	i2c-scl-falling-time-ns = <30>;
469	clock-frequency = <400000>;
470
471	vdd_cpu_b: syr837@40 {
472		compatible = "silergy,syr827";
473		reg = <0x40>;
474		vin-supply = <&vcc_sys>;
475		regulator-compatible = "fan53555-reg";
476		pinctrl-0 = <&vsel1_gpio>;
477		vsel-gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
478		regulator-name = "vdd_cpu_b";
479		regulator-min-microvolt = <712500>;
480		regulator-max-microvolt = <1500000>;
481		regulator-ramp-delay = <1000>;
482		fcs,suspend-voltage-selector = <1>;
483		regulator-always-on;
484		regulator-initial-state = <3>;
485		regulator-state-mem {
486			regulator-off-in-suspend;
487		};
488	};
489
490	vdd_gpu: syr828@41 {
491		compatible = "silergy,syr828";
492		status = "okay";
493		reg = <0x41>;
494		vin-supply = <&vcc_sys>;
495		regulator-compatible = "fan53555-reg";
496		pinctrl-0 = <&vsel2_gpio>;
497		vsel-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
498		regulator-name = "vdd_gpu";
499		regulator-min-microvolt = <735000>;
500		regulator-max-microvolt = <1400000>;
501		regulator-ramp-delay = <1000>;
502		fcs,suspend-voltage-selector = <1>;
503		regulator-always-on;
504		regulator-boot-on;
505		regulator-state-mem {
506			regulator-off-in-suspend;
507		};
508	};
509
510	rk808: pmic@1b {
511		compatible = "rockchip,rk808";
512		reg = <0x1b>;
513		interrupt-parent = <&gpio1>;
514		interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
515		pinctrl-0 = <&pmic_int_l>;
516		rockchip,system-power-controller;
517		wakeup-source;
518		#clock-cells = <1>;
519		clock-output-names = "rk808-clkout1", "rk808-clkout2";
520
521		vcc1-supply = <&vcc3v3_sys>;
522		vcc2-supply = <&vcc3v3_sys>;
523		vcc3-supply = <&vcc3v3_sys>;
524		vcc4-supply = <&vcc3v3_sys>;
525		vcc6-supply = <&vcc3v3_sys>;
526		vcc7-supply = <&vcc3v3_sys>;
527		vcc8-supply = <&vcc3v3_sys>;
528		vcc9-supply = <&vcc3v3_sys>;
529		vcc10-supply = <&vcc3v3_sys>;
530		vcc11-supply = <&vcc3v3_sys>;
531		vcc12-supply = <&vcc3v3_sys>;
532		vddio-supply = <&vcc1v8_pmu>;
533
534		regulators {
535			vdd_center: DCDC_REG1 {
536				regulator-always-on;
537				regulator-boot-on;
538				regulator-min-microvolt = <750000>;
539				regulator-max-microvolt = <1350000>;
540				regulator-ramp-delay = <6001>;
541				regulator-name = "vdd_center";
542				regulator-state-mem {
543					regulator-off-in-suspend;
544				};
545			};
546
547			vdd_cpu_l: DCDC_REG2 {
548				regulator-always-on;
549				regulator-boot-on;
550				regulator-min-microvolt = <750000>;
551				regulator-max-microvolt = <1350000>;
552				regulator-ramp-delay = <6001>;
553				regulator-name = "vdd_cpu_l";
554				regulator-state-mem {
555					regulator-off-in-suspend;
556				};
557			};
558
559			vcc_ddr: DCDC_REG3 {
560				regulator-always-on;
561				regulator-boot-on;
562				regulator-name = "vcc_ddr";
563				regulator-state-mem {
564					regulator-on-in-suspend;
565				};
566			};
567
568			vcc_1v8: DCDC_REG4 {
569				regulator-always-on;
570				regulator-boot-on;
571				regulator-min-microvolt = <1800000>;
572				regulator-max-microvolt = <1800000>;
573				regulator-name = "vcc_1v8";
574				regulator-state-mem {
575					regulator-on-in-suspend;
576					regulator-suspend-microvolt = <1800000>;
577				};
578			};
579
580			vcc1v8_dvp: LDO_REG1 {
581				regulator-always-on;
582				regulator-boot-on;
583				regulator-min-microvolt = <1800000>;
584				regulator-max-microvolt = <1800000>;
585				regulator-name = "vcc1v8_dvp";
586				regulator-state-mem {
587					regulator-off-in-suspend;
588				};
589			};
590
591			vcc3v0_tp: LDO_REG2 {
592				regulator-always-on;
593				regulator-boot-on;
594				regulator-min-microvolt = <3000000>;
595				regulator-max-microvolt = <3000000>;
596				regulator-name = "vcc3v0_tp";
597				regulator-state-mem {
598					regulator-off-in-suspend;
599				};
600			};
601
602			vcc1v8_pmu: LDO_REG3 {
603				regulator-always-on;
604				regulator-boot-on;
605				regulator-min-microvolt = <1800000>;
606				regulator-max-microvolt = <1800000>;
607				regulator-name = "vcc1v8_pmu";
608				regulator-state-mem {
609					regulator-on-in-suspend;
610					regulator-suspend-microvolt = <1800000>;
611				};
612			};
613
614			vcc_sd: LDO_REG4 {
615				regulator-always-on;
616				regulator-boot-on;
617				regulator-min-microvolt = <1800000>;
618				regulator-max-microvolt = <3000000>;
619				regulator-name = "vcc_sd";
620				regulator-state-mem {
621					regulator-on-in-suspend;
622					regulator-suspend-microvolt = <3000000>;
623				};
624			};
625
626			vcca3v0_codec: LDO_REG5 {
627				regulator-always-on;
628				regulator-boot-on;
629				regulator-min-microvolt = <3000000>;
630				regulator-max-microvolt = <3000000>;
631				regulator-name = "vcca3v0_codec";
632				regulator-state-mem {
633					regulator-off-in-suspend;
634				};
635			};
636
637			vcc_1v5: LDO_REG6 {
638				regulator-always-on;
639				regulator-boot-on;
640				regulator-min-microvolt = <1500000>;
641				regulator-max-microvolt = <1500000>;
642				regulator-name = "vcc_1v5";
643				regulator-state-mem {
644					regulator-on-in-suspend;
645					regulator-suspend-microvolt = <1500000>;
646				};
647			};
648
649			vcca1v8_codec: LDO_REG7 {
650				regulator-always-on;
651				regulator-boot-on;
652				regulator-min-microvolt = <1800000>;
653				regulator-max-microvolt = <1800000>;
654				regulator-name = "vcca1v8_codec";
655				regulator-state-mem {
656					regulator-off-in-suspend;
657				};
658			};
659
660			vcc_3v0: LDO_REG8 {
661				regulator-always-on;
662				regulator-boot-on;
663				regulator-min-microvolt = <3000000>;
664				regulator-max-microvolt = <3000000>;
665				regulator-name = "vcc_3v0";
666				regulator-state-mem {
667					regulator-on-in-suspend;
668					regulator-suspend-microvolt = <3000000>;
669				};
670			};
671
672			vcc3v3_s3: SWITCH_REG1 {
673				regulator-always-on;
674				regulator-boot-on;
675				regulator-name = "vcc3v3_s3";
676				regulator-state-mem {
677					regulator-off-in-suspend;
678				};
679			};
680
681			vcc3v3_s0: SWITCH_REG2 {
682				regulator-always-on;
683				regulator-boot-on;
684				regulator-name = "vcc3v3_s0";
685				regulator-state-mem {
686					regulator-off-in-suspend;
687				};
688			};
689		};
690	};
691};
692
693&i2c1 {
694	status = "okay";
695	i2c-scl-rising-time-ns = <140>;
696	i2c-scl-falling-time-ns = <30>;
697
698	cx2072x:cx2072x@33 {
699		status = "okay";
700		#sound-dai-cells = <0>;
701		compatible = "cnxt,cx20723";
702		reg = <0x33>;
703		clocks = <&cru SCLK_I2S_8CH_OUT>;
704		clock-names = "mclk";
705		pinctrl-names = "default";
706		pinctrl-0 = <&i2s_8ch_mclk>;
707		spk-con-gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
708	};
709};
710
711&i2c3 {
712	status="okay";
713
714	hidkey@68 {
715		clock-frequency = <100000>;
716		compatible = "hid-over-i2c";
717		interrupt-parent = <&gpio0>;
718		interrupts = <RK_PB0 IRQ_TYPE_LEVEL_LOW>;
719		pinctrl-names = "default";
720		pinctrl-0 = <&hidkey_irq_gpio>;
721		reg = <0x68>;
722		hid-descr-addr = <0x0001>;
723		hid-support-wakeup;
724	};
725
726	ec_battery@76 {
727		compatible = "rockchip,ec-battery";
728		reg = <0x76>;
729		virtual_power = <0>;
730		monitor_sec = <5>;
731		ec-notify-gpios = <&gpio1 RK_PC4 GPIO_ACTIVE_HIGH>;
732	};
733};
734
735&i2c2 {
736	status = "okay";
737	i2c-scl-rising-time-ns = <345>;
738	i2c-scl-falling-time-ns = <11>;
739	clock-frequency = <400000>;
740
741	touchpad: touchpad@2c {
742		compatible = "hid-over-i2c";
743		interrupt-parent = <&gpio1>;
744		interrupts = <RK_PC2 IRQ_TYPE_LEVEL_LOW>;
745		pinctrl-names = "default";
746		pinctrl-0 = <&touchpad_irq_gpio>;
747		reg = <0x2c>;
748		hid-descr-addr = <0x002c>;
749	};
750};
751
752&i2c4 {
753	status = "okay";
754	clock-frequency = <100000>;
755	bq25700: bq25700@09 {//6a
756		compatible = "ti,bq25700";
757		reg = <0x09>;
758		extcon = <&fusb0>, <&fusb1>;
759
760		interrupt-parent = <&gpio1>;
761		interrupts = <23 IRQ_TYPE_LEVEL_LOW>;
762		pinctrl-names = "default";
763		pinctrl-0 = <&charger_ok>;
764		ti,charge-current = <2500000>;
765		ti,max-input-voltage = <20000000>;
766		ti,max-input-current = <6000000>;
767		ti,max-charge-voltage = <8750000>;
768		ti,input-current = <500000>;
769		ti,input-current-sdp = <500000>;
770		ti,input-current-dcp = <2000000>;
771		ti,input-current-cdp = <2000000>;
772		ti,minimum-sys-voltage = <7400000>;
773		ti,otg-voltage = <5000000>;
774		ti,otg-current = <500000>;
775		pd-charge-only = <1>;
776		typec0-enable-gpios = <&gpio1 RK_PA3 GPIO_ACTIVE_HIGH>;
777		typec1-enable-gpios = <&gpio1 RK_PA4 GPIO_ACTIVE_HIGH>;
778	};
779};
780
781&i2c6 {
782	status = "okay";
783	i2c-scl-rising-time-ns = <345>;
784	i2c-scl-falling-time-ns = <11>;
785	clock-frequency = <400000>;
786
787	fusb1: fusb30x@22 {
788		compatible = "fairchild,fusb302";
789		reg = <0x22>;
790		pinctrl-names = "default";
791		pinctrl-0 = <&fusb1_int>;
792		vbus-5v-gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
793		int-n-gpios = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
794		discharge-gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
795		charge-dev = <&bq25700>;
796		support-uboot-charge = <1>;
797		port-num = <1>;
798		status = "okay";
799	};
800};
801
802&i2c7 {
803	status = "okay";
804	i2c-scl-rising-time-ns = <345>;
805	i2c-scl-falling-time-ns = <11>;
806	clock-frequency = <400000>;
807
808	fusb0: fusb30x@22 {
809		compatible = "fairchild,fusb302";
810		reg = <0x22>;
811		pinctrl-names = "default";
812		pinctrl-0 = <&fusb0_int>;
813		vbus-5v-gpios = <&gpio4 RK_PD5 GPIO_ACTIVE_HIGH>;
814		int-n-gpios = <&gpio1 RK_PA2 GPIO_ACTIVE_HIGH>;
815		discharge-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
816		charge-dev = <&bq25700>;
817		support-uboot-charge = <1>;
818		port-num = <0>;
819		status = "okay";
820	};
821};
822
823&io_domains {
824	status = "okay";
825	bt656-supply = <&vcc_3v0>;
826	audio-supply = <&vcca1v8_codec>;
827	sdmmc-supply = <&vcc_sd>;
828	gpio1830-supply = <&vcc_3v0>;
829};
830
831&dsi {
832	status = "disabled";
833};
834
835&pcie_phy {
836	status = "okay";
837};
838
839&pcie0 {
840	ep-gpios = <&gpio3 7 GPIO_ACTIVE_HIGH>;
841	num-lanes = <4>;
842	pinctrl-names = "default";
843	pinctrl-0 = <&pcie_clkreqn_cpm>;
844	status = "okay";
845};
846
847&pmu_io_domains {
848	status = "okay";
849	pmu1830-supply = <&vcc_1v8>;
850};
851
852&pwm0 {
853	status = "okay";
854};
855
856&pwm2 {
857	status = "okay";
858	pinctrl-names = "active";
859	pinctrl-0 = <&pwm2_pin_pull_down>;
860};
861
862&route_edp {
863	status = "okay";
864	logo,mode = "center";
865};
866
867&saradc {
868	status = "okay";
869};
870
871&sdmmc {
872	clock-frequency = <50000000>;
873	clock-freq-min-max = <400000 150000000>;
874	no-sdio;
875	no-mmc;
876	bus-width = <4>;
877	cap-mmc-highspeed;
878	cap-sd-highspeed;
879	disable-wp;
880	num-slots = <1>;
881	//sd-uhs-sdr104;
882	vqmmc-supply = <&vcc_sd>;
883	pinctrl-names = "default";
884	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
885	status = "okay";
886};
887
888&sdio0 {
889	clock-frequency = <150000000>;
890	clock-freq-min-max = <200000 150000000>;
891	no-sd;
892	no-mmc;
893	bus-width = <4>;
894	disable-wp;
895	cap-sd-highspeed;
896	cap-sdio-irq;
897	keep-power-in-suspend;
898	mmc-pwrseq = <&sdio_pwrseq>;
899	non-removable;
900	num-slots = <1>;
901	pinctrl-names = "default";
902	pinctrl-0 = <&sdio0_bus4 &sdio0_cmd &sdio0_clk>;
903	sd-uhs-sdr104;
904	status = "okay";
905};
906
907&sdhci {
908	bus-width = <8>;
909	mmc-hs400-1_8v;
910	no-sdio;
911	no-sd;
912	non-removable;
913	keep-power-in-suspend;
914	mmc-hs400-enhanced-strobe;
915	status = "okay";
916};
917
918&spdif {
919	status = "okay";
920	#sound-dai-cells = <0>;
921};
922
923&spi1 {
924	status = "disabled";
925};
926
927&tcphy0 {
928	extcon = <&fusb0>;
929	status = "okay";
930};
931
932&tcphy1 {
933	extcon = <&fusb1>;
934	status = "okay";
935};
936
937&tsadc {
938	rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
939	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
940	status = "okay";
941};
942
943&u2phy0 {
944	status = "okay";
945	extcon = <&fusb0>;
946
947	u2phy0_otg: otg-port {
948		status = "okay";
949	};
950
951	u2phy0_host: host-port {
952		phy-supply = <&vcc5v0_host>;
953		status = "okay";
954	};
955};
956
957&u2phy1 {
958	status = "okay";
959	extcon = <&fusb1>;
960
961	u2phy1_otg: otg-port {
962		status = "okay";
963	};
964
965	u2phy1_host: host-port {
966		phy-supply = <&vcc5v0_host>;
967		status = "okay";
968	};
969};
970
971&uart0 {
972	pinctrl-names = "default";
973	pinctrl-0 = <&uart0_xfer &uart0_cts>;
974	status = "okay";
975};
976
977&uart2 {
978	status = "okay";
979};
980
981&usb_host0_ehci {
982	status = "okay";
983};
984
985&usb_host0_ohci {
986	status = "okay";
987};
988
989&usbdrd3_0 {
990	status = "okay";
991};
992
993&usbdrd_dwc3_0 {
994	status = "okay";
995	extcon = <&fusb0>;
996};
997
998&usb_host1_ehci {
999	status = "okay";
1000};
1001
1002&usb_host1_ohci {
1003	status = "okay";
1004};
1005
1006&usbdrd3_1 {
1007	status = "okay";
1008};
1009
1010&usbdrd_dwc3_1 {
1011	status = "okay";
1012	extcon = <&fusb1>;
1013};
1014
1015&rockchip_suspend {
1016	status = "okay";
1017	rockchip,sleep-debug-en = <1>;
1018	rockchip,sleep-mode-config = <
1019		(0
1020		| RKPM_SLP_ARMPD
1021		| RKPM_SLP_PERILPPD
1022		| RKPM_SLP_DDR_RET
1023		| RKPM_SLP_PLLPD
1024		| RKPM_SLP_CENTER_PD
1025		| RKPM_SLP_AP_PWROFF
1026		)
1027		>;
1028		rockchip,wakeup-config = <
1029		(0
1030		| RKPM_GPIO_WKUP_EN
1031		| RKPM_PWM_WKUP_EN
1032		)
1033		>;
1034		rockchip,pwm-regulator-config = <
1035		(0
1036		| PWM2_REGULATOR_EN
1037		)
1038		>;
1039		rockchip,power-ctrl =
1040		<&gpio1 17 GPIO_ACTIVE_HIGH>,
1041		<&gpio1 14 GPIO_ACTIVE_HIGH>;
1042};
1043
1044&pinctrl {
1045	sdio-pwrseq {
1046		wifi_enable_h: wifi-enable-h {
1047			rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
1048		};
1049	};
1050
1051	wireless-bluetooth {
1052		uart0_gpios: uart0-gpios {
1053			rockchip,pins = <2 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
1054		};
1055	};
1056
1057	pmic {
1058		pmic_int_l: pmic-int-l {
1059			rockchip,pins =
1060				<1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
1061		};
1062		vsel1_gpio: vsel1-gpio {
1063			rockchip,pins =
1064				<1 RK_PC1 RK_FUNC_GPIO &pcfg_pull_down>;
1065		};
1066		vsel2_gpio: vsel2-gpio {
1067			rockchip,pins =
1068				<1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
1069		};
1070	};
1071
1072	headphone {
1073		hp_det: hp-det {
1074			rockchip,pins = <4 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>;
1075		};
1076	};
1077
1078	hallsensor {
1079		mh248_irq_gpio: mh248-irq-gpio {
1080			rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
1081		};
1082	};
1083
1084	hidkey {
1085		hidkey_irq_gpio: hidkey-irq-gpio {
1086			rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
1087		};
1088	};
1089
1090	touchpad {
1091		touchpad_irq_gpio: touchpad-irq-gpio {
1092			rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_up>;
1093		};
1094	};
1095
1096	charger {
1097		charger_ok: charge-ok {
1098			rockchip,pins =
1099				<1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
1100		};
1101	};
1102
1103	gpio-leds {
1104		leds_gpio: leds-gpio {
1105			rockchip,pins =
1106				<1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>,
1107				<1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>,
1108				<3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
1109				<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>,
1110				<2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_up>,
1111				<2 RK_PD4 RK_FUNC_GPIO &pcfg_pull_up>,
1112				<4 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
1113		};
1114	};
1115
1116	usb2 {
1117		host_vbus_drv: host-vbus-drv {
1118			rockchip,pins =
1119				<4 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>;
1120		};
1121	};
1122
1123	usb_camera {
1124		usb_cam_on_gpio: usb-cam-on-gpio {
1125			rockchip,pins =
1126				<3 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>,
1127				<3 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
1128		};
1129	};
1130
1131	fusb30x {
1132		fusb0_int: fusb0-int {
1133			rockchip,pins =
1134				<1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>,
1135				<0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_up>;
1136		};
1137		fusb1_int: fusb1-int {
1138			rockchip,pins =
1139				<1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>,
1140				<0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_up>;
1141		};
1142	};
1143};
1144