aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Guinot <simon.guinot@sequanux.org>2013-04-08 18:41:28 -0400
committerJason Cooper <jason@lakedaemon.net>2013-04-10 14:16:06 -0400
commit98d4f2acb91ac4a839eab6b92f02f57986af2197 (patch)
tree1e37a11881d96c169b4c2b70cb129b18527d2069
parenta557dd1a08dfb5baff4eb1704ed22fd839205057 (diff)
ARM: Kirkwood: DT board setup for CloudBox
This patch adds DT board setup for the LaCie NAS CloudBox. The CloudBox is a low cost NAS based on the Network Space v2. Chipset list: - CPU MARVELL 88F6702 1Ghz - SDRAM memory: 256MB DDR2-800 (2x128MB x8) 400Mhz - 1 Ethernet Gigabit port (PHY MARVELL 88E1318) - SPI flash, NOR 512KB - 1 push button - 2 LEDs (red and blue) There is no EEPROM and no USB ports embedded. Note that this board must not be confused with the Network Space Mini v2 which is embedded in a previous LaCie product also named CloudBox. Signed-off-by: Simon Guinot <simon.guinot@sequanux.org> Acked-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/boot/dts/Makefile3
-rw-r--r--arch/arm/boot/dts/kirkwood-cloudbox.dts89
-rw-r--r--arch/arm/configs/kirkwood_defconfig1
-rw-r--r--arch/arm/mach-kirkwood/Kconfig7
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/board-dt.c14
-rw-r--r--arch/arm/mach-kirkwood/board-ns2.c3
-rw-r--r--arch/arm/mach-kirkwood/common.h6
8 files changed, 116 insertions, 8 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index 125211d2aa36..c56f20f7ded7 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -51,7 +51,8 @@ dtb-$(CONFIG_ARCH_HIGHBANK) += highbank.dtb \
51dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \ 51dtb-$(CONFIG_ARCH_INTEGRATOR) += integratorap.dtb \
52 integratorcp.dtb 52 integratorcp.dtb
53dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb 53dtb-$(CONFIG_ARCH_LPC32XX) += ea3250.dtb phy3250.dtb
54dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \ 54dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-cloudbox.dtb \
55 kirkwood-dns320.dtb \
55 kirkwood-dns325.dtb \ 56 kirkwood-dns325.dtb \
56 kirkwood-dockstar.dtb \ 57 kirkwood-dockstar.dtb \
57 kirkwood-dreamplug.dtb \ 58 kirkwood-dreamplug.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-cloudbox.dts b/arch/arm/boot/dts/kirkwood-cloudbox.dts
new file mode 100644
index 000000000000..5f21d4e427b0
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-cloudbox.dts
@@ -0,0 +1,89 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4/include/ "kirkwood-6281.dtsi"
5
6/ {
7 model = "LaCie CloudBox";
8 compatible = "lacie,cloudbox", "marvell,kirkwood-88f6702", "marvell,kirkwood";
9
10 memory {
11 device_type = "memory";
12 reg = <0x00000000 0x10000000>;
13 };
14
15 chosen {
16 bootargs = "console=ttyS0,115200n8";
17 };
18
19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 {
21 pinctrl-0 = < &pmx_spi &pmx_uart0
22 &pmx_cloudbox_sata0 >;
23 pinctrl-names = "default";
24
25 pmx_cloudbox_sata0: pmx-cloudbox-sata0 {
26 marvell,pins = "mpp15";
27 marvell,function = "sata0";
28 };
29 };
30
31 serial@12000 {
32 clock-frequency = <166666667>;
33 status = "okay";
34 };
35
36 sata@80000 {
37 status = "okay";
38 nr-ports = <1>;
39 };
40
41 spi@10600 {
42 status = "okay";
43
44 flash@0 {
45 #address-cells = <1>;
46 #size-cells = <1>;
47 compatible = "mx25l4005a";
48 reg = <0>;
49 spi-max-frequency = <20000000>;
50 mode = <0>;
51
52 partition@0 {
53 reg = <0x0 0x80000>;
54 label = "u-boot";
55 };
56 };
57 };
58 };
59
60 gpio_keys {
61 compatible = "gpio-keys";
62 #address-cells = <1>;
63 #size-cells = <0>;
64
65 button@1 {
66 label = "Power push button";
67 linux,code = <116>;
68 gpios = <&gpio0 16 1>;
69 };
70 };
71
72 gpio-leds {
73 compatible = "gpio-leds";
74
75 red-fail {
76 label = "cloudbox:red:fail";
77 gpios = <&gpio0 14 0>;
78 };
79 blue-sata {
80 label = "cloudbox:blue:sata";
81 gpios = <&gpio0 15 0>;
82 };
83 };
84
85 gpio_poweroff {
86 compatible = "gpio-poweroff";
87 gpios = <&gpio0 17 0>;
88 };
89};
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index 0421d0f51b0b..7205a7a889a5 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -30,6 +30,7 @@ CONFIG_MACH_SHEEVAPLUG=y
30CONFIG_MACH_T5325=y 30CONFIG_MACH_T5325=y
31CONFIG_MACH_TS219=y 31CONFIG_MACH_TS219=y
32CONFIG_MACH_TS41X=y 32CONFIG_MACH_TS41X=y
33CONFIG_MACH_CLOUDBOX_DT=y
33CONFIG_MACH_DLINK_KIRKWOOD_DT=y 34CONFIG_MACH_DLINK_KIRKWOOD_DT=y
34CONFIG_MACH_DOCKSTAR_DT=y 35CONFIG_MACH_DOCKSTAR_DT=y
35CONFIG_MACH_DREAMPLUG_DT=y 36CONFIG_MACH_DREAMPLUG_DT=y
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 938395a871f9..45ab2f51a9a0 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -146,6 +146,13 @@ config ARCH_KIRKWOOD_DT
146 Say 'Y' here if you want your kernel to support the 146 Say 'Y' here if you want your kernel to support the
147 Marvell Kirkwood using flattened device tree. 147 Marvell Kirkwood using flattened device tree.
148 148
149config MACH_CLOUDBOX_DT
150 bool "LaCie CloudBox NAS (Flattened Device Tree)"
151 select ARCH_KIRKWOOD_DT
152 help
153 Say 'Y' here if you want your kernel to support the LaCie
154 CloudBox NAS, using Flattened Device Tree.
155
149config MACH_DLINK_KIRKWOOD_DT 156config MACH_DLINK_KIRKWOOD_DT
150 bool "D-Link Kirkwood-based NAS (Flattened Device Tree)" 157 bool "D-Link Kirkwood-based NAS (Flattened Device Tree)"
151 select ARCH_KIRKWOOD_DT 158 select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index 5f1285d216ac..cdbca328a412 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -20,6 +20,7 @@ obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
20obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o 20obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
21 21
22obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o 22obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
23obj-$(CONFIG_MACH_CLOUDBOX_DT) += board-ns2.o
23obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o 24obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o
24obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o 25obj-$(CONFIG_MACH_DOCKSTAR_DT) += board-dockstar.o
25obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o 26obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index e5a3cfec3d62..7904758e771f 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -139,11 +139,12 @@ static void __init kirkwood_dt_init(void)
139 if (of_machine_is_compatible("keymile,km_kirkwood")) 139 if (of_machine_is_compatible("keymile,km_kirkwood"))
140 km_kirkwood_init(); 140 km_kirkwood_init();
141 141
142 if (of_machine_is_compatible("lacie,inetspace_v2") || 142 if (of_machine_is_compatible("lacie,cloudbox") ||
143 of_machine_is_compatible("lacie,netspace_v2") || 143 of_machine_is_compatible("lacie,inetspace_v2") ||
144 of_machine_is_compatible("lacie,netspace_max_v2") ||
145 of_machine_is_compatible("lacie,netspace_lite_v2") || 144 of_machine_is_compatible("lacie,netspace_lite_v2") ||
146 of_machine_is_compatible("lacie,netspace_mini_v2")) 145 of_machine_is_compatible("lacie,netspace_max_v2") ||
146 of_machine_is_compatible("lacie,netspace_mini_v2") ||
147 of_machine_is_compatible("lacie,netspace_v2"))
147 ns2_init(); 148 ns2_init();
148 149
149 if (of_machine_is_compatible("mpl,cec4")) 150 if (of_machine_is_compatible("mpl,cec4"))
@@ -174,11 +175,12 @@ static const char * const kirkwood_dt_board_compat[] = {
174 "buffalo,lsxl", 175 "buffalo,lsxl",
175 "iom,ix2-200", 176 "iom,ix2-200",
176 "keymile,km_kirkwood", 177 "keymile,km_kirkwood",
178 "lacie,cloudbox",
177 "lacie,inetspace_v2", 179 "lacie,inetspace_v2",
178 "lacie,netspace_max_v2",
179 "lacie,netspace_v2",
180 "lacie,netspace_lite_v2", 180 "lacie,netspace_lite_v2",
181 "lacie,netspace_max_v2",
181 "lacie,netspace_mini_v2", 182 "lacie,netspace_mini_v2",
183 "lacie,netspace_v2",
182 "mpl,cec4", 184 "mpl,cec4",
183 "netgear,readynas-duo-v2", 185 "netgear,readynas-duo-v2",
184 "plathome,openblocks-a6", 186 "plathome,openblocks-a6",
diff --git a/arch/arm/mach-kirkwood/board-ns2.c b/arch/arm/mach-kirkwood/board-ns2.c
index f2ea3b7ad726..f8f660525ace 100644
--- a/arch/arm/mach-kirkwood/board-ns2.c
+++ b/arch/arm/mach-kirkwood/board-ns2.c
@@ -27,7 +27,8 @@ void __init ns2_init(void)
27 /* 27 /*
28 * Basic setup. Needs to be called early. 28 * Basic setup. Needs to be called early.
29 */ 29 */
30 if (of_machine_is_compatible("lacie,netspace_lite_v2") || 30 if (of_machine_is_compatible("lacie,cloudbox") ||
31 of_machine_is_compatible("lacie,netspace_lite_v2") ||
31 of_machine_is_compatible("lacie,netspace_mini_v2")) 32 of_machine_is_compatible("lacie,netspace_mini_v2"))
32 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0); 33 ns2_ge00_data.phy_addr = MV643XX_ETH_PHY_ADDR(0);
33 kirkwood_ge00_init(&ns2_ge00_data); 34 kirkwood_ge00_init(&ns2_ge00_data);
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index 7ee8670eb944..3147be2f34da 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -153,6 +153,12 @@ void usi_topkick_init(void);
153static inline void usi_topkick_init(void) {}; 153static inline void usi_topkick_init(void) {};
154#endif 154#endif
155 155
156#ifdef CONFIG_MACH_CLOUDBOX_DT
157void cloudbox_init(void);
158#else
159static inline void cloudbox_init(void) {};
160#endif
161
156/* early init functions not converted to fdt yet */ 162/* early init functions not converted to fdt yet */
157char *kirkwood_id(void); 163char *kirkwood_id(void);
158void kirkwood_l2_init(void); 164void kirkwood_l2_init(void);