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_pin>, <&diy_led_pin>, <&yellow_led_pin>;
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 = "mmc2";
81 label = "yellow:yellow-led";
82 gpios = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
83 default-state = "off";
84 linux,default-trigger = "mmc1";
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 compatible = "regulator-fixed";
115 regulator-name = "sys_12v";
118 vin-supply = <&dc_12v>;
121 /* switched by pmic_sleep */
122 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
123 compatible = "regulator-fixed";
124 regulator-name = "vcc1v8_s3";
127 regulator-min-microvolt = <1800000>;
128 regulator-max-microvolt = <1800000>;
129 vin-supply = <&vcc_1v8>;
132 vcc3v0_sd: vcc3v0-sd {
133 compatible = "regulator-fixed";
135 gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
136 pinctrl-names = "default";
137 pinctrl-0 = <&vcc3v0_sd_en>;
138 regulator-name = "vcc3v0_sd";
140 regulator-min-microvolt = <3000000>;
141 regulator-max-microvolt = <3000000>;
142 vin-supply = <&vcc3v3_sys>;
145 vcc3v3_sys: vcc3v3-sys {
146 compatible = "regulator-fixed";
147 regulator-name = "vcc3v3_sys";
150 regulator-min-microvolt = <3300000>;
151 regulator-max-microvolt = <3300000>;
152 vin-supply = <&sys_12v>;
156 compatible = "regulator-fixed";
157 regulator-name = "vcca_0v9";
160 regulator-min-microvolt = <900000>;
161 regulator-max-microvolt = <900000>;
162 vin-supply = <&vcc3v3_sys>;
165 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
166 vcc5v0_host: vcc5v0-host-regulator {
167 compatible = "regulator-fixed";
169 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
170 pinctrl-names = "default";
171 pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
172 regulator-name = "vcc5v0_host";
173 vin-supply = <&vcc_sys>;
176 vcc_vbus_typec1: vcc-vbus-typec1 {
177 compatible = "regulator-fixed";
179 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
180 pinctrl-names = "default";
181 pinctrl-0 = <&vcc_vbus_typec1_en>;
182 regulator-name = "vcc_vbus_typec1";
184 vin-supply = <&vcc_sys>;
188 compatible = "regulator-fixed";
190 gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
191 pinctrl-names = "default";
192 pinctrl-0 = <&vcc_sys_en>;
193 regulator-name = "vcc_sys";
195 regulator-min-microvolt = <5000000>;
196 regulator-max-microvolt = <5000000>;
197 vin-supply = <&sys_12v>;
201 compatible = "pwm-regulator";
202 pwms = <&pwm2 0 25000 1>;
203 regulator-name = "vdd_log";
206 regulator-min-microvolt = <450000>;
207 regulator-max-microvolt = <1400000>;
208 pwm-supply = <&vcc3v3_sys>;
213 cpu-supply = <&vdd_cpu_l>;
217 cpu-supply = <&vdd_cpu_l>;
221 cpu-supply = <&vdd_cpu_l>;
225 cpu-supply = <&vdd_cpu_l>;
229 cpu-supply = <&vdd_cpu_b>;
233 cpu-supply = <&vdd_cpu_b>;
241 assigned-clocks = <&cru SCLK_RMII_SRC>;
242 assigned-clock-parents = <&clkin_gmac>;
243 clock_in_out = "input";
244 phy-supply = <&vcc_lan>;
246 pinctrl-names = "default";
247 pinctrl-0 = <&rgmii_pins>;
248 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
249 snps,reset-active-low;
250 snps,reset-delays-us = <0 10000 50000>;
257 mali-supply = <&vdd_gpu>;
262 ddc-i2c-bus = <&i2c3>;
263 pinctrl-names = "default";
264 pinctrl-0 = <&hdmi_cec>;
273 clock-frequency = <400000>;
274 i2c-scl-rising-time-ns = <168>;
275 i2c-scl-falling-time-ns = <4>;
279 compatible = "rockchip,rk808";
281 interrupt-parent = <&gpio1>;
282 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
284 clock-output-names = "xin32k", "rk808-clkout2";
285 pinctrl-names = "default";
286 pinctrl-0 = <&pmic_int_l>;
287 rockchip,system-power-controller;
290 vcc1-supply = <&vcc3v3_sys>;
291 vcc2-supply = <&vcc3v3_sys>;
292 vcc3-supply = <&vcc3v3_sys>;
293 vcc4-supply = <&vcc3v3_sys>;
294 vcc6-supply = <&vcc3v3_sys>;
295 vcc7-supply = <&vcc3v3_sys>;
296 vcc8-supply = <&vcc3v3_sys>;
297 vcc9-supply = <&vcc3v3_sys>;
298 vcc10-supply = <&vcc3v3_sys>;
299 vcc11-supply = <&vcc3v3_sys>;
300 vcc12-supply = <&vcc3v3_sys>;
301 vcc13-supply = <&vcc3v3_sys>;
302 vcc14-supply = <&vcc3v3_sys>;
303 vddio-supply = <&vcc_3v0>;
306 vdd_center: DCDC_REG1 {
307 regulator-name = "vdd_center";
310 regulator-min-microvolt = <750000>;
311 regulator-max-microvolt = <1350000>;
312 regulator-ramp-delay = <6001>;
313 regulator-state-mem {
314 regulator-off-in-suspend;
318 vdd_cpu_l: DCDC_REG2 {
319 regulator-name = "vdd_cpu_l";
322 regulator-min-microvolt = <750000>;
323 regulator-max-microvolt = <1350000>;
324 regulator-ramp-delay = <6001>;
325 regulator-state-mem {
326 regulator-off-in-suspend;
331 regulator-name = "vcc_ddr";
334 regulator-state-mem {
335 regulator-on-in-suspend;
340 regulator-name = "vcc_1v8";
343 regulator-min-microvolt = <1800000>;
344 regulator-max-microvolt = <1800000>;
345 regulator-state-mem {
346 regulator-on-in-suspend;
347 regulator-suspend-microvolt = <1800000>;
351 vcca1v8_codec: LDO_REG1 {
352 regulator-name = "vcca1v8_codec";
355 regulator-min-microvolt = <1800000>;
356 regulator-max-microvolt = <1800000>;
357 regulator-state-mem {
358 regulator-off-in-suspend;
362 vcc1v8_hdmi: LDO_REG2 {
363 regulator-name = "vcc1v8_hdmi";
366 regulator-min-microvolt = <1800000>;
367 regulator-max-microvolt = <1800000>;
368 regulator-state-mem {
369 regulator-off-in-suspend;
373 vcc1v8_pmu: LDO_REG3 {
374 regulator-name = "vcc1v8_pmu";
377 regulator-min-microvolt = <1800000>;
378 regulator-max-microvolt = <1800000>;
379 regulator-state-mem {
380 regulator-on-in-suspend;
381 regulator-suspend-microvolt = <1800000>;
386 regulator-name = "vcc_sdio";
388 regulator-min-microvolt = <1800000>;
389 regulator-max-microvolt = <3000000>;
390 regulator-state-mem {
391 regulator-on-in-suspend;
392 regulator-suspend-microvolt = <3000000>;
396 vcca3v0_codec: LDO_REG5 {
397 regulator-name = "vcca3v0_codec";
400 regulator-min-microvolt = <3000000>;
401 regulator-max-microvolt = <3000000>;
402 regulator-state-mem {
403 regulator-off-in-suspend;
408 regulator-name = "vcc_1v5";
411 regulator-min-microvolt = <1500000>;
412 regulator-max-microvolt = <1500000>;
413 regulator-state-mem {
414 regulator-on-in-suspend;
415 regulator-suspend-microvolt = <1500000>;
419 vcca0v9_hdmi: LDO_REG7 {
420 regulator-name = "vcca0v9_hdmi";
423 regulator-min-microvolt = <900000>;
424 regulator-max-microvolt = <900000>;
425 regulator-state-mem {
426 regulator-off-in-suspend;
431 regulator-name = "vcc_3v0";
434 regulator-min-microvolt = <3000000>;
435 regulator-max-microvolt = <3000000>;
436 regulator-state-mem {
437 regulator-on-in-suspend;
438 regulator-suspend-microvolt = <3000000>;
442 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
443 regulator-name = "vcc3v3_s3";
446 regulator-state-mem {
447 regulator-off-in-suspend;
451 vcc3v3_s0: SWITCH_REG2 {
452 regulator-name = "vcc3v3_s0";
455 regulator-state-mem {
456 regulator-off-in-suspend;
462 vdd_cpu_b: regulator@40 {
463 compatible = "silergy,syr827";
465 fcs,suspend-voltage-selector = <1>;
466 pinctrl-names = "default";
467 pinctrl-0 = <&vsel1_pin>;
468 regulator-name = "vdd_cpu_b";
469 regulator-min-microvolt = <712500>;
470 regulator-max-microvolt = <1500000>;
471 regulator-ramp-delay = <1000>;
474 vin-supply = <&vcc3v3_sys>;
476 regulator-state-mem {
477 regulator-off-in-suspend;
481 vdd_gpu: regulator@41 {
482 compatible = "silergy,syr828";
484 fcs,suspend-voltage-selector = <1>;
485 pinctrl-names = "default";
486 pinctrl-0 = <&vsel2_pin>;
487 regulator-name = "vdd_gpu";
488 regulator-min-microvolt = <712500>;
489 regulator-max-microvolt = <1500000>;
490 regulator-ramp-delay = <1000>;
491 vin-supply = <&vcc3v3_sys>;
493 regulator-state-mem {
494 regulator-off-in-suspend;
500 i2c-scl-rising-time-ns = <300>;
501 i2c-scl-falling-time-ns = <15>;
506 i2c-scl-rising-time-ns = <450>;
507 i2c-scl-falling-time-ns = <15>;
512 i2c-scl-rising-time-ns = <600>;
513 i2c-scl-falling-time-ns = <20>;
516 fusb1: usb-typec@22 {
517 compatible = "fcs,fusb302";
519 interrupt-parent = <&gpio1>;
520 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
521 pinctrl-names = "default";
522 pinctrl-0 = <&fusb1_int>;
523 vbus-supply = <&vcc_vbus_typec1>;
529 i2c-scl-rising-time-ns = <600>;
530 i2c-scl-falling-time-ns = <20>;
533 fusb0: usb-typec@22 {
534 compatible = "fcs,fusb302";
536 interrupt-parent = <&gpio1>;
537 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
538 pinctrl-names = "default";
539 pinctrl-0 = <&fusb0_int>;
540 vbus-supply = <&vcc_vbus_typec0>;
544 mp8859: regulator@66 {
545 compatible = "mps,mp8859";
547 dc_12v: mp8859_dcdc {
548 regulator-name = "dc_12v";
549 regulator-min-microvolt = <12000000>;
550 regulator-max-microvolt = <12000000>;
553 vin-supply = <&vcc_vbus_typec0>;
555 regulator-state-mem {
556 regulator-on-in-suspend;
557 regulator-suspend-microvolt = <12000000>;
564 rockchip,playback-channels = <8>;
565 rockchip,capture-channels = <8>;
570 rockchip,playback-channels = <2>;
571 rockchip,capture-channels = <2>;
580 audio-supply = <&vcca1v8_codec>;
581 bt656-supply = <&vcc_3v0>;
582 gpio1830-supply = <&vcc_3v0>;
583 sdmmc-supply = <&vcc_sdio>;
588 pmu1830-supply = <&vcc_3v0>;
594 pwr_key_l: pwr-key-l {
595 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
600 lcd_panel_reset: lcd-panel-reset {
601 rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
606 diy_led_pin: diy-led-pin {
607 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
610 work_led_pin: work-led-pin {
611 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
614 yellow_led_pin: yellow-led-pin {
615 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
620 vsel1_pin: vsel1-pin {
621 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
624 vsel2_pin: vsel2-pin {
625 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
630 wifi_enable_h: wifi-enable-h {
631 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
636 vcc3v0_sd_en: vcc3v0-sd-en {
637 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
642 pmic_int_l: pmic-int-l {
643 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
648 vcc5v0_host_en: vcc5v0-host-en {
649 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
652 vcc_sys_en: vcc-sys-en {
653 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
657 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
662 vcc_vbus_typec1_en: vcc-vbus-typec1-en {
663 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
668 fusb0_int: fusb0-int {
669 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
672 fusb1_int: fusb1-int {
673 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
687 vref-supply = <&vcca1v8_s3>;
694 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
696 max-frequency = <150000000>;
697 pinctrl-names = "default";
698 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
700 vmmc-supply = <&vcc3v0_sd>;
701 vqmmc-supply = <&vcc_sdio>;
715 compatible = "jedec,spi-nor";
717 spi-max-frequency = <10000000>;
730 /* tshut mode 0:CRU 1:GPIO */
731 rockchip,hw-tshut-mode = <1>;
732 /* tshut polarity 0:LOW 1:HIGH */
733 rockchip,hw-tshut-polarity = <1>;
740 u2phy0_otg: otg-port {
741 phy-supply = <&vcc_vbus_typec0>;
745 u2phy0_host: host-port {
746 phy-supply = <&vcc5v0_host>;
754 u2phy1_otg: otg-port {
755 phy-supply = <&vcc_vbus_typec1>;
759 u2phy1_host: host-port {
760 phy-supply = <&vcc5v0_host>;
766 pinctrl-names = "default";
767 pinctrl-0 = <&uart0_xfer &uart0_cts>;