0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003 * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
0004 */
0005
0006 #include <dt-bindings/input/input.h>
0007 #include "rk3288.dtsi"
0008
0009 / {
0010 memory@0 {
0011 device_type = "memory";
0012 reg = <0x0 0x0 0x0 0x80000000>;
0013 };
0014
0015 adc-keys {
0016 compatible = "adc-keys";
0017 io-channels = <&saradc 1>;
0018 io-channel-names = "buttons";
0019 keyup-threshold-microvolt = <1800000>;
0020
0021 button-recovery {
0022 label = "Recovery";
0023 linux,code = <KEY_VENDOR>;
0024 press-threshold-microvolt = <0>;
0025 };
0026 };
0027
0028 dovdd_1v8: dovdd-1v8-regulator {
0029 compatible = "regulator-fixed";
0030 regulator-name = "dovdd_1v8";
0031 regulator-min-microvolt = <1800000>;
0032 regulator-max-microvolt = <1800000>;
0033 vin-supply = <&vcc28_dvp>;
0034 };
0035
0036 ext_gmac: external-gmac-clock {
0037 compatible = "fixed-clock";
0038 #clock-cells = <0>;
0039 clock-frequency = <125000000>;
0040 clock-output-names = "ext_gmac";
0041 };
0042
0043 ir: ir-receiver {
0044 compatible = "gpio-ir-receiver";
0045 pinctrl-names = "default";
0046 pinctrl-0 = <&ir_int>;
0047 };
0048
0049 keys: gpio-keys {
0050 compatible = "gpio-keys";
0051
0052 key-power {
0053 wakeup-source;
0054 gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>;
0055 label = "GPIO Power";
0056 linux,code = <KEY_POWER>;
0057 pinctrl-names = "default";
0058 pinctrl-0 = <&pwr_key>;
0059 };
0060 };
0061
0062 leds {
0063 compatible = "gpio-leds";
0064
0065 work_led: led-0 {
0066 gpios = <&gpio8 RK_PA1 GPIO_ACTIVE_LOW>;
0067 label = "firefly:blue:user";
0068 linux,default-trigger = "rc-feedback";
0069 pinctrl-names = "default";
0070 pinctrl-0 = <&work_led_pin>;
0071 };
0072
0073 power_led: led-1 {
0074 gpios = <&gpio8 RK_PA2 GPIO_ACTIVE_LOW>;
0075 label = "firefly:green:power";
0076 linux,default-trigger = "default-on";
0077 pinctrl-names = "default";
0078 pinctrl-0 = <&power_led_pin>;
0079 };
0080 };
0081
0082 vbat_wl: vcc_sys: vsys-regulator {
0083 compatible = "regulator-fixed";
0084 regulator-name = "vcc_sys";
0085 regulator-min-microvolt = <5000000>;
0086 regulator-max-microvolt = <5000000>;
0087 regulator-always-on;
0088 regulator-boot-on;
0089 };
0090
0091 vcc_sd: sdmmc-regulator {
0092 compatible = "regulator-fixed";
0093 gpio = <&gpio7 RK_PB3 GPIO_ACTIVE_LOW>;
0094 pinctrl-names = "default";
0095 pinctrl-0 = <&sdmmc_pwr>;
0096 regulator-name = "vcc_sd";
0097 regulator-min-microvolt = <3300000>;
0098 regulator-max-microvolt = <3300000>;
0099 startup-delay-us = <100000>;
0100 vin-supply = <&vcc_io>;
0101 };
0102
0103 vcc_flash: flash-regulator {
0104 compatible = "regulator-fixed";
0105 regulator-name = "vcc_flash";
0106 regulator-min-microvolt = <1800000>;
0107 regulator-max-microvolt = <1800000>;
0108 vin-supply = <&vcc_io>;
0109 };
0110
0111 vcc_5v: usb-regulator {
0112 compatible = "regulator-fixed";
0113 regulator-name = "vcc_5v";
0114 regulator-min-microvolt = <5000000>;
0115 regulator-max-microvolt = <5000000>;
0116 regulator-always-on;
0117 regulator-boot-on;
0118 vin-supply = <&vcc_sys>;
0119 };
0120
0121 vcc_host_5v: usb-host-regulator {
0122 compatible = "regulator-fixed";
0123 enable-active-high;
0124 gpio = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
0125 pinctrl-names = "default";
0126 pinctrl-0 = <&host_vbus_drv>;
0127 regulator-name = "vcc_host_5v";
0128 regulator-min-microvolt = <5000000>;
0129 regulator-max-microvolt = <5000000>;
0130 regulator-always-on;
0131 vin-supply = <&vcc_5v>;
0132 };
0133
0134 vcc_otg_5v: usb-otg-regulator {
0135 compatible = "regulator-fixed";
0136 enable-active-high;
0137 gpio = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
0138 pinctrl-names = "default";
0139 pinctrl-0 = <&otg_vbus_drv>;
0140 regulator-name = "vcc_otg_5v";
0141 regulator-min-microvolt = <5000000>;
0142 regulator-max-microvolt = <5000000>;
0143 regulator-always-on;
0144 vin-supply = <&vcc_5v>;
0145 };
0146
0147 /*
0148 * A TT8142 creates both dovdd_1v8 and vcc28_dvp, controlled
0149 * by the dvp_pwr pin.
0150 */
0151 vcc28_dvp: vcc28-dvp-regulator {
0152 compatible = "regulator-fixed";
0153 enable-active-high;
0154 gpio = <&gpio0 RK_PB3 GPIO_ACTIVE_HIGH>;
0155 pinctrl-names = "default";
0156 pinctrl-0 = <&dvp_pwr>;
0157 regulator-name = "vcc28_dvp";
0158 regulator-min-microvolt = <2800000>;
0159 regulator-max-microvolt = <2800000>;
0160 regulator-always-on;
0161 vin-supply = <&vcc_io>;
0162 };
0163 };
0164
0165 &cpu0 {
0166 cpu0-supply = <&vdd_cpu>;
0167 };
0168
0169 &emmc {
0170 bus-width = <8>;
0171 cap-mmc-highspeed;
0172 disable-wp;
0173 non-removable;
0174 pinctrl-names = "default";
0175 pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_pwr>, <&emmc_bus8>;
0176 vmmc-supply = <&vcc_io>;
0177 vqmmc-supply = <&vcc_flash>;
0178 status = "okay";
0179 };
0180
0181 &gmac {
0182 assigned-clocks = <&cru SCLK_MAC>;
0183 assigned-clock-parents = <&ext_gmac>;
0184 clock_in_out = "input";
0185 pinctrl-names = "default";
0186 pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
0187 phy-supply = <&vcc_lan>;
0188 phy-mode = "rgmii";
0189 snps,reset-active-low;
0190 snps,reset-delays-us = <0 10000 1000000>;
0191 snps,reset-gpio = <&gpio4 RK_PB0 GPIO_ACTIVE_LOW>;
0192 tx_delay = <0x30>;
0193 rx_delay = <0x10>;
0194 status = "okay";
0195 };
0196
0197 &gpu {
0198 mali-supply = <&vdd_gpu>;
0199 status = "okay";
0200 };
0201
0202 &hdmi {
0203 ddc-i2c-bus = <&i2c5>;
0204 status = "okay";
0205 };
0206
0207 &i2c0 {
0208 clock-frequency = <400000>;
0209 status = "okay";
0210
0211 vdd_cpu: syr827@40 {
0212 compatible = "silergy,syr827";
0213 fcs,suspend-voltage-selector = <1>;
0214 reg = <0x40>;
0215 regulator-name = "vdd_cpu";
0216 regulator-min-microvolt = <850000>;
0217 regulator-max-microvolt = <1350000>;
0218 regulator-always-on;
0219 regulator-boot-on;
0220 regulator-enable-ramp-delay = <300>;
0221 regulator-ramp-delay = <8000>;
0222 vin-supply = <&vcc_sys>;
0223 };
0224
0225 vdd_gpu: syr828@41 {
0226 compatible = "silergy,syr828";
0227 fcs,suspend-voltage-selector = <1>;
0228 reg = <0x41>;
0229 regulator-name = "vdd_gpu";
0230 regulator-min-microvolt = <850000>;
0231 regulator-max-microvolt = <1350000>;
0232 regulator-always-on;
0233 vin-supply = <&vcc_sys>;
0234 };
0235
0236 hym8563: hym8563@51 {
0237 compatible = "haoyu,hym8563";
0238 reg = <0x51>;
0239 #clock-cells = <0>;
0240 clock-frequency = <32768>;
0241 clock-output-names = "xin32k";
0242 interrupt-parent = <&gpio7>;
0243 interrupts = <RK_PA4 IRQ_TYPE_EDGE_FALLING>;
0244 pinctrl-names = "default";
0245 pinctrl-0 = <&rtc_int>;
0246 };
0247
0248 act8846: act8846@5a {
0249 compatible = "active-semi,act8846";
0250 reg = <0x5a>;
0251 pinctrl-names = "default";
0252 pinctrl-0 = <&pmic_vsel>, <&pwr_hold>;
0253 system-power-controller;
0254
0255 vp1-supply = <&vcc_sys>;
0256 vp2-supply = <&vcc_sys>;
0257 vp3-supply = <&vcc_sys>;
0258 vp4-supply = <&vcc_sys>;
0259 inl1-supply = <&vcc_sys>;
0260 inl2-supply = <&vcc_sys>;
0261 inl3-supply = <&vcc_20>;
0262
0263 regulators {
0264 vcc_ddr: REG1 {
0265 regulator-name = "vcc_ddr";
0266 regulator-min-microvolt = <1200000>;
0267 regulator-max-microvolt = <1200000>;
0268 regulator-always-on;
0269 };
0270
0271 vcc_io: REG2 {
0272 regulator-name = "vcc_io";
0273 regulator-min-microvolt = <3300000>;
0274 regulator-max-microvolt = <3300000>;
0275 regulator-always-on;
0276 };
0277
0278 vdd_log: REG3 {
0279 regulator-name = "vdd_log";
0280 regulator-min-microvolt = <1100000>;
0281 regulator-max-microvolt = <1100000>;
0282 regulator-always-on;
0283 };
0284
0285 vcc_20: REG4 {
0286 regulator-name = "vcc_20";
0287 regulator-min-microvolt = <2000000>;
0288 regulator-max-microvolt = <2000000>;
0289 regulator-always-on;
0290 };
0291
0292 vccio_sd: REG5 {
0293 regulator-name = "vccio_sd";
0294 regulator-min-microvolt = <3300000>;
0295 regulator-max-microvolt = <3300000>;
0296 regulator-always-on;
0297 };
0298
0299 vdd10_lcd: REG6 {
0300 regulator-name = "vdd10_lcd";
0301 regulator-min-microvolt = <1000000>;
0302 regulator-max-microvolt = <1000000>;
0303 regulator-always-on;
0304 };
0305
0306 vcca_18: REG7 {
0307 regulator-name = "vcca_18";
0308 regulator-min-microvolt = <1800000>;
0309 regulator-max-microvolt = <1800000>;
0310 };
0311
0312 vcca_33: REG8 {
0313 regulator-name = "vcca_33";
0314 regulator-min-microvolt = <3300000>;
0315 regulator-max-microvolt = <3300000>;
0316 };
0317
0318 vcc_lan: REG9 {
0319 regulator-name = "vcc_lan";
0320 regulator-min-microvolt = <3300000>;
0321 regulator-max-microvolt = <3300000>;
0322 };
0323
0324 vdd_10: REG10 {
0325 regulator-name = "vdd_10";
0326 regulator-min-microvolt = <1000000>;
0327 regulator-max-microvolt = <1000000>;
0328 regulator-always-on;
0329 };
0330
0331 vccio_wl: vcc_18: REG11 {
0332 regulator-name = "vcc_18";
0333 regulator-min-microvolt = <1800000>;
0334 regulator-max-microvolt = <1800000>;
0335 regulator-always-on;
0336 };
0337
0338 vcc18_lcd: REG12 {
0339 regulator-name = "vcc18_lcd";
0340 regulator-min-microvolt = <1800000>;
0341 regulator-max-microvolt = <1800000>;
0342 regulator-always-on;
0343 };
0344 };
0345 };
0346 };
0347
0348 &i2c1 {
0349 status = "okay";
0350 };
0351
0352 &i2c2 {
0353 status = "okay";
0354 };
0355
0356 &i2c4 {
0357 status = "okay";
0358 };
0359
0360 &i2c5 {
0361 status = "okay";
0362 };
0363
0364 &io_domains {
0365 status = "okay";
0366
0367 audio-supply = <&vcca_33>;
0368 bb-supply = <&vcc_io>;
0369 dvp-supply = <&dovdd_1v8>;
0370 flash0-supply = <&vcc_flash>;
0371 flash1-supply = <&vcc_lan>;
0372 gpio30-supply = <&vcc_io>;
0373 gpio1830-supply = <&vcc_io>;
0374 lcdc-supply = <&vcc_io>;
0375 sdcard-supply = <&vccio_sd>;
0376 wifi-supply = <&vccio_wl>;
0377 };
0378
0379 &pinctrl {
0380 pcfg_output_high: pcfg-output-high {
0381 output-high;
0382 };
0383
0384 pcfg_output_low: pcfg-output-low {
0385 output-low;
0386 };
0387
0388 pcfg_pull_up_drv_12ma: pcfg-pull-up-drv-12ma {
0389 bias-pull-up;
0390 drive-strength = <12>;
0391 };
0392
0393 act8846 {
0394 pwr_hold: pwr-hold {
0395 rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_output_high>;
0396 };
0397 };
0398
0399 dvp {
0400 dvp_pwr: dvp-pwr {
0401 rockchip,pins = <0 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0402 };
0403 };
0404
0405 gmac {
0406 phy_int: phy-int {
0407 rockchip,pins = <0 RK_PB1 RK_FUNC_GPIO &pcfg_pull_up>;
0408 };
0409
0410 phy_pmeb: phy-pmeb {
0411 rockchip,pins = <0 RK_PB0 RK_FUNC_GPIO &pcfg_pull_up>;
0412 };
0413
0414 phy_rst: phy-rst {
0415 rockchip,pins = <4 RK_PB0 RK_FUNC_GPIO &pcfg_output_high>;
0416 };
0417 };
0418
0419 hym8563 {
0420 rtc_int: rtc-int {
0421 rockchip,pins = <7 RK_PA4 RK_FUNC_GPIO &pcfg_pull_up>;
0422 };
0423 };
0424
0425 keys {
0426 pwr_key: pwr-key {
0427 rockchip,pins = <0 RK_PA5 RK_FUNC_GPIO &pcfg_pull_up>;
0428 };
0429 };
0430
0431 leds {
0432 power_led_pin: power-led-pin {
0433 rockchip,pins = <8 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
0434 };
0435
0436 work_led_pin: work-led-pin {
0437 rockchip,pins = <8 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
0438 };
0439 };
0440
0441 sdmmc {
0442 /*
0443 * Default drive strength isn't enough to achieve even
0444 * high-speed mode on firefly board so bump up to 12ma.
0445 */
0446 sdmmc_bus4: sdmmc-bus4 {
0447 rockchip,pins = <6 RK_PC0 1 &pcfg_pull_up_drv_12ma>,
0448 <6 RK_PC1 1 &pcfg_pull_up_drv_12ma>,
0449 <6 RK_PC2 1 &pcfg_pull_up_drv_12ma>,
0450 <6 RK_PC3 1 &pcfg_pull_up_drv_12ma>;
0451 };
0452
0453 sdmmc_clk: sdmmc-clk {
0454 rockchip,pins = <6 RK_PC4 1 &pcfg_pull_none_12ma>;
0455 };
0456
0457 sdmmc_cmd: sdmmc-cmd {
0458 rockchip,pins = <6 RK_PC5 1 &pcfg_pull_up_drv_12ma>;
0459 };
0460
0461 sdmmc_pwr: sdmmc-pwr {
0462 rockchip,pins = <7 RK_PB3 RK_FUNC_GPIO &pcfg_pull_none>;
0463 };
0464 };
0465
0466 usb_host {
0467 host_vbus_drv: host-vbus-drv {
0468 rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
0469 };
0470
0471 usbhub_rst: usbhub-rst {
0472 rockchip,pins = <8 RK_PA3 RK_FUNC_GPIO &pcfg_output_high>;
0473 };
0474 };
0475
0476 usb_otg {
0477 otg_vbus_drv: otg-vbus-drv {
0478 rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_none>;
0479 };
0480 };
0481 };
0482
0483 &saradc {
0484 vref-supply = <&vcc_18>;
0485 status = "okay";
0486 };
0487
0488 &sdio0 {
0489 bus-width = <4>;
0490 disable-wp;
0491 non-removable;
0492 pinctrl-names = "default";
0493 pinctrl-0 = <&sdio0_bus4>, <&sdio0_cmd>, <&sdio0_clk>;
0494 vmmc-supply = <&vbat_wl>;
0495 vqmmc-supply = <&vccio_wl>;
0496 status = "okay";
0497 };
0498
0499 &sdmmc {
0500 bus-width = <4>;
0501 cap-mmc-highspeed;
0502 cap-sd-highspeed;
0503 card-detect-delay = <200>;
0504 disable-wp;
0505 pinctrl-names = "default";
0506 pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
0507 vmmc-supply = <&vcc_sd>;
0508 vqmmc-supply = <&vccio_sd>;
0509 status = "okay";
0510 };
0511
0512 &spi0 {
0513 pinctrl-names = "default";
0514 pinctrl-0 = <&spi0_clk>, <&spi0_cs0>, <&spi0_tx>, <&spi0_rx>, <&spi0_cs1>;
0515 status = "okay";
0516 };
0517
0518 &tsadc {
0519 rockchip,hw-tshut-mode = <0>;
0520 rockchip,hw-tshut-polarity = <0>;
0521 status = "okay";
0522 };
0523
0524 &uart0 {
0525 pinctrl-names = "default";
0526 pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
0527 status = "okay";
0528 };
0529
0530 &uart1 {
0531 status = "okay";
0532 };
0533
0534 &uart2 {
0535 status = "okay";
0536 };
0537
0538 &uart3 {
0539 status = "okay";
0540 };
0541
0542 &usbphy {
0543 status = "okay";
0544 };
0545
0546 &usb_host1 {
0547 pinctrl-names = "default";
0548 pinctrl-0 = <&usbhub_rst>;
0549 status = "okay";
0550 };
0551
0552 &usb_otg {
0553 status = "okay";
0554 };
0555
0556 &vopb {
0557 status = "okay";
0558 };
0559
0560 &vopb_mmu {
0561 status = "okay";
0562 };
0563
0564 &vopl {
0565 status = "okay";
0566 };
0567
0568 &vopl_mmu {
0569 status = "okay";
0570 };
0571
0572 &wdt {
0573 status = "okay";
0574 };