xref: /OK3568_Linux_fs/kernel/arch/arm64/boot/dts/rockchip/px30-evb-ddr3-lvds-v10.dts (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1/*
2 * Copyright (c) 2017 Fuzhou Rockchip Electronics Co., Ltd
3 *
4 * SPDX-License-Identifier: (GPL-2.0+ OR MIT)
5 */
6
7/dts-v1/;
8#include <dt-bindings/gpio/gpio.h>
9#include <dt-bindings/pinctrl/rockchip.h>
10#include <dt-bindings/input/input.h>
11#include <dt-bindings/sensor-dev.h>
12#include "px30.dtsi"
13#include "px30-android.dtsi"
14
15/ {
16	model = "Rockchip PX30 evb ddr3 lvds board";
17	compatible = "rockchip,px30-evb-ddr3-lvds-v10", "rockchip,px30";
18
19	adc-keys {
20		compatible = "adc-keys";
21		io-channels = <&saradc 2>;
22		io-channel-names = "buttons";
23		poll-interval = <100>;
24		keyup-threshold-microvolt = <1800000>;
25
26		esc-key {
27			linux,code = <KEY_ESC>;
28			label = "esc";
29			press-threshold-microvolt = <1270000>;
30		};
31
32		home-key {
33			linux,code = <KEY_HOME>;
34			label = "home";
35			press-threshold-microvolt = <602000>;
36		};
37
38		menu-key {
39			linux,code = <KEY_MENU>;
40			label = "menu";
41			press-threshold-microvolt = <952000>;
42		};
43
44		vol-down-key {
45			linux,code = <KEY_VOLUMEDOWN>;
46			label = "volume down";
47			press-threshold-microvolt = <290000>;
48		};
49
50		vol-up-key {
51			linux,code = <KEY_VOLUMEUP>;
52			label = "volume up";
53			press-threshold-microvolt = <17000>;
54		};
55	};
56
57	backlight: backlight {
58		compatible = "pwm-backlight";
59		pwms = <&pwm1 0 25000 0>;
60		brightness-levels = <
61			  0   1   2   3   4   5   6   7
62			  8   9  10  11  12  13  14  15
63			 16  17  18  19  20  21  22  23
64			 24  25  26  27  28  29  30  31
65			 32  33  34  35  36  37  38  39
66			 40  41  42  43  44  45  46  47
67			 48  49  50  51  52  53  54  55
68			 56  57  58  59  60  61  62  63
69			 64  65  66  67  68  69  70  71
70			 72  73  74  75  76  77  78  79
71			 80  81  82  83  84  85  86  87
72			 88  89  90  91  92  93  94  95
73			 96  97  98  99 100 101 102 103
74			104 105 106 107 108 109 110 111
75			112 113 114 115 116 117 118 119
76			120 121 122 123 124 125 126 127
77			128 129 130 131 132 133 134 135
78			136 137 138 139 140 141 142 143
79			144 145 146 147 148 149 150 151
80			152 153 154 155 156 157 158 159
81			160 161 162 163 164 165 166 167
82			168 169 170 171 172 173 174 175
83			176 177 178 179 180 181 182 183
84			184 185 186 187 188 189 190 191
85			192 193 194 195 196 197 198 199
86			200 201 202 203 204 205 206 207
87			208 209 210 211 212 213 214 215
88			216 217 218 219 220 221 222 223
89			224 225 226 227 228 229 230 231
90			232 233 234 235 236 237 238 239
91			240 241 242 243 244 245 246 247
92			248 249 250 251 252 253 254 255>;
93		default-brightness-level = <200>;
94	};
95
96	panel {
97		compatible = "samsung,lsl070nl01", "simple-panel";
98		backlight = <&backlight>;
99		power-supply = <&vcc3v3_lcd>;
100		enable-delay-ms = <20>;
101		prepare-delay-ms = <20>;
102		unprepare-delay-ms = <20>;
103		disable-delay-ms = <20>;
104		bus-format = <MEDIA_BUS_FMT_RGB888_1X7X4_SPWG>;
105
106		width-mm = <217>;
107		height-mm = <136>;
108
109		display-timings {
110			native-mode = <&timing0>;
111
112			timing0: timing0 {
113				clock-frequency = <49500000>;
114				hactive = <1024>;
115				vactive = <600>;
116				hback-porch = <90>;
117				hfront-porch = <90>;
118				vback-porch = <10>;
119				vfront-porch = <10>;
120				hsync-len = <90>;
121				vsync-len = <10>;
122				hsync-active = <0>;
123				vsync-active = <0>;
124				de-active = <0>;
125				pixelclk-active = <0>;
126			};
127		};
128
129		port {
130			panel_in_lvds: endpoint {
131				remote-endpoint = <&lvds_out_panel>;
132			};
133		};
134	};
135
136	sdio_pwrseq: sdio-pwrseq {
137		compatible = "mmc-pwrseq-simple";
138		/*clocks = <&rk809 1>;*/
139		/*clock-names = "ext_clock";*/
140		pinctrl-names = "default";
141		pinctrl-0 = <&wifi_enable_h>;
142
143		/*
144		 * On the module itself this is one of these (depending
145		 * on the actual card populated):
146		 * - SDIO_RESET_L_WL_REG_ON
147		 * - PDN (power down when low)
148		 */
149		reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
150	};
151
152	vcc_phy: vcc-phy-regulator {
153		compatible = "regulator-fixed";
154		regulator-name = "vcc_phy";
155		regulator-always-on;
156		regulator-boot-on;
157	};
158
159	vcc5v0_sys: vccsys {
160		compatible = "regulator-fixed";
161		regulator-name = "vcc5v0_sys";
162		regulator-always-on;
163		regulator-boot-on;
164		regulator-min-microvolt = <5000000>;
165		regulator-max-microvolt = <5000000>;
166	};
167
168	wireless-wlan {
169		compatible = "wlan-platdata";
170		wifi_chip_type = "AP6210";
171		WIFI,host_wake_irq = <&gpio0 RK_PB2 GPIO_ACTIVE_HIGH>;
172		status = "okay";
173	};
174
175	wireless-bluetooth {
176		compatible = "bluetooth-platdata";
177		/*clocks = <&rk809 1>;*/
178		/*clock-names = "ext_clock";*/
179		uart_rts_gpios = <&gpio1 RK_PC3 GPIO_ACTIVE_LOW>;
180		pinctrl-names = "default","rts_gpio";
181		pinctrl-0 = <&uart1_rts>;
182		pinctrl-1 = <&uart1_rts_gpio>;
183		BT,reset_gpio = <&gpio0 RK_PC1 GPIO_ACTIVE_HIGH>;
184		BT,wake_gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
185		BT,wake_host_irq = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
186		status = "okay";
187	};
188};
189
190&cpu0 {
191	cpu-supply = <&vdd_arm>;
192};
193
194&display_subsystem {
195	status = "okay";
196};
197
198&dfi {
199	status = "okay";
200};
201
202&dmc {
203	center-supply = <&vdd_logic>;
204	status = "okay";
205};
206
207&emmc {
208	bus-width = <8>;
209	cap-mmc-highspeed;
210	mmc-hs200-1_8v;
211	no-sdio;
212	no-sd;
213	disable-wp;
214	non-removable;
215	num-slots = <1>;
216	status = "okay";
217};
218
219&gmac {
220	phy-supply = <&vcc_phy>;
221	clock_in_out = "output";
222	snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
223	snps,reset-active-low;
224	snps,reset-delays-us = <0 50000 50000>;
225	status = "okay";
226};
227
228&gpu {
229	mali-supply = <&vdd_logic>;
230	status = "okay";
231};
232
233&i2c0 {
234	status = "okay";
235
236	rk809: pmic@20 {
237		compatible = "rockchip,rk809";
238		reg = <0x20>;
239		interrupt-parent = <&gpio0>;
240		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
241		pinctrl-names = "default";
242		pinctrl-0 = <&pmic_int>;
243		rockchip,system-power-controller;
244		wakeup-source;
245		#clock-cells = <1>;
246		clock-output-names = "rk808-clkout1", "rk808-clkout2";
247
248		vcc1-supply = <&vcc5v0_sys>;
249		vcc2-supply = <&vcc5v0_sys>;
250		vcc3-supply = <&vcc5v0_sys>;
251		vcc4-supply = <&vcc5v0_sys>;
252		vcc5-supply = <&vcc3v3_sys>;
253		vcc6-supply = <&vcc3v3_sys>;
254		vcc7-supply = <&vcc3v3_sys>;
255		vcc8-supply = <&vcc3v3_sys>;
256		vcc9-supply = <&vcc5v0_sys>;
257
258		regulators {
259			vdd_logic: DCDC_REG1 {
260				regulator-always-on;
261				regulator-boot-on;
262				regulator-min-microvolt = <850000>;
263				regulator-max-microvolt = <1350000>;
264				regulator-ramp-delay = <6001>;
265				regulator-initial-mode = <0x1>;
266				regulator-name = "vdd_logic";
267				regulator-state-mem {
268					regulator-on-in-suspend;
269					regulator-suspend-microvolt = <950000>;
270				};
271			};
272
273			vdd_arm: DCDC_REG2 {
274				regulator-always-on;
275				regulator-boot-on;
276				regulator-min-microvolt = <850000>;
277				regulator-max-microvolt = <1350000>;
278				regulator-ramp-delay = <6001>;
279				regulator-initial-mode = <0x1>;
280				regulator-name = "vdd_arm";
281				regulator-state-mem {
282					regulator-off-in-suspend;
283					regulator-suspend-microvolt = <950000>;
284				};
285			};
286
287			vcc_ddr: DCDC_REG3 {
288				regulator-always-on;
289				regulator-boot-on;
290				regulator-name = "vcc_ddr";
291				regulator-initial-mode = <0x1>;
292				regulator-state-mem {
293					regulator-on-in-suspend;
294				};
295			};
296
297			vcc_3v0: DCDC_REG4 {
298				regulator-always-on;
299				regulator-boot-on;
300				regulator-min-microvolt = <3000000>;
301				regulator-max-microvolt = <3000000>;
302				regulator-initial-mode = <0x1>;
303				regulator-name = "vcc_3v0";
304				regulator-state-mem {
305					regulator-off-in-suspend;
306					regulator-suspend-microvolt = <3000000>;
307				};
308			};
309
310			vcc_1v0: LDO_REG1 {
311				regulator-always-on;
312				regulator-boot-on;
313				regulator-min-microvolt = <1000000>;
314				regulator-max-microvolt = <1000000>;
315				regulator-name = "vcc_1v0";
316				regulator-state-mem {
317					regulator-on-in-suspend;
318					regulator-suspend-microvolt = <1000000>;
319				};
320			};
321
322			vcc1v8_soc: LDO_REG2 {
323				regulator-always-on;
324				regulator-boot-on;
325				regulator-min-microvolt = <1800000>;
326				regulator-max-microvolt = <1800000>;
327
328				regulator-name = "vcc1v8_soc";
329				regulator-state-mem {
330					regulator-on-in-suspend;
331					regulator-suspend-microvolt = <1800000>;
332				};
333			};
334
335			vdd1v0_soc: LDO_REG3 {
336				regulator-always-on;
337				regulator-boot-on;
338				regulator-min-microvolt = <1000000>;
339				regulator-max-microvolt = <1000000>;
340
341				regulator-name = "vcc1v0_soc";
342				regulator-state-mem {
343					regulator-on-in-suspend;
344					regulator-suspend-microvolt = <1000000>;
345				};
346			};
347
348			vcc3v0_pmu: LDO_REG4 {
349				regulator-always-on;
350				regulator-boot-on;
351				regulator-min-microvolt = <3000000>;
352				regulator-max-microvolt = <3000000>;
353
354				regulator-name = "vcc3v0_pmu";
355				regulator-state-mem {
356					regulator-on-in-suspend;
357					regulator-suspend-microvolt = <3000000>;
358
359				};
360			};
361
362			vccio_sd: LDO_REG5 {
363				regulator-always-on;
364				regulator-boot-on;
365				regulator-min-microvolt = <1800000>;
366				regulator-max-microvolt = <3300000>;
367
368				regulator-name = "vccio_sd";
369				regulator-state-mem {
370					regulator-on-in-suspend;
371					regulator-suspend-microvolt = <3300000>;
372				};
373			};
374
375			vcc_sd: LDO_REG6 {
376				regulator-min-microvolt = <3300000>;
377				regulator-max-microvolt = <3300000>;
378
379				regulator-name = "vcc_sd";
380				regulator-state-mem {
381					regulator-on-in-suspend;
382					regulator-suspend-microvolt = <3300000>;
383
384				};
385			};
386
387			vcc2v8_dvp: LDO_REG7 {
388				regulator-always-on;
389				regulator-boot-on;
390				regulator-min-microvolt = <2800000>;
391				regulator-max-microvolt = <2800000>;
392
393				regulator-name = "vcc2v8_dvp";
394				regulator-state-mem {
395					regulator-off-in-suspend;
396					regulator-suspend-microvolt = <2800000>;
397				};
398			};
399
400			vcc1v8_dvp: LDO_REG8 {
401				regulator-always-on;
402				regulator-boot-on;
403				regulator-min-microvolt = <1800000>;
404				regulator-max-microvolt = <1800000>;
405
406				regulator-name = "vcc1v8_dvp";
407				regulator-state-mem {
408					regulator-on-in-suspend;
409					regulator-suspend-microvolt = <1800000>;
410				};
411			};
412
413			vdd1v5_dvp: LDO_REG9 {
414				regulator-always-on;
415				regulator-boot-on;
416				regulator-min-microvolt = <1500000>;
417				regulator-max-microvolt = <1500000>;
418
419				regulator-name = "vdd1v5_dvp";
420				regulator-state-mem {
421					regulator-off-in-suspend;
422					regulator-suspend-microvolt = <1500000>;
423				};
424			};
425
426			vcc3v3_sys: DCDC_REG5 {
427				regulator-always-on;
428				regulator-boot-on;
429				regulator-min-microvolt = <3300000>;
430				regulator-max-microvolt = <3300000>;
431				regulator-name = "vcc3v3_sys";
432				regulator-state-mem {
433					regulator-on-in-suspend;
434					regulator-suspend-microvolt = <3300000>;
435				};
436			};
437
438			vcc3v3_lcd: SWITCH_REG1 {
439				regulator-boot-on;
440				regulator-name = "vcc3v3_lcd";
441			};
442
443			vcc5v0_host: SWITCH_REG2 {
444				regulator-always-on;
445				regulator-boot-on;
446				regulator-name = "vcc5v0_host";
447			};
448		};
449	};
450};
451
452&i2c1 {
453	status = "okay";
454
455	sensor@f {
456		status = "okay";
457		compatible = "ak8963";
458		reg = <0x0f>;
459		type = <SENSOR_TYPE_COMPASS>;
460		irq_enable = <0>;
461		poll_delay_ms = <30>;
462		layout = <1>;
463		reprobe_en = <1>;
464	};
465
466	gt1x: gt1x@14 {
467	      compatible = "goodix,gt1x";
468	      reg = <0x14>;
469	      goodix,rst-gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
470	      goodix,irq-gpio = <&gpio0 RK_PA5 IRQ_TYPE_LEVEL_LOW>;
471	};
472
473	sensor@4c {
474		status = "okay";
475		compatible = "gs_mma7660";
476		reg = <0x4c>;
477		type = <SENSOR_TYPE_ACCEL>;
478		irq-gpio = <&gpio0 RK_PB7 IRQ_TYPE_LEVEL_LOW>;
479		irq_enable = <0>;
480		poll_delay_ms = <30>;
481		layout = <2>;
482		reprobe_en = <1>;
483	};
484};
485
486&io_domains {
487	status = "okay";
488
489	vccio1-supply = <&vcc1v8_soc>;
490	vccio2-supply = <&vccio_sd>;
491	vccio3-supply = <&vcc_3v0>;
492	vccio4-supply = <&vcc3v0_pmu>;
493	vccio5-supply = <&vcc_3v0>;
494};
495
496&lvds {
497	status = "okay";
498
499	ports {
500		port@1 {
501			reg = <1>;
502
503			lvds_out_panel: endpoint {
504				remote-endpoint = <&panel_in_lvds>;
505			};
506		};
507	};
508};
509
510&lvds_in_vopb {
511	status = "okay";
512};
513
514&lvds_in_vopl {
515	status = "disabled";
516};
517
518&route_lvds {
519	connect = <&vopb_out_lvds>;
520	status = "okay";
521};
522
523&nandc0 {
524	status = "okay";
525};
526
527&pinctrl {
528	pmic {
529		pmic_int: pmic_int {
530			rockchip,pins =
531				<0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
532		};
533	};
534
535	sdio-pwrseq {
536		wifi_enable_h: wifi-enable-h {
537			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
538		};
539	};
540};
541
542&pmu_io_domains {
543	status = "okay";
544
545	pmuio1-supply = <&vcc3v0_pmu>;
546	pmuio2-supply = <&vcc3v0_pmu>;
547};
548
549&pwm1 {
550	status = "okay";
551};
552
553&rk_rga {
554	status = "okay";
555};
556
557&saradc {
558	status = "okay";
559	vref-supply = <&vcc1v8_soc>;
560};
561
562&sdmmc {
563	bus-width = <4>;
564	cap-mmc-highspeed;
565	cap-sd-highspeed;
566	no-sdio;
567	no-mmc;
568	card-detect-delay = <800>;
569	ignore-pm-notify;
570	/*cd-gpios = <&gpio2 4 GPIO_ACTIVE_HIGH>; [> CD GPIO <]*/
571	sd-uhs-sdr12;
572	sd-uhs-sdr25;
573	sd-uhs-sdr50;
574	sd-uhs-sdr104;
575	vqmmc-supply = <&vccio_sd>;
576	vmmc-supply = <&vcc_sd>;
577	status = "okay";
578};
579
580&sdio {
581	bus-width = <4>;
582	cap-sd-highspeed;
583	no-sd;
584	no-mmc;
585	ignore-pm-notify;
586	keep-power-in-suspend;
587	non-removable;
588	mmc-pwrseq = <&sdio_pwrseq>;
589	sd-uhs-sdr104;
590	status = "okay";
591};
592
593&tsadc {
594	pinctrl-names = "gpio", "otpout";
595	pinctrl-0 = <&tsadc_otp_gpio>;
596	pinctrl-1 = <&tsadc_otp_out>;
597	status = "okay";
598};
599
600&uart1 {
601	pinctrl-names = "default";
602	pinctrl-0 = <&uart1_xfer &uart1_cts>;
603	status = "okay";
604};
605
606&u2phy {
607	status = "okay";
608
609	u2phy_host: host-port {
610		status = "okay";
611	};
612
613	u2phy_otg: otg-port {
614		status = "okay";
615	};
616};
617
618&usb20_otg {
619	status = "okay";
620};
621
622&usb_host0_ehci {
623	status = "okay";
624};
625
626&usb_host0_ohci {
627	status = "okay";
628};
629
630&vopb {
631	status = "okay";
632};
633
634&vopb_mmu {
635	status = "okay";
636};
637
638&vopl {
639	status = "okay";
640};
641
642&vopl_mmu {
643	status = "okay";
644};
645
646&mpp_srv {
647	status = "okay";
648};
649
650&vdpu {
651	status = "okay";
652};
653
654&vepu {
655	status = "okay";
656};
657
658&vpu_mmu {
659	status = "okay";
660};
661
662&hevc {
663	status = "okay";
664};
665
666&hevc_mmu {
667	status = "okay";
668};
669
670&firmware_android {
671	compatible = "android,firmware";
672	fstab {
673		compatible = "android,fstab";
674		system {
675			compatible = "android,system";
676			dev = "/dev/block/by-name/system";
677			type = "ext4";
678			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
679			fsmgr_flags = "wait";
680		};
681		vendor {
682			compatible = "android,vendor";
683			dev = "/dev/block/by-name/vendor";
684			type = "ext4";
685			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
686			fsmgr_flags = "wait";
687		};
688	};
689};
690