xref: /OK3568_Linux_fs/kernel/scripts/dtc/include-prefixes/arm/rk3288-evb-android-rk818-edp.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
3 *
4 * This file is dual-licensed: you can use it either under the terms
5 * of the GPL or the X11 license, at your option. Note that this dual
6 * licensing only applies to this file, and not this project as a
7 * whole.
8 *
9 *  a) This file is free software; you can redistribute it and/or
10 *     modify it under the terms of the GNU General Public License as
11 *     published by the Free Software Foundation; either version 2 of the
12 *     License, or (at your option) any later version.
13 *
14 *     This file is distributed in the hope that it will be useful,
15 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 *     GNU General Public License for more details.
18 *
19 * Or, alternatively,
20 *
21 *  b) Permission is hereby granted, free of charge, to any person
22 *     obtaining a copy of this software and associated documentation
23 *     files (the "Software"), to deal in the Software without
24 *     restriction, including without limitation the rights to use,
25 *     copy, modify, merge, publish, distribute, sublicense, and/or
26 *     sell copies of the Software, and to permit persons to whom the
27 *     Software is furnished to do so, subject to the following
28 *     conditions:
29 *
30 *     The above copyright notice and this permission notice shall be
31 *     included in all copies or substantial portions of the Software.
32 *
33 *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34 *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35 *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36 *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37 *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38 *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39 *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40 *     OTHER DEALINGS IN THE SOFTWARE.
41 */
42
43/dts-v1/;
44#include "rk3288-evb.dtsi"
45#include "rk3288-android.dtsi"
46
47/ {
48	compatible = "rockchip,rk3288-evb-android-rk818", "rockchip,rk3288";
49
50	sdio_pwrseq: sdio-pwrseq {
51		compatible = "mmc-pwrseq-simple";
52		clocks = <&rk818 1>;
53		clock-names = "ext_clock";
54
55		/*
56		 * On the module itself this is one of these (depending
57		 * on the actual card populated):
58		 * - SDIO_RESET_L_WL_REG_ON
59		 * - PDN (power down when low)
60		 */
61		reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
62	};
63
64	wireless-bluetooth {
65		clocks = <&rk818 1>;
66		clock-names = "ext_clock";
67	};
68
69	/delete-node/ sdmmc-regulator;
70
71	vcc_lcd: vcc-lcd {
72		compatible = "regulator-fixed";
73		regulator-boot-on;
74		enable-active-high;
75		gpio = <&gpio7 3 GPIO_ACTIVE_HIGH>;
76		pinctrl-names = "default";
77		pinctrl-0 = <&lcd_en>;
78		regulator-name = "vcc_lcd";
79		vin-supply = <&vcc_io>;
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
90&cpu0 {
91	cpu-supply = <&vdd_cpu>;
92};
93
94&dfi {
95	status = "okay";
96};
97
98&dmc {
99	center-supply = <&vdd_logic>;
100	status = "okay";
101};
102
103&edp {
104	status = "okay";
105};
106
107&edp_panel {
108	compatible ="lg,lp079qx1-sp0v", "simple-panel";
109	backlight = <&backlight>;
110	enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
111	enable-delay-ms = <120>;
112	pinctrl-0 = <&lcd_cs>;
113	power-supply = <&vcc_lcd>;
114	status = "okay";
115
116	disp_timings: display-timings {
117		native-mode = <&timing0>;
118
119		timing0: timing0 {
120			clock-frequency = <200000000>;
121			hactive = <1536>;
122			vactive = <2048>;
123			hfront-porch = <12>;
124			hsync-len = <16>;
125			hback-porch = <48>;
126			vfront-porch = <8>;
127			vsync-len = <4>;
128			vback-porch = <8>;
129			hsync-active = <0>;
130			vsync-active = <0>;
131			de-active = <0>;
132			pixelclk-active = <0>;
133		};
134	};
135};
136
137&route_edp {
138	status = "okay";
139};
140
141&gpu {
142	status = "okay";
143	mali-supply = <&vdd_gpu>;
144};
145
146&hdmi_analog_sound {
147	status = "okay";
148};
149
150&i2c0 {
151	clock-frequency = <400000>;
152
153	vdd_cpu: syr827@40 {
154		compatible = "silergy,syr827";
155		reg = <0x40>;
156		vin-supply = <&vcc_sys>;
157		regulator-compatible = "fan53555-reg";
158		pinctrl-0 = <&vsel1_gpio>;
159		vsel-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
160		regulator-name = "vdd_cpu";
161		regulator-min-microvolt = <712500>;
162		regulator-max-microvolt = <1500000>;
163		regulator-ramp-delay = <1000>;
164		fcs,suspend-voltage-selector = <1>;
165		regulator-always-on;
166		regulator-boot-on;
167		regulator-initial-state = <3>;
168		regulator-state-mem {
169			regulator-off-in-suspend;
170		};
171	};
172
173	rk818: pmic@1c {
174		compatible = "rockchip,rk818";
175		reg = <0x1c>;
176		status = "okay";
177
178		clock-output-names = "rk818-clkout1", "wifibt_32kin";
179		interrupt-parent = <&gpio0>;
180		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
181		pinctrl-names = "default";
182		pinctrl-0 = <&pmic_int>;
183		rockchip,system-power-controller;
184		wakeup-source;
185		#clock-cells = <1>;
186
187		vcc1-supply = <&vcc_sys>;
188		vcc2-supply = <&vcc_sys>;
189		vcc3-supply = <&vcc_sys>;
190		vcc4-supply = <&vcc_sys>;
191		vcc6-supply = <&vcc_sys>;
192		vcc7-supply = <&vcc_sys>;
193		vcc8-supply = <&vcc_sys>;
194		vcc9-supply = <&vcc_io>;
195		boost-supply = <&vcc_sys>;
196		h_5v-supply = <&boost>;
197
198		regulators {
199			vdd_logic: DCDC_REG1 {
200				regulator-name = "vdd_logic";
201				regulator-always-on;
202				regulator-boot-on;
203				regulator-min-microvolt = <800000>;
204				regulator-max-microvolt = <1250000>;
205				regulator-ramp-delay = <6001>;
206				regulator-state-mem {
207					regulator-on-in-suspend;
208					regulator-suspend-microvolt = <1000000>;
209				};
210			};
211
212			vdd_gpu: DCDC_REG2 {
213				regulator-name = "vdd_gpu";
214				regulator-always-on;
215				regulator-boot-on;
216				regulator-min-microvolt = <800000>;
217				regulator-max-microvolt = <1250000>;
218				regulator-ramp-delay = <6001>;
219				regulator-state-mem {
220					regulator-on-in-suspend;
221					regulator-suspend-microvolt = <1000000>;
222				};
223			};
224
225			vcc_ddr: DCDC_REG3 {
226				regulator-always-on;
227				regulator-boot-on;
228				regulator-name = "vcc_ddr";
229				regulator-state-mem {
230					regulator-on-in-suspend;
231				};
232			};
233
234			vcc_io: DCDC_REG4 {
235				regulator-always-on;
236				regulator-boot-on;
237				regulator-min-microvolt = <3300000>;
238				regulator-max-microvolt = <3300000>;
239				regulator-name = "vcc_io";
240				regulator-state-mem {
241					regulator-off-in-suspend;
242				};
243			};
244
245			boost: DCDC_BOOST {
246				regulator-always-on;
247				regulator-boot-on;
248				regulator-min-microvolt = <5000000>;
249				regulator-max-microvolt = <5000000>;
250				regulator-name = "boost";
251				regulator-state-mem {
252					regulator-on-in-suspend;
253				};
254			};
255
256			vcca_codec: LDO_REG1 {
257				regulator-always-on;
258				regulator-boot-on;
259				regulator-min-microvolt = <3300000>;
260				regulator-max-microvolt = <3300000>;
261				regulator-name = "vcca_codec";
262				regulator-state-mem {
263					regulator-off-in-suspend;
264				};
265			};
266
267			vcc_tp: LDO_REG2 {
268				regulator-always-on;
269				regulator-boot-on;
270				regulator-min-microvolt = <3300000>;
271				regulator-max-microvolt = <3300000>;
272				regulator-name = "vcc_tp";
273				regulator-state-mem {
274					regulator-off-in-suspend;
275				};
276			};
277
278			vdd_10: LDO_REG3 {
279				regulator-always-on;
280				regulator-boot-on;
281				regulator-min-microvolt = <1000000>;
282				regulator-max-microvolt = <1000000>;
283				regulator-name = "vdd_10";
284				regulator-state-mem {
285					regulator-on-in-suspend;
286					regulator-suspend-microvolt = <1000000>;
287				};
288			};
289
290			vcc18_lcd: LDO_REG4 {
291				regulator-always-on;
292				regulator-boot-on;
293				regulator-min-microvolt = <1800000>;
294				regulator-max-microvolt = <1800000>;
295				regulator-name = "vcc18_lcd";
296				regulator-state-mem {
297					regulator-off-in-suspend;
298				};
299			};
300
301			vccio_pmu: LDO_REG5 {
302				regulator-always-on;
303				regulator-boot-on;
304				regulator-min-microvolt = <3300000>;
305				regulator-max-microvolt = <3300000>;
306				regulator-name = "vccio_pmu";
307				regulator-state-mem {
308					regulator-on-in-suspend;
309					regulator-suspend-microvolt = <3300000>;
310				};
311			};
312
313			vdd10_lcd: LDO_REG6 {
314				regulator-always-on;
315				regulator-boot-on;
316				regulator-min-microvolt = <1000000>;
317				regulator-max-microvolt = <1000000>;
318				regulator-name = "vdd10_lcd";
319				regulator-state-mem {
320					regulator-off-in-suspend;
321				};
322			};
323
324			vcc_18: LDO_REG7 {
325				regulator-always-on;
326				regulator-boot-on;
327				regulator-min-microvolt = <1800000>;
328				regulator-max-microvolt = <1800000>;
329				regulator-name = "vcc_18";
330				regulator-state-mem {
331					regulator-on-in-suspend;
332					regulator-suspend-microvolt = <1800000>;
333				};
334			};
335
336			vccio_wl: LDO_REG8 {
337				regulator-always-on;
338				regulator-boot-on;
339				regulator-min-microvolt = <1800000>;
340				regulator-max-microvolt = <3300000>;
341				regulator-name = "vccio_wl";
342				regulator-state-mem {
343					regulator-on-in-suspend;
344					regulator-suspend-microvolt = <3300000>;
345				};
346			};
347
348			vccio_sd: LDO_REG9 {
349				regulator-always-on;
350				regulator-boot-on;
351				regulator-min-microvolt = <1800000>;
352				regulator-max-microvolt = <3300000>;
353				regulator-name = "vccio_sd";
354				regulator-state-mem {
355					regulator-on-in-suspend;
356					regulator-suspend-microvolt = <3300000>;
357				};
358			};
359
360			vcc_sd: SWITCH_REG {
361				regulator-always-on;
362				regulator-boot-on;
363				regulator-name = "vcc_sd";
364				regulator-state-mem {
365					regulator-on-in-suspend;
366				};
367			};
368
369			h_5v: HDMI_SWITCH {
370				regulator-always-on;
371				regulator-boot-on;
372				regulator-name = "h_5v";
373				regulator-state-mem {
374					regulator-on-in-suspend;
375				};
376			};
377		};
378	};
379};
380
381&i2c1 {
382	status = "okay";
383	clock-frequency = <400000>;
384
385	mpu6050@68 {
386		compatible = "invensense,mpu6050";
387		status = "okay";
388		pinctrl-names = "default";
389		pinctrl-0 = <&mpu6050_irq_gpio>;
390		reg = <0x68>;
391		irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>;
392		mpu-int_config = <0x10>;
393		mpu-level_shifter = <0>;
394		mpu-orientation = <0 1 0 1 0 0 0 0 1>;
395		orientation-x= <0>;
396		orientation-y= <1>;
397		orientation-z= <0>;
398		support-hw-poweroff = <1>;
399		mpu-debug = <1>;
400	};
401};
402
403&lvds_panel {
404	power-supply = <&vcc_lcd>;
405};
406
407&rockchip_suspend {
408	status = "okay";
409};
410
411&tsadc {
412	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
413};
414
415&pinctrl {
416	lcd {
417		lcd_en: lcd-en  {
418			rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
419		};
420	};
421
422	mpu6050 {
423		mpu6050_irq_gpio: mpu6050-irq-gpio {
424			rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
425		};
426	};
427
428	pmic {
429		pmic_int: pmic-int {
430			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
431		};
432		vsel1_gpio: vsel1-gpio {
433			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
434		};
435	};
436};
437