Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0
0002 /*
0003  * Device Tree common file for the Seagate Personal Cloud NAS 1 and 2-Bay
0004  * (Armada 370 SoC).
0005  *
0006  * Copyright (C) 2015 Seagate
0007  *
0008  * Author: Simon Guinot <simon.guinot@sequanux.org>
0009  */
0010 
0011 /*
0012  * TODO: add support for the white SATA LED.
0013  */
0014 
0015 #include "armada-370.dtsi"
0016 #include <dt-bindings/gpio/gpio.h>
0017 #include <dt-bindings/input/input.h>
0018 
0019 / {
0020         chosen {
0021                 stdout-path = "serial0:115200n8";
0022         };
0023 
0024         memory@0 {
0025                 device_type = "memory";
0026                 reg = <0x00000000 0x20000000>; /* 512 MB */
0027         };
0028 
0029         soc {
0030                 ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000
0031                           MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>;
0032 
0033                 internal-regs {
0034                         coherency-fabric@20200 {
0035                                 broken-idle;
0036                         };
0037 
0038                         serial@12000 {
0039                                 status = "okay";
0040                         };
0041 
0042                         ethernet@74000 {
0043                                 status = "okay";
0044                                 pinctrl-0 = <&ge1_rgmii_pins>;
0045                                 pinctrl-names = "default";
0046                                 phy = <&phy0>;
0047                                 phy-mode = "rgmii-id";
0048                         };
0049 
0050                         usb@50000 {
0051                                 status = "okay";
0052                         };
0053                 };
0054         };
0055 
0056         regulators {
0057                 compatible = "simple-bus";
0058                 #address-cells = <1>;
0059                 #size-cells = <0>;
0060 
0061                 regulator@0 {
0062                         compatible = "regulator-fixed";
0063                         reg = <0>;
0064                         regulator-name = "USB Power";
0065                         regulator-min-microvolt = <5000000>;
0066                         regulator-max-microvolt = <5000000>;
0067                         regulator-always-on;
0068                         regulator-boot-on;
0069                         gpio = <&gpio1 27 GPIO_ACTIVE_LOW>;
0070                 };
0071                 regulator@1 {
0072                         compatible = "regulator-fixed";
0073                         reg = <1>;
0074                         regulator-name = "SATA0 power";
0075                         regulator-min-microvolt = <5000000>;
0076                         regulator-max-microvolt = <5000000>;
0077                         enable-active-high;
0078                         regulator-always-on;
0079                         regulator-boot-on;
0080                         gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>;
0081                 };
0082         };
0083 
0084         gpio-keys {
0085                 compatible = "gpio-keys";
0086 
0087                 button-power {
0088                         label = "Power button";
0089                         linux,code = <KEY_POWER>;
0090                         gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>;
0091                         debounce-interval = <100>;
0092                 };
0093                 button-reset {
0094                         label = "Reset Button";
0095                         linux,code = <KEY_RESTART>;
0096                         gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
0097                         debounce-interval = <100>;
0098                 };
0099                 button-usb {
0100                         label = "USB VBUS error";
0101                         linux,code = <KEY_UNKNOWN>;
0102                         gpios = <&gpio1 21 GPIO_ACTIVE_LOW>;
0103                         debounce-interval = <100>;
0104                 };
0105         };
0106 
0107         gpio-leds {
0108                 compatible = "gpio-leds";
0109 
0110                 red-sata0 {
0111                         label = "cumulus:red:sata0";
0112                         gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
0113                         default-state = "off";
0114                 };
0115         };
0116 
0117         gpio_poweroff {
0118                 compatible = "gpio-poweroff";
0119                 gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>;
0120         };
0121 };
0122 
0123 &pciec {
0124         status = "okay";
0125 
0126         /* USB 3.0 Bridge ASM1042A */
0127         pcie@1,0 {
0128                 status = "okay";
0129         };
0130 };
0131 
0132 &mdio {
0133         pinctrl-0 = <&mdio_pins>;
0134         pinctrl-names = "default";
0135 
0136         phy0: ethernet-phy@0 {
0137                 reg = <0>;
0138         };
0139 };
0140 
0141 &pinctrl {
0142         pinctrl-0 = <&sata_led_pin>;
0143         pinctrl-names = "default";
0144 
0145         sata_led_pin: sata-led-pin {
0146                 marvell,pins = "mpp60";
0147                 marvell,function = "sata0";
0148         };
0149         gpio_led_pin: gpio-led-pin {
0150                 marvell,pins = "mpp60";
0151                 marvell,function = "gpio";
0152         };
0153 };
0154 
0155 &spi0 {
0156         status = "okay";
0157         pinctrl-0 = <&spi0_pins2>;
0158         pinctrl-names = "default";
0159 
0160         flash@0 {
0161                 #address-cells = <1>;
0162                 #size-cells = <1>;
0163                 /* MX25L8006E */
0164                 compatible = "mxicy,mx25l8005", "jedec,spi-nor";
0165                 reg = <0>; /* Chip select 0 */
0166                 spi-max-frequency = <50000000>;
0167 
0168                 partition@0 {
0169                         label = "u-boot";
0170                         reg = <0x0 0x100000>;
0171                 };
0172         };
0173 };