diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-rx51-peripherals.c')
-rw-r--r-- | arch/arm/mach-omap2/board-rx51-peripherals.c | 61 |
1 files changed, 57 insertions, 4 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c index e75e240cad67..5f1900c532ec 100644 --- a/arch/arm/mach-omap2/board-rx51-peripherals.c +++ b/arch/arm/mach-omap2/board-rx51-peripherals.c | |||
@@ -36,6 +36,8 @@ | |||
36 | 36 | ||
37 | #include <sound/tlv320aic3x.h> | 37 | #include <sound/tlv320aic3x.h> |
38 | #include <sound/tpa6130a2-plat.h> | 38 | #include <sound/tpa6130a2-plat.h> |
39 | #include <media/radio-si4713.h> | ||
40 | #include <media/si4713.h> | ||
39 | 41 | ||
40 | #include <../drivers/staging/iio/light/tsl2563.h> | 42 | #include <../drivers/staging/iio/light/tsl2563.h> |
41 | 43 | ||
@@ -47,6 +49,8 @@ | |||
47 | 49 | ||
48 | #define RX51_WL1251_POWER_GPIO 87 | 50 | #define RX51_WL1251_POWER_GPIO 87 |
49 | #define RX51_WL1251_IRQ_GPIO 42 | 51 | #define RX51_WL1251_IRQ_GPIO 42 |
52 | #define RX51_FMTX_RESET_GPIO 163 | ||
53 | #define RX51_FMTX_IRQ 53 | ||
50 | 54 | ||
51 | /* list all spi devices here */ | 55 | /* list all spi devices here */ |
52 | enum { | 56 | enum { |
@@ -331,13 +335,13 @@ static struct omap2_hsmmc_info mmc[] __initdata = { | |||
331 | }; | 335 | }; |
332 | 336 | ||
333 | static struct regulator_consumer_supply rx51_vmmc1_supply = | 337 | static struct regulator_consumer_supply rx51_vmmc1_supply = |
334 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.0"); | 338 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.0"); |
335 | 339 | ||
336 | static struct regulator_consumer_supply rx51_vaux3_supply = | 340 | static struct regulator_consumer_supply rx51_vaux3_supply = |
337 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"); | 341 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"); |
338 | 342 | ||
339 | static struct regulator_consumer_supply rx51_vsim_supply = | 343 | static struct regulator_consumer_supply rx51_vsim_supply = |
340 | REGULATOR_SUPPLY("vmmc_aux", "mmci-omap-hs.1"); | 344 | REGULATOR_SUPPLY("vmmc_aux", "omap_hsmmc.1"); |
341 | 345 | ||
342 | static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { | 346 | static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { |
343 | /* tlv320aic3x analog supplies */ | 347 | /* tlv320aic3x analog supplies */ |
@@ -348,7 +352,7 @@ static struct regulator_consumer_supply rx51_vmmc2_supplies[] = { | |||
348 | /* tpa6130a2 */ | 352 | /* tpa6130a2 */ |
349 | REGULATOR_SUPPLY("Vdd", "2-0060"), | 353 | REGULATOR_SUPPLY("Vdd", "2-0060"), |
350 | /* Keep vmmc as last item. It is not iterated for newer boards */ | 354 | /* Keep vmmc as last item. It is not iterated for newer boards */ |
351 | REGULATOR_SUPPLY("vmmc", "mmci-omap-hs.1"), | 355 | REGULATOR_SUPPLY("vmmc", "omap_hsmmc.1"), |
352 | }; | 356 | }; |
353 | 357 | ||
354 | static struct regulator_consumer_supply rx51_vio_supplies[] = { | 358 | static struct regulator_consumer_supply rx51_vio_supplies[] = { |
@@ -357,10 +361,14 @@ static struct regulator_consumer_supply rx51_vio_supplies[] = { | |||
357 | REGULATOR_SUPPLY("DVDD", "2-0018"), | 361 | REGULATOR_SUPPLY("DVDD", "2-0018"), |
358 | REGULATOR_SUPPLY("IOVDD", "2-0019"), | 362 | REGULATOR_SUPPLY("IOVDD", "2-0019"), |
359 | REGULATOR_SUPPLY("DVDD", "2-0019"), | 363 | REGULATOR_SUPPLY("DVDD", "2-0019"), |
364 | /* Si4713 IO supply */ | ||
365 | REGULATOR_SUPPLY("vio", "2-0063"), | ||
360 | }; | 366 | }; |
361 | 367 | ||
362 | static struct regulator_consumer_supply rx51_vaux1_consumers[] = { | 368 | static struct regulator_consumer_supply rx51_vaux1_consumers[] = { |
363 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), | 369 | REGULATOR_SUPPLY("vdds_sdi", "omapdss"), |
370 | /* Si4713 supply */ | ||
371 | REGULATOR_SUPPLY("vdd", "2-0063"), | ||
364 | }; | 372 | }; |
365 | 373 | ||
366 | static struct regulator_consumer_supply rx51_vdac_supply[] = { | 374 | static struct regulator_consumer_supply rx51_vdac_supply[] = { |
@@ -511,6 +519,41 @@ static struct regulator_init_data rx51_vio = { | |||
511 | .consumer_supplies = rx51_vio_supplies, | 519 | .consumer_supplies = rx51_vio_supplies, |
512 | }; | 520 | }; |
513 | 521 | ||
522 | static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = { | ||
523 | .gpio_reset = RX51_FMTX_RESET_GPIO, | ||
524 | }; | ||
525 | |||
526 | static struct i2c_board_info rx51_si4713_board_info __initdata_or_module = { | ||
527 | I2C_BOARD_INFO("si4713", SI4713_I2C_ADDR_BUSEN_HIGH), | ||
528 | .platform_data = &rx51_si4713_i2c_data, | ||
529 | }; | ||
530 | |||
531 | static struct radio_si4713_platform_data rx51_si4713_data __initdata_or_module = { | ||
532 | .i2c_bus = 2, | ||
533 | .subdev_board_info = &rx51_si4713_board_info, | ||
534 | }; | ||
535 | |||
536 | static struct platform_device rx51_si4713_dev __initdata_or_module = { | ||
537 | .name = "radio-si4713", | ||
538 | .id = -1, | ||
539 | .dev = { | ||
540 | .platform_data = &rx51_si4713_data, | ||
541 | }, | ||
542 | }; | ||
543 | |||
544 | static __init void rx51_init_si4713(void) | ||
545 | { | ||
546 | int err; | ||
547 | |||
548 | err = gpio_request_one(RX51_FMTX_IRQ, GPIOF_DIR_IN, "si4713 irq"); | ||
549 | if (err) { | ||
550 | printk(KERN_ERR "Cannot request si4713 irq gpio. %d\n", err); | ||
551 | return; | ||
552 | } | ||
553 | rx51_si4713_board_info.irq = gpio_to_irq(RX51_FMTX_IRQ); | ||
554 | platform_device_register(&rx51_si4713_dev); | ||
555 | } | ||
556 | |||
514 | static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) | 557 | static int rx51_twlgpio_setup(struct device *dev, unsigned gpio, unsigned n) |
515 | { | 558 | { |
516 | /* FIXME this gpio setup is just a placeholder for now */ | 559 | /* FIXME this gpio setup is just a placeholder for now */ |
@@ -699,6 +742,14 @@ static struct twl4030_power_data rx51_t2scripts_data __initdata = { | |||
699 | .resource_config = twl4030_rconfig, | 742 | .resource_config = twl4030_rconfig, |
700 | }; | 743 | }; |
701 | 744 | ||
745 | struct twl4030_codec_vibra_data rx51_vibra_data __initdata = { | ||
746 | .coexist = 0, | ||
747 | }; | ||
748 | |||
749 | struct twl4030_codec_data rx51_codec_data __initdata = { | ||
750 | .audio_mclk = 26000000, | ||
751 | .vibra = &rx51_vibra_data, | ||
752 | }; | ||
702 | 753 | ||
703 | static struct twl4030_platform_data rx51_twldata __initdata = { | 754 | static struct twl4030_platform_data rx51_twldata __initdata = { |
704 | .irq_base = TWL4030_IRQ_BASE, | 755 | .irq_base = TWL4030_IRQ_BASE, |
@@ -710,6 +761,7 @@ static struct twl4030_platform_data rx51_twldata __initdata = { | |||
710 | .madc = &rx51_madc_data, | 761 | .madc = &rx51_madc_data, |
711 | .usb = &rx51_usb_data, | 762 | .usb = &rx51_usb_data, |
712 | .power = &rx51_t2scripts_data, | 763 | .power = &rx51_t2scripts_data, |
764 | .codec = &rx51_codec_data, | ||
713 | 765 | ||
714 | .vaux1 = &rx51_vaux1, | 766 | .vaux1 = &rx51_vaux1, |
715 | .vaux2 = &rx51_vaux2, | 767 | .vaux2 = &rx51_vaux2, |
@@ -921,6 +973,7 @@ void __init rx51_peripherals_init(void) | |||
921 | board_smc91x_init(); | 973 | board_smc91x_init(); |
922 | rx51_add_gpio_keys(); | 974 | rx51_add_gpio_keys(); |
923 | rx51_init_wl1251(); | 975 | rx51_init_wl1251(); |
976 | rx51_init_si4713(); | ||
924 | spi_register_board_info(rx51_peripherals_spi_board_info, | 977 | spi_register_board_info(rx51_peripherals_spi_board_info, |
925 | ARRAY_SIZE(rx51_peripherals_spi_board_info)); | 978 | ARRAY_SIZE(rx51_peripherals_spi_board_info)); |
926 | 979 | ||