aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap4panda.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c146
1 files changed, 12 insertions, 134 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index ee2034e37468..9aaa96057666 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -154,14 +154,6 @@ static struct omap_musb_board_data musb_board_data = {
154 .power = 100, 154 .power = 100,
155}; 155};
156 156
157static struct twl4030_usb_data omap4_usbphy_data = {
158 .phy_init = omap4430_phy_init,
159 .phy_exit = omap4430_phy_exit,
160 .phy_power = omap4430_phy_power,
161 .phy_set_clock = omap4430_phy_set_clk,
162 .phy_suspend = omap4430_phy_suspend,
163};
164
165static struct omap2_hsmmc_info mmc[] = { 157static struct omap2_hsmmc_info mmc[] = {
166 { 158 {
167 .mmc = 1, 159 .mmc = 1,
@@ -181,10 +173,6 @@ static struct omap2_hsmmc_info mmc[] = {
181 {} /* Terminator */ 173 {} /* Terminator */
182}; 174};
183 175
184static struct regulator_consumer_supply omap4_panda_vmmc_supply[] = {
185 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
186};
187
188static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = { 176static struct regulator_consumer_supply omap4_panda_vmmc5_supply[] = {
189 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"), 177 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.4"),
190}; 178};
@@ -269,128 +257,8 @@ static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers)
269 return 0; 257 return 0;
270} 258}
271 259
272static struct regulator_init_data omap4_panda_vaux2 = { 260/* Panda board uses the common PMIC configuration */
273 .constraints = { 261static struct twl4030_platform_data omap4_panda_twldata;
274 .min_uV = 1200000,
275 .max_uV = 2800000,
276 .apply_uV = true,
277 .valid_modes_mask = REGULATOR_MODE_NORMAL
278 | REGULATOR_MODE_STANDBY,
279 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
280 | REGULATOR_CHANGE_MODE
281 | REGULATOR_CHANGE_STATUS,
282 },
283};
284
285static struct regulator_init_data omap4_panda_vaux3 = {
286 .constraints = {
287 .min_uV = 1000000,
288 .max_uV = 3000000,
289 .apply_uV = true,
290 .valid_modes_mask = REGULATOR_MODE_NORMAL
291 | REGULATOR_MODE_STANDBY,
292 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
293 | REGULATOR_CHANGE_MODE
294 | REGULATOR_CHANGE_STATUS,
295 },
296};
297
298/* VMMC1 for MMC1 card */
299static struct regulator_init_data omap4_panda_vmmc = {
300 .constraints = {
301 .min_uV = 1200000,
302 .max_uV = 3000000,
303 .apply_uV = true,
304 .valid_modes_mask = REGULATOR_MODE_NORMAL
305 | REGULATOR_MODE_STANDBY,
306 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
307 | REGULATOR_CHANGE_MODE
308 | REGULATOR_CHANGE_STATUS,
309 },
310 .num_consumer_supplies = ARRAY_SIZE(omap4_panda_vmmc_supply),
311 .consumer_supplies = omap4_panda_vmmc_supply,
312};
313
314static struct regulator_init_data omap4_panda_vpp = {
315 .constraints = {
316 .min_uV = 1800000,
317 .max_uV = 2500000,
318 .apply_uV = true,
319 .valid_modes_mask = REGULATOR_MODE_NORMAL
320 | REGULATOR_MODE_STANDBY,
321 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE
322 | REGULATOR_CHANGE_MODE
323 | REGULATOR_CHANGE_STATUS,
324 },
325};
326
327static struct regulator_init_data omap4_panda_vana = {
328 .constraints = {
329 .min_uV = 2100000,
330 .max_uV = 2100000,
331 .valid_modes_mask = REGULATOR_MODE_NORMAL
332 | REGULATOR_MODE_STANDBY,
333 .valid_ops_mask = REGULATOR_CHANGE_MODE
334 | REGULATOR_CHANGE_STATUS,
335 },
336};
337
338static struct regulator_init_data omap4_panda_vcxio = {
339 .constraints = {
340 .min_uV = 1800000,
341 .max_uV = 1800000,
342 .valid_modes_mask = REGULATOR_MODE_NORMAL
343 | REGULATOR_MODE_STANDBY,
344 .valid_ops_mask = REGULATOR_CHANGE_MODE
345 | REGULATOR_CHANGE_STATUS,
346 },
347};
348
349static struct regulator_init_data omap4_panda_vdac = {
350 .constraints = {
351 .min_uV = 1800000,
352 .max_uV = 1800000,
353 .valid_modes_mask = REGULATOR_MODE_NORMAL
354 | REGULATOR_MODE_STANDBY,
355 .valid_ops_mask = REGULATOR_CHANGE_MODE
356 | REGULATOR_CHANGE_STATUS,
357 },
358};
359
360static struct regulator_init_data omap4_panda_vusb = {
361 .constraints = {
362 .min_uV = 3300000,
363 .max_uV = 3300000,
364 .apply_uV = true,
365 .valid_modes_mask = REGULATOR_MODE_NORMAL
366 | REGULATOR_MODE_STANDBY,
367 .valid_ops_mask = REGULATOR_CHANGE_MODE
368 | REGULATOR_CHANGE_STATUS,
369 },
370};
371
372static struct regulator_init_data omap4_panda_clk32kg = {
373 .constraints = {
374 .valid_ops_mask = REGULATOR_CHANGE_STATUS,
375 },
376};
377
378static struct twl4030_platform_data omap4_panda_twldata = {
379 .irq_base = TWL6030_IRQ_BASE,
380 .irq_end = TWL6030_IRQ_END,
381
382 /* Regulators */
383 .vmmc = &omap4_panda_vmmc,
384 .vpp = &omap4_panda_vpp,
385 .vana = &omap4_panda_vana,
386 .vcxio = &omap4_panda_vcxio,
387 .vdac = &omap4_panda_vdac,
388 .vusb = &omap4_panda_vusb,
389 .vaux2 = &omap4_panda_vaux2,
390 .vaux3 = &omap4_panda_vaux3,
391 .clk32kg = &omap4_panda_clk32kg,
392 .usb = &omap4_usbphy_data,
393};
394 262
395/* 263/*
396 * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM 264 * Display monitor features are burnt in their EEPROM as EDID data. The EEPROM
@@ -404,6 +272,16 @@ static struct i2c_board_info __initdata panda_i2c_eeprom[] = {
404 272
405static int __init omap4_panda_i2c_init(void) 273static int __init omap4_panda_i2c_init(void)
406{ 274{
275 omap4_pmic_get_config(&omap4_panda_twldata, TWL_COMMON_PDATA_USB,
276 TWL_COMMON_REGULATOR_VDAC |
277 TWL_COMMON_REGULATOR_VAUX2 |
278 TWL_COMMON_REGULATOR_VAUX3 |
279 TWL_COMMON_REGULATOR_VMMC |
280 TWL_COMMON_REGULATOR_VPP |
281 TWL_COMMON_REGULATOR_VANA |
282 TWL_COMMON_REGULATOR_VCXIO |
283 TWL_COMMON_REGULATOR_VUSB |
284 TWL_COMMON_REGULATOR_CLK32KG);
407 omap4_pmic_init("twl6030", &omap4_panda_twldata); 285 omap4_pmic_init("twl6030", &omap4_panda_twldata);
408 omap_register_i2c_bus(2, 400, NULL, 0); 286 omap_register_i2c_bus(2, 400, NULL, 0);
409 /* 287 /*