diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2011-06-22 08:25:24 -0400 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2011-07-07 03:07:30 -0400 |
commit | aec250dc123be14805d51d29d19bf9c3abf733fa (patch) | |
tree | 5ff79c45a528dbd279b480975199b1d7174528a1 /arch/arm/mach-imx | |
parent | 581f84e24b45ab871ae5f15f9290261c7226ffa9 (diff) |
ARM: mach-imx/mx27_3ds: Fix regulator support
Fix the 2.8V (VMMC1) and 1.8V (VGEN) voltage generation on mx27_3ds.
Also configure the IOMUX for the PMIC interrupt pin and for the CSPI chip select that is connected
to the MC13783 PMIC.
In order to get the voltage for the LCD (2.8V and 1.8V) it is also necessary to turn on GPO1 and GPO3
supplies because they are connected to switches that enable these two voltages.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/mach-imx')
-rw-r--r-- | arch/arm/mach-imx/mach-mx27_3ds.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/arch/arm/mach-imx/mach-mx27_3ds.c b/arch/arm/mach-imx/mach-mx27_3ds.c index c60cd3332e81..e7965ec176fc 100644 --- a/arch/arm/mach-imx/mach-mx27_3ds.c +++ b/arch/arm/mach-imx/mach-mx27_3ds.c | |||
@@ -46,6 +46,7 @@ | |||
46 | #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) | 46 | #define OTG_PHY_RESET_GPIO IMX_GPIO_NR(2, 23) |
47 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) | 47 | #define SPI2_SS0 IMX_GPIO_NR(4, 21) |
48 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) | 48 | #define EXPIO_PARENT_INT gpio_to_irq(IMX_GPIO_NR(3, 28)) |
49 | #define PMIC_INT IMX_GPIO_NR(3, 14) | ||
49 | 50 | ||
50 | static const int mx27pdk_pins[] __initconst = { | 51 | static const int mx27pdk_pins[] __initconst = { |
51 | /* UART1 */ | 52 | /* UART1 */ |
@@ -98,9 +99,12 @@ static const int mx27pdk_pins[] __initconst = { | |||
98 | PD22_PF_CSPI2_SCLK, | 99 | PD22_PF_CSPI2_SCLK, |
99 | PD23_PF_CSPI2_MISO, | 100 | PD23_PF_CSPI2_MISO, |
100 | PD24_PF_CSPI2_MOSI, | 101 | PD24_PF_CSPI2_MOSI, |
102 | SPI2_SS0 | GPIO_GPIO | GPIO_OUT, | ||
101 | /* I2C1 */ | 103 | /* I2C1 */ |
102 | PD17_PF_I2C_DATA, | 104 | PD17_PF_I2C_DATA, |
103 | PD18_PF_I2C_CLK, | 105 | PD18_PF_I2C_CLK, |
106 | /* PMIC INT */ | ||
107 | PMIC_INT | GPIO_GPIO | GPIO_IN, | ||
104 | }; | 108 | }; |
105 | 109 | ||
106 | static const struct imxuart_platform_data uart_pdata __initconst = { | 110 | static const struct imxuart_platform_data uart_pdata __initconst = { |
@@ -193,6 +197,13 @@ static int __init mx27_3ds_otg_mode(char *options) | |||
193 | __setup("otg_mode=", mx27_3ds_otg_mode); | 197 | __setup("otg_mode=", mx27_3ds_otg_mode); |
194 | 198 | ||
195 | /* Regulators */ | 199 | /* Regulators */ |
200 | static struct regulator_init_data gpo_init = { | ||
201 | .constraints = { | ||
202 | .boot_on = 1, | ||
203 | .always_on = 1, | ||
204 | } | ||
205 | }; | ||
206 | |||
196 | static struct regulator_consumer_supply vmmc1_consumers[] = { | 207 | static struct regulator_consumer_supply vmmc1_consumers[] = { |
197 | REGULATOR_SUPPLY("lcd_2v8", NULL), | 208 | REGULATOR_SUPPLY("lcd_2v8", NULL), |
198 | }; | 209 | }; |
@@ -201,7 +212,9 @@ static struct regulator_init_data vmmc1_init = { | |||
201 | .constraints = { | 212 | .constraints = { |
202 | .min_uV = 2800000, | 213 | .min_uV = 2800000, |
203 | .max_uV = 2800000, | 214 | .max_uV = 2800000, |
204 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, | 215 | .apply_uV = 1, |
216 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | ||
217 | REGULATOR_CHANGE_STATUS, | ||
205 | }, | 218 | }, |
206 | .num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers), | 219 | .num_consumer_supplies = ARRAY_SIZE(vmmc1_consumers), |
207 | .consumer_supplies = vmmc1_consumers, | 220 | .consumer_supplies = vmmc1_consumers, |
@@ -228,6 +241,12 @@ static struct mc13xxx_regulator_init_data mx27_3ds_regulators[] = { | |||
228 | }, { | 241 | }, { |
229 | .id = MC13783_REG_VGEN, | 242 | .id = MC13783_REG_VGEN, |
230 | .init_data = &vgen_init, | 243 | .init_data = &vgen_init, |
244 | }, { | ||
245 | .id = MC13783_REG_GPO1, /* Turn on 1.8V */ | ||
246 | .init_data = &gpo_init, | ||
247 | }, { | ||
248 | .id = MC13783_REG_GPO3, /* Turn on 3.3V */ | ||
249 | .init_data = &gpo_init, | ||
231 | }, | 250 | }, |
232 | }; | 251 | }; |
233 | 252 | ||