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";
17 stdout-path = "serial2:1500000n8";
20 backlight: backlight {
21 compatible = "pwm-backlight";
22 pwms = <&pwm0 0 25000 0>;
25 clkin_gmac: external-gmac-clock {
26 compatible = "fixed-clock";
27 clock-frequency = <125000000>;
28 clock-output-names = "clkin_gmac";
33 compatible = "adc-keys";
34 io-channels = <&saradc 1>;
35 io-channel-names = "buttons";
36 keyup-threshold-microvolt = <1500000>;
37 poll-interval = <100>;
41 linux,code = <KEY_VENDOR>;
42 press-threshold-microvolt = <18000>;
47 compatible = "gpio-keys";
49 pinctrl-names = "default";
50 pinctrl-0 = <&pwr_key_l>;
53 debounce-interval = <100>;
54 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
55 label = "GPIO Key Power";
56 linux,code = <KEY_POWER>;
62 compatible = "gpio-leds";
63 pinctrl-names = "default";
64 pinctrl-0 = <&work_led_gpio>, <&diy_led_gpio>, <&yellow_led_gpio>;
68 gpios = <&gpio2 RK_PD3 GPIO_ACTIVE_HIGH>;
70 linux,default-trigger = "heartbeat";
75 gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
76 default-state = "off";
77 linux,default-trigger = "mmc1";
81 label = "yellow:yellow-led";
82 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
83 default-state = "off";
84 linux,default-trigger = "mmc0";
88 sdio_pwrseq: sdio-pwrseq {
89 compatible = "mmc-pwrseq-simple";
91 clock-names = "ext_clock";
92 pinctrl-names = "default";
93 pinctrl-0 = <&wifi_enable_h>;
96 * On the module itself this is one of these (depending
97 * on the actual card populated):
98 * - SDIO_RESET_L_WL_REG_ON
99 * - PDN (power down when low)
101 reset-gpios = <&gpio0 RK_PB2 GPIO_ACTIVE_LOW>;
104 vcc_vbus_typec0: vcc-vbus-typec0 {
105 compatible = "regulator-fixed";
106 regulator-name = "vcc_vbus_typec0";
109 regulator-min-microvolt = <5000000>;
110 regulator-max-microvolt = <5000000>;
114 * should be placed inside mp8859, but not until mp8859 has
115 * its own dt-binding.
117 dc_12v: mp8859-dcdc1 {
118 compatible = "regulator-fixed";
119 regulator-name = "dc_12v";
122 regulator-min-microvolt = <12000000>;
123 regulator-max-microvolt = <12000000>;
124 vin-supply = <&vcc_vbus_typec0>;
127 /* switched by pmic_sleep */
128 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
129 compatible = "regulator-fixed";
130 regulator-name = "vcc1v8_s3";
133 regulator-min-microvolt = <1800000>;
134 regulator-max-microvolt = <1800000>;
135 vin-supply = <&vcc_1v8>;
138 vcc3v0_sd: vcc3v0-sd {
139 compatible = "regulator-fixed";
141 gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
142 pinctrl-names = "default";
143 pinctrl-0 = <&vcc3v0_sd_en>;
144 regulator-name = "vcc3v0_sd";
146 regulator-min-microvolt = <3000000>;
147 regulator-max-microvolt = <3000000>;
148 vin-supply = <&vcc3v3_sys>;
151 vcc3v3_sys: vcc3v3-sys {
152 compatible = "regulator-fixed";
153 regulator-name = "vcc3v3_sys";
156 regulator-min-microvolt = <3300000>;
157 regulator-max-microvolt = <3300000>;
158 vin-supply = <&dc_12v>;
162 compatible = "regulator-fixed";
163 regulator-name = "vcca_0v9";
166 regulator-min-microvolt = <900000>;
167 regulator-max-microvolt = <900000>;
168 vin-supply = <&vcc3v3_sys>;
171 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
172 vcc5v0_host: vcc5v0-host-regulator {
173 compatible = "regulator-fixed";
175 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
176 pinctrl-names = "default";
177 pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
178 regulator-name = "vcc5v0_host";
180 vin-supply = <&vcc_sys>;
183 vcc_vbus_typec1: vcc-vbus-typec1 {
184 compatible = "regulator-fixed";
186 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
187 pinctrl-names = "default";
188 pinctrl-0 = <&vcc_vbus_typec1_en>;
189 regulator-name = "vcc_vbus_typec1";
191 vin-supply = <&vcc_sys>;
195 compatible = "regulator-fixed";
197 gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
198 pinctrl-names = "default";
199 pinctrl-0 = <&vcc_sys_en>;
200 regulator-name = "vcc_sys";
203 regulator-min-microvolt = <5000000>;
204 regulator-max-microvolt = <5000000>;
205 vin-supply = <&dc_12v>;
209 compatible = "pwm-regulator";
210 pwms = <&pwm2 0 25000 1>;
211 regulator-name = "vdd_log";
214 regulator-min-microvolt = <450000>;
215 regulator-max-microvolt = <1400000>;
216 pwm-supply = <&vcc3v3_sys>;
221 cpu-supply = <&vdd_cpu_l>;
225 cpu-supply = <&vdd_cpu_l>;
229 cpu-supply = <&vdd_cpu_l>;
233 cpu-supply = <&vdd_cpu_l>;
237 cpu-supply = <&vdd_cpu_b>;
241 cpu-supply = <&vdd_cpu_b>;
249 assigned-clocks = <&cru SCLK_RMII_SRC>;
250 assigned-clock-parents = <&clkin_gmac>;
251 clock_in_out = "input";
252 phy-supply = <&vcc_lan>;
254 pinctrl-names = "default";
255 pinctrl-0 = <&rgmii_pins>;
256 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
257 snps,reset-active-low;
258 snps,reset-delays-us = <0 10000 50000>;
265 mali-supply = <&vdd_gpu>;
270 ddc-i2c-bus = <&i2c3>;
271 pinctrl-names = "default";
272 pinctrl-0 = <&hdmi_cec>;
281 clock-frequency = <400000>;
282 i2c-scl-rising-time-ns = <168>;
283 i2c-scl-falling-time-ns = <4>;
287 compatible = "rockchip,rk808";
289 interrupt-parent = <&gpio1>;
290 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
292 clock-output-names = "xin32k", "rk808-clkout2";
293 pinctrl-names = "default";
294 pinctrl-0 = <&pmic_int_l>;
295 rockchip,system-power-controller;
298 vcc1-supply = <&vcc3v3_sys>;
299 vcc2-supply = <&vcc3v3_sys>;
300 vcc3-supply = <&vcc3v3_sys>;
301 vcc4-supply = <&vcc3v3_sys>;
302 vcc6-supply = <&vcc3v3_sys>;
303 vcc7-supply = <&vcc3v3_sys>;
304 vcc8-supply = <&vcc3v3_sys>;
305 vcc9-supply = <&vcc3v3_sys>;
306 vcc10-supply = <&vcc3v3_sys>;
307 vcc11-supply = <&vcc3v3_sys>;
308 vcc12-supply = <&vcc3v3_sys>;
309 vcc13-supply = <&vcc3v3_sys>;
310 vcc14-supply = <&vcc3v3_sys>;
311 vddio-supply = <&vcc_3v0>;
314 vdd_center: DCDC_REG1 {
315 regulator-name = "vdd_center";
318 regulator-min-microvolt = <750000>;
319 regulator-max-microvolt = <1350000>;
320 regulator-ramp-delay = <6001>;
321 regulator-state-mem {
322 regulator-off-in-suspend;
326 vdd_cpu_l: DCDC_REG2 {
327 regulator-name = "vdd_cpu_l";
330 regulator-min-microvolt = <750000>;
331 regulator-max-microvolt = <1350000>;
332 regulator-ramp-delay = <6001>;
333 regulator-state-mem {
334 regulator-off-in-suspend;
339 regulator-name = "vcc_ddr";
342 regulator-state-mem {
343 regulator-on-in-suspend;
348 regulator-name = "vcc_1v8";
351 regulator-min-microvolt = <1800000>;
352 regulator-max-microvolt = <1800000>;
353 regulator-state-mem {
354 regulator-on-in-suspend;
355 regulator-suspend-microvolt = <1800000>;
359 vcca1v8_codec: LDO_REG1 {
360 regulator-name = "vcca1v8_codec";
363 regulator-min-microvolt = <1800000>;
364 regulator-max-microvolt = <1800000>;
365 regulator-state-mem {
366 regulator-off-in-suspend;
370 vcc1v8_hdmi: LDO_REG2 {
371 regulator-name = "vcc1v8_hdmi";
374 regulator-min-microvolt = <1800000>;
375 regulator-max-microvolt = <1800000>;
376 regulator-state-mem {
377 regulator-off-in-suspend;
381 vcc1v8_pmu: LDO_REG3 {
382 regulator-name = "vcc1v8_pmu";
385 regulator-min-microvolt = <1800000>;
386 regulator-max-microvolt = <1800000>;
387 regulator-state-mem {
388 regulator-on-in-suspend;
389 regulator-suspend-microvolt = <1800000>;
394 regulator-name = "vcc_sdio";
397 regulator-min-microvolt = <1800000>;
398 regulator-max-microvolt = <3000000>;
399 regulator-state-mem {
400 regulator-on-in-suspend;
401 regulator-suspend-microvolt = <3000000>;
405 vcca3v0_codec: LDO_REG5 {
406 regulator-name = "vcca3v0_codec";
409 regulator-min-microvolt = <3000000>;
410 regulator-max-microvolt = <3000000>;
411 regulator-state-mem {
412 regulator-off-in-suspend;
417 regulator-name = "vcc_1v5";
420 regulator-min-microvolt = <1500000>;
421 regulator-max-microvolt = <1500000>;
422 regulator-state-mem {
423 regulator-on-in-suspend;
424 regulator-suspend-microvolt = <1500000>;
428 vcca0v9_hdmi: LDO_REG7 {
429 regulator-name = "vcca0v9_hdmi";
432 regulator-min-microvolt = <900000>;
433 regulator-max-microvolt = <900000>;
434 regulator-state-mem {
435 regulator-off-in-suspend;
440 regulator-name = "vcc_3v0";
443 regulator-min-microvolt = <3000000>;
444 regulator-max-microvolt = <3000000>;
445 regulator-state-mem {
446 regulator-on-in-suspend;
447 regulator-suspend-microvolt = <3000000>;
451 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
452 regulator-name = "vcc3v3_s3";
455 regulator-state-mem {
456 regulator-off-in-suspend;
460 vcc3v3_s0: SWITCH_REG2 {
461 regulator-name = "vcc3v3_s0";
464 regulator-state-mem {
465 regulator-off-in-suspend;
471 vdd_cpu_b: regulator@40 {
472 compatible = "silergy,syr827";
474 fcs,suspend-voltage-selector = <1>;
475 pinctrl-names = "default";
476 pinctrl-0 = <&vsel1_gpio>;
477 regulator-name = "vdd_cpu_b";
478 regulator-min-microvolt = <712500>;
479 regulator-max-microvolt = <1500000>;
480 regulator-ramp-delay = <1000>;
483 vin-supply = <&vcc3v3_sys>;
485 regulator-state-mem {
486 regulator-off-in-suspend;
490 vdd_gpu: regulator@41 {
491 compatible = "silergy,syr828";
493 fcs,suspend-voltage-selector = <1>;
494 pinctrl-names = "default";
495 pinctrl-0 = <&vsel2_gpio>;
496 regulator-name = "vdd_gpu";
497 regulator-min-microvolt = <712500>;
498 regulator-max-microvolt = <1500000>;
499 regulator-ramp-delay = <1000>;
500 vin-supply = <&vcc3v3_sys>;
502 regulator-state-mem {
503 regulator-off-in-suspend;
509 i2c-scl-rising-time-ns = <300>;
510 i2c-scl-falling-time-ns = <15>;
515 i2c-scl-rising-time-ns = <450>;
516 i2c-scl-falling-time-ns = <15>;
521 i2c-scl-rising-time-ns = <600>;
522 i2c-scl-falling-time-ns = <20>;
525 fusb1: usb-typec@22 {
526 compatible = "fcs,fusb302";
528 interrupt-parent = <&gpio1>;
529 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
530 pinctrl-names = "default";
531 pinctrl-0 = <&fusb1_int>;
532 vbus-supply = <&vcc_vbus_typec1>;
538 i2c-scl-rising-time-ns = <600>;
539 i2c-scl-falling-time-ns = <20>;
542 fusb0: usb-typec@22 {
543 compatible = "fcs,fusb302";
545 interrupt-parent = <&gpio1>;
546 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
547 pinctrl-names = "default";
548 pinctrl-0 = <&fusb0_int>;
549 vbus-supply = <&vcc_vbus_typec0>;
555 rockchip,playback-channels = <8>;
556 rockchip,capture-channels = <8>;
561 rockchip,playback-channels = <2>;
562 rockchip,capture-channels = <2>;
571 audio-supply = <&vcca1v8_codec>;
572 bt656-supply = <&vcc_3v0>;
573 gpio1830-supply = <&vcc_3v0>;
574 sdmmc-supply = <&vcc_sdio>;
579 pmu1830-supply = <&vcc_3v0>;
585 pwr_key_l: pwr-key-l {
586 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
591 lcd_panel_reset: lcd-panel-reset {
592 rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
597 diy_led_gpio: diy_led-gpio {
598 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
601 work_led_gpio: work_led-gpio {
602 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
605 yellow_led_gpio: yellow_led-gpio {
606 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
611 vsel1_gpio: vsel1-gpio {
612 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
615 vsel2_gpio: vsel2-gpio {
616 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
621 wifi_enable_h: wifi-enable-h {
622 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
627 vcc3v0_sd_en: vcc3v0-sd-en {
628 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
633 pmic_int_l: pmic-int-l {
634 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
639 vcc5v0_host_en: vcc5v0-host-en {
640 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
643 vcc_sys_en: vcc-sys-en {
644 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
648 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
653 vcc_vbus_typec1_en: vcc-vbus-typec1-en {
654 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
659 fusb0_int: fusb0-int {
660 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
663 fusb1_int: fusb1-int {
664 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
678 vref-supply = <&vcca1v8_s3>;
685 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
687 max-frequency = <150000000>;
688 pinctrl-names = "default";
689 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
691 vmmc-supply = <&vcc3v0_sd>;
692 vqmmc-supply = <&vcc_sdio>;
706 compatible = "jedec,spi-nor";
708 spi-max-frequency = <10000000>;
721 /* tshut mode 0:CRU 1:GPIO */
722 rockchip,hw-tshut-mode = <1>;
723 /* tshut polarity 0:LOW 1:HIGH */
724 rockchip,hw-tshut-polarity = <1>;
731 u2phy0_otg: otg-port {
732 phy-supply = <&vcc_vbus_typec0>;
736 u2phy0_host: host-port {
737 phy-supply = <&vcc5v0_host>;
745 u2phy1_otg: otg-port {
746 phy-supply = <&vcc_vbus_typec1>;
750 u2phy1_host: host-port {
751 phy-supply = <&vcc5v0_host>;
757 pinctrl-names = "default";
758 pinctrl-0 = <&uart0_xfer &uart0_cts>;