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 vcc3v3_sys: vcc3v3-sys {
139 compatible = "regulator-fixed";
140 regulator-name = "vcc3v3_sys";
143 regulator-min-microvolt = <3300000>;
144 regulator-max-microvolt = <3300000>;
145 vin-supply = <&dc_12v>;
148 /* Actually 3 regulators (host0, 1, 2) controlled by the same gpio */
149 vcc5v0_host: vcc5v0-host-regulator {
150 compatible = "regulator-fixed";
152 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
153 pinctrl-names = "default";
154 pinctrl-0 = <&vcc5v0_host_en &hub_rst>;
155 regulator-name = "vcc5v0_host";
157 vin-supply = <&vcc_sys>;
160 vcc_vbus_typec1: vcc-vbus-typec1 {
161 compatible = "regulator-fixed";
163 gpio = <&gpio1 RK_PB5 GPIO_ACTIVE_HIGH>;
164 pinctrl-names = "default";
165 pinctrl-0 = <&vcc_vbus_typec1_en>;
166 regulator-name = "vcc_vbus_typec1";
168 vin-supply = <&vcc_sys>;
172 compatible = "regulator-fixed";
174 gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
175 pinctrl-names = "default";
176 pinctrl-0 = <&vcc_sys_en>;
177 regulator-name = "vcc_sys";
180 regulator-min-microvolt = <5000000>;
181 regulator-max-microvolt = <5000000>;
182 vin-supply = <&dc_12v>;
186 compatible = "pwm-regulator";
187 pwms = <&pwm2 0 25000 1>;
188 regulator-name = "vdd_log";
191 regulator-min-microvolt = <800000>;
192 regulator-max-microvolt = <1400000>;
193 vin-supply = <&vcc3v3_sys>;
198 cpu-supply = <&vdd_cpu_l>;
202 cpu-supply = <&vdd_cpu_l>;
206 cpu-supply = <&vdd_cpu_l>;
210 cpu-supply = <&vdd_cpu_l>;
214 cpu-supply = <&vdd_cpu_b>;
218 cpu-supply = <&vdd_cpu_b>;
226 assigned-clocks = <&cru SCLK_RMII_SRC>;
227 assigned-clock-parents = <&clkin_gmac>;
228 clock_in_out = "input";
229 phy-supply = <&vcc_lan>;
231 pinctrl-names = "default";
232 pinctrl-0 = <&rgmii_pins>;
233 snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
234 snps,reset-active-low;
235 snps,reset-delays-us = <0 10000 50000>;
242 ddc-i2c-bus = <&i2c3>;
243 pinctrl-names = "default";
244 pinctrl-0 = <&hdmi_cec>;
249 clock-frequency = <400000>;
250 i2c-scl-rising-time-ns = <168>;
251 i2c-scl-falling-time-ns = <4>;
255 compatible = "rockchip,rk808";
257 interrupt-parent = <&gpio1>;
258 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
260 clock-output-names = "xin32k", "rk808-clkout2";
261 pinctrl-names = "default";
262 pinctrl-0 = <&pmic_int_l>;
263 rockchip,system-power-controller;
266 vcc1-supply = <&vcc3v3_sys>;
267 vcc2-supply = <&vcc3v3_sys>;
268 vcc3-supply = <&vcc3v3_sys>;
269 vcc4-supply = <&vcc3v3_sys>;
270 vcc6-supply = <&vcc3v3_sys>;
271 vcc7-supply = <&vcc3v3_sys>;
272 vcc8-supply = <&vcc3v3_sys>;
273 vcc9-supply = <&vcc3v3_sys>;
274 vcc10-supply = <&vcc3v3_sys>;
275 vcc11-supply = <&vcc3v3_sys>;
276 vcc12-supply = <&vcc3v3_sys>;
277 vcc13-supply = <&vcc3v3_sys>;
278 vcc14-supply = <&vcc3v3_sys>;
279 vddio-supply = <&vcc_3v0>;
282 vdd_center: DCDC_REG1 {
283 regulator-name = "vdd_center";
286 regulator-min-microvolt = <750000>;
287 regulator-max-microvolt = <1350000>;
288 regulator-ramp-delay = <6001>;
289 regulator-state-mem {
290 regulator-off-in-suspend;
294 vdd_cpu_l: DCDC_REG2 {
295 regulator-name = "vdd_cpu_l";
298 regulator-min-microvolt = <750000>;
299 regulator-max-microvolt = <1350000>;
300 regulator-ramp-delay = <6001>;
301 regulator-state-mem {
302 regulator-off-in-suspend;
307 regulator-name = "vcc_ddr";
310 regulator-state-mem {
311 regulator-on-in-suspend;
316 regulator-name = "vcc_1v8";
319 regulator-min-microvolt = <1800000>;
320 regulator-max-microvolt = <1800000>;
321 regulator-state-mem {
322 regulator-on-in-suspend;
323 regulator-suspend-microvolt = <1800000>;
327 vcca1v8_codec: LDO_REG1 {
328 regulator-name = "vcca1v8_codec";
331 regulator-min-microvolt = <1800000>;
332 regulator-max-microvolt = <1800000>;
333 regulator-state-mem {
334 regulator-off-in-suspend;
338 vcc1v8_hdmi: LDO_REG2 {
339 regulator-name = "vcc1v8_hdmi";
342 regulator-min-microvolt = <1800000>;
343 regulator-max-microvolt = <1800000>;
344 regulator-state-mem {
345 regulator-off-in-suspend;
349 vcc1v8_pmu: LDO_REG3 {
350 regulator-name = "vcc1v8_pmu";
353 regulator-min-microvolt = <1800000>;
354 regulator-max-microvolt = <1800000>;
355 regulator-state-mem {
356 regulator-on-in-suspend;
357 regulator-suspend-microvolt = <1800000>;
362 regulator-name = "vcc_sdio";
365 regulator-min-microvolt = <1800000>;
366 regulator-max-microvolt = <3000000>;
367 regulator-state-mem {
368 regulator-on-in-suspend;
369 regulator-suspend-microvolt = <3000000>;
373 vcca3v0_codec: LDO_REG5 {
374 regulator-name = "vcca3v0_codec";
377 regulator-min-microvolt = <3000000>;
378 regulator-max-microvolt = <3000000>;
379 regulator-state-mem {
380 regulator-off-in-suspend;
385 regulator-name = "vcc_1v5";
388 regulator-min-microvolt = <1500000>;
389 regulator-max-microvolt = <1500000>;
390 regulator-state-mem {
391 regulator-on-in-suspend;
392 regulator-suspend-microvolt = <1500000>;
396 vcca0v9_hdmi: LDO_REG7 {
397 regulator-name = "vcca0v9_hdmi";
400 regulator-min-microvolt = <900000>;
401 regulator-max-microvolt = <900000>;
402 regulator-state-mem {
403 regulator-off-in-suspend;
408 regulator-name = "vcc_3v0";
411 regulator-min-microvolt = <3000000>;
412 regulator-max-microvolt = <3000000>;
413 regulator-state-mem {
414 regulator-on-in-suspend;
415 regulator-suspend-microvolt = <3000000>;
419 vcc3v3_s3: vcc_lan: SWITCH_REG1 {
420 regulator-name = "vcc3v3_s3";
423 regulator-state-mem {
424 regulator-off-in-suspend;
428 vcc3v3_s0: SWITCH_REG2 {
429 regulator-name = "vcc3v3_s0";
432 regulator-state-mem {
433 regulator-off-in-suspend;
439 vdd_cpu_b: regulator@40 {
440 compatible = "silergy,syr827";
442 fcs,suspend-voltage-selector = <1>;
443 pinctrl-names = "default";
444 pinctrl-0 = <&vsel1_gpio>;
445 regulator-name = "vdd_cpu_b";
446 regulator-min-microvolt = <712500>;
447 regulator-max-microvolt = <1500000>;
448 regulator-ramp-delay = <1000>;
451 vin-supply = <&vcc3v3_sys>;
453 regulator-state-mem {
454 regulator-off-in-suspend;
458 vdd_gpu: regulator@41 {
459 compatible = "silergy,syr828";
461 fcs,suspend-voltage-selector = <1>;
462 pinctrl-names = "default";
463 pinctrl-0 = <&vsel2_gpio>;
464 regulator-name = "vdd_gpu";
465 regulator-min-microvolt = <712500>;
466 regulator-max-microvolt = <1500000>;
467 regulator-ramp-delay = <1000>;
470 vin-supply = <&vcc3v3_sys>;
472 regulator-state-mem {
473 regulator-off-in-suspend;
479 i2c-scl-rising-time-ns = <300>;
480 i2c-scl-falling-time-ns = <15>;
485 i2c-scl-rising-time-ns = <450>;
486 i2c-scl-falling-time-ns = <15>;
491 i2c-scl-rising-time-ns = <600>;
492 i2c-scl-falling-time-ns = <20>;
495 fusb1: usb-typec@22 {
496 compatible = "fcs,fusb302";
498 interrupt-parent = <&gpio1>;
499 interrupts = <1 IRQ_TYPE_LEVEL_LOW>;
500 pinctrl-names = "default";
501 pinctrl-0 = <&fusb1_int>;
502 vbus-supply = <&vcc_vbus_typec1>;
508 i2c-scl-rising-time-ns = <600>;
509 i2c-scl-falling-time-ns = <20>;
512 fusb0: usb-typec@22 {
513 compatible = "fcs,fusb302";
515 interrupt-parent = <&gpio1>;
516 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
517 pinctrl-names = "default";
518 pinctrl-0 = <&fusb0_int>;
519 vbus-supply = <&vcc_vbus_typec0>;
525 rockchip,playback-channels = <8>;
526 rockchip,capture-channels = <8>;
531 rockchip,playback-channels = <2>;
532 rockchip,capture-channels = <2>;
541 audio-supply = <&vcca1v8_codec>;
542 bt656-supply = <&vcc_3v0>;
543 gpio1830-supply = <&vcc_3v0>;
544 sdmmc-supply = <&vcc_sdio>;
549 pmu1830-supply = <&vcc_3v0>;
555 pwr_key_l: pwr-key-l {
556 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
561 lcd_panel_reset: lcd-panel-reset {
562 rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_up>;
567 diy_led_gpio: diy_led-gpio {
568 rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
571 work_led_gpio: work_led-gpio {
572 rockchip,pins = <2 RK_PD3 RK_FUNC_GPIO &pcfg_pull_none>;
575 yellow_led_gpio: yellow_led-gpio {
576 rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
581 vsel1_gpio: vsel1-gpio {
582 rockchip,pins = <1 RK_PC2 RK_FUNC_GPIO &pcfg_pull_down>;
585 vsel2_gpio: vsel2-gpio {
586 rockchip,pins = <1 RK_PB6 RK_FUNC_GPIO &pcfg_pull_down>;
591 wifi_enable_h: wifi-enable-h {
592 rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
597 pmic_int_l: pmic-int-l {
598 rockchip,pins = <1 RK_PC5 RK_FUNC_GPIO &pcfg_pull_up>;
603 vcc5v0_host_en: vcc5v0-host-en {
604 rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
607 vcc_sys_en: vcc-sys-en {
608 rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
612 rockchip,pins = <2 RK_PA4 RK_FUNC_GPIO &pcfg_output_high>;
617 vcc_vbus_typec1_en: vcc-vbus-typec1-en {
618 rockchip,pins = <1 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
623 fusb0_int: fusb0-int {
624 rockchip,pins = <1 RK_PA2 RK_FUNC_GPIO &pcfg_pull_up>;
627 fusb1_int: fusb1-int {
628 rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
642 vref-supply = <&vcca1v8_s3>;
650 cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
652 max-frequency = <150000000>;
653 pinctrl-names = "default";
654 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_bus4>;
661 mmc-hs400-enhanced-strobe;
675 /* tshut mode 0:CRU 1:GPIO */
676 rockchip,hw-tshut-mode = <1>;
677 /* tshut polarity 0:LOW 1:HIGH */
678 rockchip,hw-tshut-polarity = <1>;
685 u2phy0_otg: otg-port {
686 phy-supply = <&vcc_vbus_typec0>;
690 u2phy0_host: host-port {
691 phy-supply = <&vcc5v0_host>;
699 u2phy1_otg: otg-port {
700 phy-supply = <&vcc_vbus_typec1>;
704 u2phy1_host: host-port {
705 phy-supply = <&vcc5v0_host>;
711 pinctrl-names = "default";
712 pinctrl-0 = <&uart0_xfer &uart0_cts>;