aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm')
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c51
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-omap3evm.c b/arch/arm/mach-omap2/board-omap3evm.c
index 010454f58e7d..c0336b0cb702 100644
--- a/arch/arm/mach-omap2/board-omap3evm.c
+++ b/arch/arm/mach-omap2/board-omap3evm.c
@@ -28,6 +28,8 @@
28#include <linux/i2c/twl4030.h> 28#include <linux/i2c/twl4030.h>
29#include <linux/usb/otg.h> 29#include <linux/usb/otg.h>
30 30
31#include <linux/regulator/machine.h>
32
31#include <mach/hardware.h> 33#include <mach/hardware.h>
32#include <asm/mach-types.h> 34#include <asm/mach-types.h>
33#include <asm/mach/arch.h> 35#include <asm/mach/arch.h>
@@ -127,6 +129,44 @@ static inline void __init omap3evm_init_smc911x(void)
127 gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ); 129 gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
128} 130}
129 131
132static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
133 .supply = "vmmc",
134};
135
136static struct regulator_consumer_supply omap3evm_vsim_supply = {
137 .supply = "vmmc_aux",
138};
139
140/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
141static struct regulator_init_data omap3evm_vmmc1 = {
142 .constraints = {
143 .min_uV = 1850000,
144 .max_uV = 3150000,
145 .valid_modes_mask = REGULATOR_MODE_NORMAL
146 | REGULATOR_MODE_STANDBY,
147 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
148 | REGULATOR_CHANGE_MODE
149 | REGULATOR_CHANGE_STATUS,
150 },
151 .num_consumer_supplies = 1,
152 .consumer_supplies = &omap3evm_vmmc1_supply,
153};
154
155/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
156static struct regulator_init_data omap3evm_vsim = {
157 .constraints = {
158 .min_uV = 1800000,
159 .max_uV = 3000000,
160 .valid_modes_mask = REGULATOR_MODE_NORMAL
161 | REGULATOR_MODE_STANDBY,
162 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
163 | REGULATOR_CHANGE_MODE
164 | REGULATOR_CHANGE_STATUS,
165 },
166 .num_consumer_supplies = 1,
167 .consumer_supplies = &omap3evm_vsim_supply,
168};
169
130static struct twl4030_hsmmc_info mmc[] = { 170static struct twl4030_hsmmc_info mmc[] = {
131 { 171 {
132 .mmc = 1, 172 .mmc = 1,
@@ -169,6 +209,10 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
169 mmc[0].gpio_cd = gpio + 0; 209 mmc[0].gpio_cd = gpio + 0;
170 twl4030_mmc_init(mmc); 210 twl4030_mmc_init(mmc);
171 211
212 /* link regulators to MMC adapters */
213 omap3evm_vmmc1_supply.dev = mmc[0].dev;
214 omap3evm_vsim_supply.dev = mmc[0].dev;
215
172 /* 216 /*
173 * Most GPIOs are for USB OTG. Some are mostly sent to 217 * Most GPIOs are for USB OTG. Some are mostly sent to
174 * the P2 connector; notably LEDA for the LCD backlight. 218 * the P2 connector; notably LEDA for the LCD backlight.
@@ -261,6 +305,13 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
261 305
262static int __init omap3_evm_i2c_init(void) 306static int __init omap3_evm_i2c_init(void)
263{ 307{
308 /*
309 * REVISIT: These entries can be set in omap3evm_twl_data
310 * after a merge with MFD tree
311 */
312 omap3evm_twldata.vmmc1 = &omap3evm_vmmc1;
313 omap3evm_twldata.vsim = &omap3evm_vsim;
314
264 omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo, 315 omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
265 ARRAY_SIZE(omap3evm_i2c_boardinfo)); 316 ARRAY_SIZE(omap3evm_i2c_boardinfo));
266 omap_register_i2c_bus(2, 400, NULL, 0); 317 omap_register_i2c_bus(2, 400, NULL, 0);