xref: /freebsd/sys/contrib/device-tree/src/arm64/rockchip/px30-evb.dts (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
2/*
3 * Copyright (c) 2018 Fuzhou Rockchip Electronics Co., Ltd
4 */
5
6/dts-v1/;
7#include <dt-bindings/gpio/gpio.h>
8#include <dt-bindings/input/input.h>
9#include <dt-bindings/pinctrl/rockchip.h>
10#include "px30.dtsi"
11
12/ {
13	model = "Rockchip PX30 EVB";
14	compatible = "rockchip,px30-evb", "rockchip,px30";
15
16	chosen {
17		stdout-path = "serial5:115200n8";
18	};
19
20	adc-keys {
21		compatible = "adc-keys";
22		io-channels = <&saradc 2>;
23		io-channel-names = "buttons";
24		keyup-threshold-microvolt = <1800000>;
25		poll-interval = <100>;
26
27		esc-key {
28			label = "esc";
29			linux,code = <KEY_ESC>;
30			press-threshold-microvolt = <1310000>;
31		};
32
33		home-key {
34			label = "home";
35			linux,code = <KEY_HOME>;
36			press-threshold-microvolt = <624000>;
37		};
38
39		menu-key {
40			label = "menu";
41			linux,code = <KEY_MENU>;
42			press-threshold-microvolt = <987000>;
43		};
44
45		vol-down-key {
46			label = "volume down";
47			linux,code = <KEY_VOLUMEDOWN>;
48			press-threshold-microvolt = <300000>;
49		};
50
51		vol-up-key {
52			label = "volume up";
53			linux,code = <KEY_VOLUMEUP>;
54			press-threshold-microvolt = <17000>;
55		};
56	};
57
58	backlight: backlight {
59		compatible = "pwm-backlight";
60		pwms = <&pwm1 0 25000 0>;
61		power-supply = <&vcc3v3_lcd>;
62	};
63
64	emmc_pwrseq: emmc-pwrseq {
65		compatible = "mmc-pwrseq-emmc";
66		pinctrl-0 = <&emmc_reset>;
67		pinctrl-names = "default";
68		reset-gpios = <&gpio1 RK_PB3 GPIO_ACTIVE_HIGH>;
69	};
70
71	sdio_pwrseq: sdio-pwrseq {
72		compatible = "mmc-pwrseq-simple";
73		pinctrl-names = "default";
74		pinctrl-0 = <&wifi_enable_h>;
75
76		/*
77		 * On the module itself this is one of these (depending
78		 * on the actual card populated):
79		 * - SDIO_RESET_L_WL_REG_ON
80		 * - PDN (power down when low)
81		 */
82		reset-gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_LOW>; /* GPIO3_A4 */
83	};
84
85	vcc5v0_sys: vccsys {
86		compatible = "regulator-fixed";
87		regulator-name = "vcc5v0_sys";
88		regulator-always-on;
89		regulator-boot-on;
90		regulator-min-microvolt = <5000000>;
91		regulator-max-microvolt = <5000000>;
92	};
93};
94
95&cpu0 {
96	cpu-supply = <&vdd_arm>;
97};
98
99&cpu1 {
100	cpu-supply = <&vdd_arm>;
101};
102
103&cpu2 {
104	cpu-supply = <&vdd_arm>;
105};
106
107&cpu3 {
108	cpu-supply = <&vdd_arm>;
109};
110
111&display_subsystem {
112	status = "okay";
113};
114
115&dsi {
116	status = "okay";
117
118	ports {
119		mipi_out: port@1 {
120			reg = <1>;
121
122			mipi_out_panel: endpoint {
123				remote-endpoint = <&mipi_in_panel>;
124			};
125		};
126	};
127
128	panel@0 {
129		compatible = "xinpeng,xpp055c272";
130		reg = <0>;
131		backlight = <&backlight>;
132		iovcc-supply = <&vcc_1v8>;
133		vci-supply = <&vcc3v3_lcd>;
134
135		port {
136			mipi_in_panel: endpoint {
137				remote-endpoint = <&mipi_out_panel>;
138			};
139		};
140	};
141};
142
143&dsi_dphy {
144	status = "okay";
145};
146
147&emmc {
148	cap-mmc-highspeed;
149	mmc-hs200-1_8v;
150	non-removable;
151	mmc-pwrseq = <&emmc_pwrseq>;
152	vmmc-supply = <&vcc_3v0>;
153	vqmmc-supply = <&vccio_flash>;
154	status = "okay";
155};
156
157&gmac {
158	clock_in_out = "output";
159	phy-supply = <&vcc_rmii>;
160	snps,reset-gpio = <&gpio2 13 GPIO_ACTIVE_LOW>;
161	snps,reset-active-low;
162	snps,reset-delays-us = <0 50000 50000>;
163	status = "okay";
164};
165
166&gpu {
167	mali-supply = <&vdd_log>;
168	status = "okay";
169};
170
171&i2c0 {
172	status = "okay";
173
174	rk809: pmic@20 {
175		compatible = "rockchip,rk809";
176		reg = <0x20>;
177		interrupt-parent = <&gpio0>;
178		interrupts = <7 IRQ_TYPE_LEVEL_LOW>;
179		pinctrl-names = "default";
180		pinctrl-0 = <&pmic_int>;
181		rockchip,system-power-controller;
182		wakeup-source;
183		#clock-cells = <0>;
184		clock-output-names = "xin32k";
185
186		vcc1-supply = <&vcc5v0_sys>;
187		vcc2-supply = <&vcc5v0_sys>;
188		vcc3-supply = <&vcc5v0_sys>;
189		vcc4-supply = <&vcc5v0_sys>;
190		vcc5-supply = <&vcc3v3_sys>;
191		vcc6-supply = <&vcc3v3_sys>;
192		vcc7-supply = <&vcc3v3_sys>;
193		vcc8-supply = <&vcc3v3_sys>;
194		vcc9-supply = <&vcc5v0_sys>;
195
196		regulators {
197			vdd_log: DCDC_REG1 {
198				regulator-name = "vdd_log";
199				regulator-min-microvolt = <950000>;
200				regulator-max-microvolt = <1350000>;
201				regulator-ramp-delay = <6001>;
202				regulator-always-on;
203				regulator-boot-on;
204
205				regulator-state-mem {
206					regulator-on-in-suspend;
207					regulator-suspend-microvolt = <950000>;
208				};
209			};
210
211			vdd_arm: DCDC_REG2 {
212				regulator-name = "vdd_arm";
213				regulator-min-microvolt = <950000>;
214				regulator-max-microvolt = <1350000>;
215				regulator-ramp-delay = <6001>;
216				regulator-always-on;
217				regulator-boot-on;
218
219				regulator-state-mem {
220					regulator-off-in-suspend;
221					regulator-suspend-microvolt = <950000>;
222				};
223			};
224
225			vcc_ddr: DCDC_REG3 {
226				regulator-name = "vcc_ddr";
227				regulator-always-on;
228				regulator-boot-on;
229
230				regulator-state-mem {
231					regulator-on-in-suspend;
232				};
233			};
234
235			vcc_3v0: vcc_rmii: DCDC_REG4 {
236				regulator-name = "vcc_3v0";
237				regulator-min-microvolt = <3000000>;
238				regulator-max-microvolt = <3000000>;
239				regulator-always-on;
240				regulator-boot-on;
241
242				regulator-state-mem {
243					regulator-on-in-suspend;
244					regulator-suspend-microvolt = <3000000>;
245				};
246			};
247
248			vcc3v3_sys: DCDC_REG5 {
249				regulator-name = "vcc3v3_sys";
250				regulator-min-microvolt = <3300000>;
251				regulator-max-microvolt = <3300000>;
252				regulator-always-on;
253				regulator-boot-on;
254
255				regulator-state-mem {
256					regulator-on-in-suspend;
257					regulator-suspend-microvolt = <3300000>;
258				};
259			};
260
261			vcc_1v0: LDO_REG1 {
262				regulator-name = "vcc_1v0";
263				regulator-min-microvolt = <1000000>;
264				regulator-max-microvolt = <1000000>;
265				regulator-always-on;
266				regulator-boot-on;
267
268				regulator-state-mem {
269					regulator-on-in-suspend;
270					regulator-suspend-microvolt = <1000000>;
271				};
272			};
273
274			vcc_1v8: vccio_flash: vccio_sdio: LDO_REG2 {
275				regulator-name = "vcc_1v8";
276				regulator-min-microvolt = <1800000>;
277				regulator-max-microvolt = <1800000>;
278				regulator-always-on;
279				regulator-boot-on;
280
281				regulator-state-mem {
282					regulator-on-in-suspend;
283					regulator-suspend-microvolt = <1800000>;
284				};
285			};
286
287			vdd_1v0: LDO_REG3 {
288				regulator-name = "vdd_1v0";
289				regulator-min-microvolt = <1000000>;
290				regulator-max-microvolt = <1000000>;
291				regulator-always-on;
292				regulator-boot-on;
293
294				regulator-state-mem {
295					regulator-on-in-suspend;
296					regulator-suspend-microvolt = <1000000>;
297				};
298			};
299
300			vcc3v0_pmu: LDO_REG4 {
301				regulator-name = "vcc3v0_pmu";
302				regulator-min-microvolt = <3000000>;
303				regulator-max-microvolt = <3000000>;
304				regulator-always-on;
305				regulator-boot-on;
306
307				regulator-state-mem {
308					regulator-on-in-suspend;
309					regulator-suspend-microvolt = <3000000>;
310				};
311			};
312
313			vccio_sd: LDO_REG5 {
314				regulator-name = "vccio_sd";
315				regulator-min-microvolt = <1800000>;
316				regulator-max-microvolt = <3300000>;
317				regulator-always-on;
318				regulator-boot-on;
319
320				regulator-state-mem {
321					regulator-on-in-suspend;
322					regulator-suspend-microvolt = <3300000>;
323				};
324			};
325
326			vcc_sd: LDO_REG6 {
327				regulator-name = "vcc_sd";
328				regulator-min-microvolt = <3300000>;
329				regulator-max-microvolt = <3300000>;
330				regulator-boot-on;
331
332				regulator-state-mem {
333					regulator-on-in-suspend;
334					regulator-suspend-microvolt = <3300000>;
335				};
336			};
337
338			vcc2v8_dvp: LDO_REG7 {
339				regulator-name = "vcc2v8_dvp";
340				regulator-min-microvolt = <2800000>;
341				regulator-max-microvolt = <2800000>;
342				regulator-boot-on;
343
344				regulator-state-mem {
345					regulator-off-in-suspend;
346					regulator-suspend-microvolt = <2800000>;
347				};
348			};
349
350			vcc1v8_dvp: LDO_REG8 {
351				regulator-name = "vcc1v8_dvp";
352				regulator-min-microvolt = <1800000>;
353				regulator-max-microvolt = <1800000>;
354				regulator-boot-on;
355
356				regulator-state-mem {
357					regulator-on-in-suspend;
358					regulator-suspend-microvolt = <1800000>;
359				};
360			};
361
362			vcc1v5_dvp: LDO_REG9 {
363				regulator-name = "vcc1v5_dvp";
364				regulator-min-microvolt = <1500000>;
365				regulator-max-microvolt = <1500000>;
366				regulator-boot-on;
367
368				regulator-state-mem {
369					regulator-off-in-suspend;
370					regulator-suspend-microvolt = <1500000>;
371				};
372			};
373
374			vcc3v3_lcd: SWITCH_REG1 {
375				regulator-name = "vcc3v3_lcd";
376				regulator-boot-on;
377			};
378
379			vcc5v0_host: SWITCH_REG2 {
380				regulator-name = "vcc5v0_host";
381				regulator-always-on;
382				regulator-boot-on;
383			};
384		};
385	};
386};
387
388&i2c1 {
389	status = "okay";
390
391	sensor@d {
392		compatible = "asahi-kasei,ak8963";
393		reg = <0x0d>;
394		gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
395		vdd-supply = <&vcc3v0_pmu>;
396		mount-matrix = "1", /* x0 */
397			       "0", /* y0 */
398			       "0", /* z0 */
399			       "0", /* x1 */
400			       "1", /* y1 */
401			       "0", /* z1 */
402			       "0", /* x2 */
403			       "0", /* y2 */
404			       "1"; /* z2 */
405	};
406
407	touchscreen@14 {
408		compatible = "goodix,gt1151";
409		reg = <0x14>;
410		interrupt-parent = <&gpio0>;
411		interrupts = <RK_PA5 IRQ_TYPE_LEVEL_LOW>;
412		irq-gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
413		reset-gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
414		VDDIO-supply = <&vcc3v3_lcd>;
415	};
416
417	sensor@4c {
418		compatible = "fsl,mma7660";
419		reg = <0x4c>;
420		interrupt-parent = <&gpio0>;
421		interrupts = <RK_PB7 IRQ_TYPE_LEVEL_LOW>;
422	};
423};
424
425&i2s1_2ch {
426	status = "okay";
427};
428
429&io_domains {
430	status = "okay";
431
432	vccio1-supply = <&vccio_sdio>;
433	vccio2-supply = <&vccio_sd>;
434	vccio3-supply = <&vcc_3v0>;
435	vccio4-supply = <&vcc3v0_pmu>;
436	vccio5-supply = <&vcc_3v0>;
437	vccio6-supply = <&vccio_flash>;
438};
439
440&pinctrl {
441	headphone {
442		hp_det: hp-det {
443			rockchip,pins =
444				<2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_down>;
445		};
446	};
447
448	emmc {
449		emmc_reset: emmc-reset {
450			rockchip,pins = <1 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
451		};
452	};
453
454	pmic {
455		pmic_int: pmic_int {
456			rockchip,pins =
457				<0 RK_PA7 RK_FUNC_GPIO &pcfg_pull_up>;
458		};
459
460		soc_slppin_gpio: soc_slppin_gpio {
461			rockchip,pins =
462				<0 RK_PA4 RK_FUNC_GPIO &pcfg_output_low>;
463		};
464
465		soc_slppin_slp: soc_slppin_slp {
466			rockchip,pins =
467				<0 RK_PA4 1 &pcfg_pull_none>;
468		};
469
470		soc_slppin_rst: soc_slppin_rst {
471			rockchip,pins =
472				<0 RK_PA4 2 &pcfg_pull_none>;
473		};
474	};
475
476	sdio-pwrseq {
477		wifi_enable_h: wifi-enable-h {
478			rockchip,pins =
479				<0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
480		};
481	};
482};
483
484&pmu_io_domains {
485	status = "okay";
486
487	pmuio1-supply = <&vcc3v0_pmu>;
488	pmuio2-supply = <&vcc3v0_pmu>;
489};
490
491&pwm1 {
492	status = "okay";
493};
494
495&saradc {
496	vref-supply = <&vcc_1v8>;
497	status = "okay";
498};
499
500&sdmmc {
501	cap-mmc-highspeed;
502	cap-sd-highspeed;
503	card-detect-delay = <800>;
504	sd-uhs-sdr12;
505	sd-uhs-sdr25;
506	sd-uhs-sdr50;
507	sd-uhs-sdr104;
508	vmmc-supply = <&vcc_sd>;
509	vqmmc-supply = <&vccio_sd>;
510	status = "okay";
511};
512
513&sdio {
514	cap-sd-highspeed;
515	keep-power-in-suspend;
516	non-removable;
517	mmc-pwrseq = <&sdio_pwrseq>;
518	sd-uhs-sdr104;
519	status = "okay";
520};
521
522&tsadc {
523	rockchip,hw-tshut-mode = <1>;
524	rockchip,hw-tshut-polarity = <1>;
525	status = "okay";
526};
527
528&u2phy {
529	status = "okay";
530
531	u2phy_host: host-port {
532		status = "okay";
533	};
534
535	u2phy_otg: otg-port {
536		status = "okay";
537	};
538};
539
540&uart1 {
541	pinctrl-names = "default";
542	pinctrl-0 = <&uart1_xfer &uart1_cts>;
543	status = "okay";
544};
545
546&uart5 {
547	status = "okay";
548};
549
550&usb20_otg {
551	status = "okay";
552};
553
554&usb_host0_ehci {
555	status = "okay";
556};
557
558&usb_host0_ohci {
559	status = "okay";
560};
561
562&vopb {
563	status = "okay";
564};
565
566&vopb_mmu {
567	status = "okay";
568};
569
570&vopl {
571	status = "okay";
572};
573
574&vopl_mmu {
575	status = "okay";
576};
577