summaryrefslogtreecommitdiff
path: root/arch/arm/mach-omap2/board-omap4panda.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
-rw-r--r--arch/arm/mach-omap2/board-omap4panda.c117
1 files changed, 105 insertions, 12 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c
index 920b7ba1c45..891a3da88cf 100644
--- a/arch/arm/mach-omap2/board-omap4panda.c
+++ b/arch/arm/mach-omap2/board-omap4panda.c
@@ -30,6 +30,8 @@
#include <linux/wl12xx.h>
#include <linux/netdevice.h>
#include <linux/if_ether.h>
+#include <linux/skbuff.h>
+#include <linux/ti_wilink_st.h>
#include <mach/hardware.h>
#include <mach/omap4-common.h>
@@ -38,6 +40,7 @@
#include <asm/mach/arch.h>
#include <asm/mach/map.h>
#include <plat/display.h>
+#include <plat/panel-generic-dpi.h>
#include <plat/board.h>
#include <plat/common.h>
@@ -50,6 +53,7 @@
#include "control.h"
#include "mux.h"
+
#define GPIO_HUB_POWER 1
#define GPIO_HUB_NRESET 62
#define GPIO_WIFI_PMENA 43
@@ -57,16 +61,6 @@
#define HDMI_GPIO_HPD 60 /* Hot plug pin for HDMI */
#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
-/* wl127x BT, FM, GPS connectivity chip */
-static int wl1271_gpios[] = {46, -1, -1};
-static struct platform_device wl1271_device = {
- .name = "kim",
- .id = -1,
- .dev = {
- .platform_data = &wl1271_gpios,
- },
-};
-
static struct gpio_led gpio_leds[] = {
{
.name = "pandaboard::status1",
@@ -93,11 +87,78 @@ static struct platform_device leds_gpio = {
},
};
+static struct platform_device omap4panda_hdmi_audio_device = {
+ .name = "hdmi-audio-dai",
+ .id = -1,
+};
+
+struct ti_st_plat_data wilink_pdata = {
+ .nshutdown_gpio = 46,
+ .dev_name = "/dev/ttyO1",
+ .flow_cntrl = 1,
+ .baud_rate = 3000000,
+};
+static struct platform_device wl128x_device = {
+ .name = "kim",
+ .id = -1,
+ .dev.platform_data = &wilink_pdata,
+};
+static struct platform_device btwilink_device = {
+ .name = "btwilink",
+ .id = -1,
+};
+
static struct platform_device *panda_devices[] __initdata = {
&leds_gpio,
- &wl1271_device,
+ &omap4panda_hdmi_audio_device,
+ &wl128x_device,
+ &btwilink_device,
+};
+
+/* Display DVI */
+#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0
+
+static int panda_enable_dvi(struct omap_dss_device *dssdev)
+{
+ gpio_set_value(dssdev->reset_gpio, 1);
+ return 0;
+}
+
+static void panda_disable_dvi(struct omap_dss_device *dssdev)
+{
+ gpio_set_value(dssdev->reset_gpio, 0);
+}
+
+/* Using generic display panel */
+static struct panel_generic_dpi_data dvi_panel = {
+ .name = "generic",
+ .platform_enable = panda_enable_dvi,
+ .platform_disable = panda_disable_dvi,
+};
+
+struct omap_dss_device panda_dvi_device = {
+ .type = OMAP_DISPLAY_TYPE_DPI,
+ .name = "dvi",
+ .driver_name = "generic_dpi_panel",
+ .data = &dvi_panel,
+ .phy.dpi.data_lines = 24,
+ .reset_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO,
+ .channel = OMAP_DSS_CHANNEL_LCD2,
};
+int __init panda_dvi_init(void)
+{
+ int r;
+
+ /* Requesting TFP410 DVI GPIO and disabling it, at bootup */
+ r = gpio_request_one(panda_dvi_device.reset_gpio,
+ GPIOF_OUT_INIT_LOW, "DVI PD");
+ if (r)
+ pr_err("Failed to get DVI powerdown GPIO\n");
+
+ return r;
+}
+
static void __init omap4_panda_init_early(void)
{
omap2_init_common_infrastructure();
@@ -393,6 +454,20 @@ static struct regulator_init_data omap4_panda_clk32kg = {
.valid_ops_mask = REGULATOR_CHANGE_STATUS,
},
};
+static struct twl4030_codec_audio_data twl6040_audio = {
+ /* single-step ramp for headset and handsfree */
+ .left_step_hs = 0x0f,
+ .right_step_hs = 0x0f,
+ .left_step_hf = 0x1d,
+ .right_step_hf = 0x1d,
+};
+
+static struct twl4030_codec_data twl6040_codec = {
+ .audio = &twl6040_audio,
+ .audpwron_gpio = 127,
+ .naudint_irq = OMAP44XX_IRQ_SYS_2N,
+ .irq_base = TWL6040_CODEC_IRQ_BASE,
+};
static struct twl4030_platform_data omap4_panda_twldata = {
.irq_base = TWL6030_IRQ_BASE,
@@ -409,6 +484,9 @@ static struct twl4030_platform_data omap4_panda_twldata = {
.vaux3 = &omap4_panda_vaux3,
.clk32kg = &omap4_panda_clk32kg,
.usb = &omap4_usbphy_data,
+
+ /* children */
+ .codec = &twl6040_codec,
};
static struct i2c_board_info __initdata omap4_panda_i2c_boardinfo[] = {
@@ -522,6 +600,19 @@ static struct omap_board_mux board_mux[] __initdata = {
OMAP4_MUX(DPM_EMU18, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
/* dispc2_data0 */
OMAP4_MUX(DPM_EMU19, OMAP_PIN_OUTPUT | OMAP_MUX_MODE5),
+ /* WLAN IRQ - GPIO 53 */
+ OMAP4_MUX(GPMC_NCS3, OMAP_MUX_MODE3 | OMAP_PIN_INPUT),
+ /* WLAN POWER ENABLE - GPIO 43 */
+ OMAP4_MUX(GPMC_A19, OMAP_MUX_MODE3 | OMAP_PIN_OUTPUT),
+ /* WLAN SDIO: MMC5 CMD */
+ OMAP4_MUX(SDMMC5_CMD, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+ /* WLAN SDIO: MMC5 CLK */
+ OMAP4_MUX(SDMMC5_CLK, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+ /* WLAN SDIO: MMC5 DAT[0-3] */
+ OMAP4_MUX(SDMMC5_DAT0, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+ OMAP4_MUX(SDMMC5_DAT1, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+ OMAP4_MUX(SDMMC5_DAT2, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
+ OMAP4_MUX(SDMMC5_DAT3, OMAP_MUX_MODE0 | OMAP_PIN_INPUT_PULLUP),
{ .reg_offset = OMAP_MUX_TERMINATOR },
};
@@ -696,13 +787,15 @@ static struct omap_dss_device omap4_panda_hdmi_device = {
static struct omap_dss_device *omap4_panda_dss_devices[] = {
&omap4_panda_dvi_device,
+#ifdef CONFIG_OMAP4_DSS_HDMI
&omap4_panda_hdmi_device,
+#endif
};
static struct omap_dss_board_info omap4_panda_dss_data = {
.num_devices = ARRAY_SIZE(omap4_panda_dss_devices),
.devices = omap4_panda_dss_devices,
- .default_device = &omap4_panda_dvi_device,
+ .default_device = &omap4_panda_hdmi_device,
};
void omap4_panda_display_init(void)