From 767fc1ea92f70b5a97d43b79c146c2bee3eb6e83 Mon Sep 17 00:00:00 2001 From: Jason Cooper Date: Mon, 22 Oct 2012 02:15:35 +0000 Subject: ARM: Kirkwood: new board USI Topkick This is a new kirkwood box made by Universal Scientific Industrial, Inc. The product description is here: http://www.usish.com/english/products_topkick1281p2.php It is very similar to the dreamplug and other plug devices, with the exception that it has room for a 2.5" SATA HDD internally. Signed-off-by: Jason Cooper Acked-by: Andrew Lunn Tested-by: Sebastian Hesselbarth --- arch/arm/mach-kirkwood/board-usi_topkick.c | 82 ++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 arch/arm/mach-kirkwood/board-usi_topkick.c (limited to 'arch/arm/mach-kirkwood/board-usi_topkick.c') diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c new file mode 100644 index 00000000000..e2ec9d891fe --- /dev/null +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c @@ -0,0 +1,82 @@ +/* + * Copyright 2012 (C), Jason Cooper + * + * arch/arm/mach-kirkwood/board-usi_topkick.c + * + * USI Topkick Init for drivers not converted to flattened device tree yet. + * + * 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 +#include +#include +#include +#include +#include "common.h" +#include "mpp.h" + +static struct mv643xx_eth_platform_data topkick_ge00_data = { + .phy_addr = MV643XX_ETH_PHY_ADDR(0), +}; + +static struct mvsdio_platform_data topkick_mvsdio_data = { + /* unfortunately the CD signal has not been connected */ +}; + +/* + * GPIO LED layout + * + * /-SYS_LED(2) + * | + * | /-DISK_LED + * | | + * | | /-WLAN_LED(2) + * | | | + * [SW] [*] [*] [*] + */ + +/* + * Switch positions + * + * /-SW_LEFT + * | + * | /-SW_IDLE + * | | + * | | /-SW_RIGHT + * | | | + * PS [L] [I] [R] LEDS + */ + +static unsigned int topkick_mpp_config[] __initdata = { + MPP21_GPIO, /* DISK_LED (low active) - yellow */ + MPP36_GPIO, /* SATA0 power enable (high active) */ + MPP37_GPIO, /* SYS_LED2 (low active) - red */ + MPP38_GPIO, /* SYS_LED (low active) - blue */ + MPP39_GPIO, /* WLAN_LED (low active) - green */ + MPP43_GPIO, /* SW_LEFT (low active) */ + MPP44_GPIO, /* SW_RIGHT (low active) */ + MPP45_GPIO, /* SW_IDLE (low active) */ + MPP46_GPIO, /* SW_LEFT (low active) */ + MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */ + 0 +}; + +#define TOPKICK_SATA0_PWR_ENABLE 36 + +void __init usi_topkick_init(void) +{ + /* + * Basic setup. Needs to be called early. + */ + kirkwood_mpp_conf(topkick_mpp_config); + + /* SATA0 power enable */ + gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); + + kirkwood_ehci_init(); + kirkwood_ge00_init(&topkick_ge00_data); + kirkwood_sdio_init(&topkick_mvsdio_data); +} -- cgit v1.2.3 From 2a18588c0ce336933be3c99c91e74e21db56a0fe Mon Sep 17 00:00:00 2001 From: Jason Cooper Date: Sat, 24 Nov 2012 03:58:12 +0000 Subject: ARM: Kirkwood: remove kirkwood_ehci_init() from new boards ehci-orion initialization moved to DT. New boards don't need to call kirkwood_ehci_init(). Signed-off-by: Jason Cooper --- arch/arm/mach-kirkwood/board-usi_topkick.c | 1 - 1 file changed, 1 deletion(-) (limited to 'arch/arm/mach-kirkwood/board-usi_topkick.c') diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c index e2ec9d891fe..15e69fcde9f 100644 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c @@ -76,7 +76,6 @@ void __init usi_topkick_init(void) /* SATA0 power enable */ gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); - kirkwood_ehci_init(); kirkwood_ge00_init(&topkick_ge00_data); kirkwood_sdio_init(&topkick_mvsdio_data); } -- cgit v1.2.3 From 8758c885c43859266e45db588b1a5992c049c595 Mon Sep 17 00:00:00 2001 From: Andrew Lunn Date: Sun, 6 Jan 2013 11:10:38 +0100 Subject: ARM: Kirkwood: Use fixed-regulator instead of board gpio call With the change to a DT based pinctrl/gpio driver, using gpio API calls in board-*.c files no longer works, a dereferenced NULL pointer exception occurs instead. By converting the GPIO code into a fixed-regulator which gets probed later once pinctrl/gpio is available, we avoid the exception. Signed-off-by: Andrew Lunn Tested-by: Stefan Peter Signed-off-by: Jason Cooper --- arch/arm/mach-kirkwood/board-usi_topkick.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'arch/arm/mach-kirkwood/board-usi_topkick.c') diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c index 15e69fcde9f..23d2dd1b1b1 100644 --- a/arch/arm/mach-kirkwood/board-usi_topkick.c +++ b/arch/arm/mach-kirkwood/board-usi_topkick.c @@ -64,8 +64,6 @@ static unsigned int topkick_mpp_config[] __initdata = { 0 }; -#define TOPKICK_SATA0_PWR_ENABLE 36 - void __init usi_topkick_init(void) { /* @@ -73,8 +71,6 @@ void __init usi_topkick_init(void) */ kirkwood_mpp_conf(topkick_mpp_config); - /* SATA0 power enable */ - gpio_set_value(TOPKICK_SATA0_PWR_ENABLE, 1); kirkwood_ge00_init(&topkick_ge00_data); kirkwood_sdio_init(&topkick_mvsdio_data); -- cgit v1.2.3