diff options
author | Jarkko Nikula <jhnikula@gmail.com> | 2010-05-10 17:29:19 -0400 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-05-20 13:53:55 -0400 |
commit | 4cfcaef11fd32a27cee1bb5b7fcb741003db84a2 (patch) | |
tree | e2fe56caeaeb115ad2f7a4657b7cf1cca2859414 /arch/arm | |
parent | dabe929b590c0139aa5a18994d953a9eb201d626 (diff) |
omap: rx51: Add supplies for the tlv320aic3x codec driver
Upcoming change to tlv320aic3x codec driver require four supplies.
Implement this by connecting analogic supplies to TWL4030 VMMC2 and digital
supplies to TWL4030 VIO.
Signed-off-by: Jarkko Nikula <jhnikula@gmail.com>
Cc: Eduardo Valentin <eduardo.valentin@nokia.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm')
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 60 |
1 files changed, 53 insertions, 7 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index 3addfe646625..8179d55106d5 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -277,7 +277,7 @@ static struct regulator_consumer_supply rx51_vmmc1_supply = { | |||
277 | .dev_name = "mmci-omap-hs.0", | 277 | .dev_name = "mmci-omap-hs.0", |
278 | }; | 278 | }; |
279 | 279 | ||
280 | static struct regulator_consumer_supply rx51_vmmc2_supply = { | 280 | static struct regulator_consumer_supply rx51_vaux3_supply = { |
281 | .supply = "vmmc", | 281 | .supply = "vmmc", |
282 | .dev_name = "mmci-omap-hs.1", | 282 | .dev_name = "mmci-omap-hs.1", |
283 | }; | 283 | }; |
@@ -287,6 +287,35 @@ static struct regulator_consumer_supply rx51_vsim_supply = { | |||
287 | .dev_name = "mmci-omap-hs.1", | 287 | .dev_name = "mmci-omap-hs.1", |
288 | }; | 288 | }; |
289 | 289 | ||
290 | static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { | ||
291 | /* tlv320aic3x analog supplies */ | ||
292 | { | ||
293 | .supply = "AVDD", | ||
294 | .dev_name = "2-0018", | ||
295 | }, | ||
296 | { | ||
297 | .supply = "DRVDD", | ||
298 | .dev_name = "2-0018", | ||
299 | }, | ||
300 | /* Keep vmmc as last item. It is not iterated for newer boards */ | ||
301 | { | ||
302 | .supply = "vmmc", | ||
303 | .dev_name = "mmci-omap-hs.1", | ||
304 | }, | ||
305 | }; | ||
306 | |||
307 | static struct regulator_consumer_supply rx51_vio_supplies[] = { | ||
308 | /* tlv320aic3x digital supplies */ | ||
309 | { | ||
310 | .supply = "IOVDD", | ||
311 | .dev_name = "2-0018" | ||
312 | }, | ||
313 | { | ||
314 | .supply = "DVDD", | ||
315 | .dev_name = "2-0018" | ||
316 | }, | ||
317 | }; | ||
318 | |||
290 | static struct regulator_init_data rx51_vaux1 = { | 319 | static struct regulator_init_data rx51_vaux1 = { |
291 | .constraints = { | 320 | .constraints = { |
292 | .name = "V28", | 321 | .name = "V28", |
@@ -338,7 +367,7 @@ static struct regulator_init_data rx51_vaux3_mmc = { | |||
338 | | REGULATOR_CHANGE_STATUS, | 367 | | REGULATOR_CHANGE_STATUS, |
339 | }, | 368 | }, |
340 | .num_consumer_supplies = 1, | 369 | .num_consumer_supplies = 1, |
341 | .consumer_supplies = &rx51_vmmc2_supply, | 370 | .consumer_supplies = &rx51_vaux3_supply, |
342 | }; | 371 | }; |
343 | 372 | ||
344 | static struct regulator_init_data rx51_vaux4 = { | 373 | static struct regulator_init_data rx51_vaux4 = { |
@@ -380,8 +409,8 @@ static struct regulator_init_data rx51_vmmc2 = { | |||
380 | | REGULATOR_CHANGE_MODE | 409 | | REGULATOR_CHANGE_MODE |
381 | | REGULATOR_CHANGE_STATUS, | 410 | | REGULATOR_CHANGE_STATUS, |
382 | }, | 411 | }, |
383 | .num_consumer_supplies = 1, | 412 | .num_consumer_supplies = ARRAY_SIZE(rx51_vmmc2_supplies), |
384 | .consumer_supplies = &rx51_vmmc2_supply, | 413 | .consumer_supplies = rx51_vmmc2_supplies, |
385 | }; | 414 | }; |
386 | 415 | ||
387 | static struct regulator_init_data rx51_vsim = { | 416 | static struct regulator_init_data rx51_vsim = { |
@@ -411,6 +440,20 @@ static struct regulator_init_data rx51_vdac = { | |||
411 | }, | 440 | }, |
412 | }; | 441 | }; |
413 | 442 | ||
443 | static struct regulator_init_data rx51_vio = { | ||
444 | .constraints = { | ||
445 | .min_uV = 1800000, | ||
446 | .max_uV = 1800000, | ||
447 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
448 | | REGULATOR_MODE_STANDBY, | ||
449 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | ||
450 | | REGULATOR_CHANGE_MODE | ||
451 | | REGULATOR_CHANGE_STATUS, | ||
452 | }, | ||
453 | .num_consumer_supplies = ARRAY_SIZE(rx51_vio_supplies), | ||
454 | .consumer_supplies = rx51_vio_supplies, | ||
455 | }; | ||
456 | |||
414 | static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) | 457 | static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) |
415 | { | 458 | { |
416 | /* FIXME this gpio setup is just a placeholder for now */ | 459 | /* FIXME this gpio setup is just a placeholder for now */ |
@@ -618,6 +661,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { | |||
618 | .vmmc1 = &rx51_vmmc1, | 661 | .vmmc1 = &rx51_vmmc1, |
619 | .vsim = &rx51_vsim, | 662 | .vsim = &rx51_vsim, |
620 | .vdac = &rx51_vdac, | 663 | .vdac = &rx51_vdac, |
664 | .vio = &rx51_vio, | ||
621 | }; | 665 | }; |
622 | 666 | ||
623 | static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { | 667 | static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_1[] = { |
@@ -638,12 +682,14 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { | |||
638 | static int __init rx51_i2c_init(void) | 682 | static int __init rx51_i2c_init(void) |
639 | { | 683 | { |
640 | if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) || | 684 | if ((system_rev >= SYSTEM_REV_S_USES_VAUX3 && system_rev < 0x100) || |
641 | system_rev >= SYSTEM_REV_B_USES_VAUX3) | 685 | system_rev >= SYSTEM_REV_B_USES_VAUX3) { |
642 | rx51_twldata.vaux3 = &rx51_vaux3_mmc; | 686 | rx51_twldata.vaux3 = &rx51_vaux3_mmc; |
643 | else { | 687 | /* Only older boards use VMMC2 for internal MMC */ |
688 | rx51_vmmc2.num_consumer_supplies--; | ||
689 | } else { | ||
644 | rx51_twldata.vaux3 = &rx51_vaux3_cam; | 690 | rx51_twldata.vaux3 = &rx51_vaux3_cam; |
645 | rx51_twldata.vmmc2 = &rx51_vmmc2; | ||
646 | } | 691 | } |
692 | rx51_twldata.vmmc2 = &rx51_vmmc2; | ||
647 | omap_register_i2c_bus(1, 2200, rx51_peripherals_i2c_board_info_1, | 693 | omap_register_i2c_bus(1, 2200, rx51_peripherals_i2c_board_info_1, |
648 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_1)); | 694 | ARRAY_SIZE(rx51_peripherals_i2c_board_info_1)); |
649 | omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, | 695 | omap_register_i2c_bus(2, 100, rx51_peripherals_i2c_board_info_2, |