aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-omap2')
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c100
1 files changed, 67 insertions, 33 deletions
diff --git a/arch/arm/mach-omap2/board-cm-t35.c b/arch/arm/mach-omap2/board-cm-t35.c
index d4622ed26252..33d159e2386e 100644
--- a/arch/arm/mach-omap2/board-cm-t35.c
+++ b/arch/arm/mach-omap2/board-cm-t35.c
@@ -190,52 +190,81 @@ static inline void cm_t35_init_nand(void) {}
190#define CM_T35_LCD_BL_GPIO 58 190#define CM_T35_LCD_BL_GPIO 58
191#define CM_T35_DVI_EN_GPIO 54 191#define CM_T35_DVI_EN_GPIO 54
192 192
193static struct panel_generic_dpi_data lcd_panel = { 193static const struct display_timing cm_t35_lcd_videomode = {
194 .name = "toppoly_tdo35s", 194 .pixelclock = { 0, 26000000, 0 },
195 .num_gpios = 1, 195
196 .gpios = { 196 .hactive = { 0, 480, 0 },
197 CM_T35_LCD_BL_GPIO, 197 .hfront_porch = { 0, 104, 0 },
198 }, 198 .hback_porch = { 0, 8, 0 },
199 .hsync_len = { 0, 8, 0 },
200
201 .vactive = { 0, 640, 0 },
202 .vfront_porch = { 0, 4, 0 },
203 .vback_porch = { 0, 2, 0 },
204 .vsync_len = { 0, 2, 0 },
205
206 .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
207 DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE,
208};
209
210static struct panel_dpi_platform_data cm_t35_lcd_pdata = {
211 .name = "lcd",
212 .source = "dpi.0",
213
214 .data_lines = 18,
215
216 .display_timing = &cm_t35_lcd_videomode,
217
218 .enable_gpio = -1,
219 .backlight_gpio = CM_T35_LCD_BL_GPIO,
220};
221
222static struct platform_device cm_t35_lcd_device = {
223 .name = "panel-dpi",
224 .id = 0,
225 .dev.platform_data = &cm_t35_lcd_pdata,
199}; 226};
200 227
201static struct omap_dss_device cm_t35_lcd_device = { 228static struct connector_dvi_platform_data cm_t35_dvi_connector_pdata = {
202 .name = "lcd", 229 .name = "dvi",
203 .type = OMAP_DISPLAY_TYPE_DPI, 230 .source = "tfp410.0",
204 .driver_name = "generic_dpi_panel", 231 .i2c_bus_num = -1,
205 .data = &lcd_panel,
206 .phy.dpi.data_lines = 18,
207}; 232};
208 233
209static struct tfp410_platform_data dvi_panel = { 234static struct platform_device cm_t35_dvi_connector_device = {
210 .power_down_gpio = CM_T35_DVI_EN_GPIO, 235 .name = "connector-dvi",
211 .i2c_bus_num = -1, 236 .id = 0,
237 .dev.platform_data = &cm_t35_dvi_connector_pdata,
212}; 238};
213 239
214static struct omap_dss_device cm_t35_dvi_device = { 240static struct encoder_tfp410_platform_data cm_t35_tfp410_pdata = {
215 .name = "dvi", 241 .name = "tfp410.0",
216 .type = OMAP_DISPLAY_TYPE_DPI, 242 .source = "dpi.0",
217 .driver_name = "tfp410", 243 .data_lines = 24,
218 .data = &dvi_panel, 244 .power_down_gpio = CM_T35_DVI_EN_GPIO,
219 .phy.dpi.data_lines = 24,
220}; 245};
221 246
222static struct omap_dss_device cm_t35_tv_device = { 247static struct platform_device cm_t35_tfp410_device = {
223 .name = "tv", 248 .name = "tfp410",
224 .driver_name = "venc", 249 .id = 0,
225 .type = OMAP_DISPLAY_TYPE_VENC, 250 .dev.platform_data = &cm_t35_tfp410_pdata,
226 .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
227}; 251};
228 252
229static struct omap_dss_device *cm_t35_dss_devices[] = { 253static struct connector_atv_platform_data cm_t35_tv_pdata = {
230 &cm_t35_lcd_device, 254 .name = "tv",
231 &cm_t35_dvi_device, 255 .source = "venc.0",
232 &cm_t35_tv_device, 256 .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
257 .invert_polarity = false,
258};
259
260static struct platform_device cm_t35_tv_connector_device = {
261 .name = "connector-analog-tv",
262 .id = 0,
263 .dev.platform_data = &cm_t35_tv_pdata,
233}; 264};
234 265
235static struct omap_dss_board_info cm_t35_dss_data = { 266static struct omap_dss_board_info cm_t35_dss_data = {
236 .num_devices = ARRAY_SIZE(cm_t35_dss_devices), 267 .default_display_name = "dvi",
237 .devices = cm_t35_dss_devices,
238 .default_device = &cm_t35_dvi_device,
239}; 268};
240 269
241static struct omap2_mcspi_device_config tdo24m_mcspi_config = { 270static struct omap2_mcspi_device_config tdo24m_mcspi_config = {
@@ -280,6 +309,11 @@ static void __init cm_t35_init_display(void)
280 pr_err("CM-T35: failed to register DSS device\n"); 309 pr_err("CM-T35: failed to register DSS device\n");
281 gpio_free(CM_T35_LCD_EN_GPIO); 310 gpio_free(CM_T35_LCD_EN_GPIO);
282 } 311 }
312
313 platform_device_register(&cm_t35_tfp410_device);
314 platform_device_register(&cm_t35_dvi_connector_device);
315 platform_device_register(&cm_t35_lcd_device);
316 platform_device_register(&cm_t35_tv_connector_device);
283} 317}
284 318
285static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = { 319static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = {