aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/board-4430sdp.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-4430sdp.c')
-rw-r--r--arch/arm/mach-omap2/board-4430sdp.c65
1 files changed, 55 insertions, 10 deletions
diff --git a/arch/arm/mach-omap2/board-4430sdp.c b/arch/arm/mach-omap2/board-4430sdp.c
index 39fba9df17fb..44cf1893829a 100644
--- a/arch/arm/mach-omap2/board-4430sdp.c
+++ b/arch/arm/mach-omap2/board-4430sdp.c
@@ -25,6 +25,7 @@
25#include <linux/regulator/fixed.h> 25#include <linux/regulator/fixed.h>
26#include <linux/leds.h> 26#include <linux/leds.h>
27#include <linux/leds_pwm.h> 27#include <linux/leds_pwm.h>
28#include <linux/platform_data/omap4-keypad.h>
28 29
29#include <mach/hardware.h> 30#include <mach/hardware.h>
30#include <asm/hardware/gic.h> 31#include <asm/hardware/gic.h>
@@ -41,6 +42,7 @@
41#include <video/omap-panel-nokia-dsi.h> 42#include <video/omap-panel-nokia-dsi.h>
42#include <video/omap-panel-picodlp.h> 43#include <video/omap-panel-picodlp.h>
43#include <linux/wl12xx.h> 44#include <linux/wl12xx.h>
45#include <linux/platform_data/omap-abe-twl6040.h>
44 46
45#include "mux.h" 47#include "mux.h"
46#include "hsmmc.h" 48#include "hsmmc.h"
@@ -52,8 +54,9 @@
52#define ETH_KS8851_QUART 138 54#define ETH_KS8851_QUART 138
53#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184 55#define OMAP4_SFH7741_SENSOR_OUTPUT_GPIO 184
54#define OMAP4_SFH7741_ENABLE_GPIO 188 56#define OMAP4_SFH7741_ENABLE_GPIO 188
55#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */ 57#define HDMI_GPIO_CT_CP_HPD 60 /* HPD mode enable/disable */
56#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ 58#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
59#define HDMI_GPIO_HPD 63 /* Hotplug detect */
57#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ 60#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
58#define DLP_POWER_ON_GPIO 40 61#define DLP_POWER_ON_GPIO 40
59 62
@@ -377,12 +380,40 @@ static struct platform_device sdp4430_dmic_codec = {
377 .id = -1, 380 .id = -1,
378}; 381};
379 382
383static struct omap_abe_twl6040_data sdp4430_abe_audio_data = {
384 .card_name = "SDP4430",
385 .has_hs = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
386 .has_hf = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
387 .has_ep = 1,
388 .has_aux = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
389 .has_vibra = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
390
391 .has_dmic = 1,
392 .has_hsmic = 1,
393 .has_mainmic = 1,
394 .has_submic = 1,
395 .has_afm = ABE_TWL6040_LEFT | ABE_TWL6040_RIGHT,
396
397 .jack_detection = 1,
398 /* MCLK input is 38.4MHz */
399 .mclk_freq = 38400000,
400};
401
402static struct platform_device sdp4430_abe_audio = {
403 .name = "omap-abe-twl6040",
404 .id = -1,
405 .dev = {
406 .platform_data = &sdp4430_abe_audio_data,
407 },
408};
409
380static struct platform_device *sdp4430_devices[] __initdata = { 410static struct platform_device *sdp4430_devices[] __initdata = {
381 &sdp4430_gpio_keys_device, 411 &sdp4430_gpio_keys_device,
382 &sdp4430_leds_gpio, 412 &sdp4430_leds_gpio,
383 &sdp4430_leds_pwm, 413 &sdp4430_leds_pwm,
384 &sdp4430_vbat, 414 &sdp4430_vbat,
385 &sdp4430_dmic_codec, 415 &sdp4430_dmic_codec,
416 &sdp4430_abe_audio,
386}; 417};
387 418
388static struct omap_musb_board_data musb_board_data = { 419static struct omap_musb_board_data musb_board_data = {
@@ -603,8 +634,9 @@ static void __init omap_sfh7741prox_init(void)
603} 634}
604 635
605static struct gpio sdp4430_hdmi_gpios[] = { 636static struct gpio sdp4430_hdmi_gpios[] = {
606 { HDMI_GPIO_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_hpd" }, 637 { HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },
607 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, 638 { HDMI_GPIO_LS_OE, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" },
639 { HDMI_GPIO_HPD, GPIOF_DIR_IN, "hdmi_gpio_hpd" },
608}; 640};
609 641
610static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev) 642static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
@@ -621,8 +653,7 @@ static int sdp4430_panel_enable_hdmi(struct omap_dss_device *dssdev)
621 653
622static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev) 654static void sdp4430_panel_disable_hdmi(struct omap_dss_device *dssdev)
623{ 655{
624 gpio_free(HDMI_GPIO_LS_OE); 656 gpio_free_array(sdp4430_hdmi_gpios, ARRAY_SIZE(sdp4430_hdmi_gpios));
625 gpio_free(HDMI_GPIO_HPD);
626} 657}
627 658
628static struct nokia_dsi_panel_data dsi1_panel = { 659static struct nokia_dsi_panel_data dsi1_panel = {
@@ -738,6 +769,10 @@ static void sdp4430_lcd_init(void)
738 pr_err("%s: Could not get lcd2_reset_gpio\n", __func__); 769 pr_err("%s: Could not get lcd2_reset_gpio\n", __func__);
739} 770}
740 771
772static struct omap_dss_hdmi_data sdp4430_hdmi_data = {
773 .hpd_gpio = HDMI_GPIO_HPD,
774};
775
741static struct omap_dss_device sdp4430_hdmi_device = { 776static struct omap_dss_device sdp4430_hdmi_device = {
742 .name = "hdmi", 777 .name = "hdmi",
743 .driver_name = "hdmi_panel", 778 .driver_name = "hdmi_panel",
@@ -745,6 +780,7 @@ static struct omap_dss_device sdp4430_hdmi_device = {
745 .platform_enable = sdp4430_panel_enable_hdmi, 780 .platform_enable = sdp4430_panel_enable_hdmi,
746 .platform_disable = sdp4430_panel_disable_hdmi, 781 .platform_disable = sdp4430_panel_disable_hdmi,
747 .channel = OMAP_DSS_CHANNEL_DIGIT, 782 .channel = OMAP_DSS_CHANNEL_DIGIT,
783 .data = &sdp4430_hdmi_data,
748}; 784};
749 785
750static struct picodlp_panel_data sdp4430_picodlp_pdata = { 786static struct picodlp_panel_data sdp4430_picodlp_pdata = {
@@ -808,7 +844,7 @@ static struct omap_dss_board_info sdp4430_dss_data = {
808 .default_device = &sdp4430_lcd_device, 844 .default_device = &sdp4430_lcd_device,
809}; 845};
810 846
811static void omap_4430sdp_display_init(void) 847static void __init omap_4430sdp_display_init(void)
812{ 848{
813 int r; 849 int r;
814 850
@@ -829,6 +865,10 @@ static void omap_4430sdp_display_init(void)
829 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP); 865 omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
830 else 866 else
831 omap_hdmi_init(0); 867 omap_hdmi_init(0);
868
869 omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
870 omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
871 omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
832} 872}
833 873
834#ifdef CONFIG_OMAP_MUX 874#ifdef CONFIG_OMAP_MUX
@@ -841,7 +881,7 @@ static struct omap_board_mux board_mux[] __initdata = {
841#define board_mux NULL 881#define board_mux NULL
842 #endif 882 #endif
843 883
844static void omap4_sdp4430_wifi_mux_init(void) 884static void __init omap4_sdp4430_wifi_mux_init(void)
845{ 885{
846 omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT | 886 omap_mux_init_gpio(GPIO_WIFI_IRQ, OMAP_PIN_INPUT |
847 OMAP_PIN_OFF_WAKEUPENABLE); 887 OMAP_PIN_OFF_WAKEUPENABLE);
@@ -868,12 +908,17 @@ static struct wl12xx_platform_data omap4_sdp4430_wlan_data __initdata = {
868 .board_tcxo_clock = WL12XX_TCXOCLOCK_26, 908 .board_tcxo_clock = WL12XX_TCXOCLOCK_26,
869}; 909};
870 910
871static void omap4_sdp4430_wifi_init(void) 911static void __init omap4_sdp4430_wifi_init(void)
872{ 912{
913 int ret;
914
873 omap4_sdp4430_wifi_mux_init(); 915 omap4_sdp4430_wifi_mux_init();
874 if (wl12xx_set_platform_data(&omap4_sdp4430_wlan_data)) 916 ret = wl12xx_set_platform_data(&omap4_sdp4430_wlan_data);
875 pr_err("Error setting wl12xx data\n"); 917 if (ret)
876 platform_device_register(&omap_vwlan_device); 918 pr_err("Error setting wl12xx data: %d\n", ret);
919 ret = platform_device_register(&omap_vwlan_device);
920 if (ret)
921 pr_err("Error registering wl12xx device: %d\n", ret);
877} 922}
878 923
879static void __init omap_4430sdp_init(void) 924static void __init omap_4430sdp_init(void)