aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSiddarth Gore <gores@marvell.com>2010-03-22 05:28:20 -0400
committerNicolas Pitre <nico@fluxnic.net>2010-05-03 16:34:47 -0400
commitd8f089d2ad35861c432618900fa08ca70c168d76 (patch)
tree1717d278dfdbad41b181a9ddd2457155e2e2d937
parent66f41d4c5c8a5deed66fdcc84509376c9a0bf9d8 (diff)
[ARM] Kirkwood: Marvell GuruPlug support
GuruPlug Standard: 1 Gb Ethernet, 2 USB 2.0 GuruPlug Plus: 2 Gb Ethernet, 2 USB 2.0, 1 eSATA, 1 uSD slot References: http://www.globalscaletechnologies.com/t-guruplugdetails.aspx http://plugcomputer.org This patch is for GuruPlug Plus, but it supports Standard version as well. Signed-off-by: Siddarth Gore <gores@marvell.com> Signed-off-by: Nicolas Pitre <nico@marvell.com>
-rw-r--r--arch/arm/mach-kirkwood/Kconfig6
-rw-r--r--arch/arm/mach-kirkwood/Makefile1
-rw-r--r--arch/arm/mach-kirkwood/guruplug-setup.c131
3 files changed, 138 insertions, 0 deletions
diff --git a/arch/arm/mach-kirkwood/Kconfig b/arch/arm/mach-kirkwood/Kconfig
index 17879a876be6..05a85526d6d5 100644
--- a/arch/arm/mach-kirkwood/Kconfig
+++ b/arch/arm/mach-kirkwood/Kconfig
@@ -38,6 +38,12 @@ config MACH_ESATA_SHEEVAPLUG
38 Say 'Y' here if you want your kernel to support the 38 Say 'Y' here if you want your kernel to support the
39 Marvell eSATA SheevaPlug Reference Board. 39 Marvell eSATA SheevaPlug Reference Board.
40 40
41config MACH_GURUPLUG
42 bool "Marvell GuruPlug Reference Board"
43 help
44 Say 'Y' here if you want your kernel to support the
45 Marvell GuruPlug Reference Board.
46
41config MACH_TS219 47config MACH_TS219
42 bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS" 48 bool "QNAP TS-110, TS-119, TS-210, TS-219 and TS-219P Turbo NAS"
43 help 49 help
diff --git a/arch/arm/mach-kirkwood/Makefile b/arch/arm/mach-kirkwood/Makefile
index a5530e36ba3e..85b3a39a6204 100644
--- a/arch/arm/mach-kirkwood/Makefile
+++ b/arch/arm/mach-kirkwood/Makefile
@@ -6,6 +6,7 @@ obj-$(CONFIG_MACH_RD88F6281) += rd88f6281-setup.o
6obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o 6obj-$(CONFIG_MACH_MV88F6281GTW_GE) += mv88f6281gtw_ge-setup.o
7obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o 7obj-$(CONFIG_MACH_SHEEVAPLUG) += sheevaplug-setup.o
8obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o 8obj-$(CONFIG_MACH_ESATA_SHEEVAPLUG) += sheevaplug-setup.o
9obj-$(CONFIG_MACH_GURUPLUG) += guruplug-setup.o
9obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o 10obj-$(CONFIG_MACH_TS219) += ts219-setup.o tsx1x-common.o
10obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o 11obj-$(CONFIG_MACH_TS41X) += ts41x-setup.o tsx1x-common.o
11obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o 12obj-$(CONFIG_MACH_OPENRD) += openrd-setup.o
diff --git a/arch/arm/mach-kirkwood/guruplug-setup.c b/arch/arm/mach-kirkwood/guruplug-setup.c
new file mode 100644
index 000000000000..54d07c89d4ff
--- /dev/null
+++ b/arch/arm/mach-kirkwood/guruplug-setup.c
@@ -0,0 +1,131 @@
1/*
2 * arch/arm/mach-kirkwood/guruplug-setup.c
3 *
4 * Marvell GuruPlug Reference Board Setup
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/platform_device.h>
14#include <linux/mtd/partitions.h>
15#include <linux/ata_platform.h>
16#include <linux/mv643xx_eth.h>
17#include <linux/gpio.h>
18#include <linux/leds.h>
19#include <asm/mach-types.h>
20#include <asm/mach/arch.h>
21#include <mach/kirkwood.h>
22#include <plat/mvsdio.h>
23#include "common.h"
24#include "mpp.h"
25
26static struct mtd_partition guruplug_nand_parts[] = {
27 {
28 .name = "u-boot",
29 .offset = 0,
30 .size = SZ_1M
31 }, {
32 .name = "uImage",
33 .offset = MTDPART_OFS_NXTBLK,
34 .size = SZ_4M
35 }, {
36 .name = "root",
37 .offset = MTDPART_OFS_NXTBLK,
38 .size = MTDPART_SIZ_FULL
39 },
40};
41
42static struct mv643xx_eth_platform_data guruplug_ge00_data = {
43 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
44};
45
46static struct mv643xx_eth_platform_data guruplug_ge01_data = {
47 .phy_addr = MV643XX_ETH_PHY_ADDR(1),
48};
49
50static struct mv_sata_platform_data guruplug_sata_data = {
51 .n_ports = 1,
52};
53
54static struct mvsdio_platform_data guruplug_mvsdio_data = {
55 /* unfortunately the CD signal has not been connected */
56};
57
58static struct gpio_led guruplug_led_pins[] = {
59 {
60 .name = "guruplug:red:health",
61 .gpio = 46,
62 .active_low = 1,
63 },
64 {
65 .name = "guruplug:green:health",
66 .gpio = 47,
67 .active_low = 1,
68 },
69 {
70 .name = "guruplug:red:wmode",
71 .gpio = 48,
72 .active_low = 1,
73 },
74 {
75 .name = "guruplug:green:wmode",
76 .gpio = 49,
77 .active_low = 1,
78 },
79};
80
81static struct gpio_led_platform_data guruplug_led_data = {
82 .leds = guruplug_led_pins,
83 .num_leds = ARRAY_SIZE(guruplug_led_pins),
84};
85
86static struct platform_device guruplug_leds = {
87 .name = "leds-gpio",
88 .id = -1,
89 .dev = {
90 .platform_data = &guruplug_led_data,
91 }
92};
93
94static unsigned int guruplug_mpp_config[] __initdata = {
95 MPP46_GPIO, /* M_RLED */
96 MPP47_GPIO, /* M_GLED */
97 MPP48_GPIO, /* B_RLED */
98 MPP49_GPIO, /* B_GLED */
99 0
100};
101
102static void __init guruplug_init(void)
103{
104 /*
105 * Basic setup. Needs to be called early.
106 */
107 kirkwood_init();
108 kirkwood_mpp_conf(guruplug_mpp_config);
109
110 kirkwood_uart0_init();
111 kirkwood_nand_init(ARRAY_AND_SIZE(guruplug_nand_parts), 25);
112
113 kirkwood_ehci_init();
114 kirkwood_ge00_init(&guruplug_ge00_data);
115 kirkwood_ge01_init(&guruplug_ge01_data);
116 kirkwood_sata_init(&guruplug_sata_data);
117 kirkwood_sdio_init(&guruplug_mvsdio_data);
118
119 platform_device_register(&guruplug_leds);
120}
121
122MACHINE_START(GURUPLUG, "Marvell GuruPlug Reference Board")
123 /* Maintainer: Siddarth Gore <gores@marvell.com> */
124 .phys_io = KIRKWOOD_REGS_PHYS_BASE,
125 .io_pg_offst = ((KIRKWOOD_REGS_VIRT_BASE) >> 18) & 0xfffc,
126 .boot_params = 0x00000100,
127 .init_machine = guruplug_init,
128 .map_io = kirkwood_map_io,
129 .init_irq = kirkwood_init_irq,
130 .timer = &kirkwood_timer,
131MACHINE_END