diff options
Diffstat (limited to 'arch/arm/mach-mx5/mx50_arm2_pmic_mc13892.c')
-rw-r--r-- | arch/arm/mach-mx5/mx50_arm2_pmic_mc13892.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/arch/arm/mach-mx5/mx50_arm2_pmic_mc13892.c b/arch/arm/mach-mx5/mx50_arm2_pmic_mc13892.c index 05b8462ade40..d852fb0e016b 100644 --- a/arch/arm/mach-mx5/mx50_arm2_pmic_mc13892.c +++ b/arch/arm/mach-mx5/mx50_arm2_pmic_mc13892.c @@ -27,8 +27,8 @@ #include <linux/regulator/machine.h> #include <linux/mfd/mc13892/core.h> #include <mach/irqs.h> - -#include <mach/iomux-mx50.h> +#include "iomux.h" +#include "mx50_pins.h" /* * Convenience conversion. @@ -74,7 +74,11 @@ #define AUDIO_STBY_MASK (1 << 16) #define SD_STBY_MASK (1 << 19) -#define REG_MODE_0_ALL_MASK (DIG_STBY_MASK | GEN1_STBY_MASK) +/* 0x92412 */ +#define REG_MODE_0_ALL_MASK (GEN1_STBY_MASK |\ + DIG_STBY_MASK | GEN2_STBY_MASK |\ + PLL_STBY_MASK) +/* 0x92082 */ #define REG_MODE_1_ALL_MASK (CAM_STBY_MASK | VIDEO_STBY_MASK |\ AUDIO_STBY_MASK | SD_STBY_MASK) @@ -149,17 +153,11 @@ static struct regulator_init_data sw2_init = { static struct regulator_init_data sw3_init = { .constraints = { .name = "SW3", - .min_uV = mV_to_uV(900), + .min_uV = mV_to_uV(1100), .max_uV = mV_to_uV(1850), .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, .always_on = 1, .boot_on = 1, - .initial_state = PM_SUSPEND_MEM, - .state_mem = { - .uV = 950000, - .mode = REGULATOR_MODE_NORMAL, - .enabled = 1, - }, } }; @@ -330,6 +328,8 @@ static int mc13892_regulator_init(struct mc13892 *mc13892) { unsigned int value, register_mask; printk("Initializing regulators for mx50 arm2.\n"); + sw2_init.constraints.state_mem.uV = 1200000; + sw1_init.constraints.state_mem.uV = 1000000; /* enable standby controll for all regulators */ pmic_read_reg(REG_MODE_0, &value, 0xffffff); @@ -360,6 +360,7 @@ static int mc13892_regulator_init(struct mc13892 *mc13892) (SWMODE_AUTO << SW4MODE_LSB); pmic_write_reg(REG_SW_5, value, 0xffffff); } + /* Enable coin cell charger */ value = BITFVAL(COINCHEN, 1) | BITFVAL(VCOIN, VCOIN_3_0V); register_mask = BITFMASK(COINCHEN) | BITFMASK(VCOIN); @@ -404,7 +405,7 @@ static struct mc13892_platform_data mc13892_plat = { static struct spi_board_info __initdata mc13892_spi_device = { .modalias = "pmic_spi", - .irq = IOMUX_TO_IRQ_V3(114), + .irq = IOMUX_TO_IRQ(MX50_PIN_ECSPI2_MISO), .max_speed_hz = 6000000, /* max spi SCK clock speed in HZ */ .bus_num = 3, .chip_select = 0, |