xref: /OK3568_Linux_fs/kernel/scripts/dtc/include-prefixes/arm64/rockchip/px30-ad-r35-mb.dtsi (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6#include <dt-bindings/gpio/gpio.h>
7#include <dt-bindings/pinctrl/rockchip.h>
8#include <dt-bindings/input/input.h>
9#include <dt-bindings/sensor-dev.h>
10#include <dt-bindings/display/drm_mipi_dsi.h>
11#include <dt-bindings/display/media-bus-format.h>
12#include "px30.dtsi"
13#include "px30-android.dtsi"
14
15/ {
16	model = "Rockchip PX30 AD R35 MB board";
17	compatible = "rockchip,px30-ad-r35-mb", "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		enable-gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
95	};
96
97	sdio_pwrseq: sdio-pwrseq {
98		compatible = "mmc-pwrseq-simple";
99		pinctrl-names = "default";
100		pinctrl-0 = <&wifi_enable_h>;
101
102		/*
103		 * On the module itself this is one of these (depending
104		 * on the actual card populated):
105		 * - SDIO_RESET_L_WL_REG_ON
106		 * - PDN (power down when low)
107		 */
108		reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>;
109	};
110
111	vcc_phy: vcc-phy-regulator {
112		compatible = "regulator-fixed";
113		regulator-name = "vcc_phy";
114		regulator-always-on;
115		regulator-boot-on;
116	};
117
118	vcc5v0_sys: vccsys {
119		compatible = "regulator-fixed";
120		regulator-name = "vcc5v0_sys";
121		regulator-always-on;
122		regulator-boot-on;
123		regulator-min-microvolt = <5000000>;
124		regulator-max-microvolt = <5000000>;
125	};
126};
127
128&cpu0 {
129	cpu-supply = <&vdd_arm>;
130};
131
132&display_subsystem {
133	status = "okay";
134};
135
136&dfi {
137	status = "okay";
138};
139
140&dmc {
141	center-supply = <&vdd_logic>;
142	status = "okay";
143};
144
145&emmc {
146	bus-width = <8>;
147	cap-mmc-highspeed;
148	mmc-hs200-1_8v;
149	no-sdio;
150	no-sd;
151	disable-wp;
152	non-removable;
153	num-slots = <1>;
154	status = "okay";
155};
156
157&gpu {
158	mali-supply = <&vdd_logic>;
159	status = "okay";
160};
161
162&i2c0 {
163	status = "okay";
164
165	rk809: pmic@20 {
166		compatible = "rockchip,rk809";
167		reg = <0x20>;
168		interrupt-parent = <&gpio0>;
169		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
170		pinctrl-names = "default";
171		pinctrl-0 = <&pmic_int>;
172		rockchip,system-power-controller;
173		wakeup-source;
174		#clock-cells = <1>;
175		clock-output-names = "rk808-clkout1", "rk808-clkout2";
176
177		vcc1-supply = <&vcc5v0_sys>;
178		vcc2-supply = <&vcc5v0_sys>;
179		vcc3-supply = <&vcc5v0_sys>;
180		vcc4-supply = <&vcc5v0_sys>;
181		vcc5-supply = <&vcc3v3_sys>;
182		vcc6-supply = <&vcc3v3_sys>;
183		vcc7-supply = <&vcc3v3_sys>;
184		vcc8-supply = <&vcc3v3_sys>;
185		vcc9-supply = <&vcc5v0_sys>;
186
187		regulators {
188			vdd_logic: DCDC_REG1 {
189				regulator-always-on;
190				regulator-boot-on;
191				regulator-min-microvolt = <850000>;
192				regulator-max-microvolt = <1350000>;
193				regulator-ramp-delay = <6001>;
194				regulator-initial-mode = <0x1>;
195				regulator-name = "vdd_logic";
196
197				regulator-state-mem {
198					regulator-on-in-suspend;
199					regulator-suspend-microvolt = <950000>;
200				};
201			};
202
203			vdd_arm: DCDC_REG2 {
204				regulator-always-on;
205				regulator-boot-on;
206				regulator-min-microvolt = <850000>;
207				regulator-max-microvolt = <1350000>;
208				regulator-ramp-delay = <6001>;
209				regulator-initial-mode = <0x1>;
210				regulator-name = "vdd_arm";
211
212				regulator-state-mem {
213					regulator-off-in-suspend;
214					regulator-suspend-microvolt = <950000>;
215				};
216			};
217
218			vcc_ddr: DCDC_REG3 {
219				regulator-always-on;
220				regulator-boot-on;
221				regulator-name = "vcc_ddr";
222				regulator-initial-mode = <0x1>;
223
224				regulator-state-mem {
225					regulator-on-in-suspend;
226				};
227			};
228
229			vcc_3v0: DCDC_REG4 {
230				regulator-always-on;
231				regulator-boot-on;
232				regulator-min-microvolt = <3000000>;
233				regulator-max-microvolt = <3000000>;
234				regulator-initial-mode = <0x1>;
235				regulator-name = "vcc_3v0";
236
237				regulator-state-mem {
238					regulator-off-in-suspend;
239					regulator-suspend-microvolt = <3000000>;
240				};
241			};
242
243			vcc_1v0: LDO_REG1 {
244				regulator-always-on;
245				regulator-boot-on;
246				regulator-min-microvolt = <1000000>;
247				regulator-max-microvolt = <1000000>;
248				regulator-name = "vcc_1v0";
249
250				regulator-state-mem {
251					regulator-on-in-suspend;
252					regulator-suspend-microvolt = <1000000>;
253				};
254			};
255
256			vcc1v8_soc: LDO_REG2 {
257				regulator-always-on;
258				regulator-boot-on;
259				regulator-min-microvolt = <1800000>;
260				regulator-max-microvolt = <1800000>;
261				regulator-name = "vcc1v8_soc";
262
263				regulator-state-mem {
264					regulator-on-in-suspend;
265					regulator-suspend-microvolt = <1800000>;
266				};
267			};
268
269			vdd1v0_soc: LDO_REG3 {
270				regulator-always-on;
271				regulator-boot-on;
272				regulator-min-microvolt = <1000000>;
273				regulator-max-microvolt = <1000000>;
274				regulator-name = "vcc1v0_soc";
275
276				regulator-state-mem {
277					regulator-on-in-suspend;
278					regulator-suspend-microvolt = <1000000>;
279				};
280			};
281
282			vcc3v0_pmu: LDO_REG4 {
283				regulator-always-on;
284				regulator-boot-on;
285				regulator-min-microvolt = <3300000>;
286				regulator-max-microvolt = <3300000>;
287				regulator-name = "vcc3v0_pmu";
288
289				regulator-state-mem {
290					regulator-on-in-suspend;
291					regulator-suspend-microvolt = <3300000>;
292
293				};
294			};
295
296			vccio_sd: LDO_REG5 {
297				regulator-always-on;
298				regulator-boot-on;
299				regulator-min-microvolt = <1800000>;
300				regulator-max-microvolt = <3300000>;
301				regulator-name = "vccio_sd";
302
303				regulator-state-mem {
304					regulator-on-in-suspend;
305					regulator-suspend-microvolt = <3300000>;
306				};
307			};
308
309			vcc_sd: LDO_REG6 {
310				regulator-min-microvolt = <3300000>;
311				regulator-max-microvolt = <3300000>;
312				regulator-name = "vcc_sd";
313
314				regulator-state-mem {
315					regulator-on-in-suspend;
316					regulator-suspend-microvolt = <3300000>;
317
318				};
319			};
320
321			vcc2v8_dvp: LDO_REG7 {
322				regulator-always-on;
323				regulator-boot-on;
324				regulator-min-microvolt = <2800000>;
325				regulator-max-microvolt = <2800000>;
326				regulator-name = "vcc2v8_dvp";
327
328				regulator-state-mem {
329					regulator-off-in-suspend;
330					regulator-suspend-microvolt = <2800000>;
331				};
332			};
333
334			vcc1v8_dvp: LDO_REG8 {
335				regulator-always-on;
336				regulator-boot-on;
337				regulator-min-microvolt = <1800000>;
338				regulator-max-microvolt = <1800000>;
339				regulator-name = "vcc1v8_dvp";
340
341				regulator-state-mem {
342					regulator-on-in-suspend;
343					regulator-suspend-microvolt = <1800000>;
344				};
345			};
346
347			vdd1v5_dvp: LDO_REG9 {
348				regulator-always-on;
349				regulator-boot-on;
350				regulator-min-microvolt = <1500000>;
351				regulator-max-microvolt = <1500000>;
352				regulator-name = "vdd1v5_dvp";
353
354				regulator-state-mem {
355					regulator-off-in-suspend;
356					regulator-suspend-microvolt = <1500000>;
357				};
358			};
359
360			vcc3v3_sys: DCDC_REG5 {
361				regulator-always-on;
362				regulator-boot-on;
363				regulator-min-microvolt = <3300000>;
364				regulator-max-microvolt = <3300000>;
365				regulator-name = "vcc3v3_sys";
366
367				regulator-state-mem {
368					regulator-on-in-suspend;
369					regulator-suspend-microvolt = <3300000>;
370				};
371			};
372
373			vcc3v3_lcd: SWITCH_REG1 {
374				regulator-boot-on;
375				regulator-name = "vcc3v3_lcd";
376			};
377
378			vcc5v0_host: SWITCH_REG2 {
379				regulator-always-on;
380				regulator-boot-on;
381				regulator-name = "vcc5v0_host";
382			};
383		};
384	};
385};
386
387&io_domains {
388	vccio1-supply = <&vcc1v8_soc>;
389	vccio2-supply = <&vccio_sd>;
390	vccio3-supply = <&vcc_3v0>;
391	vccio4-supply = <&vcc3v0_pmu>;
392	vccio5-supply = <&vcc_3v0>;
393	status = "okay";
394};
395
396&nandc0 {
397	status = "okay";
398};
399
400&pmu_io_domains {
401	pmuio1-supply = <&vcc3v0_pmu>;
402	pmuio2-supply = <&vcc3v0_pmu>;
403	status = "okay";
404};
405
406&pwm1 {
407	status = "okay";
408};
409
410&saradc {
411	vref-supply = <&vcc1v8_soc>;
412	status = "okay";
413};
414
415&sdmmc {
416	bus-width = <4>;
417	cap-mmc-highspeed;
418	cap-sd-highspeed;
419	no-sdio;
420	no-mmc;
421	card-detect-delay = <800>;
422	ignore-pm-notify;
423	sd-uhs-sdr12;
424	sd-uhs-sdr25;
425	sd-uhs-sdr50;
426	sd-uhs-sdr104;
427	vqmmc-supply = <&vccio_sd>;
428	vmmc-supply = <&vcc_sd>;
429	status = "okay";
430};
431
432&sdio {
433	bus-width = <4>;
434	cap-sd-highspeed;
435	no-sd;
436	no-mmc;
437	ignore-pm-notify;
438	keep-power-in-suspend;
439	non-removable;
440	mmc-pwrseq = <&sdio_pwrseq>;
441	sd-uhs-sdr104;
442	status = "okay";
443};
444
445&tsadc {
446	pinctrl-names = "init", "default";
447	pinctrl-0 = <&tsadc_otp_gpio>;
448	pinctrl-1 = <&tsadc_otp_out>;
449	status = "okay";
450};
451
452&uart1 {
453	pinctrl-names = "default";
454	pinctrl-0 = <&uart1_xfer &uart1_cts>;
455	status = "okay";
456};
457
458&u2phy {
459	status = "okay";
460
461	u2phy_host: host-port {
462		status = "okay";
463	};
464
465	u2phy_otg: otg-port {
466		status = "okay";
467	};
468};
469
470&usb20_otg {
471	status = "okay";
472};
473
474&usb_host0_ehci {
475	status = "okay";
476};
477
478&usb_host0_ohci {
479	status = "okay";
480};
481
482&vopb {
483	status = "okay";
484};
485
486&vopb_mmu {
487	status = "okay";
488};
489
490&vopl {
491	status = "okay";
492};
493
494&vopl_mmu {
495	status = "okay";
496};
497
498&mpp_srv {
499	status = "okay";
500};
501
502&vdpu {
503	status = "okay";
504};
505
506&vepu {
507	status = "okay";
508};
509
510&vpu_mmu {
511	status = "okay";
512};
513
514&hevc {
515	status = "okay";
516};
517
518&hevc_mmu {
519	status = "okay";
520};
521
522&dsi {
523	status = "okay";
524
525	panel@0 {
526		compatible = "pvo,p101nwwbp-01g", "simple-panel-dsi";
527		reg = <0>;
528		power-supply = <&vcc3v3_lcd>;
529		backlight = <&backlight>;
530		prepare-delay-ms = <20>;
531		reset-delay-ms = <20>;
532		init-delay-ms = <20>;
533		enable-delay-ms = <20>;
534		disable-delay-ms = <20>;
535		unprepare-delay-ms = <20>;
536
537		width-mm = <135>;
538		height-mm = <216>;
539
540		dsi,flags = <(MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
541			      MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_EOT_PACKET)>;
542		dsi,format = <MIPI_DSI_FMT_RGB888>;
543		dsi,lanes = <4>;
544
545		panel-init-sequence = [
546			15 00 02 E0 00
547			15 00 02 E1 93
548			15 00 02 E2 65
549			15 00 02 E3 F8
550			15 00 02 80 03
551			15 00 02 E0 04
552			15 00 02 2B 2B
553			15 00 02 2D 03
554			15 00 02 2E 44
555			15 00 02 E0 01
556			15 00 02 00 00
557			15 00 02 01 6D
558			15 00 02 0C 74
559			15 00 02 17 00
560			15 00 02 18 A7
561			15 00 02 19 01
562			15 00 02 1A 00
563			15 00 02 1B A7
564			15 00 02 1C 01
565			15 00 02 1F 6A
566			15 00 02 20 23
567			15 00 02 21 23
568			15 00 02 22 0E
569			15 00 02 35 28
570			15 00 02 37 59
571			15 00 02 38 05
572			15 00 02 39 04
573			15 00 02 3A 08
574			15 00 02 3B 08
575			15 00 02 3C 7C
576			15 00 02 3D FF
577			15 00 02 3E FF
578			15 00 02 3F FF
579			15 00 02 40 06
580			15 00 02 41 A0
581			15 00 02 43 08
582			15 00 02 44 0B
583			15 00 02 45 88
584			15 00 02 4B 04
585			15 00 02 55 01
586			15 00 02 56 01
587			15 00 02 57 8D
588			15 00 02 58 0A
589			15 00 02 59 0A
590			15 00 02 5A 28
591			15 00 02 5B 1E
592			15 00 02 5C 16
593			15 00 02 5D 76
594			15 00 02 5E 58
595			15 00 02 5F 46
596			15 00 02 60 39
597			15 00 02 61 37
598			15 00 02 62 2A
599			15 00 02 63 2F
600			15 00 02 64 18
601			15 00 02 65 39
602			15 00 02 66 38
603			15 00 02 67 3A
604			15 00 02 68 5A
605			15 00 02 69 46
606			15 00 02 6A 4C
607			15 00 02 6B 3F
608			15 00 02 6C 3D
609			15 00 02 6D 2F
610			15 00 02 6E 1E
611			15 00 02 6F 00
612			15 00 02 70 76
613			15 00 02 71 58
614			15 00 02 72 46
615			15 00 02 73 39
616			15 00 02 74 33
617			15 00 02 75 22
618			15 00 02 76 27
619			15 00 02 77 14
620			15 00 02 78 29
621			15 00 02 79 2A
622			15 00 02 7A 28
623			15 00 02 7B 46
624			15 00 02 7C 38
625			15 00 02 7D 3E
626			15 00 02 7E 31
627			15 00 02 7F 29
628			15 00 02 80 1B
629			15 00 02 81 0A
630			15 00 02 82 00
631			15 00 02 E0 02
632			15 00 02 00 44
633			15 00 02 01 44
634			15 00 02 02 45
635			15 00 02 03 45
636			15 00 02 04 46
637			15 00 02 05 46
638			15 00 02 06 47
639			15 00 02 07 47
640			15 00 02 08 1D
641			15 00 02 09 1D
642			15 00 02 0A 1D
643			15 00 02 0B 1D
644			15 00 02 0C 1D
645			15 00 02 0D 1D
646			15 00 02 0E 1D
647			15 00 02 0F 57
648			15 00 02 10 57
649			15 00 02 11 58
650			15 00 02 12 58
651			15 00 02 13 40
652			15 00 02 14 55
653			15 00 02 15 55
654			15 00 02 16 44
655			15 00 02 17 44
656			15 00 02 18 45
657			15 00 02 19 45
658			15 00 02 1A 46
659			15 00 02 1B 46
660			15 00 02 1C 47
661			15 00 02 1D 47
662			15 00 02 1E 1D
663			15 00 02 1F 1D
664			15 00 02 20 1D
665			15 00 02 21 1D
666			15 00 02 22 1D
667			15 00 02 23 1D
668			15 00 02 24 1D
669			15 00 02 25 57
670			15 00 02 26 57
671			15 00 02 27 58
672			15 00 02 28 58
673			15 00 02 29 40
674			15 00 02 2A 55
675			15 00 02 2B 55
676			15 00 02 58 40
677			15 00 02 59 00
678			15 00 02 5A 00
679			15 00 02 5B 00
680			15 00 02 5C 0A
681			15 00 02 5D 10
682			15 00 02 5E 01
683			15 00 02 5F 02
684			15 00 02 60 00
685			15 00 02 61 01
686			15 00 02 62 02
687			15 00 02 63 0B
688			15 00 02 64 6A
689			15 00 02 65 00
690			15 00 02 66 00
691			15 00 02 67 31
692			15 00 02 68 0B
693			15 00 02 69 1E
694			15 00 02 6A 6A
695			15 00 02 6B 04
696			15 00 02 6C 00
697			15 00 02 6D 04
698			15 00 02 6E 00
699			15 00 02 6F 88
700			15 00 02 70 00
701			15 00 02 71 00
702			15 00 02 72 06
703			15 00 02 73 7B
704			15 00 02 74 00
705			15 00 02 75 F8
706			15 00 02 76 00
707			15 00 02 77 0D
708			15 00 02 78 14
709			15 00 02 79 00
710			15 00 02 7A 00
711			15 00 02 7B 00
712			15 00 02 7C 00
713			15 00 02 7D 03
714			15 00 02 7E 7B
715			15 00 02 E0 00
716			15 00 02 E6 02
717			15 00 02 E7 06
718			15 80 01 11
719			15 16 01 29
720		];
721
722		panel-exit-sequence = [
723			05 00 01 28
724			05 00 01 10
725		];
726
727		display-timings {
728			native-mode = <&timing0>;
729
730			timing0: timing0 {
731				clock-frequency = <68500000>;
732				hactive = <800>;
733				hfront-porch = <16>;
734				hsync-len = <16>;
735				hback-porch = <48>;
736				vactive = <1280>;
737				vfront-porch = <8>;
738				vsync-len = <4>;
739				vback-porch = <4>;
740				hsync-active = <0>;
741				vsync-active = <0>;
742				de-active = <0>;
743				pixelclk-active = <0>;
744			};
745		};
746
747		ports {
748			#address-cells = <1>;
749			#size-cells = <0>;
750
751			port@0 {
752				reg = <0>;
753				panel_in_dsi: endpoint {
754					remote-endpoint = <&dsi_out_panel>;
755				};
756			};
757		};
758	};
759
760	ports {
761		#address-cells = <1>;
762		#size-cells = <0>;
763
764		port@1 {
765			reg = <1>;
766			dsi_out_panel: endpoint {
767				remote-endpoint = <&panel_in_dsi>;
768			};
769		};
770	};
771};
772
773&dsi_in_vopl {
774	status = "disabled";
775};
776
777&dsi_in_vopb {
778	status = "okay";
779};
780
781&route_dsi {
782	connect = <&vopb_out_dsi>;
783	status = "okay";
784};
785
786&pinctrl {
787	pmic {
788		pmic_int: pmic_int {
789			rockchip,pins =
790				<0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
791		};
792	};
793
794	sdio-pwrseq {
795		wifi_enable_h: wifi-enable-h {
796			rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
797		};
798	};
799};
800
801&firmware_android {
802	compatible = "android,firmware";
803
804	fstab {
805		compatible = "android,fstab";
806
807		system {
808			compatible = "android,system";
809			dev = "/dev/block/by-name/system";
810			type = "ext4";
811			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
812			fsmgr_flags = "wait";
813		};
814
815		vendor {
816			compatible = "android,vendor";
817			dev = "/dev/block/by-name/vendor";
818			type = "ext4";
819			mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
820			fsmgr_flags = "wait";
821		};
822	};
823};
824