xref: /OK3568_Linux_fs/kernel/arch/arm/boot/dts/rk3288-evb-android-rk808-edp.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
5 */
6
7/dts-v1/;
8#include "rk3288-evb.dtsi"
9#include "rk3288-android.dtsi"
10#include <dt-bindings/sensor-dev.h>
11
12/ {
13	panel {
14		compatible = "simple-panel";
15		backlight = <&backlight>;
16		enable-gpios = <&gpio7 RK_PA4 GPIO_ACTIVE_HIGH>;
17		prepare-delay-ms = <120>;
18
19		display-timings {
20			native-mode = <&timing0>;
21
22			timing0: timing0 {
23				clock-frequency = <200000000>;
24				hactive = <1536>;
25				vactive = <2048>;
26				hfront-porch = <12>;
27				hsync-len = <16>;
28				hback-porch = <48>;
29				vfront-porch = <8>;
30				vsync-len = <4>;
31				vback-porch = <8>;
32				hsync-active = <0>;
33				vsync-active = <0>;
34				de-active = <0>;
35				pixelclk-active = <0>;
36			};
37		};
38
39		port {
40			panel_in_edp: endpoint {
41				remote-endpoint = <&edp_out_panel>;
42			};
43		};
44	};
45
46	sdio_pwrseq: sdio-pwrseq {
47		compatible = "mmc-pwrseq-simple";
48		clocks = <&rk808 1>;
49		clock-names = "ext_clock";
50		pinctrl-names = "default";
51		pinctrl-0 = <&wifi_enable_h>;
52
53		/*
54		 * On the module itself this is one of these (depending
55		 * on the actual card populated):
56		 * - SDIO_RESET_L_WL_REG_ON
57		 * - PDN (power down when low)
58		 */
59		reset-gpios = <&gpio4 28 GPIO_ACTIVE_LOW>;
60	};
61
62	test-power {
63		status = "okay";
64	};
65
66	wireless-bluetooth {
67		clocks = <&rk808 1>;
68		clock-names = "ext_clock";
69	};
70
71	/delete-node/ sdmmc-regulator;
72
73	vdd_log: vdd-logic {
74		compatible = "pwm-regulator";
75		rockchip,pwm_id = <1>;
76		rockchip,pwm_voltage = <1100000>;
77		pwms = <&pwm1 0 25000 1>;
78		regulator-name = "vcc_log";
79		regulator-min-microvolt = <860000>;
80		regulator-max-microvolt = <1360000>;
81		regulator-always-on;
82		regulator-boot-on;
83	};
84
85	xin32k: xin32k {
86		compatible = "fixed-clock";
87		clock-frequency = <32768>;
88		clock-output-names = "xin32k";
89		#clock-cells = <0>;
90	};
91};
92
93&backlight {
94	pwms = <&pwm0 0 1000000 0>;
95	enable-gpios = <&gpio7 RK_PA2 GPIO_ACTIVE_HIGH>;
96};
97
98&cpu0 {
99	cpu-supply = <&vdd_cpu>;
100};
101
102&cif_isp0 {
103	status = "okay";
104};
105
106&dfi {
107	status = "okay";
108};
109
110&dmc {
111	center-supply = <&vdd_log>;
112	status = "okay";
113};
114
115&edp {
116	force-hpd;
117	status = "okay";
118
119	ports {
120		port@1 {
121			reg = <1>;
122
123			edp_out_panel: endpoint {
124				remote-endpoint = <&panel_in_edp>;
125			};
126		};
127	};
128};
129
130&edp_in_vopb {
131	status = "disabled";
132};
133
134&edp_in_vopl {
135	status = "okay";
136};
137
138&route_edp {
139	connect = <&vopl_out_edp>;
140	status = "okay";
141};
142
143&gpu {
144	status = "okay";
145	mali-supply = <&vdd_gpu>;
146};
147
148&gmac {
149	max-speed = <1000>;
150};
151
152&hdmi_analog_sound {
153	status = "disabled";
154};
155
156&sound {
157	status = "okay";
158};
159
160&i2c0 {
161	clock-frequency = <400000>;
162
163	rk808: pmic@1b {
164		compatible = "rockchip,rk808";
165		reg = <0x1b>;
166		interrupt-parent = <&gpio0>;
167		interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
168		pinctrl-names = "default";
169		pinctrl-0 = <&pmic_int &global_pwroff>;
170		rockchip,system-power-controller;
171		wakeup-source;
172		#clock-cells = <1>;
173		clock-output-names = "rk808-clkout1", "rk808-clkout2";
174
175		vcc1-supply = <&vcc_sys>;
176		vcc2-supply = <&vcc_sys>;
177		vcc3-supply = <&vcc_sys>;
178		vcc4-supply = <&vcc_sys>;
179		vcc6-supply = <&vcc_sys>;
180		vcc8-supply = <&vcc_io>;
181		vcc9-supply = <&vcc_io>;
182		vcc12-supply = <&vcc_io>;
183		vddio-supply = <&vcc_io>;
184
185		regulators {
186			vdd_cpu: DCDC_REG1 {
187				regulator-always-on;
188				regulator-boot-on;
189				regulator-min-microvolt = <750000>;
190				regulator-max-microvolt = <1400000>;
191				regulator-name = "vdd_arm";
192				regulator-state-mem {
193					regulator-off-in-suspend;
194				};
195			};
196
197			vdd_gpu: DCDC_REG2 {
198				regulator-always-on;
199				regulator-boot-on;
200				regulator-min-microvolt = <850000>;
201				regulator-max-microvolt = <1250000>;
202				regulator-name = "vdd_gpu";
203				regulator-ramp-delay = <6000>;
204				regulator-state-mem {
205					regulator-off-in-suspend;
206				};
207			};
208
209			vcc_ddr: DCDC_REG3 {
210				regulator-always-on;
211				regulator-boot-on;
212				regulator-name = "vcc_ddr";
213				regulator-state-mem {
214					regulator-on-in-suspend;
215				};
216			};
217
218			vcc_io: DCDC_REG4 {
219				regulator-always-on;
220				regulator-boot-on;
221				regulator-min-microvolt = <3300000>;
222				regulator-max-microvolt = <3300000>;
223				regulator-name = "vcc_io";
224				regulator-state-mem {
225					regulator-on-in-suspend;
226					regulator-suspend-microvolt = <3300000>;
227				};
228			};
229
230			vcc_tp: LDO_REG1 {
231				regulator-always-on;
232				regulator-boot-on;
233				regulator-min-microvolt = <3300000>;
234				regulator-max-microvolt = <3300000>;
235				regulator-name = "vcc_tp";
236				regulator-state-mem {
237					regulator-off-in-suspend;
238				};
239			};
240
241			vcca_codec: LDO_REG2 {
242				regulator-always-on;
243				regulator-boot-on;
244				regulator-min-microvolt = <3300000>;
245				regulator-max-microvolt = <3300000>;
246				regulator-name = "vcca_codec";
247				regulator-state-mem {
248					regulator-on-in-suspend;
249					regulator-suspend-microvolt = <3300000>;
250				};
251			};
252
253			vdd_10: LDO_REG3 {
254				regulator-always-on;
255				regulator-boot-on;
256				regulator-min-microvolt = <1000000>;
257				regulator-max-microvolt = <1000000>;
258				regulator-name = "vdd_10";
259				regulator-state-mem {
260					regulator-on-in-suspend;
261					regulator-suspend-microvolt = <1000000>;
262				};
263			};
264
265			vcc_wl: LDO_REG4 {
266				regulator-always-on;
267				regulator-boot-on;
268				regulator-min-microvolt = <1800000>;
269				regulator-max-microvolt = <1800000>;
270				regulator-name = "vcc_wl";
271				regulator-state-mem {
272					regulator-on-in-suspend;
273				};
274			};
275
276			vccio_sd: LDO_REG5 {
277				regulator-always-on;
278				regulator-boot-on;
279				regulator-min-microvolt = <1800000>;
280				regulator-max-microvolt = <3300000>;
281				regulator-name = "vccio_sd";
282				regulator-state-mem {
283					regulator-off-in-suspend;
284				};
285			};
286
287			vdd10_lcd: LDO_REG6 {
288				regulator-always-on;
289				regulator-boot-on;
290				regulator-min-microvolt = <1000000>;
291				regulator-max-microvolt = <1000000>;
292				regulator-name = "vdd10_lcd";
293				regulator-state-mem {
294					regulator-off-in-suspend;
295				};
296			};
297
298			vcc_18: LDO_REG7 {
299				regulator-always-on;
300				regulator-boot-on;
301				regulator-min-microvolt = <1800000>;
302				regulator-max-microvolt = <1800000>;
303				regulator-name = "vcc_18";
304				regulator-state-mem {
305					regulator-on-in-suspend;
306					regulator-suspend-microvolt = <1800000>;
307				};
308			};
309
310			vcc18_lcd: LDO_REG8 {
311				regulator-always-on;
312				regulator-boot-on;
313				regulator-min-microvolt = <1800000>;
314				regulator-max-microvolt = <1800000>;
315				regulator-name = "vcc18_lcd";
316				regulator-state-mem {
317					regulator-off-in-suspend;
318				};
319			};
320
321			vcc_sd: SWITCH_REG1 {
322				regulator-always-on;
323				regulator-boot-on;
324				regulator-name = "vcc_sd";
325				regulator-state-mem {
326					regulator-off-in-suspend;
327				};
328			};
329
330			vcc_lcd: SWITCH_REG2 {
331				regulator-always-on;
332				regulator-boot-on;
333				regulator-name = "vcc_lcd";
334				regulator-state-mem {
335					regulator-off-in-suspend;
336				};
337			};
338		};
339	};
340};
341
342&i2c1 {
343	status = "okay";
344	clock-frequency = <400000>;
345
346	mpu6050_acc: mpu-acc@68 {
347		status = "okay";
348		compatible = "mpu6500_acc";
349		pinctrl-names = "default";
350		pinctrl-0 = <&mpu6050_irq_gpio>;
351		reg = <0x68>;
352		irq-gpio = <&gpio8 0 IRQ_TYPE_EDGE_RISING>;
353		irq_enable = <0>;
354		poll_delay_ms = <30>;
355		type = <SENSOR_TYPE_ACCEL>;
356		layout = <8>;
357	};
358
359	mpu6050_gyro: mpu-gyro@68 {
360		status = "okay";
361		compatible = "mpu6500_gyro";
362		reg = <0x68>;
363		irq_enable = <0>;
364		poll_delay_ms = <30>;
365		type = <SENSOR_TYPE_GYROSCOPE>;
366		layout = <8>;
367	};
368
369	ak8963_compass: ak8963-compass@0d {
370		status = "okay";
371		compatible = "ak8963";
372		pinctrl-names = "default";
373		pinctrl-0 = <&ak8963_irq_gpio>;
374		reg = <0x0d>;
375		type = <SENSOR_TYPE_COMPASS>;
376		irq-gpio = <&gpio8 1 IRQ_TYPE_EDGE_RISING>;
377		irq_enable = <0>;
378		poll_delay_ms = <30>;
379		layout = <1>;
380	};
381
382};
383
384&io_domains {
385	status = "okay";
386	audio-supply = <&vcc_io>;
387	bb-supply = <&vcc_io>;
388	dvp-supply = <&vcc_io>;
389	flash0-supply = <&vcc_18>;
390	flash1-supply = <&vcc_io>;
391	gpio30-supply = <&vcc_io>;
392	gpio1830 = <&vcc_io>;
393	lcdc-supply = <&vcc_lcd>;
394	sdcard-supply = <&vccio_sd>;
395	wifi-supply = <&vcc_wl>;
396};
397
398&rockchip_suspend {
399	status = "okay";
400	rockchip,pwm-regulator-config = <
401	(0
402	| PWM1_REGULATOR_EN
403	)
404	>;
405};
406
407&pwm0 {
408	status = "okay";
409};
410
411&pwm1 {
412	status = "okay";
413	pinctrl-names = "active";
414	pinctrl-0 = <&pwm1_pin_pull_down>;
415};
416
417&pinctrl {
418	mpu6050 {
419		mpu6050_irq_gpio: mpu6050-irq-gpio {
420			rockchip,pins = <8 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
421		};
422	};
423
424	ak8963 {
425		ak8963_irq_gpio: ak8963-irq-gpio {
426			rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
427		};
428	};
429};
430