提交 1a7ec135 编写于 作者: M Mike Rapoport 提交者: Tony Lindgren

omap3evm: Initialize vmmc and vmmc_aux regulators

Initialize vmmc and vmmc_aux regulators

Note that the omap3evm_twldata.vmmc1 and omap3evm_twldata.vsim
are set in omap3_evm_i2c_init() to avoid a merge conflict
with the MFD tree. These will be initialized in omap3evm_i2c_boardinfo
as a fix later on.
Signed-off-by: NMike Rapoport <mike@compulab.co.il>
Signed-off-by: NTony Lindgren <tony@atomide.com>
上级 e8e51d29
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
#include <linux/i2c/twl4030.h> #include <linux/i2c/twl4030.h>
#include <linux/usb/otg.h> #include <linux/usb/otg.h>
#include <linux/regulator/machine.h>
#include <mach/hardware.h> #include <mach/hardware.h>
#include <asm/mach-types.h> #include <asm/mach-types.h>
#include <asm/mach/arch.h> #include <asm/mach/arch.h>
...@@ -127,6 +129,44 @@ static inline void __init omap3evm_init_smc911x(void) ...@@ -127,6 +129,44 @@ static inline void __init omap3evm_init_smc911x(void)
gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ); gpio_direction_input(OMAP3EVM_ETHR_GPIO_IRQ);
} }
static struct regulator_consumer_supply omap3evm_vmmc1_supply = {
.supply = "vmmc",
};
static struct regulator_consumer_supply omap3evm_vsim_supply = {
.supply = "vmmc_aux",
};
/* VMMC1 for MMC1 pins CMD, CLK, DAT0..DAT3 (20 mA, plus card == max 220 mA) */
static struct regulator_init_data omap3evm_vmmc1 = {
.constraints = {
.min_uV = 1850000,
.max_uV = 3150000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &omap3evm_vmmc1_supply,
};
/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
static struct regulator_init_data omap3evm_vsim = {
.constraints = {
.min_uV = 1800000,
.max_uV = 3000000,
.valid_modes_mask = REGULATOR_MODE_NORMAL
| REGULATOR_MODE_STANDBY,
.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
| REGULATOR_CHANGE_MODE
| REGULATOR_CHANGE_STATUS,
},
.num_consumer_supplies = 1,
.consumer_supplies = &omap3evm_vsim_supply,
};
static struct twl4030_hsmmc_info mmc[] = { static struct twl4030_hsmmc_info mmc[] = {
{ {
.mmc = 1, .mmc = 1,
...@@ -169,6 +209,10 @@ static int omap3evm_twl_gpio_setup(struct device *dev, ...@@ -169,6 +209,10 @@ static int omap3evm_twl_gpio_setup(struct device *dev,
mmc[0].gpio_cd = gpio + 0; mmc[0].gpio_cd = gpio + 0;
twl4030_mmc_init(mmc); twl4030_mmc_init(mmc);
/* link regulators to MMC adapters */
omap3evm_vmmc1_supply.dev = mmc[0].dev;
omap3evm_vsim_supply.dev = mmc[0].dev;
/* /*
* Most GPIOs are for USB OTG. Some are mostly sent to * Most GPIOs are for USB OTG. Some are mostly sent to
* the P2 connector; notably LEDA for the LCD backlight. * the P2 connector; notably LEDA for the LCD backlight.
...@@ -261,6 +305,13 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = { ...@@ -261,6 +305,13 @@ static struct i2c_board_info __initdata omap3evm_i2c_boardinfo[] = {
static int __init omap3_evm_i2c_init(void) static int __init omap3_evm_i2c_init(void)
{ {
/*
* REVISIT: These entries can be set in omap3evm_twl_data
* after a merge with MFD tree
*/
omap3evm_twldata.vmmc1 = &omap3evm_vmmc1;
omap3evm_twldata.vsim = &omap3evm_vsim;
omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo, omap_register_i2c_bus(1, 2600, omap3evm_i2c_boardinfo,
ARRAY_SIZE(omap3evm_i2c_boardinfo)); ARRAY_SIZE(omap3evm_i2c_boardinfo));
omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(2, 400, NULL, 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册