Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
0002 /*
0003  * Copyright (c) 2020 Aditya Prayoga <aditya@kobol.io>
0004  */
0005 
0006 /*
0007  * The Kobol Helios64 is a board designed to operate as a NAS and optionally
0008  * ships with an enclosing that can host five 2.5" hard disks.
0009  *
0010  * See https://wiki.kobol.io/helios64/intro/ for further details.
0011  */
0012 
0013 /dts-v1/;
0014 #include "rk3399.dtsi"
0015 #include "rk3399-opp.dtsi"
0016 
0017 / {
0018         model = "Kobol Helios64";
0019         compatible = "kobol,helios64", "rockchip,rk3399";
0020 
0021         aliases {
0022                 mmc0 = &sdmmc;
0023                 mmc1 = &sdhci;
0024                 spi1 = &spi1;
0025                 spi2 = &spi2;
0026                 spi5 = &spi5;
0027         };
0028 
0029         avdd_0v9_s0: avdd-0v9-s0 {
0030                 compatible = "regulator-fixed";
0031                 regulator-name = "avdd_0v9_s0";
0032                 regulator-always-on;
0033                 regulator-boot-on;
0034                 regulator-min-microvolt = <900000>;
0035                 regulator-max-microvolt = <900000>;
0036                 vin-supply = <&vcc1v8_sys_s3>;
0037         };
0038 
0039         avdd_1v8_s0: avdd-1v8-s0 {
0040                 compatible = "regulator-fixed";
0041                 regulator-name = "avdd_1v8_s0";
0042                 regulator-always-on;
0043                 regulator-boot-on;
0044                 regulator-min-microvolt = <1800000>;
0045                 regulator-max-microvolt = <1800000>;
0046                 vin-supply = <&vcc3v3_sys_s3>;
0047         };
0048 
0049         chosen {
0050                 stdout-path = "serial2:1500000n8";
0051         };
0052 
0053         clkin_gmac: external-gmac-clock {
0054                 compatible = "fixed-clock";
0055                 clock-frequency = <125000000>;
0056                 clock-output-names = "clkin_gmac";
0057                 #clock-cells = <0>;
0058         };
0059 
0060         fan1 {
0061                 /* fan connected to P7 */
0062                 compatible = "pwm-fan";
0063                 pwms = <&pwm0 0 40000 0>;
0064                 cooling-levels = <0 80 170 255>;
0065         };
0066 
0067         fan2 {
0068                 /* fan connected to P6 */
0069                 compatible = "pwm-fan";
0070                 pwms = <&pwm1 0 40000 0>;
0071                 cooling-levels = <0 80 170 255>;
0072         };
0073 
0074         leds {
0075                 compatible = "gpio-leds";
0076                 pinctrl-names = "default";
0077                 pinctrl-0 = <&sys_grn_led_on &sys_red_led_on>;
0078 
0079                 led-0 {
0080                         label = "helios64:green:status";
0081                         gpios = <&gpio0 RK_PB4 GPIO_ACTIVE_HIGH>;
0082                         default-state = "on";
0083                 };
0084 
0085                 led-1 {
0086                         label = "helios64:red:fault";
0087                         gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
0088                         default-state = "keep";
0089                 };
0090         };
0091 
0092         hdd_a_power: hdd-a-power {
0093                 compatible = "regulator-fixed";
0094                 enable-active-high;
0095                 gpio = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
0096                 pinctrl-0 = <&hdd_a_power_en>;
0097                 pinctrl-names = "default";
0098                 regulator-always-on;
0099                 regulator-boot-on;
0100                 regulator-name = "hdd_a_power";
0101                 startup-delay-us = <2000000>;
0102         };
0103 
0104         hdd_b_power: hdd-b-power {
0105                 compatible = "regulator-fixed";
0106                 enable-active-high;
0107                 gpio = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
0108                 pinctrl-0 = <&hdd_b_power_en>;
0109                 pinctrl-names = "default";
0110                 regulator-always-on;
0111                 regulator-boot-on;
0112                 regulator-name = "hdd_b_power";
0113                 startup-delay-us = <2000000>;
0114         };
0115 
0116         pcie_power: pcie-power {
0117                 compatible = "regulator-fixed";
0118                 enable-active-high;
0119                 gpio = <&gpio1 RK_PD0 GPIO_ACTIVE_HIGH>;
0120                 pinctrl-0 = <&pcie_pwr>;
0121                 pinctrl-names = "default";
0122                 regulator-boot-on;
0123                 regulator-name = "pcie_power";
0124                 startup-delay-us = <10000>;
0125                 vin-supply = <&vcc5v0_perdev>;
0126         };
0127 
0128         usblan_power: usblan-power {
0129                 compatible = "regulator-fixed";
0130                 enable-active-high;
0131                 gpio = <&gpio1 RK_PC7 GPIO_ACTIVE_HIGH>;
0132                 pinctrl-names = "default";
0133                 pinctrl-0 = <&usb_lan_en>;
0134                 regulator-name = "usblan_power";
0135                 regulator-always-on;
0136                 regulator-boot-on;
0137                 vin-supply = <&vcc5v0_usb>;
0138         };
0139 
0140         vcc1v8_sys_s0: vcc1v8-sys-s0 {
0141                 compatible = "regulator-fixed";
0142                 regulator-name = "vcc1v8_sys_s0";
0143                 regulator-always-on;
0144                 regulator-boot-on;
0145                 regulator-min-microvolt = <1800000>;
0146                 regulator-max-microvolt = <1800000>;
0147                 vin-supply = <&vcc1v8_sys_s3>;
0148         };
0149 
0150         vcc3v0_sd: vcc3v0-sd {
0151                 compatible = "regulator-fixed";
0152                 enable-active-high;
0153                 gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>;
0154                 regulator-name = "vcc3v0_sd";
0155                 regulator-boot-on;
0156                 regulator-min-microvolt = <3000000>;
0157                 regulator-max-microvolt = <3000000>;
0158                 pinctrl-names = "default";
0159                 pinctrl-0 = <&sdmmc0_pwr_h>;
0160                 vin-supply = <&vcc3v3_sys_s3>;
0161         };
0162 
0163         vcc3v3_sys_s3: vcc_lan: vcc3v3-sys-s3 {
0164                 compatible = "regulator-fixed";
0165                 regulator-name = "vcc3v3_sys_s3";
0166                 regulator-always-on;
0167                 regulator-boot-on;
0168                 regulator-min-microvolt = <3300000>;
0169                 regulator-max-microvolt = <3300000>;
0170                 vin-supply = <&vcc5v0_sys>;
0171 
0172                 regulator-state-mem {
0173                         regulator-on-in-suspend;
0174                 };
0175         };
0176 
0177         vcc5v0_perdev: vcc5v0-perdev {
0178                 compatible = "regulator-fixed";
0179                 regulator-name = "vcc5v0_perdev";
0180                 regulator-always-on;
0181                 regulator-boot-on;
0182                 regulator-min-microvolt = <5000000>;
0183                 regulator-max-microvolt = <5000000>;
0184                 vin-supply = <&vcc12v_dcin_bkup>;
0185         };
0186 
0187         vcc5v0_sys: vcc5v0-sys {
0188                 compatible = "regulator-fixed";
0189                 regulator-name = "vcc5v0_sys";
0190                 regulator-always-on;
0191                 regulator-boot-on;
0192                 regulator-min-microvolt = <5000000>;
0193                 regulator-max-microvolt = <5000000>;
0194                 vin-supply = <&vcc12v_dcin_bkup>;
0195 
0196                 regulator-state-mem {
0197                         regulator-on-in-suspend;
0198                 };
0199         };
0200 
0201         vcc5v0_usb: vcc5v0-usb {
0202                 compatible = "regulator-fixed";
0203                 enable-active-high;
0204                 gpio = <&gpio1 RK_PC6 GPIO_ACTIVE_HIGH>;
0205                 pinctrl-names = "default";
0206                 pinctrl-0 = <&vcc5v0_usb_en>;
0207                 regulator-name = "vcc5v0_usb";
0208                 regulator-always-on;
0209                 regulator-boot-on;
0210                 regulator-min-microvolt = <5000000>;
0211                 regulator-max-microvolt = <5000000>;
0212                 vin-supply = <&vcc5v0_perdev>;
0213         };
0214 
0215         vcc12v_dcin: vcc12v-dcin {
0216                 compatible = "regulator-fixed";
0217                 regulator-name = "vcc12v_dcin";
0218                 regulator-always-on;
0219                 regulator-boot-on;
0220                 regulator-min-microvolt = <12000000>;
0221                 regulator-max-microvolt = <12000000>;
0222         };
0223 
0224         vcc12v_dcin_bkup: vcc12v-dcin-bkup {
0225                 compatible = "regulator-fixed";
0226                 regulator-name = "vcc12v_dcin_bkup";
0227                 regulator-always-on;
0228                 regulator-boot-on;
0229                 regulator-min-microvolt = <12000000>;
0230                 regulator-max-microvolt = <12000000>;
0231                 vin-supply = <&vcc12v_dcin>;
0232         };
0233 };
0234 
0235 /*
0236  * The system doesn't run stable with cpu freq enabled, so disallow the lower
0237  * frequencies until this problem is properly understood and resolved.
0238  */
0239 &cluster0_opp {
0240         /delete-node/ opp00;
0241         /delete-node/ opp01;
0242         /delete-node/ opp02;
0243         /delete-node/ opp03;
0244         /delete-node/ opp04;
0245 };
0246 
0247 &cluster1_opp {
0248         /delete-node/ opp00;
0249         /delete-node/ opp01;
0250         /delete-node/ opp02;
0251         /delete-node/ opp03;
0252         /delete-node/ opp04;
0253         /delete-node/ opp05;
0254         /delete-node/ opp06;
0255 };
0256 
0257 &cpu_b0 {
0258         cpu-supply = <&vdd_cpu_b>;
0259 };
0260 
0261 &cpu_b1 {
0262         cpu-supply = <&vdd_cpu_b>;
0263 };
0264 
0265 &cpu_l0 {
0266         cpu-supply = <&vdd_cpu_l>;
0267 };
0268 
0269 &cpu_l1 {
0270         cpu-supply = <&vdd_cpu_l>;
0271 };
0272 
0273 &cpu_l2 {
0274         cpu-supply = <&vdd_cpu_l>;
0275 };
0276 
0277 &cpu_l3 {
0278         cpu-supply = <&vdd_cpu_l>;
0279 };
0280 
0281 &emmc_phy {
0282         status = "okay";
0283 };
0284 
0285 &gmac {
0286         assigned-clock-parents = <&clkin_gmac>;
0287         assigned-clocks = <&cru SCLK_RMII_SRC>;
0288         clock_in_out = "input";
0289         phy-mode = "rgmii";
0290         phy-supply = <&vcc_lan>;
0291         pinctrl-names = "default";
0292         pinctrl-0 = <&rgmii_pins &gphy_reset>;
0293         rx_delay = <0x20>;
0294         tx_delay = <0x28>;
0295         snps,reset-active-low;
0296         snps,reset-delays-us = <0 10000 50000>;
0297         snps,reset-gpio = <&gpio3 RK_PB7 GPIO_ACTIVE_LOW>;
0298         status = "okay";
0299 };
0300 
0301 &i2c0 {
0302         clock-frequency = <400000>;
0303         i2c-scl-rising-time-ns = <168>;
0304         i2c-scl-falling-time-ns = <4>;
0305         status = "okay";
0306 
0307         rk808: pmic@1b {
0308                 compatible = "rockchip,rk808";
0309                 reg = <0x1b>;
0310                 interrupt-parent = <&gpio0>;
0311                 interrupts = <10 IRQ_TYPE_LEVEL_LOW>;
0312                 clock-output-names = "xin32k", "rk808-clkout2";
0313                 pinctrl-names = "default";
0314                 pinctrl-0 = <&pmic_int_l>;
0315                 rockchip,system-power-controller;
0316                 vcc1-supply = <&vcc5v0_sys>;
0317                 vcc2-supply = <&vcc5v0_sys>;
0318                 vcc3-supply = <&vcc5v0_sys>;
0319                 vcc4-supply = <&vcc5v0_sys>;
0320                 vcc6-supply = <&vcc5v0_sys>;
0321                 vcc7-supply = <&vcc5v0_sys>;
0322                 vcc8-supply = <&vcc3v3_sys_s3>;
0323                 vcc9-supply = <&vcc5v0_sys>;
0324                 vcc10-supply = <&vcc5v0_sys>;
0325                 vcc11-supply = <&vcc5v0_sys>;
0326                 vcc12-supply = <&vcc3v3_sys_s3>;
0327                 vddio-supply = <&vcc3v0_s3>;
0328                 wakeup-source;
0329                 #clock-cells = <1>;
0330 
0331                 regulators {
0332                         vdd_cpu_l: DCDC_REG2 {
0333                                 regulator-name = "vdd_cpu_l";
0334                                 regulator-always-on;
0335                                 regulator-boot-on;
0336                                 regulator-min-microvolt = <750000>;
0337                                 regulator-max-microvolt = <1350000>;
0338                                 regulator-ramp-delay = <6001>;
0339 
0340                                 regulator-state-mem {
0341                                         regulator-off-in-suspend;
0342                                 };
0343                         };
0344 
0345                         vcc1v8_sys_s3: DCDC_REG4 {
0346                                 regulator-name = "vcc1v8_sys_s3";
0347                                 regulator-always-on;
0348                                 regulator-boot-on;
0349                                 regulator-min-microvolt = <1800000>;
0350                                 regulator-max-microvolt = <1800000>;
0351 
0352                                 regulator-state-mem {
0353                                         regulator-on-in-suspend;
0354                                         regulator-suspend-microvolt = <1800000>;
0355                                 };
0356                         };
0357 
0358                         vcc_sdio_s0: LDO_REG4 {
0359                                 regulator-name = "vcc_sdio_s0";
0360                                 regulator-always-on;
0361                                 regulator-boot-on;
0362                                 regulator-min-microvolt = <1800000>;
0363                                 regulator-max-microvolt = <3000000>;
0364 
0365                                 regulator-state-mem {
0366                                         regulator-on-in-suspend;
0367                                         regulator-suspend-microvolt = <3000000>;
0368                                 };
0369                         };
0370 
0371                         vcc3v0_s3: LDO_REG8 {
0372                                 regulator-name = "vcc3v0_s3";
0373                                 regulator-always-on;
0374                                 regulator-boot-on;
0375                                 regulator-min-microvolt = <3000000>;
0376                                 regulator-max-microvolt = <3000000>;
0377 
0378                                 regulator-state-mem {
0379                                         regulator-on-in-suspend;
0380                                         regulator-suspend-microvolt = <3000000>;
0381                                 };
0382                         };
0383                 };
0384         };
0385 
0386         vdd_cpu_b: regulator@40 {
0387                 compatible = "silergy,syr827";
0388                 reg = <0x40>;
0389                 fcs,suspend-voltage-selector = <1>;
0390                 regulator-name = "vdd_cpu_b";
0391                 regulator-always-on;
0392                 regulator-boot-on;
0393                 regulator-min-microvolt = <712500>;
0394                 regulator-max-microvolt = <1500000>;
0395                 regulator-ramp-delay = <1000>;
0396                 vin-supply = <&vcc5v0_sys>;
0397 
0398                 regulator-state-mem {
0399                         regulator-off-in-suspend;
0400                 };
0401         };
0402 };
0403 
0404 &i2c2 {
0405         clock-frequency = <400000>;
0406         i2c-scl-rising-time-ns = <160>;
0407         i2c-scl-falling-time-ns = <30>;
0408         status = "okay";
0409 
0410         temp@4c {
0411                 compatible = "national,lm75";
0412                 reg = <0x4c>;
0413         };
0414 };
0415 
0416 &io_domains {
0417         audio-supply = <&vcc1v8_sys_s0>;
0418         bt656-supply = <&vcc1v8_sys_s0>;
0419         gpio1830-supply = <&vcc3v0_s3>;
0420         sdmmc-supply = <&vcc_sdio_s0>;
0421         status = "okay";
0422 };
0423 
0424 &pcie_phy {
0425         status = "okay";
0426 };
0427 
0428 &pcie0 {
0429         ep-gpios = <&gpio2 RK_PD4 GPIO_ACTIVE_HIGH>;
0430         max-link-speed = <2>;
0431         num-lanes = <2>;
0432         pinctrl-names = "default";
0433         status = "okay";
0434 
0435         vpcie12v-supply = <&vcc12v_dcin>;
0436         vpcie3v3-supply = <&pcie_power>;
0437         vpcie1v8-supply = <&avdd_1v8_s0>;
0438         vpcie0v9-supply = <&avdd_0v9_s0>;
0439 };
0440 
0441 &pinctrl {
0442         gmac {
0443                 gphy_reset: gphy-reset {
0444                         rockchip,pins = <3 RK_PB7 RK_FUNC_GPIO &pcfg_output_low>;
0445                 };
0446         };
0447 
0448         leds {
0449                 sys_grn_led_on: sys-grn-led-on {
0450                         rockchip,pins = <0 RK_PB4 RK_FUNC_GPIO &pcfg_pull_down>;
0451                 };
0452 
0453                 sys_red_led_on: sys-red-led-on {
0454                         rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_down>;
0455                 };
0456         };
0457 
0458         pcie {
0459                 pcie_pwr: pcie-pwr {
0460                         rockchip,pins =
0461                                 <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>;
0462                 };
0463         };
0464 
0465         pmic {
0466                 pmic_int_l: pmic-int-l {
0467                         rockchip,pins = <0 RK_PB2 RK_FUNC_GPIO &pcfg_pull_none>;
0468                 };
0469         };
0470 
0471         power {
0472                 hdd_a_power_en: hdd-a-power-en {
0473                         rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
0474                 };
0475 
0476                 hdd_b_power_en: hdd-b-power-en {
0477                         rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
0478                 };
0479 
0480                 vcc5v0_usb_en: vcc5v0-usb-en {
0481                         rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>;
0482                 };
0483 
0484                 usb_lan_en: usb-lan-en {
0485                         rockchip,pins = <1 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
0486                 };
0487         };
0488 
0489         vcc3v0-sd {
0490                 sdmmc0_pwr_h: sdmmc0-pwr-h {
0491                         rockchip,pins = <0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_up>;
0492                 };
0493         };
0494 };
0495 
0496 &pmu_io_domains {
0497         pmu1830-supply = <&vcc3v0_s3>;
0498         status = "okay";
0499 };
0500 
0501 &pwm0 {
0502         /* pwm-fan on P7 */
0503         status = "okay";
0504 };
0505 
0506 &pwm1 {
0507         /* pwm-fan on P6 */
0508         status = "okay";
0509 };
0510 
0511 &sdhci {
0512         bus-width = <8>;
0513         mmc-hs200-1_8v;
0514         non-removable;
0515         vqmmc-supply = <&vcc1v8_sys_s0>;
0516         status = "okay";
0517 };
0518 
0519 &sdmmc {
0520         bus-width = <4>;
0521         cap-sd-highspeed;
0522         cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
0523         disable-wp;
0524         pinctrl-names = "default";
0525         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
0526         vmmc-supply = <&vcc3v0_sd>;
0527         vqmmc-supply = <&vcc_sdio_s0>;
0528         status = "okay";
0529 };
0530 
0531 &spi1 {
0532         status = "okay";
0533 
0534         spiflash: flash@0 {
0535                 compatible = "jedec,spi-nor";
0536                 reg = <0x0>;
0537                 spi-max-frequency = <25000000>;
0538                 status = "okay";
0539                 m25p,fast-read;
0540         };
0541 };
0542 
0543 /* UEXT connector */
0544 &spi2 {
0545         status = "okay";
0546 };
0547 
0548 &spi5 {
0549         status = "okay";
0550 };
0551 
0552 &tcphy1 {
0553         /* phy for &usbdrd_dwc3_1 */
0554         status = "okay";
0555 };
0556 
0557 &tsadc {
0558         /* tshut mode 0:CRU 1:GPIO */
0559         rockchip,hw-tshut-mode = <1>;
0560         /* tshut polarity 0:LOW 1:HIGH */
0561         rockchip,hw-tshut-polarity = <1>;
0562         status = "okay";
0563 };
0564 
0565 &u2phy1 {
0566         status = "okay";
0567 
0568         otg-port {
0569                 /* phy for &usbdrd_dwc3_1 */
0570                 phy-supply = <&vcc5v0_usb>;
0571                 status = "okay";
0572         };
0573 };
0574 
0575 &uart2 {
0576         status = "okay";
0577 };
0578 
0579 &usbdrd3_1 {
0580         status = "okay";
0581 
0582         usb@fe900000 {
0583                 dr_mode = "host";
0584                 status = "okay";
0585                 #address-cells = <1>;
0586                 #size-cells = <0>;
0587 
0588                 hub@1 {
0589                         compatible = "usb2109,0815";
0590                         reg = <1>;
0591                         #address-cells = <1>;
0592                         #size-cells = <0>;
0593 
0594                         port@1 {
0595                                 reg = <1>;
0596                                 #trigger-source-cells = <0>;
0597                         };
0598 
0599                         port@2 {
0600                                 reg = <2>;
0601                                 #trigger-source-cells = <0>;
0602                         };
0603 
0604                         port@3 {
0605                                 reg = <3>;
0606                                 #trigger-source-cells = <0>;
0607                         };
0608 
0609                         device@4 {
0610                                 compatible = "usbbda,8156";
0611                                 reg = <4>;
0612                                 #address-cells = <2>;
0613                                 #size-cells = <0>;
0614 
0615                                 interface@0 {   /* interface 0 of configuration 1 */
0616                                         compatible = "usbbda,8156.config1.0";
0617                                         reg = <0 1>;
0618                                 };
0619                         };
0620                 };
0621         };
0622 };