2 * linux/arch/arm/mach-mmp/jasper.c
4 * Support for the Marvell Jasper Development Platform.
6 * Copyright (C) 2009-2010 Marvell International Ltd.
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.
13 #include <linux/init.h>
14 #include <linux/kernel.h>
15 #include <linux/platform_device.h>
17 #include <linux/regulator/machine.h>
18 #include <linux/regulator/max8649.h>
19 #include <linux/mfd/max8925.h>
20 #include <linux/interrupt.h>
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>
30 #define JASPER_NR_IRQS (IRQ_BOARD_START + 48)
32 static unsigned long jasper_pin_config[] __initdata = {
68 PMIC_PMIC_INT | MFP_LPM_EDGE_FALL,
101 static struct regulator_consumer_supply max8649_supply[] = {
102 REGULATOR_SUPPLY("vcc_core", NULL),
105 static struct regulator_init_data max8649_init_data = {
107 .name = "vcc_core range",
112 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
114 .num_consumer_supplies = 1,
115 .consumer_supplies = &max8649_supply[0],
118 static struct max8649_platform_data jasper_max8649_info = {
119 .mode = 2, /* VID1 = 1, VID0 = 0 */
121 .ramp_timing = MAX8649_RAMP_32MV,
122 .regulator = &max8649_init_data,
125 static struct max8925_backlight_pdata jasper_backlight_data = {
129 static struct max8925_power_pdata jasper_power_data = {
130 .batt_detect = 0, /* can't detect battery by ID pin */
131 .topoff_threshold = MAX8925_TOPOFF_THR_10PER,
132 .fast_charge = MAX8925_FCHG_1000MA,
135 static struct max8925_platform_data jasper_max8925_info = {
136 .backlight = &jasper_backlight_data,
137 .power = &jasper_power_data,
138 .irq_base = IRQ_BOARD_START,
141 static struct i2c_board_info jasper_twsi1_info[] = {
145 .platform_data = &jasper_max8649_info,
150 .irq = IRQ_MMP2_PMIC,
151 .platform_data = &jasper_max8925_info,
155 static struct sdhci_pxa_platdata mmp2_sdh_platdata_mmc0 = {
156 .clk_delay_cycles = 0x1f,
159 static void __init jasper_init(void)
161 mfp_config(ARRAY_AND_SIZE(jasper_pin_config));
163 /* on-chip devices */
166 mmp2_add_twsi(1, NULL, ARRAY_AND_SIZE(jasper_twsi1_info));
167 mmp2_add_sdhost(0, &mmp2_sdh_platdata_mmc0); /* SD/MMC */
169 regulator_has_full_constraints();
172 MACHINE_START(MARVELL_JASPER, "Jasper Development Platform")
173 .map_io = mmp_map_io,
174 .nr_irqs = JASPER_NR_IRQS,
175 .init_irq = mmp2_init_irq,
176 .timer = &mmp2_timer,
177 .init_machine = jasper_init,
178 .restart = mmp_restart,