aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-mmp
diff options
context:
space:
mode:
authorHaojian Zhuang <haojian.zhuang@marvell.com>2010-11-24 22:33:13 -0500
committerEric Miao <eric.y.miao@gmail.com>2010-12-16 01:31:18 -0500
commit13dee960f37b3769baa0eae9d1de4a7ca9a2e999 (patch)
tree9ea0bb2ca8f20863d4855109f4e17c4b3ed25dc6 /arch/arm/mach-mmp
parent7bdba92dcaefdc69c339db9e23861e5e21d3a2c4 (diff)
ARM: mmp: append brownstone support
Signed-off-by: Haojian Zhuang <haojian.zhuang@marvell.com> Signed-off-by: Eric Miao <eric.y.miao@gmail.com>
Diffstat (limited to 'arch/arm/mach-mmp')
-rw-r--r--arch/arm/mach-mmp/Kconfig11
-rw-r--r--arch/arm/mach-mmp/Makefile1
-rw-r--r--arch/arm/mach-mmp/brownstone.c166
3 files changed, 178 insertions, 0 deletions
diff --git a/arch/arm/mach-mmp/Kconfig b/arch/arm/mach-mmp/Kconfig
index 0711d3b620ad..95e7c4abb27f 100644
--- a/arch/arm/mach-mmp/Kconfig
+++ b/arch/arm/mach-mmp/Kconfig
@@ -37,6 +37,17 @@ config MACH_TTC_DKB
37 Say 'Y' here if you want to support the Marvell PXA910-based 37 Say 'Y' here if you want to support the Marvell PXA910-based
38 TTC_DKB Development Board. 38 TTC_DKB Development Board.
39 39
40config MACH_BROWNSTONE
41 bool "Marvell's Brownstone Development Platform"
42 depends on !CPU_MOHAWK
43 select CPU_MMP2
44 help
45 Say 'Y' here if you want to support the Marvell MMP2-based
46 Brown Development Platform.
47 MMP2-based board can't be co-existed with PXA168-based &
48 PXA910-based development board. Since MMP2 is compatible to
49 ARMv7 architecture.
50
40config MACH_FLINT 51config MACH_FLINT
41 bool "Marvell's Flint Development Platform" 52 bool "Marvell's Flint Development Platform"
42 select CPU_MMP2 53 select CPU_MMP2
diff --git a/arch/arm/mach-mmp/Makefile b/arch/arm/mach-mmp/Makefile
index 751cdbf733c8..5c68382141af 100644
--- a/arch/arm/mach-mmp/Makefile
+++ b/arch/arm/mach-mmp/Makefile
@@ -15,6 +15,7 @@ obj-$(CONFIG_MACH_ZYLONITE2) += aspenite.o
15obj-$(CONFIG_MACH_AVENGERS_LITE)+= avengers_lite.o 15obj-$(CONFIG_MACH_AVENGERS_LITE)+= avengers_lite.o
16obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o 16obj-$(CONFIG_MACH_TAVOREVB) += tavorevb.o
17obj-$(CONFIG_MACH_TTC_DKB) += ttc_dkb.o 17obj-$(CONFIG_MACH_TTC_DKB) += ttc_dkb.o
18obj-$(CONFIG_MACH_BROWNSTONE) += brownstone.o
18obj-$(CONFIG_MACH_FLINT) += flint.o 19obj-$(CONFIG_MACH_FLINT) += flint.o
19obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o 20obj-$(CONFIG_MACH_MARVELL_JASPER) += jasper.o
20obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o 21obj-$(CONFIG_MACH_TETON_BGA) += teton_bga.o
diff --git a/arch/arm/mach-mmp/brownstone.c b/arch/arm/mach-mmp/brownstone.c
new file mode 100644
index 000000000000..635c4004ebe1
--- /dev/null
+++ b/arch/arm/mach-mmp/brownstone.c
@@ -0,0 +1,166 @@
1/*
2 * linux/arch/arm/mach-mmp/brownstone.c
3 *
4 * Support for the Marvell Brownstone Development Platform.
5 *
6 * Copyright (C) 2009-2010 Marvell International Ltd.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License version 2 as
10 * publishhed by the Free Software Foundation.
11 */
12
13#include <linux/init.h>
14#include <linux/kernel.h>
15#include <linux/platform_device.h>
16#include <linux/io.h>
17#include <linux/gpio.h>
18#include <linux/regulator/machine.h>
19#include <linux/regulator/max8649.h>
20#include <linux/mfd/max8925.h>
21
22#include <asm/mach-types.h>
23#include <asm/mach/arch.h>
24#include <mach/addr-map.h>
25#include <mach/mfp-mmp2.h>
26#include <mach/mmp2.h>
27#include <mach/irqs.h>
28
29#include "common.h"
30
31#define BROWNSTONE_NR_IRQS (IRQ_BOARD_START + 40)
32
33static unsigned long brownstone_pin_config[] __initdata = {
34 /* UART1 */
35 GPIO29_UART1_RXD,
36 GPIO30_UART1_TXD,
37
38 /* UART3 */
39 GPIO51_UART3_RXD,
40 GPIO52_UART3_TXD,
41
42 /* DFI */
43 GPIO168_DFI_D0,
44 GPIO167_DFI_D1,
45 GPIO166_DFI_D2,
46 GPIO165_DFI_D3,
47 GPIO107_DFI_D4,
48 GPIO106_DFI_D5,
49 GPIO105_DFI_D6,
50 GPIO104_DFI_D7,
51 GPIO111_DFI_D8,
52 GPIO164_DFI_D9,
53 GPIO163_DFI_D10,
54 GPIO162_DFI_D11,
55 GPIO161_DFI_D12,
56 GPIO110_DFI_D13,
57 GPIO109_DFI_D14,
58 GPIO108_DFI_D15,
59 GPIO143_ND_nCS0,
60 GPIO144_ND_nCS1,
61 GPIO147_ND_nWE,
62 GPIO148_ND_nRE,
63 GPIO150_ND_ALE,
64 GPIO149_ND_CLE,
65 GPIO112_ND_RDY0,
66 GPIO160_ND_RDY1,
67
68 /* PMIC */
69 PMIC_PMIC_INT | MFP_LPM_EDGE_FALL,
70
71 /* MMC0 */
72 GPIO131_MMC1_DAT3 | MFP_PULL_HIGH,
73 GPIO132_MMC1_DAT2 | MFP_PULL_HIGH,
74 GPIO133_MMC1_DAT1 | MFP_PULL_HIGH,
75 GPIO134_MMC1_DAT0 | MFP_PULL_HIGH,
76 GPIO136_MMC1_CMD | MFP_PULL_HIGH,
77 GPIO139_MMC1_CLK,
78 GPIO140_MMC1_CD | MFP_PULL_LOW,
79 GPIO141_MMC1_WP | MFP_PULL_LOW,
80
81 /* MMC1 */
82 GPIO37_MMC2_DAT3 | MFP_PULL_HIGH,
83 GPIO38_MMC2_DAT2 | MFP_PULL_HIGH,
84 GPIO39_MMC2_DAT1 | MFP_PULL_HIGH,
85 GPIO40_MMC2_DAT0 | MFP_PULL_HIGH,
86 GPIO41_MMC2_CMD | MFP_PULL_HIGH,
87 GPIO42_MMC2_CLK,
88
89 /* MMC2 */
90 GPIO165_MMC3_DAT7 | MFP_PULL_HIGH,
91 GPIO162_MMC3_DAT6 | MFP_PULL_HIGH,
92 GPIO166_MMC3_DAT5 | MFP_PULL_HIGH,
93 GPIO163_MMC3_DAT4 | MFP_PULL_HIGH,
94 GPIO167_MMC3_DAT3 | MFP_PULL_HIGH,
95 GPIO164_MMC3_DAT2 | MFP_PULL_HIGH,
96 GPIO168_MMC3_DAT1 | MFP_PULL_HIGH,
97 GPIO111_MMC3_DAT0 | MFP_PULL_HIGH,
98 GPIO112_MMC3_CMD | MFP_PULL_HIGH,
99 GPIO151_MMC3_CLK,
100};
101
102static struct regulator_consumer_supply max8649_supply[] = {
103 REGULATOR_SUPPLY("vcc_core", NULL),
104};
105
106static struct regulator_init_data max8649_init_data = {
107 .constraints = {
108 .name = "vcc_core range",
109 .min_uV = 1150000,
110 .max_uV = 1280000,
111 .always_on = 1,
112 .boot_on = 1,
113 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
114 },
115 .num_consumer_supplies = 1,
116 .consumer_supplies = &max8649_supply[0],
117};
118
119static struct max8649_platform_data brownstone_max8649_info = {
120 .mode = 2, /* VID1 = 1, VID0 = 0 */
121 .extclk = 0,
122 .ramp_timing = MAX8649_RAMP_32MV,
123 .regulator = &max8649_init_data,
124};
125
126static struct max8925_platform_data brownstone_max8925_info = {
127 .irq_base = IRQ_BOARD_START,
128};
129
130static struct i2c_board_info brownstone_twsi1_info[] = {
131 [0] = {
132 .type = "max8649",
133 .addr = 0x60,
134 .platform_data = &brownstone_max8649_info,
135 },
136 [1] = {
137 .type = "max8925",
138 .addr = 0x3c,
139 .irq = IRQ_MMP2_PMIC,
140 .platform_data = &brownstone_max8925_info,
141 },
142};
143
144static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc0 = {
145 .max_speed = 25000000,
146};
147
148static void __init brownstone_init(void)
149{
150 mfp_config(ARRAY_AND_SIZE(brownstone_pin_config));
151
152 /* on-chip devices */
153 mmp2_add_uart(1);
154 mmp2_add_uart(3);
155 mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(brownstone_twsi1_info));
156 mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
157}
158
159MACHINE_START(BROWNSTONE, "Brownstone Development Platform")
160 /* Maintainer: Haojian Zhuang <haojian.zhuang@marvell.com> */
161 .map_io = mmp_map_io,
162 .nr_irqs = BROWNSTONE_NR_IRQS,
163 .init_irq = mmp2_init_irq,
164 .timer = &mmp2_timer,
165 .init_machine = brownstone_init,
166MACHINE_END