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