diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-04-24 10:29:03 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2013-08-28 09:23:19 +0200 |
commit | 7346582dd116181f3c6e9e3c4525f5c0c6cf430b (patch) | |
tree | de07613e56584f31314722f4aa528a11913a93fb /arch/arm/mach-omap2/dss-common.c | |
parent | ARM: OMAP2+: Add selected display drivers to omap2plus_defconfig (diff) | |
download | linux-7346582dd116181f3c6e9e3c4525f5c0c6cf430b.tar.xz linux-7346582dd116181f3c6e9e3c4525f5c0c6cf430b.zip |
ARM: OMAP: dss-common: use new display drivers
Use the new display drivers for OMAP4 Panda and OMAP4 SDP boards.
The new OMAP display drivers were merged for 3.11, and we can now change
the board files to use the new ones and phase out the old ones.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/dss-common.c')
-rw-r--r-- | arch/arm/mach-omap2/dss-common.c | 186 |
1 files changed, 109 insertions, 77 deletions
diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index 00c049243d25..321541223bb7 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c @@ -25,6 +25,7 @@ #include <linux/kernel.h> #include <linux/gpio.h> +#include <linux/platform_device.h> #include <video/omapdss.h> #include <video/omap-panel-data.h> @@ -37,52 +38,76 @@ #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ #define HDMI_GPIO_HPD 63 /* Hotplug detect */ -/* Display DVI */ #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 -/* Using generic display panel */ -static struct tfp410_platform_data omap4_dvi_panel = { - .i2c_bus_num = 2, - .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, +/* DVI Connector */ +static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = { + .name = "dvi", + .source = "tfp410.0", + .i2c_bus_num = 2, }; -static struct omap_dss_device omap4_panda_dvi_device = { - .type = OMAP_DISPLAY_TYPE_DPI, - .name = "dvi", - .driver_name = "tfp410", - .data = &omap4_dvi_panel, - .phy.dpi.data_lines = 24, - .channel = OMAP_DSS_CHANNEL_LCD2, +static struct platform_device omap4_panda_dvi_connector_device = { + .name = "connector-dvi", + .id = 0, + .dev.platform_data = &omap4_panda_dvi_connector_pdata, +}; + +/* TFP410 DPI-to-DVI chip */ +static struct encoder_tfp410_platform_data omap4_panda_tfp410_pdata = { + .name = "tfp410.0", + .source = "dpi.0", + .data_lines = 24, + .power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, +}; + +static struct platform_device omap4_panda_tfp410_device = { + .name = "tfp410", + .id = 0, + .dev.platform_data = &omap4_panda_tfp410_pdata, }; -static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { +/* HDMI Connector */ +static struct connector_hdmi_platform_data omap4_panda_hdmi_connector_pdata = { + .name = "hdmi", + .source = "tpd12s015.0", +}; + +static struct platform_device omap4_panda_hdmi_connector_device = { + .name = "connector-hdmi", + .id = 0, + .dev.platform_data = &omap4_panda_hdmi_connector_pdata, +}; + +/* TPD12S015 HDMI ESD protection & level shifter chip */ +static struct encoder_tpd12s015_platform_data omap4_panda_tpd_pdata = { + .name = "tpd12s015.0", + .source = "hdmi.0", + .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, .ls_oe_gpio = HDMI_GPIO_LS_OE, .hpd_gpio = HDMI_GPIO_HPD, }; -static struct omap_dss_device omap4_panda_hdmi_device = { - .name = "hdmi", - .driver_name = "hdmi_panel", - .type = OMAP_DISPLAY_TYPE_HDMI, - .channel = OMAP_DSS_CHANNEL_DIGIT, - .data = &omap4_panda_hdmi_data, -}; - -static struct omap_dss_device *omap4_panda_dss_devices[] = { - &omap4_panda_dvi_device, - &omap4_panda_hdmi_device, +static struct platform_device omap4_panda_tpd_device = { + .name = "tpd12s015", + .id = 0, + .dev.platform_data = &omap4_panda_tpd_pdata, }; 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_display_name = "dvi", }; void __init omap4_panda_display_init_of(void) { omap_display_init(&omap4_panda_dss_data); + + platform_device_register(&omap4_panda_tfp410_device); + platform_device_register(&omap4_panda_dvi_connector_device); + + platform_device_register(&omap4_panda_tpd_device); + platform_device_register(&omap4_panda_hdmi_connector_device); } @@ -91,67 +116,71 @@ void __init omap4_panda_display_init_of(void) #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ #define DLP_POWER_ON_GPIO 40 -static struct nokia_dsi_panel_data dsi1_panel = { - .name = "taal", - .reset_gpio = 102, - .use_ext_te = false, - .ext_te_gpio = 101, - .esd_interval = 0, - .pin_config = { - .num_pins = 6, - .pins = { 0, 1, 2, 3, 4, 5 }, - }, -}; - -static struct omap_dss_device sdp4430_lcd_device = { - .name = "lcd", - .driver_name = "taal", - .type = OMAP_DISPLAY_TYPE_DSI, - .data = &dsi1_panel, - .phy.dsi = { - .module = 0, +static struct panel_dsicm_platform_data dsi1_panel = { + .name = "lcd", + .source = "dsi.0", + .reset_gpio = 102, + .use_ext_te = false, + .ext_te_gpio = 101, + .pin_config = { + .num_pins = 6, + .pins = { 0, 1, 2, 3, 4, 5 }, }, - .channel = OMAP_DSS_CHANNEL_LCD, }; -static struct nokia_dsi_panel_data dsi2_panel = { - .name = "taal", - .reset_gpio = 104, - .use_ext_te = false, - .ext_te_gpio = 103, - .esd_interval = 0, - .pin_config = { - .num_pins = 6, - .pins = { 0, 1, 2, 3, 4, 5 }, - }, +static struct platform_device sdp4430_lcd_device = { + .name = "panel-dsi-cm", + .id = 0, + .dev.platform_data = &dsi1_panel, }; -static struct omap_dss_device sdp4430_lcd2_device = { - .name = "lcd2", - .driver_name = "taal", - .type = OMAP_DISPLAY_TYPE_DSI, - .data = &dsi2_panel, - .phy.dsi = { - - .module = 1, +static struct panel_dsicm_platform_data dsi2_panel = { + .name = "lcd2", + .source = "dsi.1", + .reset_gpio = 104, + .use_ext_te = false, + .ext_te_gpio = 103, + .pin_config = { + .num_pins = 6, + .pins = { 0, 1, 2, 3, 4, 5 }, }, - .channel = OMAP_DSS_CHANNEL_LCD2, }; -static struct omap_dss_hdmi_data sdp4430_hdmi_data = { +static struct platform_device sdp4430_lcd2_device = { + .name = "panel-dsi-cm", + .id = 1, + .dev.platform_data = &dsi2_panel, +}; + +/* HDMI Connector */ +static struct connector_hdmi_platform_data sdp4430_hdmi_connector_pdata = { + .name = "hdmi", + .source = "tpd12s015.0", +}; + +static struct platform_device sdp4430_hdmi_connector_device = { + .name = "connector-hdmi", + .id = 0, + .dev.platform_data = &sdp4430_hdmi_connector_pdata, +}; + +/* TPD12S015 HDMI ESD protection & level shifter chip */ +static struct encoder_tpd12s015_platform_data sdp4430_tpd_pdata = { + .name = "tpd12s015.0", + .source = "hdmi.0", + .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, .ls_oe_gpio = HDMI_GPIO_LS_OE, .hpd_gpio = HDMI_GPIO_HPD, }; -static struct omap_dss_device sdp4430_hdmi_device = { - .name = "hdmi", - .driver_name = "hdmi_panel", - .type = OMAP_DISPLAY_TYPE_HDMI, - .channel = OMAP_DSS_CHANNEL_DIGIT, - .data = &sdp4430_hdmi_data, +static struct platform_device sdp4430_tpd_device = { + .name = "tpd12s015", + .id = 0, + .dev.platform_data = &sdp4430_tpd_pdata, }; + static struct picodlp_panel_data sdp4430_picodlp_pdata = { .picodlp_adapter_id = 2, .emu_done_gpio = 44, @@ -168,16 +197,13 @@ static struct omap_dss_device sdp4430_picodlp_device = { }; static struct omap_dss_device *sdp4430_dss_devices[] = { - &sdp4430_lcd_device, - &sdp4430_lcd2_device, - &sdp4430_hdmi_device, &sdp4430_picodlp_device, }; static struct omap_dss_board_info sdp4430_dss_data = { .num_devices = ARRAY_SIZE(sdp4430_dss_devices), .devices = sdp4430_dss_devices, - .default_device = &sdp4430_lcd_device, + .default_display_name = "lcd", }; /* @@ -201,4 +227,10 @@ void __init omap_4430sdp_display_init_of(void) pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__); omap_display_init(&sdp4430_dss_data); + + platform_device_register(&sdp4430_lcd_device); + platform_device_register(&sdp4430_lcd2_device); + + platform_device_register(&sdp4430_tpd_device); + platform_device_register(&sdp4430_hdmi_connector_device); } |