aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>2012-11-13 02:43:09 -0500
committerJason Cooper <jason@lakedaemon.net>2012-11-22 02:01:51 -0500
commitf17073a3aec601cb9aba6d8c1c6dbc8c6a919c07 (patch)
tree4b17d50752e378d212bd283b1dfa4ee9a2e06c5b
parent88bc4a36a985ac14bd60fdc4fee00c68874c52f1 (diff)
ARM: kirkwood: Add Plat'Home OpenBlocks A6 support
Add support for Plat'Home OpenBlocks A6 using the device tree where possible. This commit supports SATA, USB, ether and serial console. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/boot/dts/Makefile3
-rw-r--r--arch/arm/boot/dts/kirkwood-openblocks_a6.dts39
-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.c4
-rw-r--r--arch/arm/mach-kirkwood/board-openblocks_a6.c71
-rw-r--r--arch/arm/mach-kirkwood/common.h6
8 files changed, 131 insertions, 1 deletions
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index f1ba69c2496a..94561b500429 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -48,7 +48,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
48 kirkwood-nsa310.dtb \ 48 kirkwood-nsa310.dtb \
49 kirkwood-topkick.dtb \ 49 kirkwood-topkick.dtb \
50 kirkwood-ts219-6281.dtb \ 50 kirkwood-ts219-6281.dtb \
51 kirkwood-ts219-6282.dtb 51 kirkwood-ts219-6282.dtb \
52 kirkwood-openblocks_a6.dtb
52dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \ 53dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
53 msm8960-cdp.dtb 54 msm8960-cdp.dtb
54dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \ 55dtb-$(CONFIG_ARCH_MVEBU) += armada-370-db.dtb \
diff --git a/arch/arm/boot/dts/kirkwood-openblocks_a6.dts b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
new file mode 100644
index 000000000000..9a2606c8b78f
--- /dev/null
+++ b/arch/arm/boot/dts/kirkwood-openblocks_a6.dts
@@ -0,0 +1,39 @@
1/dts-v1/;
2
3/include/ "kirkwood.dtsi"
4
5/ {
6 model = "Plat'Home OpenBlocksA6";
7 compatible = "plathome,openblocks-a6", "marvell,kirkwood-88f6283", "marvell,kirkwood";
8
9 memory {
10 device_type = "memory";
11 reg = <0x00000000 0x20000000>;
12 };
13
14 chosen {
15 bootargs = "console=ttyS0,115200n8 earlyprintk";
16 };
17
18 ocp@f1000000 {
19 serial@12000 {
20 clock-frequency = <200000000>;
21 status = "ok";
22 };
23
24 serial@12100 {
25 clock-frequency = <200000000>;
26 status = "ok";
27 };
28
29 nand@3000000 {
30 chip-delay = <25>;
31 status = "okay";
32 };
33
34 sata@80000 {
35 nr-ports = <1>;
36 status = "okay";
37 };
38 };
39};
diff --git a/arch/arm/configs/kirkwood_defconfig b/arch/arm/configs/kirkwood_defconfig
index 1128d180eec6..93f3794ba5cb 100644
--- a/arch/arm/configs/kirkwood_defconfig
+++ b/arch/arm/configs/kirkwood_defconfig
@@ -33,6 +33,7 @@ CONFIG_MACH_NETSPACE_V2_DT=y
33CONFIG_MACH_NETSPACE_MAX_V2_DT=y 33CONFIG_MACH_NETSPACE_MAX_V2_DT=y
34CONFIG_MACH_NETSPACE_LITE_V2_DT=y 34CONFIG_MACH_NETSPACE_LITE_V2_DT=y
35CONFIG_MACH_NETSPACE_MINI_V2_DT=y 35CONFIG_MACH_NETSPACE_MINI_V2_DT=y
36CONFIG_MACH_OPENBLOCKS_A6_DT=y
36CONFIG_MACH_TOPKICK_DT=y 37CONFIG_MACH_TOPKICK_DT=y
37CONFIG_MACH_TS219=y 38CONFIG_MACH_TS219=y
38CONFIG_MACH_TS41X=y 39CONFIG_MACH_TS41X=y
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 141b105ce8d9..d018ad4bcc3c 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -173,6 +173,13 @@ config MACH_NETSPACE_MINI_V2_DT
173 Network Space Mini v2 NAS (aka SafeBox), using Flattened 173 Network Space Mini v2 NAS (aka SafeBox), using Flattened
174 Device Tree. 174 Device Tree.
175 175
176config MACH_OPENBLOCKS_A6_DT
177 bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)"
178 select ARCH_KIRKWOOD_DT
179 help
180 Say 'Y' here if you want your kernel to support the
181 Plat'Home OpenBlocks A6 (Flattened Device Tree).
182
176config MACH_TOPKICK_DT 183config MACH_TOPKICK_DT
177 bool "USI Topkick (Flattened Device Tree)" 184 bool "USI Topkick (Flattened Device Tree)"
178 select ARCH_KIRKWOOD_DT 185 select ARCH_KIRKWOOD_DT
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index b5bc33467590..8d2e5a96247c 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -38,4 +38,5 @@ obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
38obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o 38obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
39obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o 39obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
40obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o 40obj-$(CONFIG_MACH_NSA310_DT) += board-nsa310.o
41obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT) += board-openblocks_a6.o
41obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o 42obj-$(CONFIG_MACH_TOPKICK_DT) += board-usi_topkick.o
diff --git a/arch/arm/mach-kirkwood/board-dt.c b/arch/arm/mach-kirkwood/board-dt.c
index 33c0bc1e2f3a..70eb01d96085 100644
--- a/arch/arm/mach-kirkwood/board-dt.c
+++ b/arch/arm/mach-kirkwood/board-dt.c
@@ -106,6 +106,9 @@ static void __init kirkwood_dt_init(void)
106 if (of_machine_is_compatible("mpl,cec4")) 106 if (of_machine_is_compatible("mpl,cec4"))
107 mplcec4_init(); 107 mplcec4_init();
108 108
109 if (of_machine_is_compatible("plathome,openblocks-a6"))
110 openblocks_a6_init();
111
109 if (of_machine_is_compatible("usi,topkick")) 112 if (of_machine_is_compatible("usi,topkick"))
110 usi_topkick_init(); 113 usi_topkick_init();
111 114
@@ -134,6 +137,7 @@ static const char *kirkwood_dt_board_compat[] = {
134 "lacie,netspace_lite_v2", 137 "lacie,netspace_lite_v2",
135 "lacie,netspace_mini_v2", 138 "lacie,netspace_mini_v2",
136 "mpl,cec4", 139 "mpl,cec4",
140 "plathome,openblocks-a6",
137 "usi,topkick", 141 "usi,topkick",
138 "zyxel,nsa310", 142 "zyxel,nsa310",
139 NULL 143 NULL
diff --git a/arch/arm/mach-kirkwood/board-openblocks_a6.c b/arch/arm/mach-kirkwood/board-openblocks_a6.c
new file mode 100644
index 000000000000..e807e8cfdd44
--- /dev/null
+++ b/arch/arm/mach-kirkwood/board-openblocks_a6.c
@@ -0,0 +1,71 @@
1/*
2 * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
3 *
4 * arch/arm/mach-kirkwood/board-openblocks_a6.c
5 *
6 * This file is licensed under the terms of the GNU General Public
7 * License version 2. This program is licensed "as is" without any
8 * warranty of any kind, whether express or implied.
9 */
10
11#include <linux/kernel.h>
12#include <linux/init.h>
13#include <linux/mv643xx_eth.h>
14#include <linux/clk.h>
15#include <linux/clk-private.h>
16#include "common.h"
17#include "mpp.h"
18
19static struct mv643xx_eth_platform_data openblocks_ge00_data = {
20 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
21};
22
23static unsigned int openblocks_a6_mpp_config[] __initdata = {
24 MPP0_NF_IO2,
25 MPP1_NF_IO3,
26 MPP2_NF_IO4,
27 MPP3_NF_IO5,
28 MPP4_NF_IO6,
29 MPP5_NF_IO7,
30 MPP6_SYSRST_OUTn,
31 MPP8_UART1_RTS,
32 MPP9_UART1_CTS,
33 MPP10_UART0_TXD,
34 MPP11_UART0_RXD,
35 MPP13_UART1_TXD,
36 MPP14_UART1_RXD,
37 MPP15_UART0_RTS,
38 MPP16_UART0_CTS,
39 MPP18_NF_IO0,
40 MPP19_NF_IO1,
41 MPP20_GPIO, /* DIP SW0 */
42 MPP21_GPIO, /* DIP SW1 */
43 MPP22_GPIO, /* DIP SW2 */
44 MPP23_GPIO, /* DIP SW3 */
45 MPP24_GPIO, /* GPIO 0 */
46 MPP25_GPIO, /* GPIO 1 */
47 MPP26_GPIO, /* GPIO 2 */
48 MPP27_GPIO, /* GPIO 3 */
49 MPP28_GPIO, /* GPIO 4 */
50 MPP29_GPIO, /* GPIO 5 */
51 MPP30_GPIO, /* GPIO 6 */
52 MPP31_GPIO, /* GPIO 7 */
53 MPP36_TW1_SDA,
54 MPP37_TW1_SCK,
55 MPP38_GPIO, /* INIT */
56 MPP39_GPIO, /* USB OC */
57 MPP41_GPIO, /* LED: Red */
58 MPP42_GPIO, /* LED: Yellow */
59 MPP43_GPIO, /* LED: Green */
60 0,
61};
62
63void __init openblocks_a6_init(void)
64{
65 /*
66 * Basic setup. Needs to be called early.
67 */
68 kirkwood_mpp_conf(openblocks_a6_mpp_config);
69 kirkwood_ehci_init();
70 kirkwood_ge00_init(&openblocks_ge00_data);
71}
diff --git a/arch/arm/mach-kirkwood/common.h b/arch/arm/mach-kirkwood/common.h
index f86fcced0bb1..3e079d1d99d0 100644
--- a/arch/arm/mach-kirkwood/common.h
+++ b/arch/arm/mach-kirkwood/common.h
@@ -134,6 +134,12 @@ void nsa310_init(void);
134static inline void nsa310_init(void) {}; 134static inline void nsa310_init(void) {};
135#endif 135#endif
136 136
137#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT
138void openblocks_a6_init(void);
139#else
140static inline void openblocks_a6_init(void) {};
141#endif
142
137#ifdef CONFIG_MACH_TOPKICK_DT 143#ifdef CONFIG_MACH_TOPKICK_DT
138void usi_topkick_init(void); 144void usi_topkick_init(void);
139#else 145#else