Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: (GPL-2.0 OR MIT)
0002 /*
0003  * Device Tree file for Helios4
0004  * based on SolidRun Clearfog revision A1 rev 2.0 (88F6828)
0005  *
0006  *  Copyright (C) 2017 Aditya Prayoga <aditya@kobol.io>
0007  *
0008  */
0009 
0010 /dts-v1/;
0011 #include "armada-388.dtsi"
0012 #include "armada-38x-solidrun-microsom.dtsi"
0013 
0014 / {
0015         model = "Helios4";
0016         compatible = "kobol,helios4", "marvell,armada388",
0017                 "marvell,armada385", "marvell,armada380";
0018 
0019         memory {
0020                 device_type = "memory";
0021                 reg = <0x00000000 0x80000000>; /* 2 GB */
0022         };
0023 
0024         aliases {
0025                 /* So that mvebu u-boot can update the MAC addresses */
0026                 ethernet1 = &eth0;
0027         };
0028 
0029         chosen {
0030                 stdout-path = "serial0:115200n8";
0031         };
0032 
0033         reg_12v: regulator-12v {
0034                 compatible = "regulator-fixed";
0035                 regulator-name = "power_brick_12V";
0036                 regulator-min-microvolt = <12000000>;
0037                 regulator-max-microvolt = <12000000>;
0038                 regulator-always-on;
0039         };
0040 
0041         reg_3p3v: regulator-3p3v {
0042                 compatible = "regulator-fixed";
0043                 regulator-name = "3P3V";
0044                 regulator-min-microvolt = <3300000>;
0045                 regulator-max-microvolt = <3300000>;
0046                 regulator-always-on;
0047                 vin-supply = <&reg_12v>;
0048         };
0049 
0050         reg_5p0v_hdd: regulator-5v-hdd {
0051                 compatible = "regulator-fixed";
0052                 regulator-name = "5V_HDD";
0053                 regulator-min-microvolt = <5000000>;
0054                 regulator-max-microvolt = <5000000>;
0055                 regulator-always-on;
0056                 vin-supply = <&reg_12v>;
0057         };
0058 
0059         reg_5p0v_usb: regulator-5v-usb {
0060                 compatible = "regulator-fixed";
0061                 regulator-name = "USB-PWR";
0062                 regulator-min-microvolt = <5000000>;
0063                 regulator-max-microvolt = <5000000>;
0064                 regulator-boot-on;
0065                 regulator-always-on;
0066                 enable-active-high;
0067                 gpio = <&expander0 6 GPIO_ACTIVE_HIGH>;
0068                 vin-supply = <&reg_12v>;
0069         };
0070 
0071         system-leds {
0072                 compatible = "gpio-leds";
0073                 pinctrl-names = "default";
0074                 pinctrl-0 = <&helios_system_led_pins>;
0075 
0076                 status-led {
0077                         label = "helios4:green:status";
0078                         gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
0079                         linux,default-trigger = "heartbeat";
0080                         default-state = "on";
0081                 };
0082 
0083                 fault-led {
0084                         label = "helios4:red:fault";
0085                         gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
0086                         default-state = "keep";
0087                 };
0088         };
0089 
0090         io-leds {
0091                 compatible = "gpio-leds";
0092                 pinctrl-names = "default";
0093                 pinctrl-0 = <&helios_io_led_pins>;
0094 
0095                 sata1-led {
0096                         label = "helios4:green:ata1";
0097                         gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
0098                         linux,default-trigger = "ata1";
0099                         default-state = "off";
0100                 };
0101                 sata2-led {
0102                         label = "helios4:green:ata2";
0103                         gpios = <&gpio1 18 GPIO_ACTIVE_LOW>;
0104                         linux,default-trigger = "ata2";
0105                         default-state = "off";
0106                 };
0107                 sata3-led {
0108                         label = "helios4:green:ata3";
0109                         gpios = <&gpio1 20 GPIO_ACTIVE_LOW>;
0110                         linux,default-trigger = "ata3";
0111                         default-state = "off";
0112                 };
0113                 sata4-led {
0114                         label = "helios4:green:ata4";
0115                         gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
0116                         linux,default-trigger = "ata4";
0117                         default-state = "off";
0118                 };
0119                 usb-led {
0120                         label = "helios4:green:usb";
0121                         gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
0122                         linux,default-trigger = "usb-host";
0123                         default-state = "off";
0124                 };
0125         };
0126 
0127         fan1: j10-pwm {
0128                 compatible = "pwm-fan";
0129                 pwms = <&gpio1 9 40000>;        /* Target freq:25 kHz */
0130                 pinctrl-names = "default";
0131                 pinctrl-0 = <&helios_fan1_pins>;
0132         };
0133 
0134         fan2: j17-pwm {
0135                 compatible = "pwm-fan";
0136                 pwms = <&gpio1 23 40000>;       /* Target freq:25 kHz */
0137                 pinctrl-names = "default";
0138                 pinctrl-0 = <&helios_fan2_pins>;
0139         };
0140 
0141         usb2_phy: usb2-phy {
0142                 compatible = "usb-nop-xceiv";
0143                 vbus-regulator = <&reg_5p0v_usb>;
0144         };
0145 
0146         usb3_phy: usb3-phy {
0147                 compatible = "usb-nop-xceiv";
0148         };
0149 
0150         soc {
0151                 internal-regs {
0152                         i2c@11000 {
0153                                 /*
0154                                  * PCA9655 GPIO expander, up to 1MHz clock.
0155                                  *  0-Board Revision bit 0 #
0156                                  *  1-Board Revision bit 1 #
0157                                  *  5-USB3 overcurrent
0158                                  *  6-USB3 power
0159                                  */
0160                                 expander0: gpio-expander@20 {
0161                                         /*
0162                                          * This is how it should be:
0163                                          * compatible = "onnn,pca9655",
0164                                          *       "nxp,pca9555";
0165                                          * but you can't do this because of
0166                                          * the way I2C works.
0167                                          */
0168                                         compatible = "nxp,pca9555";
0169                                         gpio-controller;
0170                                         #gpio-cells = <2>;
0171                                         reg = <0x20>;
0172                                         pinctrl-names = "default";
0173                                         pinctrl-0 = <&pca0_pins>;
0174                                         interrupt-parent = <&gpio0>;
0175                                         interrupts = <23 IRQ_TYPE_EDGE_FALLING>;
0176                                         interrupt-controller;
0177                                         #interrupt-cells = <2>;
0178 
0179                                         board-rev-bit-0-hog {
0180                                                 gpio-hog;
0181                                                 gpios = <0 GPIO_ACTIVE_LOW>;
0182                                                 input;
0183                                                 line-name = "board-rev-0";
0184                                         };
0185                                         board-rev-bit-1-hog {
0186                                                 gpio-hog;
0187                                                 gpios = <1 GPIO_ACTIVE_LOW>;
0188                                                 input;
0189                                                 line-name = "board-rev-1";
0190                                         };
0191                                         usb3-ilimit-hog {
0192                                                 gpio-hog;
0193                                                 gpios = <5 GPIO_ACTIVE_HIGH>;
0194                                                 input;
0195                                                 line-name = "usb-overcurrent-status";
0196                                         };
0197                                 };
0198 
0199                                 temp_sensor: temp@4c {
0200                                         compatible = "ti,lm75";
0201                                         reg = <0x4c>;
0202                                         vcc-supply = <&reg_3p3v>;
0203                                 };
0204                         };
0205 
0206                         i2c@11100 {
0207                                 /*
0208                                  * External I2C Bus for user peripheral
0209                                  */
0210                                 clock-frequency = <400000>;
0211                                 pinctrl-0 = <&helios_i2c1_pins>;
0212                                 pinctrl-names = "default";
0213                                 status = "okay";
0214                         };
0215 
0216                         sata@a8000 {
0217                                 status = "okay";
0218                                 #address-cells = <1>;
0219                                 #size-cells = <0>;
0220 
0221                                 sata0: sata-port@0 {
0222                                         reg = <0>;
0223                                 };
0224 
0225                                 sata1: sata-port@1 {
0226                                         reg = <1>;
0227                                 };
0228                         };
0229 
0230                         sata@e0000 {
0231                                 status = "okay";
0232                                 #address-cells = <1>;
0233                                 #size-cells = <0>;
0234 
0235                                 sata2: sata-port@0 {
0236                                         reg = <0>;
0237                                 };
0238 
0239                                 sata3: sata-port@1 {
0240                                         reg = <1>;
0241                                 };
0242                         };
0243 
0244                         spi@10680 {
0245                                 pinctrl-0 = <&spi1_pins
0246                                              &microsom_spi1_cs_pins>;
0247                                 pinctrl-names = "default";
0248                                 status = "okay";
0249                         };
0250 
0251                         sdhci@d8000 {
0252                                 bus-width = <4>;
0253                                 cd-gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
0254                                 no-1-8-v;
0255                                 pinctrl-0 = <&helios_sdhci_pins
0256                                              &helios_sdhci_cd_pins>;
0257                                 pinctrl-names = "default";
0258                                 status = "okay";
0259                                 vmmc = <&reg_3p3v>;
0260                                 wp-inverted;
0261                         };
0262 
0263                         usb@58000 {
0264                                 usb-phy = <&usb2_phy>;
0265                                 status = "okay";
0266                         };
0267 
0268                         usb3@f0000 {
0269                                 status = "okay";
0270                         };
0271 
0272                         usb3@f8000 {
0273                                 status = "okay";
0274                         };
0275 
0276                         pinctrl@18000 {
0277                                 pca0_pins: pca0-pins {
0278                                         marvell,pins = "mpp23";
0279                                         marvell,function = "gpio";
0280                                 };
0281                                 microsom_phy0_int_pins: microsom-phy0-int-pins {
0282                                         marvell,pins = "mpp18";
0283                                         marvell,function = "gpio";
0284                                 };
0285                                 helios_i2c1_pins: i2c1-pins {
0286                                         marvell,pins = "mpp26", "mpp27";
0287                                         marvell,function = "i2c1";
0288                                 };
0289                                 helios_sdhci_cd_pins: helios-sdhci-cd-pins {
0290                                         marvell,pins = "mpp20";
0291                                         marvell,function = "gpio";
0292                                 };
0293                                 helios_sdhci_pins: helios-sdhci-pins {
0294                                         marvell,pins = "mpp21", "mpp28",
0295                                                        "mpp37", "mpp38",
0296                                                        "mpp39", "mpp40";
0297                                         marvell,function = "sd0";
0298                                 };
0299                                 helios_system_led_pins: helios-system-led-pins {
0300                                         marvell,pins = "mpp24", "mpp25";
0301                                         marvell,function = "gpio";
0302                                 };
0303                                 helios_io_led_pins: helios-io-led-pins {
0304                                         marvell,pins = "mpp49", "mpp50",
0305                                                        "mpp52", "mpp53",
0306                                                        "mpp54";
0307                                         marvell,function = "gpio";
0308                                 };
0309                                 helios_fan1_pins: helios_fan1_pins {
0310                                         marvell,pins = "mpp41", "mpp43";
0311                                         marvell,function = "gpio";
0312                                 };
0313                                 helios_fan2_pins: helios_fan2_pins {
0314                                         marvell,pins = "mpp48", "mpp55";
0315                                         marvell,function = "gpio";
0316                                 };
0317                                 microsom_spi1_cs_pins: spi1-cs-pins {
0318                                         marvell,pins = "mpp59";
0319                                         marvell,function = "spi1";
0320                                 };
0321                         };
0322                 };
0323         };
0324 };