xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3288-evb-android-rk818-lvds.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	vop-dclk-mode = <1>;
102};
103
104&route_lvds {
105	status = "okay";
106};
107
108&lvds {
109	status = "okay";
110};
111
112&lvds_panel {
113	status = "okay";
114	compatible ="simple-panel";
115	backlight = <&backlight>;
116	enable-gpios = <&gpio7 4 GPIO_ACTIVE_HIGH>;
117	enable-delay-ms = <10>;
118	power-supply = <&vcc_lcd>;
119	/*
120	 * MEDIA_BUS_FMT_RGB666_1X7X3_SPWG  - "jeida-18"
121	 * MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA - "jeida-24"
122	 * MEDIA_BUS_FMT_RGB888_1X7X4_SPWG  - "vesa-24"
123	 */
124	bus-format = <MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA>;
125
126	display-timings {
127		native-mode = <&timing0>;
128		timing0: timing0 {
129			clock-frequency = <71000000>;
130			hactive = <1280>;
131			vactive = <800>;
132			hback-porch = <100>;
133			hfront-porch = <18>;
134			vback-porch = <8>;
135			vfront-porch = <6>;
136			hsync-len = <10>;
137			vsync-len = <2>;
138			hsync-active = <0>;
139			vsync-active = <0>;
140			de-active = <0>;
141			pixelclk-active = <0>;
142		};
143	};
144};
145
146&gpu {
147	status = "okay";
148	mali-supply = <&vdd_gpu>;
149};
150
151&hdmi_analog_sound {
152	status = "okay";
153};
154
155&i2c0 {
156	clock-frequency = <400000>;
157
158	vdd_cpu: syr827@40 {
159		compatible = "silergy,syr827";
160		reg = <0x40>;
161		vin-supply = <&vcc_sys>;
162		regulator-compatible = "fan53555-reg";
163		pinctrl-0 = <&vsel1_gpio>;
164		vsel-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
165		regulator-name = "vdd_cpu";
166		regulator-min-microvolt = <712500>;
167		regulator-max-microvolt = <1500000>;
168		regulator-ramp-delay = <1000>;
169		fcs,suspend-voltage-selector = <1>;
170		regulator-always-on;
171		regulator-boot-on;
172		regulator-initial-state = <3>;
173		regulator-state-mem {
174			regulator-off-in-suspend;
175		};
176	};
177
178	rk818: pmic@1c {
179		compatible = "rockchip,rk818";
180		reg = <0x1c>;
181		status = "okay";
182
183		clock-output-names = "rk818-clkout1", "wifibt_32kin";
184		interrupt-parent = <&gpio0>;
185		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
186		pinctrl-names = "default";
187		pinctrl-0 = <&pmic_int>;
188		rockchip,system-power-controller;
189		wakeup-source;
190		#clock-cells = <1>;
191
192		vcc1-supply = <&vcc_sys>;
193		vcc2-supply = <&vcc_sys>;
194		vcc3-supply = <&vcc_sys>;
195		vcc4-supply = <&vcc_sys>;
196		vcc6-supply = <&vcc_sys>;
197		vcc7-supply = <&vcc_sys>;
198		vcc8-supply = <&vcc_sys>;
199		vcc9-supply = <&vcc_io>;
200		boost-supply = <&vcc_sys>;
201		h_5v-supply = <&boost>;
202
203		regulators {
204			vdd_logic: DCDC_REG1 {
205				regulator-name = "vdd_logic";
206				regulator-always-on;
207				regulator-boot-on;
208				regulator-min-microvolt = <800000>;
209				regulator-max-microvolt = <1250000>;
210				regulator-ramp-delay = <6001>;
211				regulator-state-mem {
212					regulator-on-in-suspend;
213					regulator-suspend-microvolt = <1000000>;
214				};
215			};
216
217			vdd_gpu: DCDC_REG2 {
218				regulator-name = "vdd_gpu";
219				regulator-always-on;
220				regulator-boot-on;
221				regulator-min-microvolt = <800000>;
222				regulator-max-microvolt = <1250000>;
223				regulator-ramp-delay = <6001>;
224				regulator-state-mem {
225					regulator-on-in-suspend;
226					regulator-suspend-microvolt = <1000000>;
227				};
228			};
229
230			vcc_ddr: DCDC_REG3 {
231				regulator-always-on;
232				regulator-boot-on;
233				regulator-name = "vcc_ddr";
234				regulator-state-mem {
235					regulator-on-in-suspend;
236				};
237			};
238
239			vcc_io: DCDC_REG4 {
240				regulator-always-on;
241				regulator-boot-on;
242				regulator-min-microvolt = <3300000>;
243				regulator-max-microvolt = <3300000>;
244				regulator-name = "vcc_io";
245				regulator-state-mem {
246					regulator-off-in-suspend;
247				};
248			};
249
250			boost: DCDC_BOOST {
251				regulator-always-on;
252				regulator-boot-on;
253				regulator-min-microvolt = <5000000>;
254				regulator-max-microvolt = <5000000>;
255				regulator-name = "boost";
256				regulator-state-mem {
257					regulator-on-in-suspend;
258				};
259			};
260
261			vcca_codec: LDO_REG1 {
262				regulator-always-on;
263				regulator-boot-on;
264				regulator-min-microvolt = <3300000>;
265				regulator-max-microvolt = <3300000>;
266				regulator-name = "vcca_codec";
267				regulator-state-mem {
268					regulator-off-in-suspend;
269				};
270			};
271
272			vcc_tp: LDO_REG2 {
273				regulator-always-on;
274				regulator-boot-on;
275				regulator-min-microvolt = <3300000>;
276				regulator-max-microvolt = <3300000>;
277				regulator-name = "vcc_tp";
278				regulator-state-mem {
279					regulator-off-in-suspend;
280				};
281			};
282
283			vdd_10: LDO_REG3 {
284				regulator-always-on;
285				regulator-boot-on;
286				regulator-min-microvolt = <1000000>;
287				regulator-max-microvolt = <1000000>;
288				regulator-name = "vdd_10";
289				regulator-state-mem {
290					regulator-on-in-suspend;
291					regulator-suspend-microvolt = <1000000>;
292				};
293			};
294
295			vcc18_lcd: LDO_REG4 {
296				regulator-always-on;
297				regulator-boot-on;
298				regulator-min-microvolt = <1800000>;
299				regulator-max-microvolt = <1800000>;
300				regulator-name = "vcc18_lcd";
301				regulator-state-mem {
302					regulator-off-in-suspend;
303				};
304			};
305
306			vccio_pmu: LDO_REG5 {
307				regulator-always-on;
308				regulator-boot-on;
309				regulator-min-microvolt = <3300000>;
310				regulator-max-microvolt = <3300000>;
311				regulator-name = "vccio_pmu";
312				regulator-state-mem {
313					regulator-on-in-suspend;
314					regulator-suspend-microvolt = <3300000>;
315				};
316			};
317
318			vdd10_lcd: LDO_REG6 {
319				regulator-always-on;
320				regulator-boot-on;
321				regulator-min-microvolt = <1000000>;
322				regulator-max-microvolt = <1000000>;
323				regulator-name = "vdd10_lcd";
324				regulator-state-mem {
325					regulator-off-in-suspend;
326				};
327			};
328
329			vcc_18: LDO_REG7 {
330				regulator-always-on;
331				regulator-boot-on;
332				regulator-min-microvolt = <1800000>;
333				regulator-max-microvolt = <1800000>;
334				regulator-name = "vcc_18";
335				regulator-state-mem {
336					regulator-on-in-suspend;
337					regulator-suspend-microvolt = <1800000>;
338				};
339			};
340
341			vccio_wl: LDO_REG8 {
342				regulator-always-on;
343				regulator-boot-on;
344				regulator-min-microvolt = <1800000>;
345				regulator-max-microvolt = <3300000>;
346				regulator-name = "vccio_wl";
347				regulator-state-mem {
348					regulator-on-in-suspend;
349					regulator-suspend-microvolt = <3300000>;
350				};
351			};
352
353			vccio_sd: LDO_REG9 {
354				regulator-always-on;
355				regulator-boot-on;
356				regulator-min-microvolt = <1800000>;
357				regulator-max-microvolt = <3300000>;
358				regulator-name = "vccio_sd";
359				regulator-state-mem {
360					regulator-on-in-suspend;
361					regulator-suspend-microvolt = <3300000>;
362				};
363			};
364
365			vcc_sd: SWITCH_REG {
366				regulator-always-on;
367				regulator-boot-on;
368				regulator-name = "vcc_sd";
369				regulator-state-mem {
370					regulator-on-in-suspend;
371				};
372			};
373
374			h_5v: HDMI_SWITCH {
375				regulator-always-on;
376				regulator-boot-on;
377				regulator-name = "h_5v";
378				regulator-state-mem {
379					regulator-on-in-suspend;
380				};
381			};
382		};
383	};
384};
385
386&i2c1 {
387	status = "okay";
388	clock-frequency = <400000>;
389
390	mpu6050@68 {
391		compatible = "invensense,mpu6050";
392		status = "okay";
393		pinctrl-names = "default";
394		pinctrl-0 = <&mpu6050_irq_gpio>;
395		reg = <0x68>;
396		irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>;
397		mpu-int_config = <0x10>;
398		mpu-level_shifter = <0>;
399		mpu-orientation = <0 1 0 1 0 0 0 0 1>;
400		orientation-x= <0>;
401		orientation-y= <1>;
402		orientation-z= <0>;
403		support-hw-poweroff = <1>;
404		mpu-debug = <1>;
405	};
406};
407
408&rockchip_suspend {
409	status = "okay";
410};
411
412&tsadc {
413	rockchip,hw-tshut-polarity = <1>; /* tshut polarity 0:LOW 1:HIGH */
414};
415
416&pinctrl {
417	lcd {
418		lcd_en: lcd-en  {
419			rockchip,pins = <7 RK_PA3 RK_FUNC_GPIO &pcfg_pull_none>;
420		};
421	};
422
423	mpu6050 {
424		mpu6050_irq_gpio: mpu6050-irq-gpio {
425			rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
426		};
427	};
428
429	pmic {
430		pmic_int: pmic-int {
431			rockchip,pins = <0 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
432		};
433		vsel1_gpio: vsel1-gpio {
434			rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_down>;
435		};
436	};
437};
438