aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-rx51-peripherals.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c')
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c77
1 files changed, 41 insertions, 36 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index 3fec4d62a91a..e75e240cad67 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -23,7 +23,6 @@
23#include <linux/gpio.h> 23#include <linux/gpio.h>
24#include <linux/gpio_keys.h> 24#include <linux/gpio_keys.h>
25#include <linux/mmc/host.h> 25#include <linux/mmc/host.h>
26#include <sound/tlv320aic3x.h>
27 26
28#include <plat/mcspi.h> 27#include <plat/mcspi.h>
29#include <plat/board.h> 28#include <plat/board.h>
@@ -293,6 +292,8 @@ static struct omap_board_mux rx51_mmc2_off_mux[] = {
293 { .reg_offset = OMAP_MUX_TERMINATOR }, 292 { .reg_offset = OMAP_MUX_TERMINATOR },
294}; 293};
295 294
295static struct omap_mux_partition *partition;
296
296/* 297/*
297 * Current flows to eMMC when eMMC is off and the data lines are pulled up, 298 * Current flows to eMMC when eMMC is off and the data lines are pulled up,
298 * so pull them down. N.B. we pull 8 lines because we are using 8 lines. 299 * so pull them down. N.B. we pull 8 lines because we are using 8 lines.
@@ -300,9 +301,9 @@ static struct omap_board_mux rx51_mmc2_off_mux[] = {
300static void rx51_mmc2_remux(struct device *dev, int slot, int power_on) 301static void rx51_mmc2_remux(struct device *dev, int slot, int power_on)
301{ 302{
302 if (power_on) 303 if (power_on)
303 omap_mux_write_array(rx51_mmc2_on_mux); 304 omap_mux_write_array(partition, rx51_mmc2_on_mux);
304 else 305 else
305 omap_mux_write_array(rx51_mmc2_off_mux); 306 omap_mux_write_array(partition, rx51_mmc2_off_mux);
306} 307}
307 308
308static struct omap2_hsmmc_info mmc[] __initdata = { 309static struct omap2_hsmmc_info mmc[] __initdata = {
@@ -342,6 +343,8 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = {
342 /* tlv320aic3x analog supplies */ 343 /* tlv320aic3x analog supplies */
343 REGULATOR_SUPPLY("AVDD", "2-0018"), 344 REGULATOR_SUPPLY("AVDD", "2-0018"),
344 REGULATOR_SUPPLY("DRVDD", "2-0018"), 345 REGULATOR_SUPPLY("DRVDD", "2-0018"),
346 REGULATOR_SUPPLY("AVDD", "2-0019"),
347 REGULATOR_SUPPLY("DRVDD", "2-0019"),
345 /* tpa6130a2 */ 348 /* tpa6130a2 */
346 REGULATOR_SUPPLY("Vdd", "2-0060"), 349 REGULATOR_SUPPLY("Vdd", "2-0060"),
347 /* Keep vmmc as last item. It is not iterated for newer boards */ 350 /* Keep vmmc as last item. It is not iterated for newer boards */
@@ -352,19 +355,16 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = {
352 /* tlv320aic3x digital supplies */ 355 /* tlv320aic3x digital supplies */
353 REGULATOR_SUPPLY("IOVDD", "2-0018"), 356 REGULATOR_SUPPLY("IOVDD", "2-0018"),
354 REGULATOR_SUPPLY("DVDD", "2-0018"), 357 REGULATOR_SUPPLY("DVDD", "2-0018"),
358 REGULATOR_SUPPLY("IOVDD", "2-0019"),
359 REGULATOR_SUPPLY("DVDD", "2-0019"),
355}; 360};
356 361
357#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
358extern struct platform_device rx51_display_device;
359#endif
360
361static struct regulator_consumer_supply rx51_vaux1_consumers[] = { 362static struct regulator_consumer_supply rx51_vaux1_consumers[] = {
362#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) 363 REGULATOR_SUPPLY("vdds_sdi", "omapdss"),
363 { 364};
364 .supply = "vdds_sdi", 365
365 .dev = &rx51_display_device.dev, 366static struct regulator_consumer_supply rx51_vdac_supply[] = {
366 }, 367 REGULATOR_SUPPLY("vdda_dac", "omapdss"),
367#endif
368}; 368};
369 369
370static struct regulator_init_data rx51_vaux1 = { 370static struct regulator_init_data rx51_vaux1 = {
@@ -484,14 +484,17 @@ static struct regulator_init_data rx51_vsim = {
484 484
485static struct regulator_init_data rx51_vdac = { 485static struct regulator_init_data rx51_vdac = {
486 .constraints = { 486 .constraints = {
487 .name = "VDAC",
487 .min_uV = 1800000, 488 .min_uV = 1800000,
488 .max_uV = 1800000, 489 .max_uV = 1800000,
490 .apply_uV = true,
489 .valid_modes_mask = REGULATOR_MODE_NORMAL 491 .valid_modes_mask = REGULATOR_MODE_NORMAL
490 | REGULATOR_MODE_STANDBY, 492 | REGULATOR_MODE_STANDBY,
491 .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE 493 .valid_ops_mask = REGULATOR_CHANGE_MODE
492 | REGULATOR_CHANGE_MODE
493 | REGULATOR_CHANGE_STATUS, 494 | REGULATOR_CHANGE_STATUS,
494 }, 495 },
496 .num_consumer_supplies = 1,
497 .consumer_supplies = rx51_vdac_supply,
495}; 498};
496 499
497static struct regulator_init_data rx51_vio = { 500static struct regulator_init_data rx51_vio = {
@@ -717,7 +720,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
717 .vio = &rx51_vio, 720 .vio = &rx51_vio,
718}; 721};
719 722
720static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata = { 723static struct tpa6130a2_platform_data rx51_tpa6130a2_data __initdata_or_module = {
721 .id = TPA6130A2, 724 .id = TPA6130A2,
722 .power_gpio = 98, 725 .power_gpio = 98,
723}; 726};
@@ -742,11 +745,19 @@ static struct aic3x_pdata rx51_aic3x_data = {
742 .gpio_reset = 60, 745 .gpio_reset = 60,
743}; 746};
744 747
748static struct aic3x_pdata rx51_aic3x_data2 = {
749 .gpio_reset = 60,
750};
751
745static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = { 752static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = {
746 { 753 {
747 I2C_BOARD_INFO("tlv320aic3x", 0x18), 754 I2C_BOARD_INFO("tlv320aic3x", 0x18),
748 .platform_data = &rx51_aic3x_data, 755 .platform_data = &rx51_aic3x_data,
749 }, 756 },
757 {
758 I2C_BOARD_INFO("tlv320aic3x", 0x19),
759 .platform_data = &rx51_aic3x_data2,
760 },
750#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE) 761#if defined(CONFIG_SENSORS_TSL2563) || defined(CONFIG_SENSORS_TSL2563_MODULE)
751 { 762 {
752 I2C_BOARD_INFO("tsl2563", 0x29), 763 I2C_BOARD_INFO("tsl2563", 0x29),
@@ -815,25 +826,15 @@ static struct mtd_partition onenand_partitions[] = {
815 }, 826 },
816}; 827};
817 828
818static struct omap_onenand_platform_data board_onenand_data = { 829static struct omap_onenand_platform_data board_onenand_data[] = {
819 .cs = 0, 830 {
820 .gpio_irq = 65, 831 .cs = 0,
821 .parts = onenand_partitions, 832 .gpio_irq = 65,
822 .nr_parts = ARRAY_SIZE(onenand_partitions), 833 .parts = onenand_partitions,
823 .flags = ONENAND_SYNC_READWRITE, 834 .nr_parts = ARRAY_SIZE(onenand_partitions),
835 .flags = ONENAND_SYNC_READWRITE,
836 }
824}; 837};
825
826static void __init board_onenand_init(void)
827{
828 gpmc_onenand_init(&board_onenand_data);
829}
830
831#else
832
833static inline void board_onenand_init(void)
834{
835}
836
837#endif 838#endif
838 839
839#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE) 840#if defined(CONFIG_SMC91X) || defined(CONFIG_SMC91X_MODULE)
@@ -916,13 +917,17 @@ error:
916void __init rx51_peripherals_init(void) 917void __init rx51_peripherals_init(void)
917{ 918{
918 rx51_i2c_init(); 919 rx51_i2c_init();
919 board_onenand_init(); 920 gpmc_onenand_init(board_onenand_data);
920 board_smc91x_init(); 921 board_smc91x_init();
921 rx51_add_gpio_keys(); 922 rx51_add_gpio_keys();
922 rx51_init_wl1251(); 923 rx51_init_wl1251();
923 spi_register_board_info(rx51_peripherals_spi_board_info, 924 spi_register_board_info(rx51_peripherals_spi_board_info,
924 ARRAY_SIZE(rx51_peripherals_spi_board_info)); 925 ARRAY_SIZE(rx51_peripherals_spi_board_info));
925 omap2_hsmmc_init(mmc); 926
927 partition = omap_mux_get("core");
928 if (partition)
929 omap2_hsmmc_init(mmc);
930
926 platform_device_register(&rx51_charger_device); 931 platform_device_register(&rx51_charger_device);
927} 932}
928 933