-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ARM: kirkwood: DT board setup for Network Space v2 and parents
This patch adds DT board setup for LaCie Network Space v2 and parents, based on the Marvell Kirkwood 6281 SoC. This includes Network Space v2 (Max) and Internet Space v2. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
- Loading branch information
Simon Guinot
authored and
Jason Cooper
committed
Nov 21, 2012
1 parent
72052fc
commit ecee1e4
Showing
11 changed files
with
301 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/dts-v1/; | ||
|
||
/include/ "kirkwood-ns2-common.dtsi" | ||
|
||
/ { | ||
model = "LaCie Internet Space v2"; | ||
compatible = "lacie,inetspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
|
||
memory { | ||
device_type = "memory"; | ||
reg = <0x00000000 0x8000000>; | ||
}; | ||
|
||
ocp@f1000000 { | ||
sata@80000 { | ||
status = "okay"; | ||
nr-ports = <1>; | ||
}; | ||
}; | ||
|
||
ns2-leds { | ||
compatible = "lacie,ns2-leds"; | ||
|
||
blue-sata { | ||
label = "ns2:blue:sata"; | ||
slow-gpio = <&gpio0 29 0>; | ||
cmd-gpio = <&gpio0 30 0>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
/include/ "kirkwood.dtsi" | ||
|
||
/ { | ||
chosen { | ||
bootargs = "console=ttyS0,115200n8"; | ||
}; | ||
|
||
ocp@f1000000 { | ||
serial@12000 { | ||
clock-frequency = <166666667>; | ||
status = "okay"; | ||
}; | ||
|
||
spi@10600 { | ||
status = "okay"; | ||
|
||
flash@0 { | ||
#address-cells = <1>; | ||
#size-cells = <1>; | ||
compatible = "mx25l4005a"; | ||
reg = <0>; | ||
spi-max-frequency = <20000000>; | ||
mode = <0>; | ||
|
||
partition@0 { | ||
reg = <0x0 0x80000>; | ||
label = "u-boot"; | ||
}; | ||
}; | ||
}; | ||
|
||
i2c@11000 { | ||
status = "okay"; | ||
|
||
eeprom@50 { | ||
compatible = "at,24c04"; | ||
pagesize = <16>; | ||
reg = <0x50>; | ||
}; | ||
}; | ||
}; | ||
|
||
gpio_keys { | ||
compatible = "gpio-keys"; | ||
#address-cells = <1>; | ||
#size-cells = <0>; | ||
|
||
button@1 { | ||
label = "Power push button"; | ||
linux,code = <116>; | ||
gpios = <&gpio1 0 0>; | ||
}; | ||
}; | ||
|
||
gpio-leds { | ||
compatible = "gpio-leds"; | ||
|
||
red-fail { | ||
label = "ns2:red:fail"; | ||
gpios = <&gpio0 12 0>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/dts-v1/; | ||
|
||
/include/ "kirkwood-ns2-common.dtsi" | ||
|
||
/ { | ||
model = "LaCie Network Space v2"; | ||
compatible = "lacie,netspace_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
|
||
memory { | ||
device_type = "memory"; | ||
reg = <0x00000000 0x10000000>; | ||
}; | ||
|
||
ocp@f1000000 { | ||
sata@80000 { | ||
status = "okay"; | ||
nr-ports = <1>; | ||
}; | ||
}; | ||
|
||
ns2-leds { | ||
compatible = "lacie,ns2-leds"; | ||
|
||
blue-sata { | ||
label = "ns2:blue:sata"; | ||
slow-gpio = <&gpio0 29 0>; | ||
cmd-gpio = <&gpio0 30 0>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/dts-v1/; | ||
|
||
/include/ "kirkwood-ns2-common.dtsi" | ||
|
||
/ { | ||
model = "LaCie Network Space Max v2"; | ||
compatible = "lacie,netspace_max_v2", "marvell,kirkwood-88f6281", "marvell,kirkwood"; | ||
|
||
memory { | ||
device_type = "memory"; | ||
reg = <0x00000000 0x10000000>; | ||
}; | ||
|
||
ocp@f1000000 { | ||
sata@80000 { | ||
status = "okay"; | ||
nr-ports = <2>; | ||
}; | ||
}; | ||
|
||
gpio_fan { | ||
compatible = "gpio-fan"; | ||
gpios = <&gpio0 22 1 | ||
&gpio0 7 1 | ||
&gpio1 1 1 | ||
&gpio0 23 1>; | ||
gpio-fan,speed-map = | ||
< 0 0 | ||
1500 15 | ||
1700 14 | ||
1800 13 | ||
2100 12 | ||
3100 11 | ||
3300 10 | ||
4300 9 | ||
5500 8>; | ||
alarm-gpios = <&gpio0 25 1>; | ||
}; | ||
|
||
ns2-leds { | ||
compatible = "lacie,ns2-leds"; | ||
|
||
blue-sata { | ||
label = "ns2:blue:sata"; | ||
slow-gpio = <&gpio0 29 0>; | ||
cmd-gpio = <&gpio0 30 0>; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
/* | ||
* Copyright 2012 (C), Simon Guinot <simon.guinot@sequanux.org> | ||
* | ||
* arch/arm/mach-kirkwood/board-ns2.c | ||
* | ||
* LaCie Network Space v2 board (and parents) initialization for drivers | ||
* not converted to flattened device tree yet. | ||
* | ||
* This file is licensed under the terms of the GNU General Public | ||
* License version 2. This program is licensed "as is" without any | ||
* warranty of any kind, whether express or implied. | ||
*/ | ||
|
||
#include <linux/kernel.h> | ||
#include <linux/init.h> | ||
#include <linux/platform_device.h> | ||
#include <linux/mv643xx_eth.h> | ||
#include <linux/gpio.h> | ||
#include "common.h" | ||
#include "mpp.h" | ||
|
||
static struct mv643xx_eth_platform_data ns2_ge00_data = { | ||
.phy_addr = MV643XX_ETH_PHY_ADDR(8), | ||
}; | ||
|
||
static unsigned int ns2_mpp_config[] __initdata = { | ||
MPP0_SPI_SCn, | ||
MPP1_SPI_MOSI, | ||
MPP2_SPI_SCK, | ||
MPP3_SPI_MISO, | ||
MPP4_NF_IO6, | ||
MPP5_NF_IO7, | ||
MPP6_SYSRST_OUTn, | ||
MPP7_GPO, /* Fan speed (bit 1) */ | ||
MPP8_TW0_SDA, | ||
MPP9_TW0_SCK, | ||
MPP10_UART0_TXD, | ||
MPP11_UART0_RXD, | ||
MPP12_GPO, /* Red led */ | ||
MPP14_GPIO, /* USB fuse */ | ||
MPP16_GPIO, /* SATA 0 power */ | ||
MPP17_GPIO, /* SATA 1 power */ | ||
MPP18_NF_IO0, | ||
MPP19_NF_IO1, | ||
MPP20_SATA1_ACTn, | ||
MPP21_SATA0_ACTn, | ||
MPP22_GPIO, /* Fan speed (bit 0) */ | ||
MPP23_GPIO, /* Fan power */ | ||
MPP24_GPIO, /* USB mode select */ | ||
MPP25_GPIO, /* Fan rotation fail */ | ||
MPP26_GPIO, /* USB device vbus */ | ||
MPP28_GPIO, /* USB enable host vbus */ | ||
MPP29_GPIO, /* Blue led (slow register) */ | ||
MPP30_GPIO, /* Blue led (command register) */ | ||
MPP31_GPIO, /* Board power off */ | ||
MPP32_GPIO, /* Power button (0 = Released, 1 = Pushed) */ | ||
MPP33_GPO, /* Fan speed (bit 2) */ | ||
0 | ||
}; | ||
|
||
#define NS2_GPIO_POWER_OFF 31 | ||
|
||
static void ns2_power_off(void) | ||
{ | ||
gpio_set_value(NS2_GPIO_POWER_OFF, 1); | ||
} | ||
|
||
void __init ns2_init(void) | ||
{ | ||
/* | ||
* Basic setup. Needs to be called early. | ||
*/ | ||
kirkwood_mpp_conf(ns2_mpp_config); | ||
|
||
kirkwood_ehci_init(); | ||
kirkwood_ge00_init(&ns2_ge00_data); | ||
|
||
if (gpio_request(NS2_GPIO_POWER_OFF, "power-off") == 0 && | ||
gpio_direction_output(NS2_GPIO_POWER_OFF, 0) == 0) | ||
pm_power_off = ns2_power_off; | ||
else | ||
pr_err("ns2: failed to configure power-off GPIO\n"); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters