aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Guinot <simon.guinot@sequanux.org>2012-10-17 06:09:06 -0400
committerJason Cooper <jason@lakedaemon.net>2012-11-21 15:58:49 -0500
commit7f9871d9d30f25891e0c4da4c6284d9e66e702f5 (patch)
tree5a9b180c35a261f8d215212cbb46e24ca0b7683d
parentca7d94524ab3554b08f13de91674d570cb4a09b6 (diff)
ARM: kirkwood: DT board setup for Network Space Mini v2
This patch adds DT board setup for the LaCie NAS Network Space Mini v2 (aka SafeBox). The hardware characteristics are very close to those of the Network Space Lite v2. The main difference are: - A GPIO fan which is only available on the NS2 Mini. - A single USB host port is wired on the NS2 Mini. The NS2 Lite provides an additional dual-mode USB port (host/device). Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/kirkwood-ns2mini.dts49
-rw-r--r--arch/arm/mach-kirkwood/Kconfig8
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c4
-rw-r--r--arch/arm/mach-kirkwood/board-ns2.c3
-rw-r--r--arch/arm/mach-kirkwood/common.h3
-rw-r--r--drivers/leds/Kconfig2
8 files changed, 67 insertions, 4 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 74fca59370c3..77fce3f63946 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -43,6 +43,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
43 kirkwood-ns2.dtb \ 43 kirkwood-ns2.dtb \
44 kirkwood-ns2lite.dtb \ 44 kirkwood-ns2lite.dtb \
45 kirkwood-ns2max.dtb \ 45 kirkwood-ns2max.dtb \
46 kirkwood-ns2mini.dtb \
46 kirkwood-ts219-6281.dtb \ 47 kirkwood-ts219-6281.dtb \
47 kirkwood-ts219-6282.dtb 48 kirkwood-ts219-6282.dtb
48dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ 49dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-ns2mini.dts b/arch/arm/boot/dts/kirkwood-ns2mini.dts
new file mode 100644
index 000000000000..b79f5eb25589
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-ns2mini.dts
@@ -0,0 +1,49 @@
1/dts-v1/;
2
3/include/ "kirkwood-ns2-common.dtsi"
4
5/ {
6 model = "LaCie Network Space Mini v2";
7 compatible = "lacie,netspace_mini_v2", "marvell,kirkwood-88f6192", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x8000000>;
12 };
13
14 ocp@f1000000 {
15 sata@80000 {
16 status = "okay";
17 nr-ports = <1>;
18 };
19 };
20
21 gpio_fan {
22 compatible = "gpio-fan";
23 gpios = <&gpio0 22 1
24 &gpio0 7 1
25 &gpio1 1 1
26 &gpio0 23 1>;
27 gpio-fan,speed-map =
28 < 0 0
29 3000 15
30 3180 14
31 4140 13
32 4570 12
33 6760 11
34 7140 10
35 7980 9
36 9200 8>;
37 alarm-gpios = <&gpio0 25 1>;
38 };
39
40 ns2-leds {
41 compatible = "lacie,ns2-leds";
42
43 blue-sata {
44 label = "ns2:blue:sata";
45 slow-gpio = <&gpio0 29 0>;
46 cmd-gpio = <&gpio0 30 0>;
47 };
48 };
49};
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 83df331fce28..757bdb39bc08 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -158,6 +158,14 @@ config MACH_NETSPACE_LITE_V2_DT
158 Say 'Y' here if you want your kernel to support the LaCie 158 Say 'Y' here if you want your kernel to support the LaCie
159 Network Space Lite v2 NAS, using Flattened Device Tree. 159 Network Space Lite v2 NAS, using Flattened Device Tree.
160 160
161config MACH_NETSPACE_MINI_V2_DT
162 bool "LaCie Network Space Mini v2 NAS (Flattened Device Tree)"
163 select ARCH_KIRKWOOD_DT
164 help
165 Say 'Y' here if you want your kernel to support the LaCie
166 Network Space Mini v2 NAS (aka SafeBox), using Flattened
167 Device Tree.
168
161config MACH_TS219 169config MACH_TS219
162 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS" 170 bool "QNAP TS-110, TS-119, TS-119P+, TS-210, TS-219, TS-219P and TS-219P+ Turbo NAS"
163 help 171 help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 4d4b7d4fbcf5..3ff4aa1030c5 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -35,3 +35,4 @@ obj-$(CONFIG_MACH_INETSPACE_V2_DT) += board-ns2.o
35obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o 35obj-$(CONFIG_MACH_NETSPACE_V2_DT) += board-ns2.o
36obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o 36obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
37obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o 37obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
38obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index b76ef75f533f..571b0198e4d5 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -99,7 +99,8 @@ static void __init kirkwood_dt_init(void)
99 if (of_machine_is_compatible("lacie,inetspace_v2") || 99 if (of_machine_is_compatible("lacie,inetspace_v2") ||
100 of_machine_is_compatible("lacie,netspace_v2") || 100 of_machine_is_compatible("lacie,netspace_v2") ||
101 of_machine_is_compatible("lacie,netspace_max_v2") || 101 of_machine_is_compatible("lacie,netspace_max_v2") ||
102 of_machine_is_compatible("lacie,netspace_lite_v2")) 102 of_machine_is_compatible("lacie,netspace_lite_v2") ||
103 of_machine_is_compatible("lacie,netspace_mini_v2"))
103 ns2_init(); 104 ns2_init();
104 105
105 of_platform_populate(NULL, kirkwood_dt_match_table, 106 of_platform_populate(NULL, kirkwood_dt_match_table,
@@ -122,6 +123,7 @@ static const char *kirkwood_dt_board_compat[] = {
122 "lacie,netspace_max_v2", 123 "lacie,netspace_max_v2",
123 "lacie,netspace_v2", 124 "lacie,netspace_v2",
124 "lacie,netspace_lite_v2", 125 "lacie,netspace_lite_v2",
126 "lacie,netspace_mini_v2",
125 NULL 127 NULL
126}; 128};
127 129
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
index da8c4c5bf4f6..78596c4f76d2 100644
--- a/arch/arm/mach-kirkwood/board-ns2.c
+++ b/arch/arm/mach-kirkwood/board-ns2.c
@@ -74,7 +74,8 @@ void __init ns2_init(void)
74 kirkwood_mpp_conf(ns2_mpp_config); 74 kirkwood_mpp_conf(ns2_mpp_config);
75 75
76 kirkwood_ehci_init(); 76 kirkwood_ehci_init();
77 if (of_machine_is_compatible("lacie,netspace_lite_v2")) 77 if (of_machine_is_compatible("lacie,netspace_lite_v2") ||
78 of_machine_is_compatible("lacie,netspace_mini_v2"))
78 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 79 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
79 kirkwood_ge00_init(&ns2_ge00_data); 80 kirkwood_ge00_init(&ns2_ge00_data);
80 81
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index 6949d8198de1..95eb69b7b46c 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -115,7 +115,8 @@ static inline void km_kirkwood_init(void) {};
115#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \ 115#if defined(CONFIG_MACH_INETSPACE_V2_DT) || \
116 defined(CONFIG_MACH_NETSPACE_V2_DT) || \ 116 defined(CONFIG_MACH_NETSPACE_V2_DT) || \
117 defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \ 117 defined(CONFIG_MACH_NETSPACE_MAX_V2_DT) || \
118 defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) 118 defined(CONFIG_MACH_NETSPACE_LITE_V2_DT) || \
119 defined(CONFIG_MACH_NETSPACE_MINI_V2_DT)
119void ns2_init(void); 120void ns2_init(void);
120#else 121#else
121static inline void ns2_init(void) {}; 122static inline void ns2_init(void) {};
diff --git a/drivers/leds/Kconfig b/drivers/leds/Kconfig
index e455c0869378..b58bc8a14b9c 100644
--- a/drivers/leds/Kconfig
+++ b/drivers/leds/Kconfig
@@ -381,7 +381,7 @@ config LEDS_NS2
381 depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || \ 381 depends on MACH_NETSPACE_V2 || MACH_INETSPACE_V2 || \
382 MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2 || \ 382 MACH_NETSPACE_MAX_V2 || MACH_D2NET_V2 || \
383 MACH_NETSPACE_V2_DT || MACH_INETSPACE_V2_DT || \ 383 MACH_NETSPACE_V2_DT || MACH_INETSPACE_V2_DT || \
384 MACH_NETSPACE_MAX_V2_DT 384 MACH_NETSPACE_MAX_V2_DT || MACH_NETSPACE_MINI_V2_DT
385 default y 385 default y
386 help 386 help
387 This option enable support for the dual-GPIO LED found on the 387 This option enable support for the dual-GPIO LED found on the