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