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.c135
1 files changed, 135 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/board-rx51-peripherals.c b/arch/arm/mach-omap2/board-rx51-peripherals.c
index bdb24db36004..0c9e0f28ed07 100644
--- a/arch/arm/mach-omap2/board-rx51-peripherals.c
+++ b/arch/arm/mach-omap2/board-rx51-peripherals.c
@@ -39,6 +39,7 @@
39#include <sound/tpa6130a2-plat.h> 39#include <sound/tpa6130a2-plat.h>
40#include <media/radio-si4713.h> 40#include <media/radio-si4713.h>
41#include <media/si4713.h> 41#include <media/si4713.h>
42#include <linux/leds-lp5523.h>
42 43
43#include <../drivers/staging/iio/light/tsl2563.h> 44#include <../drivers/staging/iio/light/tsl2563.h>
44 45
@@ -53,6 +54,7 @@
53#define RX51_WL1251_IRQ_GPIO 42 54#define RX51_WL1251_IRQ_GPIO 42
54#define RX51_FMTX_RESET_GPIO 163 55#define RX51_FMTX_RESET_GPIO 163
55#define RX51_FMTX_IRQ 53 56#define RX51_FMTX_IRQ 53
57#define RX51_LP5523_CHIP_EN_GPIO 41
56 58
57#define RX51_USB_TRANSCEIVER_RST_GPIO 67 59#define RX51_USB_TRANSCEIVER_RST_GPIO 67
58 60
@@ -71,6 +73,64 @@ static struct tsl2563_platform_data rx51_tsl2563_platform_data = {
71}; 73};
72#endif 74#endif
73 75
76#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE)
77static struct lp5523_led_config rx51_lp5523_led_config[] = {
78 {
79 .chan_nr = 0,
80 .led_current = 50,
81 }, {
82 .chan_nr = 1,
83 .led_current = 50,
84 }, {
85 .chan_nr = 2,
86 .led_current = 50,
87 }, {
88 .chan_nr = 3,
89 .led_current = 50,
90 }, {
91 .chan_nr = 4,
92 .led_current = 50,
93 }, {
94 .chan_nr = 5,
95 .led_current = 50,
96 }, {
97 .chan_nr = 6,
98 .led_current = 50,
99 }, {
100 .chan_nr = 7,
101 .led_current = 50,
102 }, {
103 .chan_nr = 8,
104 .led_current = 50,
105 }
106};
107
108static int rx51_lp5523_setup(void)
109{
110 return gpio_request_one(RX51_LP5523_CHIP_EN_GPIO, GPIOF_DIR_OUT,
111 "lp5523_enable");
112}
113
114static void rx51_lp5523_release(void)
115{
116 gpio_free(RX51_LP5523_CHIP_EN_GPIO);
117}
118
119static void rx51_lp5523_enable(bool state)
120{
121 gpio_set_value(RX51_LP5523_CHIP_EN_GPIO, !!state);
122}
123
124static struct lp5523_platform_data rx51_lp5523_platform_data = {
125 .led_config = rx51_lp5523_led_config,
126 .num_channels = ARRAY_SIZE(rx51_lp5523_led_config),
127 .clock_mode = LP5523_CLOCK_AUTO,
128 .setup_resources = rx51_lp5523_setup,
129 .release_resources = rx51_lp5523_release,
130 .enable = rx51_lp5523_enable,
131};
132#endif
133
74static struct omap2_mcspi_device_config wl1251_mcspi_config = { 134static struct omap2_mcspi_device_config wl1251_mcspi_config = {
75 .turbo_mode = 0, 135 .turbo_mode = 0,
76 .single_channel = 1, 136 .single_channel = 1,
@@ -495,6 +555,32 @@ static struct regulator_init_data rx51_vmmc2 = {
495 .consumer_supplies = rx51_vmmc2_supplies, 555 .consumer_supplies = rx51_vmmc2_supplies,
496}; 556};
497 557
558static struct regulator_init_data rx51_vpll1 = {
559 .constraints = {
560 .name = "VPLL",
561 .min_uV = 1800000,
562 .max_uV = 1800000,
563 .apply_uV = true,
564 .always_on = true,
565 .valid_modes_mask = REGULATOR_MODE_NORMAL
566 | REGULATOR_MODE_STANDBY,
567 .valid_ops_mask = REGULATOR_CHANGE_MODE,
568 },
569};
570
571static struct regulator_init_data rx51_vpll2 = {
572 .constraints = {
573 .name = "VSDI_CSI",
574 .min_uV = 1800000,
575 .max_uV = 1800000,
576 .apply_uV = true,
577 .always_on = true,
578 .valid_modes_mask = REGULATOR_MODE_NORMAL
579 | REGULATOR_MODE_STANDBY,
580 .valid_ops_mask = REGULATOR_CHANGE_MODE,
581 },
582};
583
498static struct regulator_init_data rx51_vsim = { 584static struct regulator_init_data rx51_vsim = {
499 .constraints = { 585 .constraints = {
500 .name = "VMMC2_IO_18", 586 .name = "VMMC2_IO_18",
@@ -524,6 +610,43 @@ static struct regulator_init_data rx51_vio = {
524 .consumer_supplies = rx51_vio_supplies, 610 .consumer_supplies = rx51_vio_supplies,
525}; 611};
526 612
613static struct regulator_init_data rx51_vintana1 = {
614 .constraints = {
615 .name = "VINTANA1",
616 .min_uV = 1500000,
617 .max_uV = 1500000,
618 .always_on = true,
619 .valid_modes_mask = REGULATOR_MODE_NORMAL
620 | REGULATOR_MODE_STANDBY,
621 .valid_ops_mask = REGULATOR_CHANGE_MODE,
622 },
623};
624
625static struct regulator_init_data rx51_vintana2 = {
626 .constraints = {
627 .name = "VINTANA2",
628 .min_uV = 2750000,
629 .max_uV = 2750000,
630 .apply_uV = true,
631 .always_on = true,
632 .valid_modes_mask = REGULATOR_MODE_NORMAL
633 | REGULATOR_MODE_STANDBY,
634 .valid_ops_mask = REGULATOR_CHANGE_MODE,
635 },
636};
637
638static struct regulator_init_data rx51_vintdig = {
639 .constraints = {
640 .name = "VINTDIG",
641 .min_uV = 1500000,
642 .max_uV = 1500000,
643 .always_on = true,
644 .valid_modes_mask = REGULATOR_MODE_NORMAL
645 | REGULATOR_MODE_STANDBY,
646 .valid_ops_mask = REGULATOR_CHANGE_MODE,
647 },
648};
649
527static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = { 650static struct si4713_platform_data rx51_si4713_i2c_data __initdata_or_module = {
528 .gpio_reset = RX51_FMTX_RESET_GPIO, 651 .gpio_reset = RX51_FMTX_RESET_GPIO,
529}; 652};
@@ -761,7 +884,12 @@ static struct twl4030_platform_data rx51_twldata __initdata = {
761 .vaux2 = &rx51_vaux2, 884 .vaux2 = &rx51_vaux2,
762 .vaux4 = &rx51_vaux4, 885 .vaux4 = &rx51_vaux4,
763 .vmmc1 = &rx51_vmmc1, 886 .vmmc1 = &rx51_vmmc1,
887 .vpll1 = &rx51_vpll1,
888 .vpll2 = &rx51_vpll2,
764 .vsim = &rx51_vsim, 889 .vsim = &rx51_vsim,
890 .vintana1 = &rx51_vintana1,
891 .vintana2 = &rx51_vintana2,
892 .vintdig = &rx51_vintdig,
765 .vio = &rx51_vio, 893 .vio = &rx51_vio,
766}; 894};
767 895
@@ -800,6 +928,12 @@ static struct i2c_board_info __initdata rx51_peripherals_i2c_board_info_2[] = {
800 .platform_data = &rx51_tsl2563_platform_data, 928 .platform_data = &rx51_tsl2563_platform_data,
801 }, 929 },
802#endif 930#endif
931#if defined(CONFIG_LEDS_LP5523) || defined(CONFIG_LEDS_LP5523_MODULE)
932 {
933 I2C_BOARD_INFO("lp5523", 0x32),
934 .platform_data = &rx51_lp5523_platform_data,
935 },
936#endif
803 { 937 {
804 I2C_BOARD_INFO("tpa6130a2", 0x60), 938 I2C_BOARD_INFO("tpa6130a2", 0x60),
805 .platform_data = &rx51_tpa6130a2_data, 939 .platform_data = &rx51_tpa6130a2_data,
@@ -950,6 +1084,7 @@ error:
950void __init rx51_peripherals_init(void) 1084void __init rx51_peripherals_init(void)
951{ 1085{
952 rx51_i2c_init(); 1086 rx51_i2c_init();
1087 regulator_has_full_constraints();
953 gpmc_onenand_init(board_onenand_data); 1088 gpmc_onenand_init(board_onenand_data);
954 board_smc91x_init(); 1089 board_smc91x_init();
955 rx51_add_gpio_keys(); 1090 rx51_add_gpio_keys();