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

Kirkwood: add support for Seagate BlackArmor NAS220

This patch adds support for Seagate BlackArmor NAS220.

The Seagate BlackArmor NAS 220 is a NAS system based on Marvell 88f6192. It has
32MB NAND and 128MB DRAM. It has two SATA slots, one Gigabit Ethernet port, two
USB 2.0 ports, two buttons and three LEDs. There is a serial port available on
the CN5 connector on the board (1 - TX, 4 - RX, 6 - GND).

The only functionality still not implemented is the bi-color led on the front
panel (status). Pins mpp22 and mpp23 control this led. Setting mpp22 to high and
mpp23 to low results in orange color. Setting mpp22 to low and mpp23 to high
results in blue color.

The third led is wired to show the SATA activity on the two drives.

Signed-off-by: Evgeni Dobrev <evgeni@studio-punkt.com>
Acked-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>

authored by

Evgeni Dobrev and committed by
Andrew Lunn
dd7d2be1 9c569b39

+174
+1
arch/arm/boot/dts/Makefile
··· 112 112 k2l-evm.dtb \ 113 113 k2e-evm.dtb 114 114 dtb-$(CONFIG_MACH_KIRKWOOD) += kirkwood-b3.dtb \ 115 + kirkwood-blackarmor-nas220.dtb \ 115 116 kirkwood-cloudbox.dtb \ 116 117 kirkwood-d2net.dtb \ 117 118 kirkwood-db-88f6281.dtb \
+173
arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
··· 1 + /* 2 + * Device Tree file for Seagate Blackarmor NAS220 3 + * 4 + * Copyright (C) 2014 Evgeni Dobrev <evgeni@studio-punkt.com> 5 + * 6 + * Licensed under GPLv2 or later. 7 + */ 8 + 9 + /dts-v1/; 10 + 11 + #include <dt-bindings/gpio/gpio.h> 12 + #include <dt-bindings/input/input.h> 13 + #include "kirkwood.dtsi" 14 + #include "kirkwood-6192.dtsi" 15 + 16 + / { 17 + model = "Seagate Blackarmor NAS220"; 18 + compatible = "seagate,blackarmor-nas220","marvell,kirkwood-88f6192", 19 + "marvell,kirkwood"; 20 + 21 + memory { /* 128 MB */ 22 + device_type = "memory"; 23 + reg = <0x00000000 0x8000000>; 24 + }; 25 + 26 + chosen { 27 + bootargs = "console=ttyS0,115200n8"; 28 + stdout-path = &uart0; 29 + }; 30 + 31 + gpio_poweroff { 32 + compatible = "gpio-poweroff"; 33 + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>; 34 + }; 35 + 36 + gpio_keys { 37 + compatible = "gpio-keys"; 38 + 39 + button@1{ 40 + label = "Reset"; 41 + linux,code = <KEY_POWER>; 42 + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>; 43 + }; 44 + 45 + button@2{ 46 + label = "Power"; 47 + linux,code = <KEY_SLEEP>; 48 + gpios = <&gpio0 26 GPIO_ACTIVE_LOW>; 49 + }; 50 + }; 51 + 52 + gpio-leds { 53 + compatible = "gpio-leds"; 54 + 55 + blue-power { 56 + label = "nas220:blue:power"; 57 + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; 58 + linux,default-trigger = "default-on"; 59 + }; 60 + }; 61 + 62 + regulators { 63 + compatible = "simple-bus"; 64 + #address-cells = <1>; 65 + #size-cells = <0>; 66 + pinctrl-0 = <&pmx_power_sata0 &pmx_power_sata1>; 67 + pinctrl-names = "default"; 68 + 69 + sata0_power: regulator@1 { 70 + compatible = "regulator-fixed"; 71 + reg = <1>; 72 + regulator-name = "SATA0 Power"; 73 + regulator-min-microvolt = <5000000>; 74 + regulator-max-microvolt = <5000000>; 75 + enable-active-high; 76 + regulator-always-on; 77 + regulator-boot-on; 78 + gpio = <&gpio0 24 GPIO_ACTIVE_LOW>; 79 + }; 80 + 81 + sata1_power: regulator@2 { 82 + compatible = "regulator-fixed"; 83 + reg = <2>; 84 + regulator-name = "SATA1 Power"; 85 + regulator-min-microvolt = <5000000>; 86 + regulator-max-microvolt = <5000000>; 87 + enable-active-high; 88 + regulator-always-on; 89 + regulator-boot-on; 90 + gpio = <&gpio0 28 GPIO_ACTIVE_LOW>; 91 + }; 92 + }; 93 + }; 94 + 95 + /* 96 + * Serial port routed to connector CN5 97 + * 98 + * pin 1 - TX (CPU's TX) 99 + * pin 4 - RX (CPU's RX) 100 + * pin 6 - GND 101 + */ 102 + &uart0 { 103 + status = "okay"; 104 + }; 105 + 106 + &pinctrl { 107 + pinctrl-0 = <&pmx_button_reset &pmx_button_power>; 108 + pinctrl-names = "default"; 109 + 110 + pmx_act_sata0: pmx-act-sata0 { 111 + marvell,pins = "mpp15"; 112 + marvell,function = "sata0"; 113 + }; 114 + 115 + pmx_act_sata1: pmx-act-sata1 { 116 + marvell,pins = "mpp16"; 117 + marvell,function = "sata1"; 118 + }; 119 + 120 + pmx_power_sata0: pmx-power-sata0 { 121 + marvell,pins = "mpp24"; 122 + marvell,function = "gpio"; 123 + }; 124 + 125 + pmx_power_sata1: pmx-power-sata1 { 126 + marvell,pins = "mpp28"; 127 + marvell,function = "gpio"; 128 + }; 129 + 130 + pmx_button_reset: pmx-button-reset { 131 + marvell,pins = "mpp29"; 132 + marvell,function = "gpio"; 133 + }; 134 + 135 + pmx_button_power: pmx-button-power { 136 + marvell,pins = "mpp26"; 137 + marvell,function = "gpio"; 138 + }; 139 + }; 140 + 141 + &sata { 142 + status = "okay"; 143 + nr-ports = <2>; 144 + }; 145 + 146 + &i2c0 { 147 + status = "okay"; 148 + 149 + adt7476: thermal@2e { 150 + compatible = "adi,adt7476"; 151 + reg = <0x2e>; 152 + }; 153 + }; 154 + 155 + &nand { 156 + status = "okay"; 157 + }; 158 + 159 + &mdio { 160 + status = "okay"; 161 + 162 + ethphy0: ethernet-phy@8 { 163 + reg = <8>; 164 + }; 165 + }; 166 + 167 + &eth0 { 168 + status = "okay"; 169 + 170 + ethernet0-port@0 { 171 + phy-handle = <&ethphy0>; 172 + }; 173 + };