diff options
Diffstat (limited to 'arch/arm/mach-omap2/board-omap4panda.c')
| -rw-r--r-- | arch/arm/mach-omap2/board-omap4panda.c | 119 | 
1 files changed, 29 insertions, 90 deletions
diff --git a/arch/arm/mach-omap2/board-omap4panda.c b/arch/arm/mach-omap2/board-omap4panda.c index 1b782ba5343..68b8fc9ff01 100644 --- a/arch/arm/mach-omap2/board-omap4panda.c +++ b/arch/arm/mach-omap2/board-omap4panda.c @@ -28,6 +28,7 @@  #include <linux/mfd/twl6040.h>  #include <linux/regulator/machine.h>  #include <linux/regulator/fixed.h> +#include <linux/ti_wilink_st.h>  #include <linux/wl12xx.h>  #include <linux/platform_data/omap-abe-twl6040.h> @@ -42,7 +43,7 @@  #include "common.h"  #include <plat/usb.h>  #include <plat/mmc.h> -#include <video/omap-panel-dvi.h> +#include <video/omap-panel-tfp410.h>  #include "hsmmc.h"  #include "control.h" @@ -58,12 +59,21 @@  #define HDMI_GPIO_HPD  63 /* Hotplug detect */  /* wl127x BT, FM, GPS connectivity chip */ -static int wl1271_gpios[] = {46, -1, -1}; +static struct ti_st_plat_data wilink_platform_data = { +	.nshutdown_gpio	= 46, +	.dev_name	= "/dev/ttyO1", +	.flow_cntrl	= 1, +	.baud_rate	= 3000000, +	.chip_enable	= NULL, +	.suspend	= NULL, +	.resume		= NULL, +}; +  static struct platform_device wl1271_device = {  	.name	= "kim",  	.id	= -1,  	.dev	= { -		.platform_data	= &wl1271_gpios, +		.platform_data	= &wilink_platform_data,  	},  }; @@ -117,6 +127,11 @@ static struct platform_device panda_abe_audio = {  	},  }; +static struct platform_device panda_hdmi_audio_codec = { +	.name	= "hdmi-audio-codec", +	.id	= -1, +}; +  static struct platform_device btwilink_device = {  	.name	= "btwilink",  	.id	= -1, @@ -126,6 +141,7 @@ static struct platform_device *panda_devices[] __initdata = {  	&leds_gpio,  	&wl1271_device,  	&panda_abe_audio, +	&panda_hdmi_audio_codec,  	&btwilink_device,  }; @@ -231,60 +247,11 @@ static struct platform_device omap_vwlan_device = {  	},  }; -struct wl12xx_platform_data omap_panda_wlan_data  __initdata = { +static struct wl12xx_platform_data omap_panda_wlan_data  __initdata = {  	/* PANDA ref clock is 38.4 MHz */  	.board_ref_clock = 2,  }; -static int omap4_twl6030_hsmmc_late_init(struct device *dev) -{ -	int irq = 0; -	struct platform_device *pdev = container_of(dev, -				struct platform_device, dev); -	struct omap_mmc_platform_data *pdata = dev->platform_data; - -	if (!pdata) { -		dev_err(dev, "%s: NULL platform data\n", __func__); -		return -EINVAL; -	} -	/* Setting MMC1 Card detect Irq */ -	if (pdev->id == 0) { -		irq = twl6030_mmc_card_detect_config(); -		if (irq < 0) { -			dev_err(dev, "%s: Error card detect config(%d)\n", -				__func__, irq); -			return irq; -		} -		pdata->slots[0].card_detect = twl6030_mmc_card_detect; -	} -	return 0; -} - -static __init void omap4_twl6030_hsmmc_set_late_init(struct device *dev) -{ -	struct omap_mmc_platform_data *pdata; - -	/* dev can be null if CONFIG_MMC_OMAP_HS is not set */ -	if (!dev) { -		pr_err("Failed omap4_twl6030_hsmmc_set_late_init\n"); -		return; -	} -	pdata = dev->platform_data; - -	pdata->init =	omap4_twl6030_hsmmc_late_init; -} - -static int __init omap4_twl6030_hsmmc_init(struct omap2_hsmmc_info *controllers) -{ -	struct omap2_hsmmc_info *c; - -	omap_hsmmc_init(controllers); -	for (c = controllers; c->mmc; c++) -		omap4_twl6030_hsmmc_set_late_init(&c->pdev->dev); - -	return 0; -} -  static struct twl6040_codec_data twl6040_codec = {  	/* single-step ramp for headset and handsfree */  	.hs_left_step	= 0x0f, @@ -323,7 +290,9 @@ static int __init omap4_panda_i2c_init(void)  			TWL_COMMON_REGULATOR_VANA |  			TWL_COMMON_REGULATOR_VCXIO |  			TWL_COMMON_REGULATOR_VUSB | -			TWL_COMMON_REGULATOR_CLK32KG); +			TWL_COMMON_REGULATOR_CLK32KG | +			TWL_COMMON_REGULATOR_V1V8 | +			TWL_COMMON_REGULATOR_V2V1);  	omap4_pmic_init("twl6030", &omap4_panda_twldata,  			&twl6040_data, OMAP44XX_IRQ_SYS_2N);  	omap_register_i2c_bus(2, 400, NULL, 0); @@ -420,47 +389,22 @@ static struct omap_board_mux board_mux[] __initdata = {  /* Display DVI */  #define PANDA_DVI_TFP410_POWER_DOWN_GPIO	0 -static int omap4_panda_enable_dvi(struct omap_dss_device *dssdev) -{ -	gpio_set_value(dssdev->reset_gpio, 1); -	return 0; -} - -static void omap4_panda_disable_dvi(struct omap_dss_device *dssdev) -{ -	gpio_set_value(dssdev->reset_gpio, 0); -} -  /* Using generic display panel */ -static struct panel_dvi_platform_data omap4_dvi_panel = { -	.platform_enable	= omap4_panda_enable_dvi, -	.platform_disable	= omap4_panda_disable_dvi, -	.i2c_bus_num = 3, +static struct tfp410_platform_data omap4_dvi_panel = { +	.i2c_bus_num		= 3, +	.power_down_gpio	= PANDA_DVI_TFP410_POWER_DOWN_GPIO,  }; -struct omap_dss_device omap4_panda_dvi_device = { +static struct omap_dss_device omap4_panda_dvi_device = {  	.type			= OMAP_DISPLAY_TYPE_DPI,  	.name			= "dvi", -	.driver_name		= "dvi", +	.driver_name		= "tfp410",  	.data			= &omap4_dvi_panel,  	.phy.dpi.data_lines	= 24,  	.reset_gpio		= PANDA_DVI_TFP410_POWER_DOWN_GPIO,  	.channel		= OMAP_DSS_CHANNEL_LCD2,  }; -int __init omap4_panda_dvi_init(void) -{ -	int r; - -	/* Requesting TFP410 DVI GPIO and disabling it, at bootup */ -	r = gpio_request_one(omap4_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 struct gpio panda_hdmi_gpios[] = {  	{ HDMI_GPIO_CT_CP_HPD, GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ct_cp_hpd" },  	{ HDMI_GPIO_LS_OE,	GPIOF_OUT_INIT_HIGH, "hdmi_gpio_ls_oe" }, @@ -509,13 +453,8 @@ static struct omap_dss_board_info omap4_panda_dss_data = {  	.default_device	= &omap4_panda_dvi_device,  }; -void __init omap4_panda_display_init(void) +static void __init omap4_panda_display_init(void)  { -	int r; - -	r = omap4_panda_dvi_init(); -	if (r) -		pr_err("error initializing panda DVI\n");  	omap_display_init(&omap4_panda_dss_data);  |