aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-omap3beagle.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap3beagle.c')
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c89
1 files changed, 16 insertions, 73 deletions
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 7f21d24bd437..34f841112768 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -50,7 +50,6 @@
50 50
51#include "mux.h" 51#include "mux.h"
52#include "hsmmc.h" 52#include "hsmmc.h"
53#include "timer-gp.h"
54#include "pm.h" 53#include "pm.h"
55#include "common-board-devices.h" 54#include "common-board-devices.h"
56 55
@@ -210,14 +209,6 @@ static struct omap_dss_board_info beagle_dss_data = {
210 .default_device = &beagle_dvi_device, 209 .default_device = &beagle_dvi_device,
211}; 210};
212 211
213static struct regulator_consumer_supply beagle_vdac_supply =
214 REGULATOR_SUPPLY("vdda_dac", "omapdss_venc");
215
216static struct regulator_consumer_supply beagle_vdvi_supplies[] = {
217 REGULATOR_SUPPLY("vdds_dsi", "omapdss"),
218 REGULATOR_SUPPLY("vdds_dsi", "omapdss_dsi1"),
219};
220
221static void __init beagle_display_init(void) 212static void __init beagle_display_init(void)
222{ 213{
223 int r; 214 int r;
@@ -239,12 +230,12 @@ static struct omap2_hsmmc_info mmc[] = {
239 {} /* Terminator */ 230 {} /* Terminator */
240}; 231};
241 232
242static struct regulator_consumer_supply beagle_vmmc1_supply = { 233static struct regulator_consumer_supply beagle_vmmc1_supply[] = {
243 .supply = "vmmc", 234 REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"),
244}; 235};
245 236
246static struct regulator_consumer_supply beagle_vsim_supply = { 237static struct regulator_consumer_supply beagle_vsim_supply[] = {
247 .supply = "vmmc_aux", 238 REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.0"),
248}; 239};
249 240
250static struct gpio_led gpio_leds[]; 241static struct gpio_led gpio_leds[];
@@ -267,10 +258,6 @@ static int beagle_twl_gpio_setup(struct device *dev,
267 mmc[0].gpio_cd = gpio + 0; 258 mmc[0].gpio_cd = gpio + 0;
268 omap2_hsmmc_init(mmc); 259 omap2_hsmmc_init(mmc);
269 260
270 /* link regulators to MMC adapters */
271 beagle_vmmc1_supply.dev = mmc[0].dev;
272 beagle_vsim_supply.dev = mmc[0].dev;
273
274 /* 261 /*
275 * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active 262 * TWL4030_GPIO_MAX + 0 == ledA, EHCI nEN_USB_PWR (out, XM active
276 * high / others active low) 263 * high / others active low)
@@ -336,8 +323,8 @@ static struct regulator_init_data beagle_vmmc1 = {
336 | REGULATOR_CHANGE_MODE 323 | REGULATOR_CHANGE_MODE
337 | REGULATOR_CHANGE_STATUS, 324 | REGULATOR_CHANGE_STATUS,
338 }, 325 },
339 .num_consumer_supplies = 1, 326 .num_consumer_supplies = ARRAY_SIZE(beagle_vmmc1_supply),
340 .consumer_supplies = &beagle_vmmc1_supply, 327 .consumer_supplies = beagle_vmmc1_supply,
341}; 328};
342 329
343/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */ 330/* VSIM for MMC1 pins DAT4..DAT7 (2 mA, plus card == max 50 mA) */
@@ -351,62 +338,15 @@ static struct regulator_init_data beagle_vsim = {
351 | REGULATOR_CHANGE_MODE 338 | REGULATOR_CHANGE_MODE
352 | REGULATOR_CHANGE_STATUS, 339 | REGULATOR_CHANGE_STATUS,
353 }, 340 },
354 .num_consumer_supplies = 1, 341 .num_consumer_supplies = ARRAY_SIZE(beagle_vsim_supply),
355 .consumer_supplies = &beagle_vsim_supply, 342 .consumer_supplies = beagle_vsim_supply,
356};
357
358/* VDAC for DSS driving S-Video (8 mA unloaded, max 65 mA) */
359static struct regulator_init_data beagle_vdac = {
360 .constraints = {
361 .min_uV = 1800000,
362 .max_uV = 1800000,
363 .valid_modes_mask = REGULATOR_MODE_NORMAL
364 | REGULATOR_MODE_STANDBY,
365 .valid_ops_mask = REGULATOR_CHANGE_MODE
366 | REGULATOR_CHANGE_STATUS,
367 },
368 .num_consumer_supplies = 1,
369 .consumer_supplies = &beagle_vdac_supply,
370};
371
372/* VPLL2 for digital video outputs */
373static struct regulator_init_data beagle_vpll2 = {
374 .constraints = {
375 .name = "VDVI",
376 .min_uV = 1800000,
377 .max_uV = 1800000,
378 .valid_modes_mask = REGULATOR_MODE_NORMAL
379 | REGULATOR_MODE_STANDBY,
380 .valid_ops_mask = REGULATOR_CHANGE_MODE
381 | REGULATOR_CHANGE_STATUS,
382 },
383 .num_consumer_supplies = ARRAY_SIZE(beagle_vdvi_supplies),
384 .consumer_supplies = beagle_vdvi_supplies,
385};
386
387static struct twl4030_usb_data beagle_usb_data = {
388 .usb_mode = T2_USB_MODE_ULPI,
389};
390
391static struct twl4030_codec_audio_data beagle_audio_data;
392
393static struct twl4030_codec_data beagle_codec_data = {
394 .audio_mclk = 26000000,
395 .audio = &beagle_audio_data,
396}; 343};
397 344
398static struct twl4030_platform_data beagle_twldata = { 345static struct twl4030_platform_data beagle_twldata = {
399 .irq_base = TWL4030_IRQ_BASE,
400 .irq_end = TWL4030_IRQ_END,
401
402 /* platform_data for children goes here */ 346 /* platform_data for children goes here */
403 .usb = &beagle_usb_data,
404 .gpio = &beagle_gpio_data, 347 .gpio = &beagle_gpio_data,
405 .codec = &beagle_codec_data,
406 .vmmc1 = &beagle_vmmc1, 348 .vmmc1 = &beagle_vmmc1,
407 .vsim = &beagle_vsim, 349 .vsim = &beagle_vsim,
408 .vdac = &beagle_vdac,
409 .vpll2 = &beagle_vpll2,
410}; 350};
411 351
412static struct i2c_board_info __initdata beagle_i2c_eeprom[] = { 352static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
@@ -417,6 +357,12 @@ static struct i2c_board_info __initdata beagle_i2c_eeprom[] = {
417 357
418static int __init omap3_beagle_i2c_init(void) 358static int __init omap3_beagle_i2c_init(void)
419{ 359{
360 omap3_pmic_get_config(&beagle_twldata,
361 TWL_COMMON_PDATA_USB | TWL_COMMON_PDATA_AUDIO,
362 TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2);
363
364 beagle_twldata.vpll2->constraints.name = "VDVI";
365
420 omap3_pmic_init("twl4030", &beagle_twldata); 366 omap3_pmic_init("twl4030", &beagle_twldata);
421 /* Bus 3 is attached to the DVI port where devices like the pico DLP 367 /* Bus 3 is attached to the DVI port where devices like the pico DLP
422 * projector don't work reliably with 400kHz */ 368 * projector don't work reliably with 400kHz */
@@ -486,10 +432,7 @@ static void __init omap3_beagle_init_early(void)
486 432
487static void __init omap3_beagle_init_irq(void) 433static void __init omap3_beagle_init_irq(void)
488{ 434{
489 omap_init_irq(); 435 omap3_init_irq();
490#ifdef CONFIG_OMAP_32K_TIMER
491 omap2_gp_clockevent_set_gptimer(12);
492#endif
493} 436}
494 437
495static struct platform_device *omap3_beagle_devices[] __initdata = { 438static struct platform_device *omap3_beagle_devices[] __initdata = {
@@ -599,5 +542,5 @@ MACHINE_START(OMAP3_BEAGLE, "OMAP3 Beagle Board")
599 .init_early = omap3_beagle_init_early, 542 .init_early = omap3_beagle_init_early,
600 .init_irq = omap3_beagle_init_irq, 543 .init_irq = omap3_beagle_init_irq,
601 .init_machine = omap3_beagle_init, 544 .init_machine = omap3_beagle_init,
602 .timer = &omap_timer, 545 .timer = &omap3_secure_timer,
603MACHINE_END 546MACHINE_END