Commit 7346582d authored by Tomi Valkeinen's avatar Tomi Valkeinen

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: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
Acked-by: default avatarTony Lindgren <tony@atomide.com>
parent 488e352b
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <linux/kernel.h> #include <linux/kernel.h>
#include <linux/gpio.h> #include <linux/gpio.h>
#include <linux/platform_device.h>
#include <video/omapdss.h> #include <video/omapdss.h>
#include <video/omap-panel-data.h> #include <video/omap-panel-data.h>
...@@ -37,52 +38,76 @@ ...@@ -37,52 +38,76 @@
#define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */ #define HDMI_GPIO_LS_OE 41 /* Level shifter for HDMI */
#define HDMI_GPIO_HPD 63 /* Hotplug detect */ #define HDMI_GPIO_HPD 63 /* Hotplug detect */
/* Display DVI */
#define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0 #define PANDA_DVI_TFP410_POWER_DOWN_GPIO 0
/* Using generic display panel */ /* DVI Connector */
static struct tfp410_platform_data omap4_dvi_panel = { static struct connector_dvi_platform_data omap4_panda_dvi_connector_pdata = {
.i2c_bus_num = 2, .name = "dvi",
.power_down_gpio = PANDA_DVI_TFP410_POWER_DOWN_GPIO, .source = "tfp410.0",
.i2c_bus_num = 2,
}; };
static struct omap_dss_device omap4_panda_dvi_device = { static struct platform_device omap4_panda_dvi_connector_device = {
.type = OMAP_DISPLAY_TYPE_DPI, .name = "connector-dvi",
.name = "dvi", .id = 0,
.driver_name = "tfp410", .dev.platform_data = &omap4_panda_dvi_connector_pdata,
.data = &omap4_dvi_panel, };
.phy.dpi.data_lines = 24,
.channel = OMAP_DSS_CHANNEL_LCD2, /* 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, .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
.ls_oe_gpio = HDMI_GPIO_LS_OE, .ls_oe_gpio = HDMI_GPIO_LS_OE,
.hpd_gpio = HDMI_GPIO_HPD, .hpd_gpio = HDMI_GPIO_HPD,
}; };
static struct omap_dss_device omap4_panda_hdmi_device = { static struct platform_device omap4_panda_tpd_device = {
.name = "hdmi", .name = "tpd12s015",
.driver_name = "hdmi_panel", .id = 0,
.type = OMAP_DISPLAY_TYPE_HDMI, .dev.platform_data = &omap4_panda_tpd_pdata,
.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 omap_dss_board_info omap4_panda_dss_data = { static struct omap_dss_board_info omap4_panda_dss_data = {
.num_devices = ARRAY_SIZE(omap4_panda_dss_devices), .default_display_name = "dvi",
.devices = omap4_panda_dss_devices,
.default_device = &omap4_panda_dvi_device,
}; };
void __init omap4_panda_display_init_of(void) void __init omap4_panda_display_init_of(void)
{ {
omap_display_init(&omap4_panda_dss_data); 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) ...@@ -91,67 +116,71 @@ void __init omap4_panda_display_init_of(void)
#define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */ #define DISPLAY_SEL_GPIO 59 /* LCD2/PicoDLP switch */
#define DLP_POWER_ON_GPIO 40 #define DLP_POWER_ON_GPIO 40
static struct nokia_dsi_panel_data dsi1_panel = { static struct panel_dsicm_platform_data dsi1_panel = {
.name = "taal", .name = "lcd",
.reset_gpio = 102, .source = "dsi.0",
.use_ext_te = false, .reset_gpio = 102,
.ext_te_gpio = 101, .use_ext_te = false,
.esd_interval = 0, .ext_te_gpio = 101,
.pin_config = { .pin_config = {
.num_pins = 6, .num_pins = 6,
.pins = { 0, 1, 2, 3, 4, 5 }, .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,
}, },
.channel = OMAP_DSS_CHANNEL_LCD,
}; };
static struct nokia_dsi_panel_data dsi2_panel = { static struct platform_device sdp4430_lcd_device = {
.name = "taal", .name = "panel-dsi-cm",
.reset_gpio = 104, .id = 0,
.use_ext_te = false, .dev.platform_data = &dsi1_panel,
.ext_te_gpio = 103,
.esd_interval = 0,
.pin_config = {
.num_pins = 6,
.pins = { 0, 1, 2, 3, 4, 5 },
},
}; };
static struct omap_dss_device sdp4430_lcd2_device = { static struct panel_dsicm_platform_data dsi2_panel = {
.name = "lcd2", .name = "lcd2",
.driver_name = "taal", .source = "dsi.1",
.type = OMAP_DISPLAY_TYPE_DSI, .reset_gpio = 104,
.data = &dsi2_panel, .use_ext_te = false,
.phy.dsi = { .ext_te_gpio = 103,
.pin_config = {
.module = 1, .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, .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
.ls_oe_gpio = HDMI_GPIO_LS_OE, .ls_oe_gpio = HDMI_GPIO_LS_OE,
.hpd_gpio = HDMI_GPIO_HPD, .hpd_gpio = HDMI_GPIO_HPD,
}; };
static struct omap_dss_device sdp4430_hdmi_device = { static struct platform_device sdp4430_tpd_device = {
.name = "hdmi", .name = "tpd12s015",
.driver_name = "hdmi_panel", .id = 0,
.type = OMAP_DISPLAY_TYPE_HDMI, .dev.platform_data = &sdp4430_tpd_pdata,
.channel = OMAP_DSS_CHANNEL_DIGIT,
.data = &sdp4430_hdmi_data,
}; };
static struct picodlp_panel_data sdp4430_picodlp_pdata = { static struct picodlp_panel_data sdp4430_picodlp_pdata = {
.picodlp_adapter_id = 2, .picodlp_adapter_id = 2,
.emu_done_gpio = 44, .emu_done_gpio = 44,
...@@ -168,16 +197,13 @@ static struct omap_dss_device sdp4430_picodlp_device = { ...@@ -168,16 +197,13 @@ static struct omap_dss_device sdp4430_picodlp_device = {
}; };
static struct omap_dss_device *sdp4430_dss_devices[] = { static struct omap_dss_device *sdp4430_dss_devices[] = {
&sdp4430_lcd_device,
&sdp4430_lcd2_device,
&sdp4430_hdmi_device,
&sdp4430_picodlp_device, &sdp4430_picodlp_device,
}; };
static struct omap_dss_board_info sdp4430_dss_data = { static struct omap_dss_board_info sdp4430_dss_data = {
.num_devices = ARRAY_SIZE(sdp4430_dss_devices), .num_devices = ARRAY_SIZE(sdp4430_dss_devices),
.devices = 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) ...@@ -201,4 +227,10 @@ void __init omap_4430sdp_display_init_of(void)
pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__); pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__);
omap_display_init(&sdp4430_dss_data); 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);
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment