diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-zoom-peripherals.c')
-rw-r--r-- | arch/arm/mach-omap2/board-zoom-peripherals.c | 41 |
1 files changed, 23 insertions, 18 deletions
diff --git a/arch/arm/mach-omap2/board-zoom-peripherals.c b/arch/arm/mach-omap2/board-zoom-peripherals.c index 26e07addc9d..cdc0c102186 100644 --- a/arch/arm/mach-omap2/board-zoom-peripherals.c +++ b/arch/arm/mach-omap2/board-zoom-peripherals.c @@ -20,6 +20,8 @@ #include <linux/wl12xx.h> #include <linux/mmc/host.h> #include <linux/platform_data/gpio-omap.h> +#include <linux/platform_data/omap-twl4030.h> +#include <linux/usb/phy.h> #include <asm/mach-types.h> #include <asm/mach/arch.h> @@ -34,11 +36,9 @@ #include "common-board-devices.h" #define OMAP_ZOOM_WLAN_PMENA_GPIO (101) -#define ZOOM2_HEADSET_EXTMUTE_GPIO (153) +#define OMAP_ZOOM_TSC2004_IRQ_GPIO (153) #define OMAP_ZOOM_WLAN_IRQ_GPIO (162) -#define LCD_PANEL_ENABLE_GPIO (7 + OMAP_MAX_GPIO_LINES) - /* Zoom2 has Qwerty keyboard*/ static uint32_t board_keymap[] = { KEY(0, 0, KEY_E), @@ -226,22 +226,31 @@ static struct omap2_hsmmc_info mmc[] = { {} /* Terminator */ }; +static struct omap_tw4030_pdata omap_twl4030_audio_data = { + .voice_connected = true, + .custom_routing = true, + + .has_hs = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, + .has_hf = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, + + .has_mainmic = true, + .has_submic = true, + .has_hsmic = true, + .has_linein = OMAP_TWL4030_LEFT | OMAP_TWL4030_RIGHT, +}; + static int zoom_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) { - int ret; - /* gpio + 0 is "mmc0_cd" (input/IRQ) */ mmc[0].gpio_cd = gpio + 0; omap_hsmmc_late_init(mmc); - ret = gpio_request_one(LCD_PANEL_ENABLE_GPIO, GPIOF_OUT_INIT_LOW, - "lcd enable"); - if (ret) - pr_err("Failed to get LCD_PANEL_ENABLE_GPIO (gpio%d).\n", - LCD_PANEL_ENABLE_GPIO); + /* Audio setup */ + omap_twl4030_audio_data.jack_detect = gpio + 2; + omap_twl4030_audio_init("Zoom2", &omap_twl4030_audio_data); - return ret; + return 0; } static struct twl4030_gpio_platform_data zoom_gpio_data = { @@ -264,14 +273,9 @@ static int __init omap_i2c_init(void) TWL_COMMON_PDATA_MADC | TWL_COMMON_PDATA_AUDIO, TWL_COMMON_REGULATOR_VDAC | TWL_COMMON_REGULATOR_VPLL2); - if (machine_is_omap_zoom2()) { - struct twl4030_codec_data *codec_data; - codec_data = zoom_twldata.audio->codec; + if (machine_is_omap_zoom2()) + zoom_twldata.audio->codec->ramp_delay_value = 3; /* 161 ms */ - codec_data->ramp_delay_value = 3; /* 161 ms */ - codec_data->hs_extmute = 1; - codec_data->hs_extmute_gpio = ZOOM2_HEADSET_EXTMUTE_GPIO; - } omap_pmic_init(1, 2400, "twl5030", 7 + OMAP_INTC_START, &zoom_twldata); omap_register_i2c_bus(2, 400, NULL, 0); omap_register_i2c_bus(3, 400, NULL, 0); @@ -298,6 +302,7 @@ void __init zoom_peripherals_init(void) omap_hsmmc_init(mmc); omap_i2c_init(); platform_device_register(&omap_vwlan_device); + usb_bind_phy("musb-hdrc.0.auto", 0, "twl4030_usb"); usb_musb_init(NULL); enable_board_wakeup_source(); omap_serial_init(); |