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>;
113 /* switched by pmic_sleep */
114 vcc1v8_s3: vcca1v8_s3: vcc1v8-s3 {
115 compatible = "regulator-fixed";
116 regulator-name = "vcc1v8_s3";
119 regulator-min-microvolt = <1800000>;
120 regulator-max-microvolt = <1800000>;
121 vin-supply = <&vcc_1v8>;
124 vcc3v0_sd: vcc3v0-sd {
125 compatible = "regulator-fixed";
127 gpio = <&gpio4 RK_PD6 GPIO_ACTIVE_HIGH>;
128 pinctrl-names = "default";
129 pinctrl-0 = <&vcc3v0_sd_en>;
130 regulator-name = "vcc3v0_sd";
132 regulator-min-microvolt = <3000000>;
133 regulator-max-microvolt = <3000000>;
134 vin-supply = <&vcc3v3_sys>;
137 vcc3v3_sys: vcc3v3-sys {
138 compatible = "regulator-fixed";
139 regulator-name = "vcc3v3_sys";
142 regulator-min-microvolt = <3300000>;
143 regulator-max-microvolt = <3300000>;
144 vin-supply = <&dc_12v>;
148 compatible = "regulator-fixed";
149 regulator-name = "vcca_0v9";
152 regulator-min-microvolt = <900000>;
153 regulator-max-microvolt = <900000>;
154 vin-supply = <&vcc3v3_sys>;
157 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
158 vcc5v0_host: vcc5v0-host-regulator {
159 compatible = "regulator-fixed";
161 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
162 pinctrl-names = "default";
163 pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
164 regulator-name = "vcc5v0_host";
165 vin-supply = <&vcc_sys>;
168 vcc_vbus_typec1: vcc-vbus-typec1 {
169 compatible = "regulator-fixed";
171 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
172 pinctrl-names = "default";
173 pinctrl-0 = <&vcc_vbus_typec1_en>;
174 regulator-name = "vcc_vbus_typec1";
176 vin-supply = <&vcc_sys>;
180 compatible = "regulator-fixed";
182 gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
183 pinctrl-names = "default";
184 pinctrl-0 = <&vcc_sys_en>;
185 regulator-name = "vcc_sys";
187 regulator-min-microvolt = <5000000>;
188 regulator-max-microvolt = <5000000>;
189 vin-supply = <&dc_12v>;
193 compatible = "pwm-regulator";
194 pwms = <&pwm2 0 25000 1>;
195 regulator-name = "vdd_log";
198 regulator-min-microvolt = <450000>;
199 regulator-max-microvolt = <1400000>;
200 pwm-supply = <&vcc3v3_sys>;
205 cpu-supply = <&vdd_cpu_l>;
209 cpu-supply = <&vdd_cpu_l>;
213 cpu-supply = <&vdd_cpu_l>;
217 cpu-supply = <&vdd_cpu_l>;
221 cpu-supply = <&vdd_cpu_b>;
225 cpu-supply = <&vdd_cpu_b>;
233 assigned-clocks = <&cru SCLK_RMII_SRC>;
234 assigned-clock-parents = <&clkin_gmac>;
235 clock_in_out = "input";
236 phy-supply = <&vcc_lan>;
238 pinctrl-names = "default";
239 pinctrl-0 = <&rgmii_pins>;
240 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
241 snps,reset-active-low;
242 snps,reset-delays-us = <0 10000 50000>;
249 mali-supply = <&vdd_gpu>;
254 ddc-i2c-bus = <&i2c3>;
255 pinctrl-names = "default";
256 pinctrl-0 = <&hdmi_cec>;
265 clock-frequency = <400000>;
266 i2c-scl-rising-time-ns = <168>;
267 i2c-scl-falling-time-ns = <4>;
271 compatible = "rockchip,rk808";
273 interrupt-parent = <&gpio1>;
274 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
276 clock-output-names = "xin32k", "rk808-clkout2";
277 pinctrl-names = "default";
278 pinctrl-0 = <&pmic_int_l>;
279 rockchip,system-power-controller;
282 vcc1-supply = <&vcc3v3_sys>;
283 vcc2-supply = <&vcc3v3_sys>;
284 vcc3-supply = <&vcc3v3_sys>;
285 vcc4-supply = <&vcc3v3_sys>;
286 vcc6-supply = <&vcc3v3_sys>;
287 vcc7-supply = <&vcc3v3_sys>;
288 vcc8-supply = <&vcc3v3_sys>;
289 vcc9-supply = <&vcc3v3_sys>;
290 vcc10-supply = <&vcc3v3_sys>;
291 vcc11-supply = <&vcc3v3_sys>;
292 vcc12-supply = <&vcc3v3_sys>;
293 vcc13-supply = <&vcc3v3_sys>;
294 vcc14-supply = <&vcc3v3_sys>;
295 vddio-supply = <&vcc_3v0>;
298 vdd_center: DCDC_REG1 {
299 regulator-name = "vdd_center";
302 regulator-min-microvolt = <750000>;
303 regulator-max-microvolt = <1350000>;
304 regulator-ramp-delay = <6001>;
305 regulator-state-mem {
306 regulator-off-in-suspend;
310 vdd_cpu_l: DCDC_REG2 {
311 regulator-name = "vdd_cpu_l";
314 regulator-min-microvolt = <750000>;
315 regulator-max-microvolt = <1350000>;
316 regulator-ramp-delay = <6001>;
317 regulator-state-mem {
318 regulator-off-in-suspend;
323 regulator-name = "vcc_ddr";
326 regulator-state-mem {
327 regulator-on-in-suspend;
332 regulator-name = "vcc_1v8";
335 regulator-min-microvolt = <1800000>;
336 regulator-max-microvolt = <1800000>;
337 regulator-state-mem {
338 regulator-on-in-suspend;
339 regulator-suspend-microvolt = <1800000>;
343 vcca1v8_codec: LDO_REG1 {
344 regulator-name = "vcca1v8_codec";
347 regulator-min-microvolt = <1800000>;
348 regulator-max-microvolt = <1800000>;
349 regulator-state-mem {
350 regulator-off-in-suspend;
354 vcc1v8_hdmi: LDO_REG2 {
355 regulator-name = "vcc1v8_hdmi";
358 regulator-min-microvolt = <1800000>;
359 regulator-max-microvolt = <1800000>;
360 regulator-state-mem {
361 regulator-off-in-suspend;
365 vcc1v8_pmu: LDO_REG3 {
366 regulator-name = "vcc1v8_pmu";
369 regulator-min-microvolt = <1800000>;
370 regulator-max-microvolt = <1800000>;
371 regulator-state-mem {
372 regulator-on-in-suspend;
373 regulator-suspend-microvolt = <1800000>;
378 regulator-name = "vcc_sdio";
380 regulator-min-microvolt = <1800000>;
381 regulator-max-microvolt = <3000000>;
382 regulator-state-mem {
383 regulator-on-in-suspend;
384 regulator-suspend-microvolt = <3000000>;
388 vcca3v0_codec: LDO_REG5 {
389 regulator-name = "vcca3v0_codec";
392 regulator-min-microvolt = <3000000>;
393 regulator-max-microvolt = <3000000>;
394 regulator-state-mem {
395 regulator-off-in-suspend;
400 regulator-name = "vcc_1v5";
403 regulator-min-microvolt = <1500000>;
404 regulator-max-microvolt = <1500000>;
405 regulator-state-mem {
406 regulator-on-in-suspend;
407 regulator-suspend-microvolt = <1500000>;
411 vcca0v9_hdmi: LDO_REG7 {
412 regulator-name = "vcca0v9_hdmi";
415 regulator-min-microvolt = <900000>;
416 regulator-max-microvolt = <900000>;
417 regulator-state-mem {
418 regulator-off-in-suspend;
423 regulator-name = "vcc_3v0";
426 regulator-min-microvolt = <3000000>;
427 regulator-max-microvolt = <3000000>;
428 regulator-state-mem {
429 regulator-on-in-suspend;
430 regulator-suspend-microvolt = <3000000>;
434 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
435 regulator-name = "vcc3v3_s3";
438 regulator-state-mem {
439 regulator-off-in-suspend;
443 vcc3v3_s0: SWITCH_REG2 {
444 regulator-name = "vcc3v3_s0";
447 regulator-state-mem {
448 regulator-off-in-suspend;
454 vdd_cpu_b: regulator@40 {
455 compatible = "silergy,syr827";
457 fcs,suspend-voltage-selector = <1>;
458 pinctrl-names = "default";
459 pinctrl-0 = <&vsel1_gpio>;
460 regulator-name = "vdd_cpu_b";
461 regulator-min-microvolt = <712500>;
462 regulator-max-microvolt = <1500000>;
463 regulator-ramp-delay = <1000>;
466 vin-supply = <&vcc3v3_sys>;
468 regulator-state-mem {
469 regulator-off-in-suspend;
473 vdd_gpu: regulator@41 {
474 compatible = "silergy,syr828";
476 fcs,suspend-voltage-selector = <1>;
477 pinctrl-names = "default";
478 pinctrl-0 = <&vsel2_gpio>;
479 regulator-name = "vdd_gpu";
480 regulator-min-microvolt = <712500>;
481 regulator-max-microvolt = <1500000>;
482 regulator-ramp-delay = <1000>;
483 vin-supply = <&vcc3v3_sys>;
485 regulator-state-mem {
486 regulator-off-in-suspend;
492 i2c-scl-rising-time-ns = <300>;
493 i2c-scl-falling-time-ns = <15>;
498 i2c-scl-rising-time-ns = <450>;
499 i2c-scl-falling-time-ns = <15>;
504 i2c-scl-rising-time-ns = <600>;
505 i2c-scl-falling-time-ns = <20>;
508 fusb1: usb-typec@22 {
509 compatible = "fcs,fusb302";
511 interrupt-parent = <&gpio1>;
512 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
513 pinctrl-names = "default";
514 pinctrl-0 = <&fusb1_int>;
515 vbus-supply = <&vcc_vbus_typec1>;
521 i2c-scl-rising-time-ns = <600>;
522 i2c-scl-falling-time-ns = <20>;
525 fusb0: usb-typec@22 {
526 compatible = "fcs,fusb302";
528 interrupt-parent = <&gpio1>;
529 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
530 pinctrl-names = "default";
531 pinctrl-0 = <&fusb0_int>;
532 vbus-supply = <&vcc_vbus_typec0>;
536 mp8859: regulator@66 {
537 compatible = "mps,mp8859";
539 dc_12v: mp8859_dcdc {
540 regulator-name = "dc_12v";
541 regulator-min-microvolt = <12000000>;
542 regulator-max-microvolt = <12000000>;
545 vin-supply = <&vcc_vbus_typec0>;
547 regulator-state-mem {
548 regulator-on-in-suspend;
549 regulator-suspend-microvolt = <12000000>;
556 rockchip,playback-channels = <8>;
557 rockchip,capture-channels = <8>;
562 rockchip,playback-channels = <2>;
563 rockchip,capture-channels = <2>;
572 audio-supply = <&vcca1v8_codec>;
573 bt656-supply = <&vcc_3v0>;
574 gpio1830-supply = <&vcc_3v0>;
575 sdmmc-supply = <&vcc_sdio>;
580 pmu1830-supply = <&vcc_3v0>;
586 pwr_key_l: pwr-key-l {
587 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
592 lcd_panel_reset: lcd-panel-reset {
593 rockchip,pins = <4 RK_PD5 RK_FUNC_GPIO &pcfg_pull_up>;
598 diy_led_gpio: diy_led-gpio {
599 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
602 work_led_gpio: work_led-gpio {
603 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
606 yellow_led_gpio: yellow_led-gpio {
607 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
612 vsel1_gpio: vsel1-gpio {
613 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
616 vsel2_gpio: vsel2-gpio {
617 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
622 wifi_enable_h: wifi-enable-h {
623 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
628 vcc3v0_sd_en: vcc3v0-sd-en {
629 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
634 pmic_int_l: pmic-int-l {
635 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
640 vcc5v0_host_en: vcc5v0-host-en {
641 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
644 vcc_sys_en: vcc-sys-en {
645 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
649 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
654 vcc_vbus_typec1_en: vcc-vbus-typec1-en {
655 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
660 fusb0_int: fusb0-int {
661 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
664 fusb1_int: fusb1-int {
665 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
679 vref-supply = <&vcca1v8_s3>;
686 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
688 max-frequency = <150000000>;
689 pinctrl-names = "default";
690 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
692 vmmc-supply = <&vcc3v0_sd>;
693 vqmmc-supply = <&vcc_sdio>;
707 compatible = "jedec,spi-nor";
709 spi-max-frequency = <10000000>;
722 /* tshut mode 0:CRU 1:GPIO */
723 rockchip,hw-tshut-mode = <1>;
724 /* tshut polarity 0:LOW 1:HIGH */
725 rockchip,hw-tshut-polarity = <1>;
732 u2phy0_otg: otg-port {
733 phy-supply = <&vcc_vbus_typec0>;
737 u2phy0_host: host-port {
738 phy-supply = <&vcc5v0_host>;
746 u2phy1_otg: otg-port {
747 phy-supply = <&vcc_vbus_typec1>;
751 u2phy1_host: host-port {
752 phy-supply = <&vcc5v0_host>;
758 pinctrl-names = "default";
759 pinctrl-0 = <&uart0_xfer &uart0_cts>;