Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: mvebu: add DT support for Seagate Personal Cloud

This patch adds DT support for the Seagate Personal Cloud 1 and 2-Bay.

Here are some information allowing to identify these devices:

Product name | Personal Cloud | Personal Cloud 2-Bay
Code name (board/PCB) | Cumulus | Cumulus Max
Model name (case sticker) | SRN21C | SRN22C
Material desc (product spec) | STCRxxxxxxx | STCSxxxxxxx

Chipset list:
- SoC Marvell Armada 370 88F6707, CPU @1GHz
- SDRAM memory: 512MB DDR3 667MHz (16-bits bandwidth)
- SPI flash 1MB (Macronix MX25L8006E)
- 1 or 2 SATA internal ports
- 1 Ethernet Gigabit port (PHY Marvell 88E1518)
- 1 USB3 host port (PCIe controller ASM1042)
- 1 USB2 host port (SoC)
- 2 push buttons (power and reset)
- 1 SATA LED (bi-color, white and red)

Note that support for the white SATA LED is missing. A dedicated LED
driver is needed.

Signed-off-by: Simon Guinot <simon.guinot@sequanux.org>
Acked-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>

authored by

Simon Guinot and committed by
Gregory CLEMENT
0ac73f76 85a9efcd

+268
+2
arch/arm/boot/dts/Makefile
··· 704 704 armada-370-rd.dtb \ 705 705 armada-370-seagate-nas-2bay.dtb \ 706 706 armada-370-seagate-nas-4bay.dtb \ 707 + armada-370-seagate-personal-cloud.dtb \ 708 + armada-370-seagate-personal-cloud-2bay.dtb \ 707 709 armada-370-synology-ds213j.dtb 708 710 dtb-$(CONFIG_MACH_ARMADA_375) += \ 709 711 armada-375-db.dtb
+51
arch/arm/boot/dts/armada-370-seagate-personal-cloud-2bay.dts
··· 1 + /* 2 + * Device Tree file for Seagate Personal Cloud NAS 2-Bay (Armada 370 SoC). 3 + * 4 + * Copyright (C) 2015 Seagate 5 + * 6 + * Author: Simon Guinot <simon.guinot@sequanux.org> 7 + * 8 + * This file is licensed under the terms of the GNU General Public 9 + * License version 2. This program is licensed "as is" without any 10 + * warranty of any kind, whether express or implied. 11 + */ 12 + 13 + /* 14 + * Here are some information allowing to identify the device: 15 + * 16 + * Product name : Seagate Personal Cloud 2-Bay 17 + * Code name (board/PCB) : Cumulus Max 18 + * Model name (case sticker) : SRN22C 19 + * Material desc (product spec) : STCSxxxxxxx 20 + */ 21 + 22 + /dts-v1/; 23 + #include "armada-370-seagate-personal-cloud.dtsi" 24 + 25 + / { 26 + model = "Seagate Personal Cloud 2-Bay (Cumulus, SRN22C)"; 27 + compatible = "seagate,cumulus-max", "marvell,armada370", "marvell,armada-370-xp"; 28 + 29 + soc { 30 + internal-regs { 31 + sata@a0000 { 32 + status = "okay"; 33 + nr-ports = <2>; 34 + }; 35 + }; 36 + }; 37 + 38 + regulators { 39 + regulator@2 { 40 + compatible = "regulator-fixed"; 41 + reg = <2>; 42 + regulator-name = "SATA1 power"; 43 + regulator-min-microvolt = <5000000>; 44 + regulator-max-microvolt = <5000000>; 45 + enable-active-high; 46 + regulator-always-on; 47 + regulator-boot-on; 48 + gpio = <&gpio1 22 GPIO_ACTIVE_HIGH>; 49 + }; 50 + }; 51 + };
+37
arch/arm/boot/dts/armada-370-seagate-personal-cloud.dts
··· 1 + /* 2 + * Device Tree file for Seagate Personal Cloud NAS (Armada 370 SoC). 3 + * 4 + * Copyright (C) 2015 Seagate 5 + * 6 + * Author: Simon Guinot <simon.guinot@sequanux.org> 7 + * 8 + * This file is licensed under the terms of the GNU General Public 9 + * License version 2. This program is licensed "as is" without any 10 + * warranty of any kind, whether express or implied. 11 + */ 12 + 13 + /* 14 + * Here are some information allowing to identify the device: 15 + * 16 + * Product name : Seagate Personal Cloud 17 + * Code name (board/PCB) : Cumulus 18 + * Model name (case sticker) : SRN21C 19 + * Material desc (product spec) : STCRxxxxxxx 20 + */ 21 + 22 + /dts-v1/; 23 + #include "armada-370-seagate-personal-cloud.dtsi" 24 + 25 + / { 26 + model = "Seagate Personal Cloud (Cumulus, SRN21C)"; 27 + compatible = "seagate,cumulus", "marvell,armada370", "marvell,armada-370-xp"; 28 + 29 + soc { 30 + internal-regs { 31 + sata@a0000 { 32 + status = "okay"; 33 + nr-ports = <1>; 34 + }; 35 + }; 36 + }; 37 + };
+178
arch/arm/boot/dts/armada-370-seagate-personal-cloud.dtsi
··· 1 + /* 2 + * Device Tree common file for the Seagate Personal Cloud NAS 1 and 2-Bay 3 + * (Armada 370 SoC). 4 + * 5 + * Copyright (C) 2015 Seagate 6 + * 7 + * Author: Simon Guinot <simon.guinot@sequanux.org> 8 + * 9 + * This file is licensed under the terms of the GNU General Public 10 + * License version 2. This program is licensed "as is" without any 11 + * warranty of any kind, whether express or implied. 12 + */ 13 + 14 + /* 15 + * TODO: add support for the white SATA LED. 16 + */ 17 + 18 + #include "armada-370.dtsi" 19 + #include <dt-bindings/gpio/gpio.h> 20 + #include <dt-bindings/input/input.h> 21 + 22 + / { 23 + chosen { 24 + stdout-path = "serial0:115200n8"; 25 + }; 26 + 27 + memory { 28 + device_type = "memory"; 29 + reg = <0x00000000 0x20000000>; /* 512 MB */ 30 + }; 31 + 32 + soc { 33 + ranges = <MBUS_ID(0xf0, 0x01) 0 0xf1000000 0x100000 34 + MBUS_ID(0x01, 0xe0) 0 0xfff00000 0x100000>; 35 + 36 + pcie-controller { 37 + status = "okay"; 38 + 39 + /* USB 3.0 Bridge ASM1042A */ 40 + pcie@1,0 { 41 + status = "okay"; 42 + }; 43 + }; 44 + 45 + internal-regs { 46 + coherency-fabric@20200 { 47 + broken-idle; 48 + }; 49 + 50 + serial@12000 { 51 + status = "okay"; 52 + }; 53 + 54 + mdio { 55 + pinctrl-0 = <&mdio_pins>; 56 + pinctrl-names = "default"; 57 + 58 + phy0: ethernet-phy@0 { 59 + reg = <0>; 60 + }; 61 + }; 62 + 63 + ethernet@74000 { 64 + status = "okay"; 65 + pinctrl-0 = <&ge1_rgmii_pins>; 66 + pinctrl-names = "default"; 67 + phy = <&phy0>; 68 + phy-mode = "rgmii-id"; 69 + }; 70 + 71 + spi@10600 { 72 + status = "okay"; 73 + pinctrl-0 = <&spi0_pins2>; 74 + pinctrl-names = "default"; 75 + 76 + spi-flash@0 { 77 + #address-cells = <1>; 78 + #size-cells = <1>; 79 + /* MX25L8006E */ 80 + compatible = "mxicy,mx25l8005", "jedec,spi-nor"; 81 + reg = <0>; /* Chip select 0 */ 82 + spi-max-frequency = <50000000>; 83 + 84 + partition@0 { 85 + label = "u-boot"; 86 + reg = <0x0 0x100000>; 87 + }; 88 + }; 89 + }; 90 + 91 + usb@50000 { 92 + status = "okay"; 93 + }; 94 + }; 95 + }; 96 + 97 + regulators { 98 + compatible = "simple-bus"; 99 + #address-cells = <1>; 100 + #size-cells = <0>; 101 + 102 + regulator@0 { 103 + compatible = "regulator-fixed"; 104 + reg = <0>; 105 + regulator-name = "USB Power"; 106 + regulator-min-microvolt = <5000000>; 107 + regulator-max-microvolt = <5000000>; 108 + regulator-always-on; 109 + regulator-boot-on; 110 + gpio = <&gpio1 27 GPIO_ACTIVE_LOW>; 111 + }; 112 + regulator@1 { 113 + compatible = "regulator-fixed"; 114 + reg = <1>; 115 + regulator-name = "SATA0 power"; 116 + regulator-min-microvolt = <5000000>; 117 + regulator-max-microvolt = <5000000>; 118 + enable-active-high; 119 + regulator-always-on; 120 + regulator-boot-on; 121 + gpio = <&gpio1 18 GPIO_ACTIVE_HIGH>; 122 + }; 123 + }; 124 + 125 + gpio-keys { 126 + compatible = "gpio-keys"; 127 + #address-cells = <1>; 128 + #size-cells = <0>; 129 + 130 + button@1 { 131 + label = "Power button"; 132 + linux,code = <KEY_POWER>; 133 + gpios = <&gpio1 19 GPIO_ACTIVE_HIGH>; 134 + debounce-interval = <100>; 135 + }; 136 + button@2 { 137 + label = "Reset Button"; 138 + linux,code = <KEY_RESTART>; 139 + gpios = <&gpio1 23 GPIO_ACTIVE_LOW>; 140 + debounce-interval = <100>; 141 + }; 142 + button@3 { 143 + label = "USB VBUS error"; 144 + linux,code = <KEY_UNKNOWN>; 145 + gpios = <&gpio1 21 GPIO_ACTIVE_LOW>; 146 + debounce-interval = <100>; 147 + }; 148 + }; 149 + 150 + gpio-leds { 151 + compatible = "gpio-leds"; 152 + 153 + red-sata0 { 154 + label = "cumulus:red:sata0"; 155 + gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>; 156 + default-state = "off"; 157 + }; 158 + }; 159 + 160 + gpio_poweroff { 161 + compatible = "gpio-poweroff"; 162 + gpios = <&gpio1 25 GPIO_ACTIVE_HIGH>; 163 + }; 164 + }; 165 + 166 + &pinctrl { 167 + pinctrl-0 = <&sata_led_pin>; 168 + pinctrl-names = "default"; 169 + 170 + sata_led_pin: sata-led-pin { 171 + marvell,pins = "mpp60"; 172 + marvell,function = "sata0"; 173 + }; 174 + gpio_led_pin: gpio-led-pin { 175 + marvell,pins = "mpp60"; 176 + marvell,function = "gpio"; 177 + }; 178 + };