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-ir-receiver";
68 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
69 pinctrl-names = "default";
70 pinctrl-0 = <&ir_int>;
74 compatible = "gpio-leds";
75 pinctrl-names = "default";
76 pinctrl-0 = <&work_led_pin>, <&diy_led_pin>, <&yellow_led_pin>;
80 gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
82 linux,default-trigger = "heartbeat";
87 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
88 default-state = "off";
89 linux,default-trigger = "mmc2";
93 label = "yellow:yellow-led";
94 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
95 default-state = "off";
96 linux,default-trigger = "mmc1";
100 sdio_pwrseq: sdio-pwrseq {
101 compatible = "mmc-pwrseq-simple";
103 clock-names = "ext_clock";
104 pinctrl-names = "default";
105 pinctrl-0 = <&wifi_enable_h>;
108 * On the module itself this is one of these (depending
109 * on the actual card populated):
110 * - SDIO_RESET_L_WL_REG_ON
111 * - PDN (power down when low)
113 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
116 vcc_vbus_typec0: vcc-vbus-typec0 {
117 compatible = "regulator-fixed";
118 regulator-name = "vcc_vbus_typec0";
121 regulator-min-microvolt = <5000000>;
122 regulator-max-microvolt = <5000000>;
126 compatible = "regulator-fixed";
127 regulator-name = "sys_12v";
130 vin-supply = <&dc_12v>;
133 /* switched by pmic_sleep */
134 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
135 compatible = "regulator-fixed";
136 regulator-name = "vcc1v8_s3";
139 regulator-min-microvolt = <1800000>;
140 regulator-max-microvolt = <1800000>;
141 vin-supply = <&vcc_1v8>;
144 vcc3v0_sd: vcc3v0-sd {
145 compatible = "regulator-fixed";
147 gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
148 pinctrl-names = "default";
149 pinctrl-0 = <&vcc3v0_sd_en>;
150 regulator-name = "vcc3v0_sd";
152 regulator-min-microvolt = <3000000>;
153 regulator-max-microvolt = <3000000>;
154 vin-supply = <&vcc3v3_sys>;
157 vcc3v3_sys: vcc3v3-sys {
158 compatible = "regulator-fixed";
159 regulator-name = "vcc3v3_sys";
162 regulator-min-microvolt = <3300000>;
163 regulator-max-microvolt = <3300000>;
164 vin-supply = <&sys_12v>;
168 compatible = "regulator-fixed";
169 regulator-name = "vcca_0v9";
172 regulator-min-microvolt = <900000>;
173 regulator-max-microvolt = <900000>;
174 vin-supply = <&vcc3v3_sys>;
177 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
178 vcc5v0_host: vcc5v0-host-regulator {
179 compatible = "regulator-fixed";
181 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
182 pinctrl-names = "default";
183 pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
184 regulator-name = "vcc5v0_host";
185 vin-supply = <&vcc_sys>;
188 vcc_vbus_typec1: vcc-vbus-typec1 {
189 compatible = "regulator-fixed";
191 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
192 pinctrl-names = "default";
193 pinctrl-0 = <&vcc_vbus_typec1_en>;
194 regulator-name = "vcc_vbus_typec1";
196 vin-supply = <&vcc_sys>;
200 compatible = "regulator-fixed";
202 gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
203 pinctrl-names = "default";
204 pinctrl-0 = <&vcc_sys_en>;
205 regulator-name = "vcc_sys";
207 regulator-min-microvolt = <5000000>;
208 regulator-max-microvolt = <5000000>;
209 vin-supply = <&sys_12v>;
213 compatible = "pwm-regulator";
214 pwms = <&pwm2 0 25000 1>;
215 regulator-name = "vdd_log";
218 regulator-min-microvolt = <450000>;
219 regulator-max-microvolt = <1400000>;
220 pwm-supply = <&vcc3v3_sys>;
225 cpu-supply = <&vdd_cpu_l>;
229 cpu-supply = <&vdd_cpu_l>;
233 cpu-supply = <&vdd_cpu_l>;
237 cpu-supply = <&vdd_cpu_l>;
241 cpu-supply = <&vdd_cpu_b>;
245 cpu-supply = <&vdd_cpu_b>;
253 assigned-clocks = <&cru SCLK_RMII_SRC>;
254 assigned-clock-parents = <&clkin_gmac>;
255 clock_in_out = "input";
256 phy-supply = <&vcc_lan>;
258 pinctrl-names = "default";
259 pinctrl-0 = <&rgmii_pins>;
260 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
261 snps,reset-active-low;
262 snps,reset-delays-us = <0 10000 50000>;
269 mali-supply = <&vdd_gpu>;
274 ddc-i2c-bus = <&i2c3>;
275 pinctrl-names = "default";
276 pinctrl-0 = <&hdmi_cec>;
285 clock-frequency = <400000>;
286 i2c-scl-rising-time-ns = <168>;
287 i2c-scl-falling-time-ns = <4>;
291 compatible = "rockchip,rk808";
293 interrupt-parent = <&gpio1>;
294 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
296 clock-output-names = "xin32k", "rk808-clkout2";
297 pinctrl-names = "default";
298 pinctrl-0 = <&pmic_int_l>;
299 rockchip,system-power-controller;
302 vcc1-supply = <&vcc3v3_sys>;
303 vcc2-supply = <&vcc3v3_sys>;
304 vcc3-supply = <&vcc3v3_sys>;
305 vcc4-supply = <&vcc3v3_sys>;
306 vcc6-supply = <&vcc3v3_sys>;
307 vcc7-supply = <&vcc3v3_sys>;
308 vcc8-supply = <&vcc3v3_sys>;
309 vcc9-supply = <&vcc3v3_sys>;
310 vcc10-supply = <&vcc3v3_sys>;
311 vcc11-supply = <&vcc3v3_sys>;
312 vcc12-supply = <&vcc3v3_sys>;
313 vcc13-supply = <&vcc3v3_sys>;
314 vcc14-supply = <&vcc3v3_sys>;
315 vddio-supply = <&vcc_3v0>;
318 vdd_center: DCDC_REG1 {
319 regulator-name = "vdd_center";
322 regulator-min-microvolt = <750000>;
323 regulator-max-microvolt = <1350000>;
324 regulator-ramp-delay = <6001>;
325 regulator-state-mem {
326 regulator-off-in-suspend;
330 vdd_cpu_l: DCDC_REG2 {
331 regulator-name = "vdd_cpu_l";
334 regulator-min-microvolt = <750000>;
335 regulator-max-microvolt = <1350000>;
336 regulator-ramp-delay = <6001>;
337 regulator-state-mem {
338 regulator-off-in-suspend;
343 regulator-name = "vcc_ddr";
346 regulator-state-mem {
347 regulator-on-in-suspend;
352 regulator-name = "vcc_1v8";
355 regulator-min-microvolt = <1800000>;
356 regulator-max-microvolt = <1800000>;
357 regulator-state-mem {
358 regulator-on-in-suspend;
359 regulator-suspend-microvolt = <1800000>;
363 vcca1v8_codec: LDO_REG1 {
364 regulator-name = "vcca1v8_codec";
367 regulator-min-microvolt = <1800000>;
368 regulator-max-microvolt = <1800000>;
369 regulator-state-mem {
370 regulator-off-in-suspend;
374 vcc1v8_hdmi: LDO_REG2 {
375 regulator-name = "vcc1v8_hdmi";
378 regulator-min-microvolt = <1800000>;
379 regulator-max-microvolt = <1800000>;
380 regulator-state-mem {
381 regulator-off-in-suspend;
385 vcc1v8_pmu: LDO_REG3 {
386 regulator-name = "vcc1v8_pmu";
389 regulator-min-microvolt = <1800000>;
390 regulator-max-microvolt = <1800000>;
391 regulator-state-mem {
392 regulator-on-in-suspend;
393 regulator-suspend-microvolt = <1800000>;
398 regulator-name = "vcc_sdio";
401 regulator-min-microvolt = <1800000>;
402 regulator-max-microvolt = <3000000>;
403 regulator-state-mem {
404 regulator-on-in-suspend;
405 regulator-suspend-microvolt = <3000000>;
409 vcca3v0_codec: LDO_REG5 {
410 regulator-name = "vcca3v0_codec";
413 regulator-min-microvolt = <3000000>;
414 regulator-max-microvolt = <3000000>;
415 regulator-state-mem {
416 regulator-off-in-suspend;
421 regulator-name = "vcc_1v5";
424 regulator-min-microvolt = <1500000>;
425 regulator-max-microvolt = <1500000>;
426 regulator-state-mem {
427 regulator-on-in-suspend;
428 regulator-suspend-microvolt = <1500000>;
432 vcca0v9_hdmi: LDO_REG7 {
433 regulator-name = "vcca0v9_hdmi";
436 regulator-min-microvolt = <900000>;
437 regulator-max-microvolt = <900000>;
438 regulator-state-mem {
439 regulator-off-in-suspend;
444 regulator-name = "vcc_3v0";
447 regulator-min-microvolt = <3000000>;
448 regulator-max-microvolt = <3000000>;
449 regulator-state-mem {
450 regulator-on-in-suspend;
451 regulator-suspend-microvolt = <3000000>;
455 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
456 regulator-name = "vcc3v3_s3";
459 regulator-state-mem {
460 regulator-off-in-suspend;
464 vcc3v3_s0: SWITCH_REG2 {
465 regulator-name = "vcc3v3_s0";
468 regulator-state-mem {
469 regulator-off-in-suspend;
475 vdd_cpu_b: regulator@40 {
476 compatible = "silergy,syr827";
478 fcs,suspend-voltage-selector = <1>;
479 pinctrl-names = "default";
480 pinctrl-0 = <&vsel1_pin>;
481 regulator-name = "vdd_cpu_b";
482 regulator-min-microvolt = <712500>;
483 regulator-max-microvolt = <1500000>;
484 regulator-ramp-delay = <1000>;
487 vin-supply = <&vcc3v3_sys>;
489 regulator-state-mem {
490 regulator-off-in-suspend;
494 vdd_gpu: regulator@41 {
495 compatible = "silergy,syr828";
497 fcs,suspend-voltage-selector = <1>;
498 pinctrl-names = "default";
499 pinctrl-0 = <&vsel2_pin>;
500 regulator-name = "vdd_gpu";
501 regulator-min-microvolt = <712500>;
502 regulator-max-microvolt = <1500000>;
503 regulator-ramp-delay = <1000>;
506 vin-supply = <&vcc3v3_sys>;
508 regulator-state-mem {
509 regulator-off-in-suspend;
515 i2c-scl-rising-time-ns = <300>;
516 i2c-scl-falling-time-ns = <15>;
521 i2c-scl-rising-time-ns = <450>;
522 i2c-scl-falling-time-ns = <15>;
527 i2c-scl-rising-time-ns = <600>;
528 i2c-scl-falling-time-ns = <20>;
531 fusb1: usb-typec@22 {
532 compatible = "fcs,fusb302";
534 interrupt-parent = <&gpio1>;
535 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
536 pinctrl-names = "default";
537 pinctrl-0 = <&fusb1_int>;
538 vbus-supply = <&vcc_vbus_typec1>;
544 i2c-scl-rising-time-ns = <600>;
545 i2c-scl-falling-time-ns = <20>;
548 fusb0: usb-typec@22 {
549 compatible = "fcs,fusb302";
551 interrupt-parent = <&gpio1>;
552 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
553 pinctrl-names = "default";
554 pinctrl-0 = <&fusb0_int>;
555 vbus-supply = <&vcc_vbus_typec0>;
559 mp8859: regulator@66 {
560 compatible = "mps,mp8859";
562 dc_12v: mp8859_dcdc {
563 regulator-name = "dc_12v";
564 regulator-min-microvolt = <12000000>;
565 regulator-max-microvolt = <12000000>;
568 vin-supply = <&vcc_vbus_typec0>;
570 regulator-state-mem {
571 regulator-on-in-suspend;
572 regulator-suspend-microvolt = <12000000>;
579 rockchip,playback-channels = <8>;
580 rockchip,capture-channels = <8>;
585 rockchip,playback-channels = <2>;
586 rockchip,capture-channels = <2>;
595 audio-supply = <&vcca1v8_codec>;
596 bt656-supply = <&vcc_3v0>;
597 gpio1830-supply = <&vcc_3v0>;
598 sdmmc-supply = <&vcc_sdio>;
603 pmu1830-supply = <&vcc_3v0>;
609 pwr_key_l: pwr-key-l {
610 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
616 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
621 lcd_panel_reset: lcd-panel-reset {
622 rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
627 diy_led_pin: diy-led-pin {
628 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
631 work_led_pin: work-led-pin {
632 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
635 yellow_led_pin: yellow-led-pin {
636 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
641 vsel1_pin: vsel1-pin {
642 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
645 vsel2_pin: vsel2-pin {
646 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
651 wifi_enable_h: wifi-enable-h {
652 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
657 vcc3v0_sd_en: vcc3v0-sd-en {
658 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
663 pmic_int_l: pmic-int-l {
664 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
669 vcc5v0_host_en: vcc5v0-host-en {
670 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
673 vcc_sys_en: vcc-sys-en {
674 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
678 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
683 vcc_vbus_typec1_en: vcc-vbus-typec1-en {
684 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
689 fusb0_int: fusb0-int {
690 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
693 fusb1_int: fusb1-int {
694 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
708 vref-supply = <&vcca1v8_s3>;
715 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
717 max-frequency = <150000000>;
718 pinctrl-names = "default";
719 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
721 vmmc-supply = <&vcc3v0_sd>;
722 vqmmc-supply = <&vcc_sdio>;
736 compatible = "jedec,spi-nor";
738 spi-max-frequency = <10000000>;
751 /* tshut mode 0:CRU 1:GPIO */
752 rockchip,hw-tshut-mode = <1>;
753 /* tshut polarity 0:LOW 1:HIGH */
754 rockchip,hw-tshut-polarity = <1>;
761 u2phy0_otg: otg-port {
762 phy-supply = <&vcc_vbus_typec0>;
766 u2phy0_host: host-port {
767 phy-supply = <&vcc5v0_host>;
775 u2phy1_otg: otg-port {
776 phy-supply = <&vcc_vbus_typec1>;
780 u2phy1_host: host-port {
781 phy-supply = <&vcc5v0_host>;
787 pinctrl-names = "default";
788 pinctrl-0 = <&uart0_xfer &uart0_cts>;