1 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
3 * Copyright (c) 2017 T-Chip Intelligent Technology Co., Ltd
7 #include <dt-bindings/input/linux-event-codes.h>
8 #include <dt-bindings/pwm/pwm.h>
10 #include "rk3399-opp.dtsi"
13 model = "Firefly ROC-RK3399-PC Board";
14 compatible = "firefly,roc-rk3399-pc", "rockchip,rk3399";
22 stdout-path = "serial2:1500000n8";
25 backlight: backlight {
26 compatible = "pwm-backlight";
27 pwms = <&pwm0 0 25000 0>;
30 clkin_gmac: external-gmac-clock {
31 compatible = "fixed-clock";
32 clock-frequency = <125000000>;
33 clock-output-names = "clkin_gmac";
38 compatible = "adc-keys";
39 io-channels = <&saradc 1>;
40 io-channel-names = "buttons";
41 keyup-threshold-microvolt = <1500000>;
42 poll-interval = <100>;
46 linux,code = <KEY_VENDOR>;
47 press-threshold-microvolt = <18000>;
52 compatible = "gpio-keys";
54 pinctrl-names = "default";
55 pinctrl-0 = <&pwr_key_l>;
58 debounce-interval = <100>;
59 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
60 label = "GPIO Key Power";
61 linux,code = <KEY_POWER>;
67 compatible = "gpio-leds";
68 pinctrl-names = "default";
69 pinctrl-0 = <&work_led_pin>, <&diy_led_pin>, <&yellow_led_pin>;
73 gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
75 linux,default-trigger = "heartbeat";
80 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
81 default-state = "off";
82 linux,default-trigger = "mmc2";
86 label = "yellow:yellow-led";
87 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
88 default-state = "off";
89 linux,default-trigger = "mmc1";
93 sdio_pwrseq: sdio-pwrseq {
94 compatible = "mmc-pwrseq-simple";
96 clock-names = "ext_clock";
97 pinctrl-names = "default";
98 pinctrl-0 = <&wifi_enable_h>;
101 * On the module itself this is one of these (depending
102 * on the actual card populated):
103 * - SDIO_RESET_L_WL_REG_ON
104 * - PDN (power down when low)
106 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
109 vcc_vbus_typec0: vcc-vbus-typec0 {
110 compatible = "regulator-fixed";
111 regulator-name = "vcc_vbus_typec0";
114 regulator-min-microvolt = <5000000>;
115 regulator-max-microvolt = <5000000>;
119 compatible = "regulator-fixed";
120 regulator-name = "sys_12v";
123 vin-supply = <&dc_12v>;
126 /* switched by pmic_sleep */
127 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
128 compatible = "regulator-fixed";
129 regulator-name = "vcc1v8_s3";
132 regulator-min-microvolt = <1800000>;
133 regulator-max-microvolt = <1800000>;
134 vin-supply = <&vcc_1v8>;
137 vcc3v0_sd: vcc3v0-sd {
138 compatible = "regulator-fixed";
140 gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
141 pinctrl-names = "default";
142 pinctrl-0 = <&vcc3v0_sd_en>;
143 regulator-name = "vcc3v0_sd";
145 regulator-min-microvolt = <3000000>;
146 regulator-max-microvolt = <3000000>;
147 vin-supply = <&vcc3v3_sys>;
150 vcc3v3_sys: vcc3v3-sys {
151 compatible = "regulator-fixed";
152 regulator-name = "vcc3v3_sys";
155 regulator-min-microvolt = <3300000>;
156 regulator-max-microvolt = <3300000>;
157 vin-supply = <&sys_12v>;
161 compatible = "regulator-fixed";
162 regulator-name = "vcca_0v9";
165 regulator-min-microvolt = <900000>;
166 regulator-max-microvolt = <900000>;
167 vin-supply = <&vcc3v3_sys>;
170 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
171 vcc5v0_host: vcc5v0-host-regulator {
172 compatible = "regulator-fixed";
174 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
175 pinctrl-names = "default";
176 pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
177 regulator-name = "vcc5v0_host";
178 vin-supply = <&vcc_sys>;
181 vcc_vbus_typec1: vcc-vbus-typec1 {
182 compatible = "regulator-fixed";
184 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
185 pinctrl-names = "default";
186 pinctrl-0 = <&vcc_vbus_typec1_en>;
187 regulator-name = "vcc_vbus_typec1";
189 vin-supply = <&vcc_sys>;
193 compatible = "regulator-fixed";
195 gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
196 pinctrl-names = "default";
197 pinctrl-0 = <&vcc_sys_en>;
198 regulator-name = "vcc_sys";
200 regulator-min-microvolt = <5000000>;
201 regulator-max-microvolt = <5000000>;
202 vin-supply = <&sys_12v>;
206 compatible = "pwm-regulator";
207 pwms = <&pwm2 0 25000 1>;
208 regulator-name = "vdd_log";
211 regulator-min-microvolt = <450000>;
212 regulator-max-microvolt = <1400000>;
213 pwm-supply = <&vcc3v3_sys>;
218 cpu-supply = <&vdd_cpu_l>;
222 cpu-supply = <&vdd_cpu_l>;
226 cpu-supply = <&vdd_cpu_l>;
230 cpu-supply = <&vdd_cpu_l>;
234 cpu-supply = <&vdd_cpu_b>;
238 cpu-supply = <&vdd_cpu_b>;
246 assigned-clocks = <&cru SCLK_RMII_SRC>;
247 assigned-clock-parents = <&clkin_gmac>;
248 clock_in_out = "input";
249 phy-supply = <&vcc_lan>;
251 pinctrl-names = "default";
252 pinctrl-0 = <&rgmii_pins>;
253 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
254 snps,reset-active-low;
255 snps,reset-delays-us = <0 10000 50000>;
262 mali-supply = <&vdd_gpu>;
267 ddc-i2c-bus = <&i2c3>;
268 pinctrl-names = "default";
269 pinctrl-0 = <&hdmi_cec>;
278 clock-frequency = <400000>;
279 i2c-scl-rising-time-ns = <168>;
280 i2c-scl-falling-time-ns = <4>;
284 compatible = "rockchip,rk808";
286 interrupt-parent = <&gpio1>;
287 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
289 clock-output-names = "xin32k", "rk808-clkout2";
290 pinctrl-names = "default";
291 pinctrl-0 = <&pmic_int_l>;
292 rockchip,system-power-controller;
295 vcc1-supply = <&vcc3v3_sys>;
296 vcc2-supply = <&vcc3v3_sys>;
297 vcc3-supply = <&vcc3v3_sys>;
298 vcc4-supply = <&vcc3v3_sys>;
299 vcc6-supply = <&vcc3v3_sys>;
300 vcc7-supply = <&vcc3v3_sys>;
301 vcc8-supply = <&vcc3v3_sys>;
302 vcc9-supply = <&vcc3v3_sys>;
303 vcc10-supply = <&vcc3v3_sys>;
304 vcc11-supply = <&vcc3v3_sys>;
305 vcc12-supply = <&vcc3v3_sys>;
306 vcc13-supply = <&vcc3v3_sys>;
307 vcc14-supply = <&vcc3v3_sys>;
308 vddio-supply = <&vcc_3v0>;
311 vdd_center: DCDC_REG1 {
312 regulator-name = "vdd_center";
315 regulator-min-microvolt = <750000>;
316 regulator-max-microvolt = <1350000>;
317 regulator-ramp-delay = <6001>;
318 regulator-state-mem {
319 regulator-off-in-suspend;
323 vdd_cpu_l: DCDC_REG2 {
324 regulator-name = "vdd_cpu_l";
327 regulator-min-microvolt = <750000>;
328 regulator-max-microvolt = <1350000>;
329 regulator-ramp-delay = <6001>;
330 regulator-state-mem {
331 regulator-off-in-suspend;
336 regulator-name = "vcc_ddr";
339 regulator-state-mem {
340 regulator-on-in-suspend;
345 regulator-name = "vcc_1v8";
348 regulator-min-microvolt = <1800000>;
349 regulator-max-microvolt = <1800000>;
350 regulator-state-mem {
351 regulator-on-in-suspend;
352 regulator-suspend-microvolt = <1800000>;
356 vcca1v8_codec: LDO_REG1 {
357 regulator-name = "vcca1v8_codec";
360 regulator-min-microvolt = <1800000>;
361 regulator-max-microvolt = <1800000>;
362 regulator-state-mem {
363 regulator-off-in-suspend;
367 vcc1v8_hdmi: LDO_REG2 {
368 regulator-name = "vcc1v8_hdmi";
371 regulator-min-microvolt = <1800000>;
372 regulator-max-microvolt = <1800000>;
373 regulator-state-mem {
374 regulator-off-in-suspend;
378 vcc1v8_pmu: LDO_REG3 {
379 regulator-name = "vcc1v8_pmu";
382 regulator-min-microvolt = <1800000>;
383 regulator-max-microvolt = <1800000>;
384 regulator-state-mem {
385 regulator-on-in-suspend;
386 regulator-suspend-microvolt = <1800000>;
391 regulator-name = "vcc_sdio";
393 regulator-min-microvolt = <1800000>;
394 regulator-max-microvolt = <3000000>;
395 regulator-state-mem {
396 regulator-on-in-suspend;
397 regulator-suspend-microvolt = <3000000>;
401 vcca3v0_codec: LDO_REG5 {
402 regulator-name = "vcca3v0_codec";
405 regulator-min-microvolt = <3000000>;
406 regulator-max-microvolt = <3000000>;
407 regulator-state-mem {
408 regulator-off-in-suspend;
413 regulator-name = "vcc_1v5";
416 regulator-min-microvolt = <1500000>;
417 regulator-max-microvolt = <1500000>;
418 regulator-state-mem {
419 regulator-on-in-suspend;
420 regulator-suspend-microvolt = <1500000>;
424 vcca0v9_hdmi: LDO_REG7 {
425 regulator-name = "vcca0v9_hdmi";
428 regulator-min-microvolt = <900000>;
429 regulator-max-microvolt = <900000>;
430 regulator-state-mem {
431 regulator-off-in-suspend;
436 regulator-name = "vcc_3v0";
439 regulator-min-microvolt = <3000000>;
440 regulator-max-microvolt = <3000000>;
441 regulator-state-mem {
442 regulator-on-in-suspend;
443 regulator-suspend-microvolt = <3000000>;
447 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
448 regulator-name = "vcc3v3_s3";
451 regulator-state-mem {
452 regulator-off-in-suspend;
456 vcc3v3_s0: SWITCH_REG2 {
457 regulator-name = "vcc3v3_s0";
460 regulator-state-mem {
461 regulator-off-in-suspend;
467 vdd_cpu_b: regulator@40 {
468 compatible = "silergy,syr827";
470 fcs,suspend-voltage-selector = <1>;
471 pinctrl-names = "default";
472 pinctrl-0 = <&vsel1_pin>;
473 regulator-name = "vdd_cpu_b";
474 regulator-min-microvolt = <712500>;
475 regulator-max-microvolt = <1500000>;
476 regulator-ramp-delay = <1000>;
479 vin-supply = <&vcc3v3_sys>;
481 regulator-state-mem {
482 regulator-off-in-suspend;
486 vdd_gpu: regulator@41 {
487 compatible = "silergy,syr828";
489 fcs,suspend-voltage-selector = <1>;
490 pinctrl-names = "default";
491 pinctrl-0 = <&vsel2_pin>;
492 regulator-name = "vdd_gpu";
493 regulator-min-microvolt = <712500>;
494 regulator-max-microvolt = <1500000>;
495 regulator-ramp-delay = <1000>;
496 vin-supply = <&vcc3v3_sys>;
498 regulator-state-mem {
499 regulator-off-in-suspend;
505 i2c-scl-rising-time-ns = <300>;
506 i2c-scl-falling-time-ns = <15>;
511 i2c-scl-rising-time-ns = <450>;
512 i2c-scl-falling-time-ns = <15>;
517 i2c-scl-rising-time-ns = <600>;
518 i2c-scl-falling-time-ns = <20>;
521 fusb1: usb-typec@22 {
522 compatible = "fcs,fusb302";
524 interrupt-parent = <&gpio1>;
525 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
526 pinctrl-names = "default";
527 pinctrl-0 = <&fusb1_int>;
528 vbus-supply = <&vcc_vbus_typec1>;
534 i2c-scl-rising-time-ns = <600>;
535 i2c-scl-falling-time-ns = <20>;
538 fusb0: usb-typec@22 {
539 compatible = "fcs,fusb302";
541 interrupt-parent = <&gpio1>;
542 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
543 pinctrl-names = "default";
544 pinctrl-0 = <&fusb0_int>;
545 vbus-supply = <&vcc_vbus_typec0>;
549 mp8859: regulator@66 {
550 compatible = "mps,mp8859";
552 dc_12v: mp8859_dcdc {
553 regulator-name = "dc_12v";
554 regulator-min-microvolt = <12000000>;
555 regulator-max-microvolt = <12000000>;
558 vin-supply = <&vcc_vbus_typec0>;
560 regulator-state-mem {
561 regulator-on-in-suspend;
562 regulator-suspend-microvolt = <12000000>;
569 rockchip,playback-channels = <8>;
570 rockchip,capture-channels = <8>;
575 rockchip,playback-channels = <2>;
576 rockchip,capture-channels = <2>;
585 audio-supply = <&vcca1v8_codec>;
586 bt656-supply = <&vcc_3v0>;
587 gpio1830-supply = <&vcc_3v0>;
588 sdmmc-supply = <&vcc_sdio>;
593 pmu1830-supply = <&vcc_3v0>;
599 pwr_key_l: pwr-key-l {
600 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
605 lcd_panel_reset: lcd-panel-reset {
606 rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
611 diy_led_pin: diy-led-pin {
612 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
615 work_led_pin: work-led-pin {
616 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
619 yellow_led_pin: yellow-led-pin {
620 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
625 vsel1_pin: vsel1-pin {
626 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
629 vsel2_pin: vsel2-pin {
630 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
635 wifi_enable_h: wifi-enable-h {
636 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
641 vcc3v0_sd_en: vcc3v0-sd-en {
642 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
647 pmic_int_l: pmic-int-l {
648 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
653 vcc5v0_host_en: vcc5v0-host-en {
654 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
657 vcc_sys_en: vcc-sys-en {
658 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
662 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
667 vcc_vbus_typec1_en: vcc-vbus-typec1-en {
668 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
673 fusb0_int: fusb0-int {
674 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
677 fusb1_int: fusb1-int {
678 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
692 vref-supply = <&vcca1v8_s3>;
699 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
701 max-frequency = <150000000>;
702 pinctrl-names = "default";
703 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
705 vmmc-supply = <&vcc3v0_sd>;
706 vqmmc-supply = <&vcc_sdio>;
720 compatible = "jedec,spi-nor";
722 spi-max-frequency = <10000000>;
735 /* tshut mode 0:CRU 1:GPIO */
736 rockchip,hw-tshut-mode = <1>;
737 /* tshut polarity 0:LOW 1:HIGH */
738 rockchip,hw-tshut-polarity = <1>;
745 u2phy0_otg: otg-port {
746 phy-supply = <&vcc_vbus_typec0>;
750 u2phy0_host: host-port {
751 phy-supply = <&vcc5v0_host>;
759 u2phy1_otg: otg-port {
760 phy-supply = <&vcc_vbus_typec1>;
764 u2phy1_host: host-port {
765 phy-supply = <&vcc5v0_host>;
771 pinctrl-names = "default";
772 pinctrl-0 = <&uart0_xfer &uart0_cts>;