Commit f17073a3 authored by Nobuhiro Iwamatsu's avatar Nobuhiro Iwamatsu Committed by Jason Cooper

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: default avatarNobuhiro Iwamatsu <iwamatsu@nigauri.org>
Signed-off-by: default avatarJason Cooper <jason@lakedaemon.net>
parent 88bc4a36
......@@ -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 \
......
/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";
};
};
};
......@@ -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
......
......@@ -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
......
......@@ -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
......@@ -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
......
/*
* 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);
}
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment