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";
23 stdout-path = "serial2:1500000n8";
26 backlight: backlight {
27 compatible = "pwm-backlight";
28 pwms = <&pwm0 0 25000 0>;
31 clkin_gmac: external-gmac-clock {
32 compatible = "fixed-clock";
33 clock-frequency = <125000000>;
34 clock-output-names = "clkin_gmac";
39 compatible = "adc-keys";
40 io-channels = <&saradc 1>;
41 io-channel-names = "buttons";
42 keyup-threshold-microvolt = <1500000>;
43 poll-interval = <100>;
47 linux,code = <KEY_VENDOR>;
48 press-threshold-microvolt = <18000>;
53 compatible = "gpio-keys";
55 pinctrl-names = "default";
56 pinctrl-0 = <&pwr_key_l>;
59 debounce-interval = <100>;
60 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
61 label = "GPIO Key Power";
62 linux,code = <KEY_POWER>;
68 compatible = "gpio-ir-receiver";
69 gpios = <&gpio0 RK_PA6 GPIO_ACTIVE_LOW>;
70 pinctrl-names = "default";
71 pinctrl-0 = <&ir_int>;
75 compatible = "gpio-leds";
76 pinctrl-names = "default";
77 pinctrl-0 = <&work_led_pin>, <&diy_led_pin>, <&yellow_led_pin>;
81 gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
83 linux,default-trigger = "heartbeat";
88 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
89 default-state = "off";
90 linux,default-trigger = "mmc2";
94 label = "yellow:yellow-led";
95 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
96 default-state = "off";
97 linux,default-trigger = "mmc1";
101 sdio_pwrseq: sdio-pwrseq {
102 compatible = "mmc-pwrseq-simple";
104 clock-names = "ext_clock";
105 pinctrl-names = "default";
106 pinctrl-0 = <&wifi_enable_h>;
109 * On the module itself this is one of these (depending
110 * on the actual card populated):
111 * - SDIO_RESET_L_WL_REG_ON
112 * - PDN (power down when low)
114 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
117 vcc_vbus_typec0: vcc-vbus-typec0 {
118 compatible = "regulator-fixed";
119 regulator-name = "vcc_vbus_typec0";
122 regulator-min-microvolt = <5000000>;
123 regulator-max-microvolt = <5000000>;
127 compatible = "regulator-fixed";
128 regulator-name = "sys_12v";
131 vin-supply = <&dc_12v>;
134 /* switched by pmic_sleep */
135 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
136 compatible = "regulator-fixed";
137 regulator-name = "vcc1v8_s3";
140 regulator-min-microvolt = <1800000>;
141 regulator-max-microvolt = <1800000>;
142 vin-supply = <&vcc_1v8>;
145 vcc3v0_sd: vcc3v0-sd {
146 compatible = "regulator-fixed";
148 gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
149 pinctrl-names = "default";
150 pinctrl-0 = <&vcc3v0_sd_en>;
151 regulator-name = "vcc3v0_sd";
153 regulator-min-microvolt = <3000000>;
154 regulator-max-microvolt = <3000000>;
155 vin-supply = <&vcc3v3_sys>;
158 vcc3v3_sys: vcc3v3-sys {
159 compatible = "regulator-fixed";
160 regulator-name = "vcc3v3_sys";
163 regulator-min-microvolt = <3300000>;
164 regulator-max-microvolt = <3300000>;
165 vin-supply = <&sys_12v>;
169 compatible = "regulator-fixed";
170 regulator-name = "vcca_0v9";
173 regulator-min-microvolt = <900000>;
174 regulator-max-microvolt = <900000>;
175 vin-supply = <&vcc3v3_sys>;
178 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
179 vcc5v0_host: vcc5v0-host-regulator {
180 compatible = "regulator-fixed";
182 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
183 pinctrl-names = "default";
184 pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
185 regulator-name = "vcc5v0_host";
186 vin-supply = <&vcc_sys>;
189 vcc_vbus_typec1: vcc-vbus-typec1 {
190 compatible = "regulator-fixed";
192 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
193 pinctrl-names = "default";
194 pinctrl-0 = <&vcc_vbus_typec1_en>;
195 regulator-name = "vcc_vbus_typec1";
197 vin-supply = <&vcc_sys>;
201 compatible = "regulator-fixed";
203 gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
204 pinctrl-names = "default";
205 pinctrl-0 = <&vcc_sys_en>;
206 regulator-name = "vcc_sys";
208 regulator-min-microvolt = <5000000>;
209 regulator-max-microvolt = <5000000>;
210 vin-supply = <&sys_12v>;
214 compatible = "pwm-regulator";
215 pwms = <&pwm2 0 25000 1>;
216 regulator-name = "vdd_log";
219 regulator-min-microvolt = <450000>;
220 regulator-max-microvolt = <1400000>;
221 pwm-supply = <&vcc3v3_sys>;
226 cpu-supply = <&vdd_cpu_l>;
230 cpu-supply = <&vdd_cpu_l>;
234 cpu-supply = <&vdd_cpu_l>;
238 cpu-supply = <&vdd_cpu_l>;
242 cpu-supply = <&vdd_cpu_b>;
246 cpu-supply = <&vdd_cpu_b>;
254 assigned-clocks = <&cru SCLK_RMII_SRC>;
255 assigned-clock-parents = <&clkin_gmac>;
256 clock_in_out = "input";
257 phy-supply = <&vcc_lan>;
259 pinctrl-names = "default";
260 pinctrl-0 = <&rgmii_pins>;
261 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
262 snps,reset-active-low;
263 snps,reset-delays-us = <0 10000 50000>;
270 mali-supply = <&vdd_gpu>;
275 avdd-0v9-supply = <&vcca0v9_hdmi>;
276 avdd-1v8-supply = <&vcca1v8_hdmi>;
277 ddc-i2c-bus = <&i2c3>;
278 pinctrl-names = "default";
279 pinctrl-0 = <&hdmi_cec>;
288 clock-frequency = <400000>;
289 i2c-scl-rising-time-ns = <168>;
290 i2c-scl-falling-time-ns = <4>;
294 compatible = "rockchip,rk808";
296 interrupt-parent = <&gpio1>;
297 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
299 clock-output-names = "xin32k", "rk808-clkout2";
300 pinctrl-names = "default";
301 pinctrl-0 = <&pmic_int_l>;
302 rockchip,system-power-controller;
305 vcc1-supply = <&vcc3v3_sys>;
306 vcc2-supply = <&vcc3v3_sys>;
307 vcc3-supply = <&vcc3v3_sys>;
308 vcc4-supply = <&vcc3v3_sys>;
309 vcc6-supply = <&vcc3v3_sys>;
310 vcc7-supply = <&vcc3v3_sys>;
311 vcc8-supply = <&vcc3v3_sys>;
312 vcc9-supply = <&vcc3v3_sys>;
313 vcc10-supply = <&vcc3v3_sys>;
314 vcc11-supply = <&vcc3v3_sys>;
315 vcc12-supply = <&vcc3v3_sys>;
316 vddio-supply = <&vcc_3v0>;
319 vdd_center: DCDC_REG1 {
320 regulator-name = "vdd_center";
323 regulator-min-microvolt = <750000>;
324 regulator-max-microvolt = <1350000>;
325 regulator-ramp-delay = <6001>;
326 regulator-state-mem {
327 regulator-off-in-suspend;
331 vdd_cpu_l: DCDC_REG2 {
332 regulator-name = "vdd_cpu_l";
335 regulator-min-microvolt = <750000>;
336 regulator-max-microvolt = <1350000>;
337 regulator-ramp-delay = <6001>;
338 regulator-state-mem {
339 regulator-off-in-suspend;
344 regulator-name = "vcc_ddr";
347 regulator-state-mem {
348 regulator-on-in-suspend;
353 regulator-name = "vcc_1v8";
356 regulator-min-microvolt = <1800000>;
357 regulator-max-microvolt = <1800000>;
358 regulator-state-mem {
359 regulator-on-in-suspend;
360 regulator-suspend-microvolt = <1800000>;
364 vcca1v8_codec: LDO_REG1 {
365 regulator-name = "vcca1v8_codec";
368 regulator-min-microvolt = <1800000>;
369 regulator-max-microvolt = <1800000>;
370 regulator-state-mem {
371 regulator-off-in-suspend;
375 vcca1v8_hdmi: LDO_REG2 {
376 regulator-name = "vcca1v8_hdmi";
379 regulator-min-microvolt = <1800000>;
380 regulator-max-microvolt = <1800000>;
381 regulator-state-mem {
382 regulator-off-in-suspend;
386 vcc1v8_pmu: LDO_REG3 {
387 regulator-name = "vcc1v8_pmu";
390 regulator-min-microvolt = <1800000>;
391 regulator-max-microvolt = <1800000>;
392 regulator-state-mem {
393 regulator-on-in-suspend;
394 regulator-suspend-microvolt = <1800000>;
399 regulator-name = "vcc_sdio";
402 regulator-min-microvolt = <1800000>;
403 regulator-max-microvolt = <3000000>;
404 regulator-state-mem {
405 regulator-on-in-suspend;
406 regulator-suspend-microvolt = <3000000>;
410 vcca3v0_codec: LDO_REG5 {
411 regulator-name = "vcca3v0_codec";
414 regulator-min-microvolt = <3000000>;
415 regulator-max-microvolt = <3000000>;
416 regulator-state-mem {
417 regulator-off-in-suspend;
422 regulator-name = "vcc_1v5";
425 regulator-min-microvolt = <1500000>;
426 regulator-max-microvolt = <1500000>;
427 regulator-state-mem {
428 regulator-on-in-suspend;
429 regulator-suspend-microvolt = <1500000>;
433 vcca0v9_hdmi: LDO_REG7 {
434 regulator-name = "vcca0v9_hdmi";
437 regulator-min-microvolt = <900000>;
438 regulator-max-microvolt = <900000>;
439 regulator-state-mem {
440 regulator-off-in-suspend;
445 regulator-name = "vcc_3v0";
448 regulator-min-microvolt = <3000000>;
449 regulator-max-microvolt = <3000000>;
450 regulator-state-mem {
451 regulator-on-in-suspend;
452 regulator-suspend-microvolt = <3000000>;
456 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
457 regulator-name = "vcc3v3_s3";
460 regulator-state-mem {
461 regulator-off-in-suspend;
465 vcc3v3_s0: SWITCH_REG2 {
466 regulator-name = "vcc3v3_s0";
469 regulator-state-mem {
470 regulator-off-in-suspend;
476 vdd_cpu_b: regulator@40 {
477 compatible = "silergy,syr827";
479 fcs,suspend-voltage-selector = <1>;
480 pinctrl-names = "default";
481 pinctrl-0 = <&vsel1_pin>;
482 regulator-name = "vdd_cpu_b";
483 regulator-min-microvolt = <712500>;
484 regulator-max-microvolt = <1500000>;
485 regulator-ramp-delay = <1000>;
488 vin-supply = <&vcc3v3_sys>;
490 regulator-state-mem {
491 regulator-off-in-suspend;
495 vdd_gpu: regulator@41 {
496 compatible = "silergy,syr828";
498 fcs,suspend-voltage-selector = <1>;
499 pinctrl-names = "default";
500 pinctrl-0 = <&vsel2_pin>;
501 regulator-name = "vdd_gpu";
502 regulator-min-microvolt = <712500>;
503 regulator-max-microvolt = <1500000>;
504 regulator-ramp-delay = <1000>;
507 vin-supply = <&vcc3v3_sys>;
509 regulator-state-mem {
510 regulator-off-in-suspend;
516 i2c-scl-rising-time-ns = <300>;
517 i2c-scl-falling-time-ns = <15>;
522 i2c-scl-rising-time-ns = <450>;
523 i2c-scl-falling-time-ns = <15>;
528 i2c-scl-rising-time-ns = <600>;
529 i2c-scl-falling-time-ns = <20>;
532 fusb1: usb-typec@22 {
533 compatible = "fcs,fusb302";
535 interrupt-parent = <&gpio1>;
536 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
537 pinctrl-names = "default";
538 pinctrl-0 = <&fusb1_int>;
539 vbus-supply = <&vcc_vbus_typec1>;
545 i2c-scl-rising-time-ns = <600>;
546 i2c-scl-falling-time-ns = <20>;
549 fusb0: usb-typec@22 {
550 compatible = "fcs,fusb302";
552 interrupt-parent = <&gpio1>;
553 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
554 pinctrl-names = "default";
555 pinctrl-0 = <&fusb0_int>;
556 vbus-supply = <&vcc_vbus_typec0>;
560 mp8859: regulator@66 {
561 compatible = "mps,mp8859";
563 dc_12v: mp8859_dcdc {
564 regulator-name = "dc_12v";
565 regulator-min-microvolt = <12000000>;
566 regulator-max-microvolt = <12000000>;
569 vin-supply = <&vcc_vbus_typec0>;
571 regulator-state-mem {
572 regulator-on-in-suspend;
573 regulator-suspend-microvolt = <12000000>;
580 rockchip,playback-channels = <8>;
581 rockchip,capture-channels = <8>;
586 rockchip,playback-channels = <2>;
587 rockchip,capture-channels = <2>;
596 audio-supply = <&vcca1v8_codec>;
597 bt656-supply = <&vcc_3v0>;
598 gpio1830-supply = <&vcc_3v0>;
599 sdmmc-supply = <&vcc_sdio>;
604 pmu1830-supply = <&vcc_3v0>;
610 pwr_key_l: pwr-key-l {
611 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
617 rockchip,pins = <0 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
622 lcd_panel_reset: lcd-panel-reset {
623 rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
628 diy_led_pin: diy-led-pin {
629 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
632 work_led_pin: work-led-pin {
633 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
636 yellow_led_pin: yellow-led-pin {
637 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
642 vsel1_pin: vsel1-pin {
643 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
646 vsel2_pin: vsel2-pin {
647 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
652 wifi_enable_h: wifi-enable-h {
653 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
658 vcc3v0_sd_en: vcc3v0-sd-en {
659 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
664 pmic_int_l: pmic-int-l {
665 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
670 vcc5v0_host_en: vcc5v0-host-en {
671 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
674 vcc_sys_en: vcc-sys-en {
675 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
679 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
684 vcc_vbus_typec1_en: vcc-vbus-typec1-en {
685 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
690 fusb0_int: fusb0-int {
691 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
694 fusb1_int: fusb1-int {
695 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
709 vref-supply = <&vcca1v8_s3>;
716 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
718 max-frequency = <150000000>;
719 pinctrl-names = "default";
720 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
722 vmmc-supply = <&vcc3v0_sd>;
723 vqmmc-supply = <&vcc_sdio>;
737 compatible = "jedec,spi-nor";
739 spi-max-frequency = <30000000>;
752 /* tshut mode 0:CRU 1:GPIO */
753 rockchip,hw-tshut-mode = <1>;
754 /* tshut polarity 0:LOW 1:HIGH */
755 rockchip,hw-tshut-polarity = <1>;
762 u2phy0_otg: otg-port {
763 phy-supply = <&vcc_vbus_typec0>;
767 u2phy0_host: host-port {
768 phy-supply = <&vcc5v0_host>;
776 u2phy1_otg: otg-port {
777 phy-supply = <&vcc_vbus_typec1>;
781 u2phy1_host: host-port {
782 phy-supply = <&vcc5v0_host>;
788 pinctrl-names = "default";
789 pinctrl-0 = <&uart0_xfer &uart0_cts>;