xref: /OK3568_Linux_fs/kernel/scripts/dtc/include-prefixes/arm/rk3288-evb-android-act8846-edp.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * This file is dual-licensed: you can use it either under the terms
3 * of the GPL or the X11 license, at your option. Note that this dual
4 * licensing only applies to this file, and not this project as a
5 * whole.
6 *
7 *  a) This file is free software; you can redistribute it and/or
8 *     modify it under the terms of the GNU General Public License as
9 *     published by the Free Software Foundation; either version 2 of the
10 *     License, or (at your option) any later version.
11 *
12 *     This file is distributed in the hope that it will be useful,
13 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 *     GNU General Public License for more details.
16 *
17 * Or, alternatively,
18 *
19 *  b) Permission is hereby granted, free of charge, to any person
20 *     obtaining a copy of this software and associated documentation
21 *     files (the "Software"), to deal in the Software without
22 *     restriction, including without limitation the rights to use,
23 *     copy, modify, merge, publish, distribute, sublicense, and/or
24 *     sell copies of the Software, and to permit persons to whom the
25 *     Software is furnished to do so, subject to the following
26 *     conditions:
27 *
28 *     The above copyright notice and this permission notice shall be
29 *     included in all copies or substantial portions of the Software.
30 *
31 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38 *     OTHER DEALINGS IN THE SOFTWARE.
39 */
40
41/dts-v1/;
42#include "rk3288-evb.dtsi"
43#include "rk3288-android.dtsi"
44
45/ {
46	compatible = "rockchip,rk3288-evb-act8846", "rockchip,rk3288";
47
48	backlight: backlight {
49		compatible = "pwm-backlight";
50		brightness-levels = <
51			  0   1   2   3   4   5   6   7
52			  8   9  10  11  12  13  14  15
53			 16  17  18  19  20  21  22  23
54			 24  25  26  27  28  29  30  31
55			 32  33  34  35  36  37  38  39
56			 40  41  42  43  44  45  46  47
57			 48  49  50  51  52  53  54  55
58			 56  57  58  59  60  61  62  63
59			 64  65  66  67  68  69  70  71
60			 72  73  74  75  76  77  78  79
61			 80  81  82  83  84  85  86  87
62			 88  89  90  91  92  93  94  95
63			 96  97  98  99 100 101 102 103
64			104 105 106 107 108 109 110 111
65			112 113 114 115 116 117 118 119
66			120 121 122 123 124 125 126 127
67			128 129 130 131 132 133 134 135
68			136 137 138 139 140 141 142 143
69			144 145 146 147 148 149 150 151
70			152 153 154 155 156 157 158 159
71			160 161 162 163 164 165 166 167
72			168 169 170 171 172 173 174 175
73			176 177 178 179 180 181 182 183
74			184 185 186 187 188 189 190 191
75			192 193 194 195 196 197 198 199
76			200 201 202 203 204 205 206 207
77			208 209 210 211 212 213 214 215
78			216 217 218 219 220 221 222 223
79			224 225 226 227 228 229 230 231
80			232 233 234 235 236 237 238 239
81			240 241 242 243 244 245 246 247
82			248 249 250 251 252 253 254 255>;
83		default-brightness-level = <128>;
84		enable-gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
85		pinctrl-names = "default";
86		pinctrl-0 = <&bl_en>;
87		pwms = <&pwm0 0 1000000 PWM_POLARITY_INVERTED>;
88	};
89
90	sdio_pwrseq: sdio-pwrseq {
91		compatible = "mmc-pwrseq-simple";
92		clocks = <&hym8563>;
93		clock-names = "ext_clock";
94		pinctrl-names = "default";
95		pinctrl-0 = <&wifi_enable_h>;
96
97		/*
98		 * On the module itself this is one of these (depending
99		 * on the actual card populated):
100		 * - SDIO_RESET_L_WL_REG_ON
101		 * - PDN (power down when low)
102		 */
103		reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
104	};
105
106	vcc_lcd: vcc-lcd {
107		compatible = "regulator-fixed";
108		enable-active-high;
109		gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>;
110		pinctrl-names = "default";
111		pinctrl-0 = <&lcd_en>;
112		regulator-name = "vcc_lcd";
113		vin-supply = <&vcc_io>;
114	};
115
116	vcc_wl: vcc-wl {
117		compatible = "regulator-fixed";
118		enable-active-high;
119		gpio = <&gpio7 9 GPIO_ACTIVE_HIGH>;
120		pinctrl-names = "default";
121		pinctrl-0 = <&wifi_pwr>;
122		regulator-name = "vcc_wl";
123		vin-supply = <&vcc_18>;
124	};
125};
126
127&cif_isp0 {
128	rockchip,camera-modules-attached = <&camera0>;
129	status = "disabled";
130};
131
132&cpu0 {
133	cpu-supply = <&vdd_cpu>;
134};
135
136&dfi {
137	status = "okay";
138};
139
140&dmc {
141	center-supply = <&vdd_log>;
142	status = "okay";
143};
144
145&edp {
146	vcc-supply = <&vdd10_lcd>;
147	vccio-supply = <&vcc18_lcd>;
148	status = "okay";
149};
150
151&edp_panel {
152	compatible ="lg,lp079qx1-sp0v", "simple-panel";
153	backlight = <&backlight>;
154	enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
155	enable-delay-ms = <120>;
156	pinctrl-0 = <&lcd_cs>;
157	power-supply = <&vcc_lcd>;
158	status = "okay";
159
160	disp_timings: display-timings {
161		native-mode = <&timing0>;
162
163		timing0: timing0 {
164			clock-frequency = <200000000>;
165			hactive = <1536>;
166			vactive = <2048>;
167			hfront-porch = <12>;
168			hsync-len = <16>;
169			hback-porch = <48>;
170			vfront-porch = <8>;
171			vsync-len = <4>;
172			vback-porch = <8>;
173			hsync-active = <0>;
174			vsync-active = <0>;
175			de-active = <0>;
176			pixelclk-active = <0>;
177		};
178	};
179};
180
181&gpu {
182	status = "okay";
183	mali-supply = <&vdd_gpu>;
184};
185
186&i2c0 {
187	clock-frequency = <400000>;
188
189	vdd_cpu: syr827@40 {
190		compatible = "silergy,syr827";
191		fcs,suspend-voltage-selector = <1>;
192		reg = <0x40>;
193		regulator-name = "vdd_cpu";
194		regulator-min-microvolt = <850000>;
195		regulator-max-microvolt = <1350000>;
196		regulator-always-on;
197		regulator-boot-on;
198		regulator-enable-ramp-delay = <300>;
199		regulator-ramp-delay = <8000>;
200		vin-supply = <&vcc_sys>;
201		regulator-state-mem {
202			regulator-off-in-suspend;
203		};
204	};
205
206	vdd_gpu: syr828@41 {
207		compatible = "silergy,syr828";
208		fcs,suspend-voltage-selector = <1>;
209		reg = <0x41>;
210		regulator-name = "vdd_gpu";
211		regulator-min-microvolt = <850000>;
212		regulator-max-microvolt = <1350000>;
213		regulator-always-on;
214		regulator-ramp-delay = <6000>;
215		vin-supply = <&vcc_sys>;
216		regulator-state-mem {
217			regulator-off-in-suspend;
218		};
219	};
220
221	hym8563: hym8563@51 {
222		compatible = "haoyu,hym8563";
223		reg = <0x51>;
224
225		interrupt-parent = <&gpio0>;
226		interrupts = <4 IRQ_TYPE_EDGE_FALLING>;
227
228		pinctrl-names = "default";
229		pinctrl-0 = <&pmic_int>;
230
231		#clock-cells = <0>;
232		clock-output-names = "xin32k";
233	};
234
235	act8846: act8846@5a {
236		compatible = "active-semi,act8846";
237		reg = <0x5a>;
238		status = "okay";
239
240		vp1-supply = <&vcc_sys>;
241		vp2-supply = <&vcc_sys>;
242		vp3-supply = <&vcc_sys>;
243		vp4-supply = <&vcc_sys>;
244		inl1-supply = <&vcc_io>;
245		inl2-supply = <&vcc_sys>;
246		inl3-supply = <&vcc_20>;
247
248		regulators {
249			vcc_ddr: REG1 {
250				regulator-name = "VCC_DDR";
251				regulator-min-microvolt = <1200000>;
252				regulator-max-microvolt = <1200000>;
253				regulator-always-on;
254			};
255
256			vcc_io: REG2 {
257				regulator-name = "VCC_IO";
258				regulator-min-microvolt = <3300000>;
259				regulator-max-microvolt = <3300000>;
260				regulator-always-on;
261			};
262
263			vdd_log: REG3 {
264				regulator-name = "VDD_LOG";
265				regulator-min-microvolt = <1150000>;
266				regulator-max-microvolt = <1150000>;
267				regulator-always-on;
268			};
269
270			vcc_20: REG4 {
271				regulator-name = "VCC_20";
272				regulator-min-microvolt = <2000000>;
273				regulator-max-microvolt = <2000000>;
274				regulator-always-on;
275			};
276
277			vccio_sd: REG5 {
278				regulator-name = "VCCIO_SD";
279				regulator-min-microvolt = <1800000>;
280				regulator-max-microvolt = <3300000>;
281				regulator-always-on;
282			};
283
284			vdd10_lcd: REG6 {
285				regulator-name = "VDD10_LCD";
286				regulator-min-microvolt = <1000000>;
287				regulator-max-microvolt = <1000000>;
288				regulator-always-on;
289			};
290
291			vcca_codec: REG7 {
292				regulator-name = "VCCA_CODEC";
293				regulator-min-microvolt = <3300000>;
294				regulator-max-microvolt = <3300000>;
295				regulator-always-on;
296			};
297
298			vcca_tp: REG8 {
299				regulator-name = "VCCA_TP";
300				regulator-min-microvolt = <3300000>;
301				regulator-max-microvolt = <3300000>;
302				regulator-always-on;
303			};
304
305			vccio_pmu: REG9 {
306				regulator-name = "VCCIO_PMU";
307				regulator-min-microvolt = <3300000>;
308				regulator-max-microvolt = <3300000>;
309				regulator-always-on;
310			};
311
312			vdd_10: REG10 {
313				regulator-name = "VDD_10";
314				regulator-min-microvolt = <1000000>;
315				regulator-max-microvolt = <1000000>;
316				regulator-always-on;
317			};
318
319			vcc_18: REG11 {
320				regulator-name = "VCC_18";
321				regulator-min-microvolt = <1800000>;
322				regulator-max-microvolt = <1800000>;
323				regulator-always-on;
324			};
325
326			vcc18_lcd: REG12 {
327				regulator-name = "VCC18_LCD";
328				regulator-min-microvolt = <1800000>;
329				regulator-max-microvolt = <1800000>;
330				regulator-always-on;
331			};
332		};
333	};
334};
335
336&i2c1 {
337	status = "okay";
338	clock-frequency = <400000>;
339
340	mpu6050@68 {
341		compatible = "invensense,mpu6050";
342		status = "okay";
343		pinctrl-names = "default";
344		pinctrl-0 = <&mpu6050_irq_gpio>;
345		reg = <0x68>;
346		irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>;
347		mpu-int_config = <0x10>;
348		mpu-level_shifter = <0>;
349		mpu-orientation = <0 1 0 1 0 0 0 0 1>;
350		orientation-x= <0>;
351		orientation-y= <1>;
352		orientation-z= <0>;
353		support-hw-poweroff = <1>;
354		mpu-debug = <1>;
355	};
356};
357
358&i2c3 {
359	status = "okay";
360
361	camera0: camera-module@10 {
362		status = "disabled";
363
364		compatible = "omnivision,ov8858-v4l2-i2c-subdev";
365		reg = <0x10>;
366		device_type = "v4l2-i2c-subdev";
367
368		clocks = <&cru SCLK_VIP_OUT>;
369		clock-names = "clk_cif_out";
370
371		pinctrl-names = "rockchip,camera_default",
372			"rockchip,camera_sleep";
373		pinctrl-0 = <&cam0_default_pins>;
374		pinctrl-1 = <&cam0_sleep_pins>;
375
376		rockchip,pd-gpio = <&gpio2 15 GPIO_ACTIVE_LOW>;
377		rockchip,pwr-gpio = <&gpio0 17 GPIO_ACTIVE_HIGH>;
378
379		rockchip,camera-module-mclk-name = "clk_cif_out";
380		rockchip,camera-module-dovdd = "1.8v";
381		rockchip,camera-module-facing = "back";
382		rockchip,camera-module-name = "cmk-cb0695-fv1";
383		rockchip,camera-module-len-name = "lg9569a2";
384		rockchip,camera-module-fov-h = "66.0";
385		rockchip,camera-module-fov-v = "50.1";
386		rockchip,camera-module-orientation = <0>;
387		rockchip,camera-module-iq-flip = <0>;
388		rockchip,camera-module-iq-mirror = <0>;
389		rockchip,camera-module-flip = <0>;
390		rockchip,camera-module-mirror = <0>;
391
392		/* resolution.w, resolution.h, defrect.left, defrect.top, defrect.w, defrect.h */
393		rockchip,camera-module-defrect0 = <3264 2448 0 0 3264 2448>;
394		rockchip,camera-module-flash-support = <0>;
395		rockchip,camera-module-mipi-dphy-index = <0>;
396	};
397};
398
399&i2c4 {
400	status = "okay";
401
402	ts@01 {
403		compatible = "ct,vtl_ts";
404		reg = <0x01>;
405		screen_max_x = <1536>;
406		screen_max_y = <2048>;
407		xy_swap = <1>;
408		x_reverse = <0>;
409		y_reverse = <0>;
410		x_mul = <2>;
411		y_mul = <2>;
412		bin_ver = <0>;
413		irq_gpio_number = <&gpio7 6 IRQ_TYPE_LEVEL_LOW>;
414		rst_gpio_number = <&gpio7 5 GPIO_ACTIVE_HIGH>;
415	};
416};
417
418&lvds_panel {
419	power-supply = <&vcc_lcd>;
420};
421
422&rga {
423	status = "okay";
424};
425
426&rockchip_suspend {
427	status = "okay";
428};
429
430&route_edp {
431	status = "okay";
432};
433
434&sound {
435	status = "okay";
436};
437
438&uart2 {
439	status = "okay";
440};
441
442&pinctrl {
443	backlight {
444		bl_en: bl-en {
445			rockchip,pins = <7 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
446		};
447	};
448
449	buttons {
450		pwrbtn: pwrbtn {
451			rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
452		};
453	};
454
455	cam_pins {
456		cam0_default_pins: cam0-default-pins {
457			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>,
458					<2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>,
459					<2 RK_PB3 1 &pcfg_pull_none>;
460		};
461		cam0_sleep_pins: cam0-sleep-pins {
462			rockchip,pins = <0 RK_PC1 RK_FUNC_GPIO &pcfg_pull_none>,
463					<2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>,
464					<2 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
465		};
466	};
467
468	lcd {
469		lcd_en: lcd-en  {
470			rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
471		};
472	};
473
474	wifi {
475		wifi_pwr: wifi-pwr {
476			rockchip,pins = <7 RK_PB1 RK_FUNC_GPIO &pcfg_pull_none>;
477		};
478	};
479
480	mpu6050 {
481		mpu6050_irq_gpio: mpu6050-irq-gpio {
482			rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
483		};
484	};
485};
486