ARM: kirkwood: Add Plat'Home OpenBlocks A6 support
authorNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Tue, 13 Nov 2012 07:43:09 +0000 (16:43 +0900)
committerJason Cooper <jason@lakedaemon.net>
Thu, 22 Nov 2012 07:01:51 +0000 (07:01 +0000)
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>
arch/arm/boot/dts/Makefile
arch/arm/boot/dts/kirkwood-openblocks_a6.dts [new file with mode: 0644]
arch/arm/configs/kirkwood_defconfig
arch/arm/mach-kirkwood/Kconfig
arch/arm/mach-kirkwood/Makefile
arch/arm/mach-kirkwood/board-dt.c
arch/arm/mach-kirkwood/board-openblocks_a6.c [new file with mode: 0644]
arch/arm/mach-kirkwood/common.h

index f1ba69c2496a27d7a225770835a6ea9115dac626..94561b5004298b1f8a668a18d3a5f12f755c285b 100644 (file)
@@ -48,7 +48,8 @@ dtb-$(CONFIG_ARCH_KIRKWOOD) += kirkwood-dns320.dtb \
        kirkwood-nsa310.dtb \
        kirkwood-topkick.dtb \
        kirkwood-ts219-6281.dtb \
-       kirkwood-ts219-6282.dtb
+       kirkwood-ts219-6282.dtb \
+       kirkwood-openblocks_a6.dtb
 dtb-$(CONFIG_ARCH_MSM) += msm8660-surf.dtb \
        msm8960-cdp.dtb
 dtb-$(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 (file)
index 0000000..9a2606c
--- /dev/null
@@ -0,0 +1,39 @@
+/dts-v1/;
+
+/include/ "kirkwood.dtsi"
+
+/ {
+       model = "Plat'Home OpenBlocksA6";
+       compatible = "plathome,openblocks-a6", "marvell,kirkwood-88f6283", "marvell,kirkwood";
+
+       memory {
+               device_type = "memory";
+               reg = <0x00000000 0x20000000>;
+       };
+
+       chosen {
+               bootargs = "console=ttyS0,115200n8 earlyprintk";
+       };
+
+       ocp@f1000000 {
+               serial@12000 {
+                       clock-frequency = <200000000>;
+                       status = "ok";
+               };
+
+               serial@12100 {
+                       clock-frequency = <200000000>;
+                       status = "ok";
+               };
+
+               nand@3000000 {
+                       chip-delay = <25>;
+                       status = "okay";
+               };
+
+               sata@80000 {
+                       nr-ports = <1>;
+                       status = "okay";
+               };
+       };
+};
index 1128d180eec67cbb132afaafe29bfb9fef0335dd..93f3794ba5cb8d66c0db6cb1ba393ed2710f1552 100644 (file)
@@ -33,6 +33,7 @@ CONFIG_MACH_NETSPACE_V2_DT=y
 CONFIG_MACH_NETSPACE_MAX_V2_DT=y
 CONFIG_MACH_NETSPACE_LITE_V2_DT=y
 CONFIG_MACH_NETSPACE_MINI_V2_DT=y
+CONFIG_MACH_OPENBLOCKS_A6_DT=y
 CONFIG_MACH_TOPKICK_DT=y
 CONFIG_MACH_TS219=y
 CONFIG_MACH_TS41X=y
index 141b105ce8d9c290c8bdf6e5bd20829ee0fe2ff2..d018ad4bcc3cb0728ce2be3ae01a8802b7dc1189 100644 (file)
@@ -173,6 +173,13 @@ config MACH_NETSPACE_MINI_V2_DT
          Network Space Mini v2 NAS (aka SafeBox), using Flattened
          Device Tree.
 
+config MACH_OPENBLOCKS_A6_DT
+       bool "Plat'Home OpenBlocks A6 (Flattened Device Tree)"
+       select ARCH_KIRKWOOD_DT
+       help
+         Say 'Y' here if you want your kernel to support the
+         Plat'Home OpenBlocks A6 (Flattened Device Tree).
+
 config MACH_TOPKICK_DT
        bool "USI Topkick (Flattened Device Tree)"
        select ARCH_KIRKWOOD_DT
index b5bc33467590bfcabba6fd10eee94600ad92ac56..8d2e5a96247cb05305394d2ae94c01369f84a832 100644 (file)
@@ -38,4 +38,5 @@ obj-$(CONFIG_MACH_NETSPACE_MAX_V2_DT) += board-ns2.o
 obj-$(CONFIG_MACH_NETSPACE_LITE_V2_DT) += board-ns2.o
 obj-$(CONFIG_MACH_NETSPACE_MINI_V2_DT) += board-ns2.o
 obj-$(CONFIG_MACH_NSA310_DT)           += board-nsa310.o
+obj-$(CONFIG_MACH_OPENBLOCKS_A6_DT)    += board-openblocks_a6.o
 obj-$(CONFIG_MACH_TOPKICK_DT)          += board-usi_topkick.o
index 33c0bc1e2f3aa81aee94a7481477407f1f457433..70eb01d96085981d2c0cae2834da22fe08fe105d 100644 (file)
@@ -106,6 +106,9 @@ static void __init kirkwood_dt_init(void)
        if (of_machine_is_compatible("mpl,cec4"))
                mplcec4_init();
 
+       if (of_machine_is_compatible("plathome,openblocks-a6"))
+               openblocks_a6_init();
+
        if (of_machine_is_compatible("usi,topkick"))
                usi_topkick_init();
 
@@ -134,6 +137,7 @@ static const char *kirkwood_dt_board_compat[] = {
        "lacie,netspace_lite_v2",
        "lacie,netspace_mini_v2",
        "mpl,cec4",
+       "plathome,openblocks-a6",
        "usi,topkick",
        "zyxel,nsa310",
        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 (file)
index 0000000..e807e8c
--- /dev/null
@@ -0,0 +1,71 @@
+/*
+ * Copyright 2012 Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
+ *
+ * arch/arm/mach-kirkwood/board-openblocks_a6.c
+ *
+ * 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/mv643xx_eth.h>
+#include <linux/clk.h>
+#include <linux/clk-private.h>
+#include "common.h"
+#include "mpp.h"
+
+static struct mv643xx_eth_platform_data openblocks_ge00_data = {
+       .phy_addr       = MV643XX_ETH_PHY_ADDR(0),
+};
+
+static unsigned int openblocks_a6_mpp_config[] __initdata = {
+       MPP0_NF_IO2,
+       MPP1_NF_IO3,
+       MPP2_NF_IO4,
+       MPP3_NF_IO5,
+       MPP4_NF_IO6,
+       MPP5_NF_IO7,
+       MPP6_SYSRST_OUTn,
+       MPP8_UART1_RTS,
+       MPP9_UART1_CTS,
+       MPP10_UART0_TXD,
+       MPP11_UART0_RXD,
+       MPP13_UART1_TXD,
+       MPP14_UART1_RXD,
+       MPP15_UART0_RTS,
+       MPP16_UART0_CTS,
+       MPP18_NF_IO0,
+       MPP19_NF_IO1,
+       MPP20_GPIO, /* DIP SW0 */
+       MPP21_GPIO, /* DIP SW1 */
+       MPP22_GPIO, /* DIP SW2 */
+       MPP23_GPIO, /* DIP SW3 */
+       MPP24_GPIO, /* GPIO 0 */
+       MPP25_GPIO, /* GPIO 1 */
+       MPP26_GPIO, /* GPIO 2 */
+       MPP27_GPIO, /* GPIO 3 */
+       MPP28_GPIO, /* GPIO 4 */
+       MPP29_GPIO, /* GPIO 5 */
+       MPP30_GPIO, /* GPIO 6 */
+       MPP31_GPIO, /* GPIO 7 */
+       MPP36_TW1_SDA,
+       MPP37_TW1_SCK,
+       MPP38_GPIO, /* INIT */
+       MPP39_GPIO, /* USB OC */
+       MPP41_GPIO, /* LED: Red */
+       MPP42_GPIO, /* LED: Yellow */
+       MPP43_GPIO, /* LED: Green */
+       0,
+};
+
+void __init openblocks_a6_init(void)
+{
+       /*
+        * Basic setup. Needs to be called early.
+        */
+       kirkwood_mpp_conf(openblocks_a6_mpp_config);
+       kirkwood_ehci_init();
+       kirkwood_ge00_init(&openblocks_ge00_data);
+}
index f86fcced0bb1db8254d41a35730e5aa0c610a421..3e079d1d99d02983417797f1c67fc9ec53f0e42f 100644 (file)
@@ -134,6 +134,12 @@ void nsa310_init(void);
 static inline void nsa310_init(void) {};
 #endif
 
+#ifdef CONFIG_MACH_OPENBLOCKS_A6_DT
+void openblocks_a6_init(void);
+#else
+static inline void openblocks_a6_init(void) {};
+#endif
+
 #ifdef CONFIG_MACH_TOPKICK_DT
 void usi_topkick_init(void);
 #else
This page took 0.029298 seconds and 5 git commands to generate.