aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-rx51-peripherals.c
diff options
context:
space:
mode:
authorAdrian Hunter <adrian.hunter@nokia.com>2009-05-28 17:04:04 -0400
committerTony Lindgren <tony@atomide.com>2009-05-28 17:04:04 -0400
commitf52eeee83d360d536cab1c0296eae0ec5f05e4dd (patch)
treebc3463d02a714399abfcd1b1ac16211049a4dede /arch/arm/mach-omap2/board-rx51-peripherals.c
parent64f535a87ce103fae592f2cce0866b4a45903ed6 (diff)
ARM: OMAP3: RX51: Connect VAUX3 to MMC2
Connect VAUX3 to MMC2 Signed-off-by: Adrian Hunter <adrian.hunter@nokia.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c30
1 files changed, 27 insertions, 3 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 233c7454d84f..da93b86234ed 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -32,6 +32,9 @@
32 32
33#include "mmc-twl4030.h" 33#include "mmc-twl4030.h"
34 34
35#define SYSTEM_REV_B_USES_VAUX3 0x1699
36#define SYSTEM_REV_S_USES_VAUX3 0x8
37
35static int rx51_keymap[] = { 38static int rx51_keymap[] = {
36 KEY(0, 0, KEY_Q), 39 KEY(0, 0, KEY_Q),
37 KEY(0, 1, KEY_W), 40 KEY(0, 1, KEY_W),
@@ -147,7 +150,7 @@ static struct regulator_init_data rx51_vaux2 = {
147}; 150};
148 151
149/* VAUX3 - adds more power to VIO_18 rail */ 152/* VAUX3 - adds more power to VIO_18 rail */
150static struct regulator_init_data rx51_vaux3 = { 153static struct regulator_init_data rx51_vaux3_cam = {
151 .constraints = { 154 .constraints = {
152 .name = "VCAM_DIG_18", 155 .name = "VCAM_DIG_18",
153 .min_uV = 1800000, 156 .min_uV = 1800000,
@@ -160,6 +163,22 @@ static struct regulator_init_data rx51_vaux3 = {
160 }, 163 },
161}; 164};
162 165
166static struct regulator_init_data rx51_vaux3_mmc = {
167 .constraints = {
168 .name = "VMMC2_30",
169 .min_uV = 2800000,
170 .max_uV = 3000000,
171 .apply_uV = true,
172 .valid_modes_mask = REGULATOR_MODE_NORMAL
173 | REGULATOR_MODE_STANDBY,
174 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
175 | REGULATOR_CHANGE_MODE
176 | REGULATOR_CHANGE_STATUS,
177 },
178 .num_consumer_supplies = 1,
179 .consumer_supplies = &rx51_vmmc2_supply,
180};
181
163static struct regulator_init_data rx51_vaux4 = { 182static struct regulator_init_data rx51_vaux4 = {
164 .constraints = { 183 .constraints = {
165 .name = "VCAM_ANA_28", 184 .name = "VCAM_ANA_28",
@@ -270,10 +289,8 @@ static struct twl4030_platform_data rx51_twldata = {
270 289
271 .vaux1 = &rx51_vaux1, 290 .vaux1 = &rx51_vaux1,
272 .vaux2 = &rx51_vaux2, 291 .vaux2 = &rx51_vaux2,
273 .vaux3 = &rx51_vaux3,
274 .vaux4 = &rx51_vaux4, 292 .vaux4 = &rx51_vaux4,
275 .vmmc1 = &rx51_vmmc1, 293 .vmmc1 = &rx51_vmmc1,
276 .vmmc2 = &rx51_vmmc2,
277 .vsim = &rx51_vsim, 294 .vsim = &rx51_vsim,
278 .vdac = &rx51_vdac, 295 .vdac = &rx51_vdac,
279}; 296};
@@ -289,6 +306,13 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = {
289 306
290static int __init rx51_i2c_init(void) 307static int __init rx51_i2c_init(void)
291{ 308{
309 if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) ||
310 system_rev >= SYSTEM_REV_B_USES_VAUX3)
311 rx51_twldata.vaux3 = &rx51_vaux3_mmc;
312 else {
313 rx51_twldata.vaux3 = &rx51_vaux3_cam;
314 rx51_twldata.vmmc2 = &rx51_vmmc2;
315 }
292 omap_register_i2c_bus(1, 2600, rx51_peripherals_i2c_board_info_1, 316 omap_register_i2c_bus(1, 2600, rx51_peripherals_i2c_board_info_1,
293 ARRAY_SIZE(rx51_peripherals_i2c_board_info_1)); 317 ARRAY_SIZE(rx51_peripherals_i2c_board_info_1));
294 omap_register_i2c_bus(2, 100, NULL, 0); 318 omap_register_i2c_bus(2, 100, NULL, 0);