aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilly Tarreau <w@1wt.eu>2012-12-09 13:40:04 -0500
committerArnd Bergmann <arnd@arndb.de>2013-02-28 12:57:07 -0500
commit9b47a4fb7760fabfbbc33b7d7703454684f36782 (patch)
tree2528c2cf86ab1bfe904dd36c641a328c671d56c9
parent491221451b9998cf182770f2b5f8b3a8b141dd81 (diff)
ARM: kirkwood: convert Guruplug Server Plus to use the device tree
Add a device tree entry for the Guruplug Server Plus board. This port was based both on the work done on the dreamplug and the dockstar. It builds, boots and works on my Guruplug Server Plus. Signed-off-by: Willy Tarreau <w@1wt.eu> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/boot/dts/Makefile1
-rw-r--r--arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts94
-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.c4
-rw-r--r--arch/arm/mach-kirkwood/board-guruplug.c39
-rw-r--r--arch/arm/mach-kirkwood/common.h5
7 files changed, 151 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index ed256e29cc2a..ebba972d774b 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -56,6 +56,7 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
56 kirkwood-dockstar.dtb \ 56 kirkwood-dockstar.dtb \
57 kirkwood-dreamplug.dtb \ 57 kirkwood-dreamplug.dtb \
58 kirkwood-goflexnet.dtb \ 58 kirkwood-goflexnet.dtb \
59 kirkwood-guruplug-server-plus.dtb \
59 kirkwood-ib62x0.dtb \ 60 kirkwood-ib62x0.dtb \
60 kirkwood-iconnect.dtb \ 61 kirkwood-iconnect.dtb \
61 kirkwood-iomega_ix2_200.dtb \ 62 kirkwood-iomega_ix2_200.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
new file mode 100644
index 000000000000..9555a86297c2
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
@@ -0,0 +1,94 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4/include/ "kirkwood-6281.dtsi"
5
6/ {
7 model = "Globalscale Technologies Guruplug Server Plus";
8 compatible = "globalscale,guruplug-server-plus", "globalscale,guruplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
9
10 memory {
11 device_type = "memory";
12 reg = <0x00000000 0x20000000>;
13 };
14
15 chosen {
16 bootargs = "console=ttyS0,115200n8 earlyprintk";
17 };
18
19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 {
21
22 pinctrl-0 = < &pmx_led_health_r &pmx_led_health_g
23 &pmx_led_wmode_r &pmx_led_wmode_g >;
24 pinctrl-names = "default";
25
26 pmx_led_health_r: pmx-led-health-r {
27 marvell,pins = "mpp46";
28 marvell,function = "gpio";
29 };
30 pmx_led_health_g: pmx-led-health-g {
31 marvell,pins = "mpp47";
32 marvell,function = "gpio";
33 };
34 pmx_led_wmode_r: pmx-led-wmode-r {
35 marvell,pins = "mpp48";
36 marvell,function = "gpio";
37 };
38 pmx_led_wmode_g: pmx-led-wmode-g {
39 marvell,pins = "mpp49";
40 marvell,function = "gpio";
41 };
42 };
43 serial@12000 {
44 clock-frequency = <200000000>;
45 status = "ok";
46 };
47
48 nand@3000000 {
49 status = "okay";
50
51 partition@0 {
52 label = "u-boot";
53 reg = <0x00000000 0x00100000>;
54 read-only;
55 };
56
57 partition@100000 {
58 label = "uImage";
59 reg = <0x00100000 0x00400000>;
60 };
61
62 partition@500000 {
63 label = "data";
64 reg = <0x00500000 0x1fb00000>;
65 };
66 };
67
68 sata@80000 {
69 status = "okay";
70 nr-ports = <1>;
71 };
72 };
73
74 gpio-leds {
75 compatible = "gpio-leds";
76
77 health-r {
78 label = "guruplug:red:health";
79 gpios = <&gpio1 14 1>;
80 };
81 health-g {
82 label = "guruplug:green:health";
83 gpios = <&gpio1 15 1>;
84 };
85 wmode-r {
86 label = "guruplug:red:wmode";
87 gpios = <&gpio1 16 1>;
88 };
89 wmode-g {
90 label = "guruplug:green:wmode";
91 gpios = <&gpio1 17 1>;
92 };
93 };
94};
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index f91cdff5a3e4..7b6a64bc5f40 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -58,6 +58,13 @@ config ARCH_KIRKWOOD_DT
58 Say 'Y' here if you want your kernel to support the 58 Say 'Y' here if you want your kernel to support the
59 Marvell Kirkwood using flattened device tree. 59 Marvell Kirkwood using flattened device tree.
60 60
61config MACH_GURUPLUG_DT
62 bool "Marvell GuruPlug Reference Board (Flattened Device Tree)"
63 select ARCH_KIRKWOOD_DT
64 help
65 Say 'Y' here if you want your kernel to support the
66 Marvell GuruPlug Reference Board (Flattened Device Tree).
67
61config MACH_DREAMPLUG_DT 68config MACH_DREAMPLUG_DT
62 bool "Marvell DreamPlug (Flattened Device Tree)" 69 bool "Marvell DreamPlug (Flattened Device Tree)"
63 select ARCH_KIRKWOOD_DT 70 select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index d6653095a1eb..4cc4bee4d0cf 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -21,6 +21,7 @@ obj-$(CONFIG_MACH_T5325) += t5325-setup.o
21 21
22obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o 22obj-$(CONFIG_ARCH_KIRKWOOD_DT) += board-dt.o
23obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o 23obj-$(CONFIG_MACH_DREAMPLUG_DT) += board-dreamplug.o
24obj-$(CONFIG_MACH_GURUPLUG_DT) += board-guruplug.o
24obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o 25obj-$(CONFIG_MACH_ICONNECT_DT) += board-iconnect.o
25obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o 26obj-$(CONFIG_MACH_DLINK_KIRKWOOD_DT) += board-dnskw.o
26obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o 27obj-$(CONFIG_MACH_IB62X0_DT) += board-ib62x0.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 8eac5487773b..05b3b7ea41f7 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -98,6 +98,9 @@ static void __init kirkwood_dt_init(void)
98 if (of_machine_is_compatible("globalscale,dreamplug")) 98 if (of_machine_is_compatible("globalscale,dreamplug"))
99 dreamplug_init(); 99 dreamplug_init();
100 100
101 if (of_machine_is_compatible("globalscale,guruplug"))
102 guruplug_dt_init();
103
101 if (of_machine_is_compatible("dlink,dns-kirkwood")) 104 if (of_machine_is_compatible("dlink,dns-kirkwood"))
102 dnskw_init(); 105 dnskw_init();
103 106
@@ -149,6 +152,7 @@ static void __init kirkwood_dt_init(void)
149 152
150static const char * const kirkwood_dt_board_compat[] = { 153static const char * const kirkwood_dt_board_compat[] = {
151 "globalscale,dreamplug", 154 "globalscale,dreamplug",
155 "globalscale,guruplug",
152 "dlink,dns-320", 156 "dlink,dns-320",
153 "dlink,dns-325", 157 "dlink,dns-325",
154 "iom,iconnect", 158 "iom,iconnect",
diff --git a/arch/arm/mach-kirkwood/board-guruplug.c b/arch/arm/mach-kirkwood/board-guruplug.c
new file mode 100644
index 000000000000..0a0df4554d8b
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-guruplug.c
@@ -0,0 +1,39 @@
1/*
2 * arch/arm/mach-kirkwood/board-guruplug.c
3 *
4 * Marvell Guruplug Reference Board Init for drivers not converted to
5 * flattened device tree yet.
6 *
7 * This file is licensed under the terms of the GNU General Public
8 * License version 2. This program is licensed "as is" without any
9 * warranty of any kind, whether express or implied.
10 */
11
12#include <linux/kernel.h>
13#include <linux/init.h>
14#include <linux/mv643xx_eth.h>
15#include <linux/gpio.h>
16#include <linux/platform_data/mmc-mvsdio.h>
17#include "common.h"
18
19static struct mv643xx_eth_platform_data guruplug_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
21};
22
23static struct mv643xx_eth_platform_data guruplug_ge01_data = {
24 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
25};
26
27static struct mvsdio_platform_data guruplug_mvsdio_data = {
28 /* unfortunately the CD signal has not been connected */
29};
30
31void __init guruplug_dt_init(void)
32{
33 /*
34 * Basic setup. Needs to be called early.
35 */
36 kirkwood_ge00_init(&guruplug_ge00_data);
37 kirkwood_ge01_init(&guruplug_ge01_data);
38 kirkwood_sdio_init(&guruplug_mvsdio_data);
39}
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index e956d0277dd1..537bdf816af7 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -60,6 +60,11 @@ void dreamplug_init(void);
60#else 60#else
61static inline void dreamplug_init(void) {}; 61static inline void dreamplug_init(void) {};
62#endif 62#endif
63#ifdef CONFIG_MACH_GURUPLUG_DT
64void guruplug_dt_init(void);
65#else
66static inline void guruplug_dt_init(void) {};
67#endif
63#ifdef CONFIG_MACH_TS219_DT 68#ifdef CONFIG_MACH_TS219_DT
64void qnap_dt_ts219_init(void); 69void qnap_dt_ts219_init(void);
65#else 70#else