xref: /OK3568_Linux_fs/kernel/scripts/dtc/include-prefixes/arm64/rockchip/rk3566-rk817-eink-w103.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2020 Rockchip Electronics Co., Ltd.
4 *
5 */
6
7/dts-v1/;
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/pinctrl/rockchip.h>
11#include <dt-bindings/input/rk-input.h>
12#include <dt-bindings/sensor-dev.h>
13#include <dt-bindings/display/drm_mipi_dsi.h>
14#include "rk3566.dtsi"
15#include "rk3568-android.dtsi"
16#include "rk3566-eink.dtsi"
17
18/ {
19	model = "Rockchip RK3566 RK817 EINK LP4X Board";
20	compatible = "rockchip,rk3566-rk817-eink", "rockchip,rk3566";
21
22	charge-animation {
23		compatible = "rockchip,uboot-charge";
24		rockchip,uboot-charge-on = <1>;
25		rockchip,android-charge-on = <0>;
26		rockchip,uboot-low-power-voltage = <3350>;
27		rockchip,screen-on-voltage = <3400>;
28		rockchip,auto-wakeup-interval = <60>;
29		status = "okay";
30	};
31
32	adc_keys: adc-keys {
33		status = "okay";
34		compatible = "adc-keys";
35		io-channels = <&saradc 0>;
36		io-channel-names = "buttons";
37		keyup-threshold-microvolt = <1800000>;
38		poll-interval = <100>;
39
40		vol-up-key {
41			label = "volume up";
42			linux,code = <KEY_VOLUMEUP>;
43			press-threshold-microvolt = <9000>;
44		};
45
46		vol-down-key {
47			label = "volume down";
48			linux,code = <KEY_VOLUMEDOWN>;
49			press-threshold-microvolt = <235000>;
50		};
51	};
52
53	backlight: backlight {
54		compatible = "pwm-backlight";
55		pwms = <&pwm0 0 25000 0>;
56		brightness-levels = <
57			  0  20  20  21  21  22  22  23
58			 23  24  24  25  25  26  26  27
59			 27  28  28  29  29  30  30  31
60			 31  32  32  33  33  34  34  35
61			 35  36  36  37  37  38  38  39
62			 40  41  42  43  44  45  46  47
63			 48  49  50  51  52  53  54  55
64			 56  57  58  59  60  61  62  63
65			 64  65  66  67  68  69  70  71
66			 72  73  74  75  76  77  78  79
67			 80  81  82  83  84  85  86  87
68			 88  89  90  91  92  93  94  95
69			 96  97  98  99 100 101 102 103
70			104 105 106 107 108 109 110 111
71			112 113 114 115 116 117 118 119
72			120 121 122 123 124 125 126 127
73			128 129 130 131 132 133 134 135
74			136 137 138 139 140 141 142 143
75			144 145 146 147 148 149 150 151
76			152 153 154 155 156 157 158 159
77			160 161 162 163 164 165 166 167
78			168 169 170 171 172 173 174 175
79			176 177 178 179 180 181 182 183
80			184 185 186 187 188 189 190 191
81			192 193 194 195 196 197 198 199
82			200 201 202 203 204 205 206 207
83			208 209 210 211 212 213 214 215
84			216 217 218 219 220 221 222 223
85			224 225 226 227 228 229 230 231
86			232 233 234 235 236 237 238 239
87			240 241 242 243 244 245 246 247
88			248 249 250 251 252 253 254 255
89		>;
90		default-brightness-level = <200>;
91	};
92
93	gpio_keys: gpio-keys {
94		status = "disabled";
95		compatible = "gpio-keys";
96		autorepeat;
97
98		BACK {
99			label = "GPIO Key Home";
100			debounce-interval = <10>;
101			interrupt-parent = <&gpio0>;
102			interrupts = <13 IRQ_TYPE_LEVEL_LOW>;
103			linux,input-type = <EV_KEY>;
104			linux,code = <KEY_BACK>;
105		};
106	};
107
108	hdmi_sound: hdmi-sound {
109		compatible = "simple-audio-card";
110		simple-audio-card,format = "i2s";
111		simple-audio-card,mclk-fs = <128>;
112		simple-audio-card,name = "rockchip,hdmi";
113		status = "disabled";
114
115		simple-audio-card,cpu {
116				sound-dai = <&i2s0_8ch>;
117		};
118		simple-audio-card,codec {
119				sound-dai = <&hdmi>;
120		};
121	};
122
123	leds: gpio-leds {
124		compatible = "gpio-leds";
125
126		led@2 {
127			gpios = <&gpio3 RK_PC5 GPIO_ACTIVE_HIGH>;
128			linux,default-trigger = "battery-charging";
129			label = "battery_charging";
130			retain-state-suspended;
131		};
132	};
133
134	hall_sensor: hall-mh248 {
135		compatible = "hall-mh248";
136		irq-gpio = <&gpio0 RK_PC7 IRQ_TYPE_EDGE_BOTH>;
137		hall-active = <1>;
138		status = "okay";
139	};
140
141	vccsys: vccsys {
142		compatible = "regulator-fixed";
143		regulator-name = "vcc3v8_sys";
144		regulator-always-on;
145		regulator-boot-on;
146		regulator-min-microvolt = <3800000>;
147		regulator-max-microvolt = <3800000>;
148	};
149
150	vcc_tp: vcc-tp-regulator {
151		compatible = "regulator-fixed";
152		enable-active-high;
153		gpio = <&gpio0 RK_PD6 GPIO_ACTIVE_HIGH>;
154		pinctrl-names = "default";
155		pinctrl-0 = <&vcc_tp_en>;
156		regulator-name = "vcc_tp";
157		regulator-boot-on;
158		startup-delay-us = <10000>;
159		regulator-min-microvolt = <3300000>;
160		regulator-max-microvolt = <3300000>;
161	};
162
163	rk817-sound {
164		compatible = "simple-audio-card";
165		simple-audio-card,format = "i2s";
166		simple-audio-card,name = "rockchip,rk817-codec";
167		simple-audio-card,mclk-fs = <256>;
168
169		simple-audio-card,cpu {
170			sound-dai = <&i2s1_8ch>;
171		};
172		simple-audio-card,codec {
173			sound-dai = <&rk817_codec>;
174		};
175	};
176
177	sdio_pwrseq: sdio-pwrseq {
178		compatible = "mmc-pwrseq-simple";
179		clocks = <&rk817 1>;
180		clock-names = "ext_clock";
181		pinctrl-names = "default";
182		pinctrl-0 = <&wifi_enable_h>;
183
184		/*
185		 * On the module itself this is one of these (depending
186		 * on the actual card populated):
187		 * - SDIO_RESET_L_WL_REG_ON
188		 * - PDN (power down when low)
189		 */
190		post-power-on-delay-ms = <200>;
191		reset-gpios = <&gpio0 RK_PC6 GPIO_ACTIVE_LOW>;
192	};
193
194	wireless-wlan {
195		compatible = "wlan-platdata";
196		rockchip,grf = <&grf>;
197		wifi_chip_type = "ap6255";
198		pinctrl-names = "default";
199		pinctrl-0 = <&wifi_vbat &wifi_host_wake_irq>;
200		WIFI,vbat_gpio = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
201		WIFI,host_wake_irq = <&gpio0 RK_PC5 GPIO_ACTIVE_HIGH>;
202		status = "okay";
203	};
204
205	wireless-bluetooth {
206		compatible = "bluetooth-platdata";
207		clocks = <&rk817 1>;
208		clock-names = "ext_clock";
209		wifi-bt-power-toggle;
210		uart_rts_gpios = <&gpio2 RK_PB5 GPIO_ACTIVE_LOW>;
211		pinctrl-names = "default", "rts_gpio";
212		pinctrl-0 = <&uart1m0_rtsn>,
213			    <&bt_reset_gpio>,
214			    <&bt_wake_gpio>,
215			    <&bt_irq_gpio>;
216		pinctrl-1 = <&uart1_gpios>;
217		BT,reset_gpio    = <&gpio0 RK_PC4 GPIO_ACTIVE_HIGH>;
218		BT,wake_gpio     = <&gpio0 RK_PC2 GPIO_ACTIVE_HIGH>;
219		BT,wake_host_irq = <&gpio0 RK_PC3 GPIO_ACTIVE_HIGH>;
220		status = "okay";
221	};
222};
223
224&ebc {
225	/* clock rate 1000M/n, (n=1~32) */
226	assigned-clocks = <&cru CPLL_333M>, <&cru DCLK_EBC>;
227	//assigned-clock-rates = <340000000>, <340000000>;
228	assigned-clock-rates = <250000000>, <250000000>;
229	status = "okay";
230};
231
232&ebc_dev {
233	pmic = <&tps65185>;
234	status = "okay";
235#if 0
236	/* ED097TC2U1 */
237	panel,width = <1200>;
238	panel,height = <825>;
239	panel,vir_width = <1200>;
240	panel,vir_height = <825>;
241	panel,sdck = <25000000>;
242	panel,lsl = <4>;
243	panel,lbl = <4>;
244	panel,ldl = <300>;
245	panel,lel = <36>;
246	panel,gdck-sta = <18>;
247	panel,lgonl = <265>;
248	panel,fsl = <2>;
249	panel,fbl = <4>;
250	panel,fdl = <825>;
251	panel,fel = <24>;
252	panel,mirror = <0>;
253	panel,panel_16bit = <0>;
254	panel,panel_color = <0>;
255	panel,width-mm = <203>;
256	panel,height-mm = <140>;
257#endif
258#if 1
259	/* ES103TC1 */
260	panel,width = <1872>;
261	panel,height = <1404>;
262	panel,vir_width = <1872>;
263	panel,vir_height = <1404>;
264	panel,sdck = <33300000>;
265	panel,lsl = <18>;
266	panel,lbl = <17>;
267	panel,ldl = <234>;
268	panel,lel = <7>;
269	panel,gdck-sta = <34>;
270	panel,lgonl = <192>;
271	panel,fsl = <1>;
272	panel,fbl = <4>;
273	panel,fdl = <1404>;
274	panel,fel = <12>;
275	panel,mirror = <0>;
276	panel,panel_16bit = <1>;
277	panel,panel_color = <0>;
278	panel,width-mm = <157>;
279	panel,height-mm = <210>;
280#endif
281#if 0
282	/* ES133TC1 */
283	panel,width = <2200>;
284	panel,height = <1650>;
285	panel,vir_width = <2208>;
286	panel,vir_height = <1650>;
287	panel,sdck = <37500000>;
288	panel,lsl = <4>;
289	panel,lbl = <8>;
290	panel,ldl = <275>;
291	panel,lel = <14>;
292	panel,gdck-sta = <34>;
293	panel,lgonl = <217>;
294	panel,fsl = <1>;
295	panel,fbl = <4>;
296	panel,fdl = <1650>;
297	panel,fel = <6>;
298	panel,mirror = <0>;
299	panel,panel_16bit = <1>;
300	panel,panel_color = <0>;
301	panel,width-mm = <157>;
302	panel,height-mm = <210>;
303#endif
304};
305
306&cpu0 {
307	cpu-supply = <&vdd_cpu>;
308};
309
310&csi2_dphy_hw {
311	status = "okay";
312};
313
314&csi2_dphy0 {
315	status = "okay";
316
317	ports {
318		#address-cells = <1>;
319		#size-cells = <0>;
320		port@0 {
321			reg = <0>;
322			#address-cells = <1>;
323			#size-cells = <0>;
324
325			mipi_in_ucam0: endpoint@0 {
326				reg = <0>;
327				/*remote-endpoint = <&ov5648_out>;*/
328				data-lanes = <1 2>;
329			};
330		};
331		port@1 {
332			reg = <1>;
333			#address-cells = <1>;
334			#size-cells = <0>;
335
336			csidphy0_out: endpoint@0 {
337				reg = <0>;
338				remote-endpoint = <&isp0_in>;
339			};
340		};
341	};
342};
343
344&gpu {
345	mali-supply = <&vdd_gpu>;
346	status = "okay";
347};
348
349&hdmi {
350	status = "disabled";
351};
352
353&hdmi_in_vp0 {
354	status = "disabled";
355};
356
357&hdmi_in_vp1 {
358	status = "disabled";
359};
360
361&hdmi_sound {
362	status = "disabled";
363};
364
365&i2c0 {
366	status = "okay";
367
368	vdd_cpu: tcs4525@1c {
369		compatible = "tcs,tcs4525";
370		reg = <0x1c>;
371		vin-supply = <&vccsys>;
372		regulator-compatible = "fan53555-reg";
373		regulator-name = "vdd_cpu";
374		regulator-min-microvolt = <712500>;
375		regulator-max-microvolt = <1390000>;
376		regulator-init-microvolt = <900000>;
377		regulator-ramp-delay = <2300>;
378		fcs,suspend-voltage-selector = <0>;
379		regulator-initial-mode = <0x2>;
380		regulator-boot-on;
381		regulator-always-on;
382		regulator-state-mem {
383			regulator-on-in-suspend;
384			regulator-suspend-microvolt = <1100000>;
385			regulator-changeable-in-suspend;
386		};
387	};
388
389	rk817: pmic@20 {
390		compatible = "rockchip,rk817";
391		reg = <0x20>;
392		interrupt-parent = <&gpio0>;
393		interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
394
395		pinctrl-names = "default";
396//		pinctrl-names = "default", "pmic-sleep",
397//				"pmic-power-off", "pmic-reset";
398		pinctrl-0 = <&pmic_int>;
399//		pinctrl-1 = <&soc_slppin_slp>, <&rk817_slppin_slp>;
400//		pinctrl-2 = <&soc_slppin_gpio>, <&rk817_slppin_pwrdn>;
401//		pinctrl-3 = <&soc_slppin_gpio>, <&rk817_slppin_rst>;
402		rockchip,system-power-controller;
403		wakeup-source;
404		#clock-cells = <1>;
405		clock-output-names = "rk808-clkout1", "rk808-clkout2";
406		//fb-inner-reg-idxs = <2>;
407		/* 1: rst regs (default in codes), 0: rst the pmic */
408		pmic-reset-func = <0>;
409		/* not save the PMIC_POWER_EN register in uboot */
410		not-save-power-en = <1>;
411		vcc1-supply = <&vccsys>;
412		vcc2-supply = <&vccsys>;
413		vcc3-supply = <&vccsys>;
414		vcc4-supply = <&vccsys>;
415		vcc5-supply = <&vccsys>;
416		vcc6-supply = <&vccsys>;
417		vcc7-supply = <&vccsys>;
418		vcc8-supply = <&vccsys>;
419		vcc9-supply = <&dcdc_boost>;
420
421		pwrkey {
422			status = "okay";
423		};
424
425		pinctrl_rk8xx: pinctrl_rk8xx {
426			gpio-controller;
427			#gpio-cells = <2>;
428
429			rk817_slppin_null: rk817_slppin_null {
430				pins = "gpio_slp";
431				function = "pin_fun0";
432			};
433
434			rk817_slppin_slp: rk817_slppin_slp {
435				pins = "gpio_slp";
436				function = "pin_fun1";
437			};
438
439			rk817_slppin_pwrdn: rk817_slppin_pwrdn {
440				pins = "gpio_slp";
441				function = "pin_fun2";
442			};
443
444			rk817_slppin_rst: rk817_slppin_rst {
445				pins = "gpio_slp";
446				function = "pin_fun3";
447			};
448		};
449
450		regulators {
451			vdd_logic: DCDC_REG1 {
452				regulator-always-on;
453				regulator-boot-on;
454				regulator-min-microvolt = <500000>;
455				regulator-max-microvolt = <1350000>;
456				regulator-init-microvolt = <900000>;
457				regulator-ramp-delay = <6001>;
458				regulator-initial-mode = <0x2>;
459				regulator-name = "vdd_logic";
460				regulator-state-mem {
461					regulator-off-in-suspend;
462					regulator-suspend-microvolt = <900000>;
463					regulator-changeable-in-suspend;
464				};
465			};
466
467			vdd_gpu: DCDC_REG2 {
468				regulator-always-on;
469				regulator-boot-on;
470				regulator-min-microvolt = <500000>;
471				regulator-max-microvolt = <1350000>;
472				regulator-init-microvolt = <900000>;
473				regulator-ramp-delay = <6001>;
474				regulator-initial-mode = <0x2>;
475				regulator-name = "vdd_gpu";
476					regulator-state-mem {
477					regulator-off-in-suspend;
478					regulator-changeable-in-suspend;
479				};
480			};
481
482			vcc_ddr: DCDC_REG3 {
483				regulator-always-on;
484				regulator-boot-on;
485				regulator-initial-mode = <0x2>;
486				regulator-name = "vcc_ddr";
487				regulator-state-mem {
488					regulator-on-in-suspend;
489				};
490			};
491
492			vcc_3v3: DCDC_REG4 {
493				regulator-always-on;
494				regulator-boot-on;
495				regulator-min-microvolt = <3300000>;
496				regulator-max-microvolt = <3300000>;
497				regulator-initial-mode = <0x2>;
498				regulator-name = "vcc_3v3";
499				regulator-state-mem {
500					regulator-off-in-suspend;
501					regulator-changeable-in-suspend;
502				};
503			};
504
505			vcca1v8_pmu: LDO_REG1 {
506				regulator-always-on;
507				regulator-boot-on;
508				regulator-min-microvolt = <1800000>;
509				regulator-max-microvolt = <1800000>;
510				regulator-name = "vcca1v8_pmu";
511				regulator-state-mem {
512					regulator-on-in-suspend;
513					regulator-suspend-microvolt = <1800000>;
514					regulator-changeable-in-suspend;
515				};
516			};
517
518			vdda_0v9: LDO_REG2 {
519				regulator-always-on;
520				regulator-boot-on;
521				regulator-min-microvolt = <900000>;
522				regulator-max-microvolt = <900000>;
523				regulator-name = "vdda_0v9";
524				regulator-state-mem {
525					regulator-off-in-suspend;
526					regulator-changeable-in-suspend;
527				};
528			};
529
530			vdda0v9_pmu: LDO_REG3 {
531				regulator-always-on;
532				regulator-boot-on;
533				regulator-min-microvolt = <900000>;
534				regulator-max-microvolt = <900000>;
535				regulator-name = "vdda0v9_pmu";
536				regulator-state-mem {
537					regulator-on-in-suspend;
538					regulator-suspend-microvolt = <900000>;
539					regulator-changeable-in-suspend;
540				};
541			};
542
543			vccio_acodec: LDO_REG4 {
544				regulator-always-on;
545				regulator-boot-on;
546				regulator-min-microvolt = <3300000>;
547				regulator-max-microvolt = <3300000>;
548				regulator-name = "vccio_acodec";
549				regulator-state-mem {
550					regulator-off-in-suspend;
551					regulator-changeable-in-suspend;
552				};
553			};
554
555			vccio_sd: LDO_REG5 {
556				regulator-min-microvolt = <1800000>;
557				regulator-max-microvolt = <3300000>;
558				regulator-name = "vccio_sd";
559				regulator-state-mem {
560					regulator-off-in-suspend;
561					regulator-changeable-in-suspend;
562				};
563			};
564
565			vcc3v3_pmu: LDO_REG6 {
566				regulator-always-on;
567				regulator-boot-on;
568				regulator-min-microvolt = <3300000>;
569				regulator-max-microvolt = <3300000>;
570				regulator-name = "vcc3v3_pmu";
571				regulator-state-mem {
572					regulator-on-in-suspend;
573					regulator-suspend-microvolt = <3000000>;
574					regulator-changeable-in-suspend;
575				};
576			};
577
578			vcc_1v8: LDO_REG7 {
579				regulator-always-on;
580				regulator-boot-on;
581				regulator-min-microvolt = <1800000>;
582				regulator-max-microvolt = <1800000>;
583				regulator-name = "vcc_1v8";
584				regulator-state-mem {
585					regulator-off-in-suspend;
586					regulator-changeable-in-suspend;
587				};
588			};
589
590			vcc1v8_dvp: LDO_REG8 {
591				regulator-min-microvolt = <1800000>;
592				regulator-max-microvolt = <1800000>;
593				regulator-name = "vcc1v8_dvp";
594				regulator-state-mem {
595					regulator-off-in-suspend;
596					regulator-changeable-in-suspend;
597				};
598			};
599
600			sleep_sta_ctl: LDO_REG9 {
601				regulator-name = "sleep_sta_ctl";
602				regulator-state-mem {
603					regulator-on-in-suspend;
604					regulator-suspend-microvolt = <3300000>;
605					regulator-changeable-in-suspend;
606				};
607			};
608
609			dcdc_boost: BOOST {
610				regulator-always-on;
611				regulator-boot-on;
612				regulator-min-microvolt = <4700000>;
613				regulator-max-microvolt = <5400000>;
614				regulator-name = "boost";
615				regulator-state-mem {
616					regulator-off-in-suspend;
617					regulator-changeable-in-suspend;
618				};
619			};
620
621			otg_switch: OTG_SWITCH {
622				regulator-name = "otg_switch";
623				regulator-state-mem {
624					regulator-off-in-suspend;
625					regulator-changeable-in-suspend;
626				};
627			};
628		};
629
630		battery {
631			compatible = "rk817,battery";
632			ocv_table = <3400 3513 3578 3687 3734 3752 3763
633				     3766 3771 3784 3804 3836 3885 3925
634				     3962 4005 4063 4114 4169 4227 4303>;
635			design_capacity = <4150>;
636			design_qmax = <4565>;
637			bat_res = <100>;
638			sleep_enter_current = <150>;
639			sleep_exit_current = <180>;
640			sleep_filter_current = <100>;
641			power_off_thresd = <3450>;
642			zero_algorithm_vol = <3850>;
643			max_soc_offset = <60>;
644			monitor_sec = <5>;
645			sample_res = <10>;
646			virtual_power = <0>;
647			low_power_sleep = <1>;
648		};
649
650		charger {
651			compatible = "rk817,charger";
652			min_input_voltage = <4500>;
653			max_input_current = <1500>;
654			max_chrg_current = <2000>;
655			max_chrg_voltage = <4300>;
656			chrg_term_mode = <0>;
657			chrg_finish_cur = <300>;
658			virtual_power = <0>;
659			dc_det_adc = <0>;
660			extcon = <&usb2phy0>;
661			gate_function_disable = <1>;
662		};
663
664		rk817_codec: codec {
665			#sound-dai-cells = <0>;
666			compatible = "rockchip,rk817-codec";
667			clocks = <&cru I2S1_MCLKOUT>;
668			clock-names = "mclk";
669			assigned-clocks = <&cru I2S1_MCLKOUT>, <&cru I2S1_MCLK_TX_IOE>;
670			assigned-clock-rates = <12288000>;
671			assigned-clock-parents = <&cru I2S1_MCLKOUT_TX>, <&cru I2S1_MCLKOUT_TX>;
672			pinctrl-names = "default";
673			pinctrl-0 = <&i2s1m0_mclk>;
674			hp-volume = <20>;
675			spk-volume = <3>;
676			out-l2spk-r2hp;
677			spk-ctl-gpios = <&gpio1 RK_PB1 GPIO_ACTIVE_HIGH>;
678			status = "okay";
679		};
680	};
681};
682
683&i2c1 {
684	status = "okay";
685
686	wacom: wacom@9 {
687		compatible = "wacom,w9013";
688		reg = <0x09>;
689		pwr-supply = <&vcc_tp>;
690		pinctrl-names = "default";
691		pinctrl-0 = <&wacom_gpio>;
692		gpio_detect = <&gpio0 RK_PC0 GPIO_ACTIVE_HIGH>;
693		gpio_intr = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
694		gpio_rst = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
695		revert_x = <0>;
696		revert_y = <0>;
697		xy_exchange = <0>;
698	};
699};
700
701&i2c3 {
702	status = "okay";
703	pinctrl-names = "default";
704	pinctrl-0 = <&i2c3m1_xfer>;
705
706	tps65185: tps65185@68 {
707		status = "okay";
708		compatible = "ti,tps65185";
709		reg = <0x68>;
710		pinctrl-names = "default";
711		pinctrl-0 = <&tps65185_gpio>;
712		wakeup-gpios = <&gpio3 RK_PA5 GPIO_ACTIVE_HIGH>;
713		vcomctl-gpios = <&gpio4 RK_PB2 GPIO_ACTIVE_HIGH>;
714		int-gpios = <&gpio3 RK_PA6 GPIO_ACTIVE_HIGH>;
715		powerup-gpios = <&gpio3 RK_PB0 GPIO_ACTIVE_HIGH>;
716		poweren-gpios = <&gpio3 RK_PB1 GPIO_ACTIVE_HIGH>;
717	};
718};
719
720&i2c4 {
721	//camera
722};
723
724&i2c5 {
725	status = "okay";
726
727	sensor@4c {
728		status = "okay";
729		compatible = "gs_mma7660";
730		reg = <0x4c>;
731		type = <SENSOR_TYPE_ACCEL>;
732		irq_enable = <0>;
733		poll_delay_ms = <30>;
734		layout = <6>;
735		reprobe_en = <1>;
736	};
737
738	tsc@24 {
739		status = "okay";
740		compatible = "cy,cyttsp5_i2c_adapter";
741		reg = <0x24>;
742		cy,adapter_id = "cyttsp5_i2c_adapter";
743		pinctrl-names = "default";
744		pinctrl-0 = <&tsc_gpio>;
745		cytp-supply = <&vcc_tp>;
746		cy,core {
747			cy,name = "cyttsp5_core";
748			cy,irq_gpio =  <&gpio0 RK_PA6 GPIO_ACTIVE_HIGH>;
749			cy,rst_gpio =  <&gpio0 RK_PA5 GPIO_ACTIVE_HIGH>;
750			cy,hid_desc_register = <1>;
751			/* CY_CORE_FLAG_RESTORE_PARAMETERS */
752			cy,flags = <6>;
753			/* CY_CORE_EWG_NONE */
754			cy,easy_wakeup_gesture = <0>;
755			cy,btn_keys = <172 /* KEY_HOMEPAGE */
756						/* previously was KEY_HOME, new Android versions use KEY_HOMEPAGE */
757						139 /* KEY_MENU */
758						158 /* KEY_BACK */
759						217 /* KEY_SEARCH */
760						114 /* KEY_VOLUMEDOWN */
761						115 /* KEY_VOLUMEUP */
762						212 /* KEY_CAMERA */
763						116>; /* KEY_POWER */
764			cy,btn_keys-tag = <0>;
765			cy,mt {
766				cy,name = "cyttsp5_mt";
767				cy,inp_dev_name = "cyttsp5_mt";
768				cy,flags = <0xA8>;
769				cy,abs =
770					/* ABS_MT_POSITION_X, CY_ABS_MIN_X, CY_ABS_MAX_X, 0, 0 */
771					<0x35 0 1404 0 0
772					/* ABS_MT_POSITION_Y, CY_ABS_MIN_Y, CY_ABS_MAX_Y, 0, 0 */
773					0x36 0 1872 0 0
774					/* ABS_MT_PRESSURE, CY_ABS_MIN_P, CY_ABS_MAX_P, 0, 0 */
775					0x3a 0 255 0 0
776					/* CY_IGNORE_VALUE, CY_ABS_MIN_W, CY_ABS_MAX_W, 0, 0 */
777					0xffff 0 255 0 0
778					/* ABS_MT_TRACKING_ID, CY_ABS_MIN_T, CY_ABS_MAX_T, 0, 0 */
779					0x39 0 15 0 0
780					/* ABS_MT_TOUCH_MAJOR, 0, 255, 0, 0 */
781					0x30 0 255 0 0
782					/* ABS_MT_TOUCH_MINOR, 0, 255, 0, 0 */
783					0x31 0 255 0 0
784					/* ABS_MT_ORIENTATION, -127, 127, 0, 0 */
785					0x34 0xffffff81 127 0 0
786					/* ABS_MT_TOOL_TYPE, 0, MT_TOOL_MAX, 0, 0 */
787					0x37 0 1 0 0
788					/* ABS_DISTANCE, 0, 255, 0, 0 */
789					0x19 0 255 0 0>;
790
791					cy,vkeys_x = <1404>;
792					cy,vkeys_y = <1872>;
793					cy,revert_x = <0>;
794					cy,revert_y = <0>;
795					cy,xy_exchange = <0>;
796
797					cy,virtual_keys =
798						/* KeyCode CenterX CenterY Width Height */
799						/* KEY_BACK */
800						<158 1360 90 160 180
801						/* KEY_MENU */
802						139 1360 270 160 180
803						/* KEY_HOMEPAGE */
804						172 1360 450 160 180
805						/* KEY SEARCH */
806						217 1360 630 160 180>;
807			};
808
809			cy,btn {
810				cy,name = "cyttsp5_btn";
811				cy,inp_dev_name = "cyttsp5_btn";
812			};
813
814			cy,proximity {
815				cy,name = "cyttsp5_proximity";
816				cy,inp_dev_name = "cyttsp5_proximity";
817				cy,abs =
818			/* ABS_DISTANCE, CY_PROXIMITY_MIN_VAL, CY_PROXIMITY_MAX_VAL, 0, 0 */
819					<0x19 0 1 0 0>;
820			};
821		};
822	};
823};
824
825&i2s0_8ch {
826	status = "disabled";
827};
828
829&i2s1_8ch {
830	status = "okay";
831	rockchip,clk-trcm = <1>;
832	pinctrl-names = "default";
833	pinctrl-0 = <&i2s1m0_sclktx
834		     &i2s1m0_lrcktx
835		     &i2s1m0_sdi0
836		     &i2s1m0_sdo0>;
837};
838
839&jpegd {
840	status = "okay";
841};
842
843&jpegd_mmu {
844	status = "okay";
845};
846
847&video_phy0 {
848	status = "disabled";
849};
850
851&mpp_srv {
852	status = "okay";
853};
854
855&nandc0 {
856	status = "disabled";
857};
858
859&pinctrl {
860	wacom {
861		wacom_gpio: wacom-gpio {
862			rockchip,pins =
863					<0 RK_PC0 RK_FUNC_GPIO &pcfg_pull_up>,
864					<0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_up>,
865					<0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_up>;
866		};
867	};
868
869	tsc {
870		tsc_gpio: tsc-gpio {
871			rockchip,pins =
872					<0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>, //touch q gpio
873					<0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
874					<0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
875		};
876	};
877
878	tps_pmic {
879		tps65185_gpio: tps65185-gpio {
880			rockchip,pins =
881					<4 RK_PB2 RK_FUNC_GPIO &pcfg_pull_up>,
882					<3 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>,
883					<3 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>,
884					<3 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>,
885					<3 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
886		};
887	};
888
889	pmic {
890		pmic_int: pmic_int {
891			rockchip,pins =
892				<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
893		};
894
895		soc_slppin_gpio: soc_slppin_gpio {
896			rockchip,pins =
897				<0 RK_PA2 RK_FUNC_GPIO &pcfg_output_low>;
898		};
899
900		soc_slppin_slp: soc_slppin_slp {
901			rockchip,pins =
902				<0 RK_PA2 1 &pcfg_pull_none>;
903		};
904
905		soc_slppin_rst: soc_slppin_rst {
906			rockchip,pins =
907				<0 RK_PA2 2 &pcfg_pull_none>;
908		};
909	};
910
911	sdio-pwrseq {
912		wifi_enable_h: wifi-enable-h {
913			rockchip,pins = <0 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
914		};
915	};
916
917	wireless-wlan {
918		wifi_vbat: wifi-vbat {
919			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
920		};
921
922		wifi_host_wake_irq: wifi-host-wake-irq {
923			rockchip,pins = <0 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
924		};
925	};
926
927	wireless-bluetooth {
928		uart1_gpios: uart1-gpios {
929			rockchip,pins = <2 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
930		};
931
932		bt_reset_gpio: bt-reset-gpio {
933			rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_none>;
934		};
935
936		bt_wake_gpio: bt-wake-gpio {
937			rockchip,pins = <0 RK_PC2 RK_FUNC_GPIO &pcfg_pull_none>;
938		};
939
940		bt_irq_gpio: bt-irq-gpio {
941			rockchip,pins = <0 RK_PC3 RK_FUNC_GPIO &pcfg_pull_up>;
942		};
943	};
944
945	vcc-tp {
946		vcc_tp_en: vcc-tp-en {
947			rockchip,pins = <0 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
948		};
949	};
950};
951
952&pmu_io_domains {
953	status = "okay";
954	pmuio1-supply = <&vcc3v3_pmu>;
955	pmuio2-supply = <&vcc3v3_pmu>;
956	vccio1-supply = <&vccio_acodec>;
957	vccio3-supply = <&vcc_1v8>;
958	vccio4-supply = <&vcca1v8_pmu>;
959	vccio5-supply = <&vcc_3v3>;
960	vccio6-supply = <&vcc_3v3>;
961	vccio7-supply = <&vcc_1v8>;
962};
963
964&pwm0 {
965	status = "okay";
966};
967
968&rk_rga {
969	status = "okay";
970};
971
972&rkisp {
973	status = "okay";
974};
975
976&rkisp_mmu {
977	status = "okay";
978};
979
980&rkisp_vir0 {
981	status = "okay";
982
983	port {
984		#address-cells = <1>;
985		#size-cells = <0>;
986
987		isp0_in: endpoint@0 {
988			reg = <0>;
989			remote-endpoint = <&csidphy0_out>;
990		};
991	};
992};
993
994&rkvdec {
995	status = "okay";
996};
997
998&rkvdec_mmu {
999	status = "okay";
1000};
1001
1002&rkvenc {
1003	status = "okay";
1004};
1005
1006&rkvenc_mmu {
1007	status = "okay";
1008};
1009
1010&rockchip_suspend {
1011	status = "okay";
1012
1013	rockchip,regulator-off-in-mem-lite =
1014		<&vdd_cpu>, <&vdd_logic>, <&vdd_gpu>, <&vcc_3v3>, <&vdda_0v9>, <&vcc_1v8>,
1015		<&vccio_acodec>, <&vccio_sd>, <&vcc1v8_dvp>, <&dcdc_boost>, <&otg_switch>,
1016		<&sleep_sta_ctl>;
1017	rockchip,regulator-on-in-mem-lite =
1018		<&vcc_ddr>, <&vdda0v9_pmu>, <&vcca1v8_pmu>, <&vcc3v3_pmu>;
1019
1020	rockchip,regulator-off-in-mem =
1021		<&vdd_cpu>, <&vdd_logic>, <&vdd_gpu>, <&vcc_3v3>, <&vdda_0v9>, <&vcc_1v8>,
1022		<&vccio_acodec>, <&vccio_sd>, <&vcc1v8_dvp>, <&dcdc_boost>, <&otg_switch>,
1023		<&sleep_sta_ctl>;
1024	rockchip,regulator-on-in-mem =
1025		<&vcc_ddr>, <&vdda0v9_pmu>, <&vcca1v8_pmu>, <&vcc3v3_pmu>;
1026
1027	rockchip,regulator-off-in-mem-ultra =
1028		<&vdd_logic>, <&vdd_gpu>, <&vcc_ddr>, <&vcc_3v3>, <&vdda_0v9>, <&vcc_1v8>,
1029		<&vdda0v9_pmu>, <&vcca1v8_pmu>, <&vcc3v3_pmu>, <&vccio_acodec>, <&vccio_sd>,
1030		<&vcc1v8_dvp>, <&dcdc_boost>, <&otg_switch>;
1031	rockchip,regulator-on-in-mem-ultra = <&vdd_cpu>, <&sleep_sta_ctl>;
1032};
1033
1034&saradc {
1035	status = "okay";
1036	vref-supply = <&vcc_1v8>;
1037};
1038
1039&sdhci {
1040	bus-width = <8>;
1041	no-sdio;
1042	no-sd;
1043	non-removable;
1044	keep-power-in-suspend;
1045	max-frequency = <200000000>;
1046	status = "okay";
1047};
1048
1049&sdmmc1 {
1050	max-frequency = <150000000>;
1051	no-sd;
1052	no-mmc;
1053	bus-width = <4>;
1054	disable-wp;
1055	cap-sd-highspeed;
1056	cap-sdio-irq;
1057	keep-power-in-suspend;
1058	mmc-pwrseq = <&sdio_pwrseq>;
1059	non-removable;
1060	pinctrl-names = "default";
1061	pinctrl-0 = <&sdmmc1_bus4 &sdmmc1_cmd &sdmmc1_clk>;
1062	sd-uhs-sdr104;
1063	rockchip,default-sample-phase = <90>;
1064	status = "okay";
1065};
1066
1067&tsadc {
1068	status = "okay";
1069};
1070
1071&uart1 {
1072	status = "okay";
1073	pinctrl-names = "default";
1074	pinctrl-0 = <&uart1m0_xfer &uart1m0_ctsn>;
1075};
1076
1077&u2phy0_otg {
1078	status = "okay";
1079};
1080
1081&usb2phy0 {
1082	status = "okay";
1083};
1084
1085&usbdrd_dwc3 {
1086	status = "okay";
1087};
1088
1089&usbdrd30 {
1090	status = "okay";
1091};
1092
1093&vdpu {
1094	status = "okay";
1095};
1096
1097&vdpu_mmu {
1098	status = "okay";
1099};
1100
1101&vepu {
1102	status = "okay";
1103};
1104
1105&vepu_mmu {
1106	status = "okay";
1107};
1108
1109&vop {
1110	status = "okay";
1111};
1112
1113&vop_mmu {
1114	status = "okay";
1115};
1116