summaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2013-09-05 09:44:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2013-09-05 09:44:03 -0700
commiteced5a0a5a8f7a3b07320e3b7d1d432e0f044735 (patch)
tree043192035e9d9fb77f052ae4dc6fa21ea257efc0 /arch
parent7c049d086941a74c1babac6dc6901b88e1ce5b7e (diff)
parent9560dc1059222d059d494a64e5da4c54d23838da (diff)
Merge tag 'fbdev-3.12-omap-legacy-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux
Pull OMAP specific fbdev changes from Tomi Valkeinen: "I've got this pull request separate from the main fbdev pull request, as this contains a bunch of OMAP board file changes and thus could possibly be rejected in case of bad conflicts. The removal of the old display drivers depend on the board file changes, so Tony Lindgren suggested taking them together via fbdev tree. These are in linux-next, and also Tony didn't see any conflicts with any of the branches he had, so they should go in clean. - Change the OMAP board files to use the new OMAP display drivers - Remove all the old drivers, and the related auxiliary code" * tag 'fbdev-3.12-omap-legacy-removal' of git://git.kernel.org/pub/scm/linux/kernel/git/tomba/linux: (35 commits) OMAPDSS: rename omap_dss_device's 'device' field to 'dst' OMAPDSS: rename omap_dss_device's 'output' to 'src' OMAPDSS: DSS: remove legacy dss bus support OMAPDSS: RFBI: remove code related to old panel model OMAPDSS: VENC: remove code related to old panel model OMAPDSS: SDI: remove code related to old panel model OMAPDSS: DSI: remove code related to old panel model OMAPDSS: HDMI: remove code related to old panel model OMAPDSS: DPI: remove code related to old panel model OMAPDSS: remove all old panel drivers OMAPDSS: DPI: change regulator handling OMAPDSS: SDI: change regulator handling OMAPDSS: fix DPI and SDI device ids OMAPDSS: remove omap_dss_device->channel field OMAPDSS: RFBI: Mark RFBI as broken ARM: OMAP2+: Remove old display drivers from omap2plus_defconfig ARM: OMAP: AM3517EVM: use new display drivers ARM: OMAP: Zoom: use new display drivers ARM: OMAP: Pandora: use new display drivers ARM: OMAP: OMAP3EVM: use new display drivers ...
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/configs/omap2plus_defconfig12
-rw-r--r--arch/arm/mach-omap2/board-2430sdp.c57
-rw-r--r--arch/arm/mach-omap2/board-3430sdp.c83
-rw-r--r--arch/arm/mach-omap2/board-am3517evm.c113
-rw-r--r--arch/arm/mach-omap2/board-cm-t35.c100
-rw-r--r--arch/arm/mach-omap2/board-devkit8000.c96
-rw-r--r--arch/arm/mach-omap2/board-h4.c48
-rw-r--r--arch/arm/mach-omap2/board-igep0020.c36
-rw-r--r--arch/arm/mach-omap2/board-ldp.c68
-rw-r--r--arch/arm/mach-omap2/board-omap3beagle.c56
-rw-r--r--arch/arm/mach-omap2/board-omap3evm.c87
-rw-r--r--arch/arm/mach-omap2/board-omap3pandora.c48
-rw-r--r--arch/arm/mach-omap2/board-omap3stalker.c61
-rw-r--r--arch/arm/mach-omap2/board-overo.c160
-rw-r--r--arch/arm/mach-omap2/board-rx51-peripherals.c12
-rw-r--r--arch/arm/mach-omap2/board-rx51-video.c35
-rw-r--r--arch/arm/mach-omap2/board-zoom-display.c30
-rw-r--r--arch/arm/mach-omap2/display.c4
-rw-r--r--arch/arm/mach-omap2/dss-common.c244
-rw-r--r--arch/arm/mach-omap2/dss-common.h2
20 files changed, 789 insertions, 563 deletions
diff --git a/arch/arm/configs/omap2plus_defconfig b/arch/arm/configs/omap2plus_defconfig
index 5465f564fdf3..056b27aafbe6 100644
--- a/arch/arm/configs/omap2plus_defconfig
+++ b/arch/arm/configs/omap2plus_defconfig
@@ -186,13 +186,11 @@ CONFIG_OMAP2_DSS_RFBI=y
CONFIG_OMAP2_DSS_SDI=y
CONFIG_OMAP2_DSS_DSI=y
CONFIG_FB_OMAP2=m
-CONFIG_PANEL_GENERIC_DPI=m
-CONFIG_PANEL_TFP410=m
-CONFIG_PANEL_SHARP_LS037V7DW01=m
-CONFIG_PANEL_NEC_NL8048HL11_01B=m
-CONFIG_PANEL_TAAL=m
-CONFIG_PANEL_TPO_TD043MTEA1=m
-CONFIG_PANEL_ACX565AKM=m
+CONFIG_DISPLAY_ENCODER_TFP410=m
+CONFIG_DISPLAY_ENCODER_TPD12S015=m
+CONFIG_DISPLAY_CONNECTOR_DVI=m
+CONFIG_DISPLAY_CONNECTOR_HDMI=m
+CONFIG_DISPLAY_PANEL_DPI=m
CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_PLATFORM=y
diff --git a/arch/arm/mach-omap2/board-2430sdp.c b/arch/arm/mach-omap2/board-2430sdp.c
index 244d8a5aa54b..c711ad6ac067 100644
--- a/arch/arm/mach-omap2/board-2430sdp.c
+++ b/arch/arm/mach-omap2/board-2430sdp.c
@@ -100,39 +100,52 @@ static struct platform_device sdp2430_flash_device = {
.resource = &sdp2430_flash_resource,
};
-static struct platform_device *sdp2430_devices[] __initdata = {
- &sdp2430_flash_device,
-};
-
/* LCD */
#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91
#define SDP2430_LCD_PANEL_ENABLE_GPIO 154
-static struct panel_generic_dpi_data sdp2430_panel_data = {
- .name = "nec_nl2432dr22-11b",
- .num_gpios = 2,
- .gpios = {
- SDP2430_LCD_PANEL_ENABLE_GPIO,
- SDP2430_LCD_PANEL_BACKLIGHT_GPIO,
- },
+static const struct display_timing sdp2430_lcd_videomode = {
+ .pixelclock = { 0, 5400000, 0 },
+
+ .hactive = { 0, 240, 0 },
+ .hfront_porch = { 0, 3, 0 },
+ .hback_porch = { 0, 39, 0 },
+ .hsync_len = { 0, 3, 0 },
+
+ .vactive = { 0, 320, 0 },
+ .vfront_porch = { 0, 2, 0 },
+ .vback_porch = { 0, 7, 0 },
+ .vsync_len = { 0, 1, 0 },
+
+ .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
+ DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
};
-static struct omap_dss_device sdp2430_lcd_device = {
- .name = "lcd",
- .driver_name = "generic_dpi_panel",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .phy.dpi.data_lines = 16,
- .data = &sdp2430_panel_data,
+static struct panel_dpi_platform_data sdp2430_lcd_pdata = {
+ .name = "lcd",
+ .source = "dpi.0",
+
+ .data_lines = 16,
+
+ .display_timing = &sdp2430_lcd_videomode,
+
+ .enable_gpio = SDP2430_LCD_PANEL_ENABLE_GPIO,
+ .backlight_gpio = SDP2430_LCD_PANEL_BACKLIGHT_GPIO,
};
-static struct omap_dss_device *sdp2430_dss_devices[] = {
- &sdp2430_lcd_device,
+static struct platform_device sdp2430_lcd_device = {
+ .name = "panel-dpi",
+ .id = 0,
+ .dev.platform_data = &sdp2430_lcd_pdata,
};
static struct omap_dss_board_info sdp2430_dss_data = {
- .num_devices = ARRAY_SIZE(sdp2430_dss_devices),
- .devices = sdp2430_dss_devices,
- .default_device = &sdp2430_lcd_device,
+ .default_display_name = "lcd",
+};
+
+static struct platform_device *sdp2430_devices[] __initdata = {
+ &sdp2430_flash_device,
+ &sdp2430_lcd_device,
};
#if IS_ENABLED(CONFIG_SMC91X)
diff --git a/arch/arm/mach-omap2/board-3430sdp.c b/arch/arm/mach-omap2/board-3430sdp.c
index 23b004afa3f8..d95d0ef1354a 100644
--- a/arch/arm/mach-omap2/board-3430sdp.c
+++ b/arch/arm/mach-omap2/board-3430sdp.c
@@ -126,53 +126,65 @@ static void __init sdp3430_display_init(void)
}
-static struct panel_sharp_ls037v7dw01_data sdp3430_lcd_data = {
- .resb_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO,
- .ini_gpio = -1,
- .mo_gpio = -1,
- .lr_gpio = -1,
- .ud_gpio = -1,
+static struct panel_sharp_ls037v7dw01_platform_data sdp3430_lcd_pdata = {
+ .name = "lcd",
+ .source = "dpi.0",
+
+ .data_lines = 16,
+
+ .resb_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO,
+ .ini_gpio = -1,
+ .mo_gpio = -1,
+ .lr_gpio = -1,
+ .ud_gpio = -1,
+};
+
+static struct platform_device sdp3430_lcd_device = {
+ .name = "panel-sharp-ls037v7dw01",
+ .id = 0,
+ .dev.platform_data = &sdp3430_lcd_pdata,
};
-static struct omap_dss_device sdp3430_lcd_device = {
- .name = "lcd",
- .driver_name = "sharp_ls_panel",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .phy.dpi.data_lines = 16,
- .data = &sdp3430_lcd_data,
+static struct connector_dvi_platform_data sdp3430_dvi_connector_pdata = {
+ .name = "dvi",
+ .source = "tfp410.0",
+ .i2c_bus_num = -1,
};
-static struct tfp410_platform_data dvi_panel = {
- .power_down_gpio = -1,
- .i2c_bus_num = -1,
+static struct platform_device sdp3430_dvi_connector_device = {
+ .name = "connector-dvi",
+ .id = 0,
+ .dev.platform_data = &sdp3430_dvi_connector_pdata,
};
-static struct omap_dss_device sdp3430_dvi_device = {
- .name = "dvi",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .driver_name = "tfp410",
- .data = &dvi_panel,
- .phy.dpi.data_lines = 24,
+static struct encoder_tfp410_platform_data sdp3430_tfp410_pdata = {
+ .name = "tfp410.0",
+ .source = "dpi.0",
+ .data_lines = 24,
+ .power_down_gpio = -1,
};
-static struct omap_dss_device sdp3430_tv_device = {
- .name = "tv",
- .driver_name = "venc",
- .type = OMAP_DISPLAY_TYPE_VENC,
- .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
+static struct platform_device sdp3430_tfp410_device = {
+ .name = "tfp410",
+ .id = 0,
+ .dev.platform_data = &sdp3430_tfp410_pdata,
};
+static struct connector_atv_platform_data sdp3430_tv_pdata = {
+ .name = "tv",
+ .source = "venc.0",
+ .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
+ .invert_polarity = false,
+};
-static struct omap_dss_device *sdp3430_dss_devices[] = {
- &sdp3430_lcd_device,
- &sdp3430_dvi_device,
- &sdp3430_tv_device,
+static struct platform_device sdp3430_tv_connector_device = {
+ .name = "connector-analog-tv",
+ .id = 0,
+ .dev.platform_data = &sdp3430_tv_pdata,
};
static struct omap_dss_board_info sdp3430_dss_data = {
- .num_devices = ARRAY_SIZE(sdp3430_dss_devices),
- .devices = sdp3430_dss_devices,
- .default_device = &sdp3430_lcd_device,
+ .default_display_name = "lcd",
};
static struct omap2_hsmmc_info mmc[] = {
@@ -583,6 +595,11 @@ static void __init omap_3430sdp_init(void)
omap_hsmmc_init(mmc);
omap3430_i2c_init();
omap_display_init(&sdp3430_dss_data);
+ platform_device_register(&sdp3430_lcd_device);
+ platform_device_register(&sdp3430_tfp410_device);
+ platform_device_register(&sdp3430_dvi_connector_device);
+ platform_device_register(&sdp3430_tv_connector_device);
+
if (omap_rev() > OMAP3430_REV_ES1_0)
gpio_pendown = SDP3430_TS_GPIO_IRQ_SDPV2;
else
diff --git a/arch/arm/mach-omap2/board-am3517evm.c b/arch/arm/mach-omap2/board-am3517evm.c
index d63f14b534b5..8cc2c9e9fb03 100644
--- a/arch/arm/mach-omap2/board-am3517evm.c
+++ b/arch/arm/mach-omap2/board-am3517evm.c
@@ -120,56 +120,95 @@ static int __init am3517_evm_i2c_init(void)
return 0;
}
-static struct panel_generic_dpi_data lcd_panel = {
- .name = "sharp_lq",
- .num_gpios = 3,
- .gpios = {
- LCD_PANEL_PWR,
- LCD_PANEL_BKLIGHT_PWR,
- LCD_PANEL_PWM,
- },
+static const struct display_timing am3517_evm_lcd_videomode = {
+ .pixelclock = { 0, 9000000, 0 },
+
+ .hactive = { 0, 480, 0 },
+ .hfront_porch = { 0, 3, 0 },
+ .hback_porch = { 0, 2, 0 },
+ .hsync_len = { 0, 42, 0 },
+
+ .vactive = { 0, 272, 0 },
+ .vfront_porch = { 0, 3, 0 },
+ .vback_porch = { 0, 2, 0 },
+ .vsync_len = { 0, 11, 0 },
+
+ .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
+ DISPLAY_FLAGS_DE_LOW | DISPLAY_FLAGS_PIXDATA_POSEDGE,
+};
+
+static struct panel_dpi_platform_data am3517_evm_lcd_pdata = {
+ .name = "lcd",
+ .source = "dpi.0",
+
+ .data_lines = 16,
+
+ .display_timing = &am3517_evm_lcd_videomode,
+
+ .enable_gpio = LCD_PANEL_PWR,
+ .backlight_gpio = LCD_PANEL_BKLIGHT_PWR,
+};
+
+static struct platform_device am3517_evm_lcd_device = {
+ .name = "panel-dpi",
+ .id = 0,
+ .dev.platform_data = &am3517_evm_lcd_pdata,
};
-static struct omap_dss_device am3517_evm_lcd_device = {
- .type = OMAP_DISPLAY_TYPE_DPI,
- .name = "lcd",
- .driver_name = "generic_dpi_panel",
- .data = &lcd_panel,
- .phy.dpi.data_lines = 16,
+static struct connector_dvi_platform_data am3517_evm_dvi_connector_pdata = {
+ .name = "dvi",
+ .source = "tfp410.0",
+ .i2c_bus_num = -1,
};
-static struct omap_dss_device am3517_evm_tv_device = {
- .type = OMAP_DISPLAY_TYPE_VENC,
- .name = "tv",
- .driver_name = "venc",
- .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
+static struct platform_device am3517_evm_dvi_connector_device = {
+ .name = "connector-dvi",
+ .id = 0,
+ .dev.platform_data = &am3517_evm_dvi_connector_pdata,
};
-static struct tfp410_platform_data dvi_panel = {
- .power_down_gpio = -1,
- .i2c_bus_num = -1,
+static struct encoder_tfp410_platform_data am3517_evm_tfp410_pdata = {
+ .name = "tfp410.0",
+ .source = "dpi.0",
+ .data_lines = 24,
+ .power_down_gpio = -1,
};
-static struct omap_dss_device am3517_evm_dvi_device = {
- .type = OMAP_DISPLAY_TYPE_DPI,
- .name = "dvi",
- .driver_name = "tfp410",
- .data = &dvi_panel,
- .phy.dpi.data_lines = 24,
+static struct platform_device am3517_evm_tfp410_device = {
+ .name = "tfp410",
+ .id = 0,
+ .dev.platform_data = &am3517_evm_tfp410_pdata,
};
-static struct omap_dss_device *am3517_evm_dss_devices[] = {
- &am3517_evm_lcd_device,
- &am3517_evm_tv_device,
- &am3517_evm_dvi_device,
+static struct connector_atv_platform_data am3517_evm_tv_pdata = {
+ .name = "tv",
+ .source = "venc.0",
+ .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
+ .invert_polarity = false,
+};
+
+static struct platform_device am3517_evm_tv_connector_device = {
+ .name = "connector-analog-tv",
+ .id = 0,
+ .dev.platform_data = &am3517_evm_tv_pdata,
};
static struct omap_dss_board_info am3517_evm_dss_data = {
- .num_devices = ARRAY_SIZE(am3517_evm_dss_devices),
- .devices = am3517_evm_dss_devices,
- .default_device = &am3517_evm_lcd_device,
+ .default_display_name = "lcd",
};
+static void __init am3517_evm_display_init(void)
+{
+ gpio_request_one(LCD_PANEL_PWM, GPIOF_OUT_INIT_HIGH, "lcd panel pwm");
+
+ omap_display_init(&am3517_evm_dss_data);
+
+ platform_device_register(&am3517_evm_tfp410_device);
+ platform_device_register(&am3517_evm_dvi_connector_device);
+ platform_device_register(&am3517_evm_lcd_device);
+ platform_device_register(&am3517_evm_tv_connector_device);
+}
+
/*
* Board initialization
*/
@@ -295,7 +334,9 @@ static void __init am3517_evm_init(void)
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
am3517_evm_i2c_init();
- omap_display_init(&am3517_evm_dss_data);
+
+ am3517_evm_display_init();
+
omap_serial_init();
omap_sdrc_init(NULL, NULL);
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) {}
#define CM_T35_LCD_BL_GPIO 58
#define CM_T35_DVI_EN_GPIO 54
-static struct panel_generic_dpi_data lcd_panel = {
- .name = "toppoly_tdo35s",
- .num_gpios = 1,
- .gpios = {
- CM_T35_LCD_BL_GPIO,
- },
+static const struct display_timing cm_t35_lcd_videomode = {
+ .pixelclock = { 0, 26000000, 0 },
+
+ .hactive = { 0, 480, 0 },
+ .hfront_porch = { 0, 104, 0 },
+ .hback_porch = { 0, 8, 0 },
+ .hsync_len = { 0, 8, 0 },
+
+ .vactive = { 0, 640, 0 },
+ .vfront_porch = { 0, 4, 0 },
+ .vback_porch = { 0, 2, 0 },
+ .vsync_len = { 0, 2, 0 },
+
+ .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
+ DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE,
+};
+
+static struct panel_dpi_platform_data cm_t35_lcd_pdata = {
+ .name = "lcd",
+ .source = "dpi.0",
+
+ .data_lines = 18,
+
+ .display_timing = &cm_t35_lcd_videomode,
+
+ .enable_gpio = -1,
+ .backlight_gpio = CM_T35_LCD_BL_GPIO,
+};
+
+static struct platform_device cm_t35_lcd_device = {
+ .name = "panel-dpi",
+ .id = 0,
+ .dev.platform_data = &cm_t35_lcd_pdata,
};
-static struct omap_dss_device cm_t35_lcd_device = {
- .name = "lcd",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .driver_name = "generic_dpi_panel",
- .data = &lcd_panel,
- .phy.dpi.data_lines = 18,
+static struct connector_dvi_platform_data cm_t35_dvi_connector_pdata = {
+ .name = "dvi",
+ .source = "tfp410.0",
+ .i2c_bus_num = -1,
};
-static struct tfp410_platform_data dvi_panel = {
- .power_down_gpio = CM_T35_DVI_EN_GPIO,
- .i2c_bus_num = -1,
+static struct platform_device cm_t35_dvi_connector_device = {
+ .name = "connector-dvi",
+ .id = 0,
+ .dev.platform_data = &cm_t35_dvi_connector_pdata,
};
-static struct omap_dss_device cm_t35_dvi_device = {
- .name = "dvi",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .driver_name = "tfp410",
- .data = &dvi_panel,
- .phy.dpi.data_lines = 24,
+static struct encoder_tfp410_platform_data cm_t35_tfp410_pdata = {
+ .name = "tfp410.0",
+ .source = "dpi.0",
+ .data_lines = 24,
+ .power_down_gpio = CM_T35_DVI_EN_GPIO,
};
-static struct omap_dss_device cm_t35_tv_device = {
- .name = "tv",
- .driver_name = "venc",
- .type = OMAP_DISPLAY_TYPE_VENC,
- .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
+static struct platform_device cm_t35_tfp410_device = {
+ .name = "tfp410",
+ .id = 0,
+ .dev.platform_data = &cm_t35_tfp410_pdata,
};
-static struct omap_dss_device *cm_t35_dss_devices[] = {
- &cm_t35_lcd_device,
- &cm_t35_dvi_device,
- &cm_t35_tv_device,
+static struct connector_atv_platform_data cm_t35_tv_pdata = {
+ .name = "tv",
+ .source = "venc.0",
+ .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
+ .invert_polarity = false,
+};
+
+static struct platform_device cm_t35_tv_connector_device = {
+ .name = "connector-analog-tv",
+ .id = 0,
+ .dev.platform_data = &cm_t35_tv_pdata,
};
static struct omap_dss_board_info cm_t35_dss_data = {
- .num_devices = ARRAY_SIZE(cm_t35_dss_devices),
- .devices = cm_t35_dss_devices,
- .default_device = &cm_t35_dvi_device,
+ .default_display_name = "dvi",
};
static struct omap2_mcspi_device_config tdo24m_mcspi_config = {
@@ -280,6 +309,11 @@ static void __init cm_t35_init_display(void)
pr_err("CM-T35: failed to register DSS device\n");
gpio_free(CM_T35_LCD_EN_GPIO);
}
+
+ platform_device_register(&cm_t35_tfp410_device);
+ platform_device_register(&cm_t35_dvi_connector_device);
+ platform_device_register(&cm_t35_lcd_device);
+ platform_device_register(&cm_t35_tv_connector_device);
}
static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = {
diff --git a/arch/arm/mach-omap2/board-devkit8000.c b/arch/arm/mach-omap2/board-devkit8000.c
index f1d91ba5d1ac..cdc4fb9960a9 100644
--- a/arch/arm/mach-omap2/board-devkit8000.c
+++ b/arch/arm/mach-omap2/board-devkit8000.c
@@ -112,50 +112,81 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = {
REGULATOR_SUPPLY("vcc", "spi2.0"),
};
-static struct panel_generic_dpi_data lcd_panel = {
- .name = "innolux_at070tn83",
- /* gpios filled in code */
+static const struct display_timing devkit8000_lcd_videomode = {
+ .pixelclock = { 0, 40000000, 0 },
+
+ .hactive = { 0, 800, 0 },
+ .hfront_porch = { 0, 1, 0 },
+ .hback_porch = { 0, 1, 0 },
+ .hsync_len = { 0, 48, 0 },
+
+ .vactive = { 0, 480, 0 },
+ .vfront_porch = { 0, 12, 0 },
+ .vback_porch = { 0, 25, 0 },
+ .vsync_len = { 0, 3, 0 },
+
+ .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
+ DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
};
-static struct omap_dss_device devkit8000_lcd_device = {
+static struct panel_dpi_platform_data devkit8000_lcd_pdata = {
.name = "lcd",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .driver_name = "generic_dpi_panel",
- .data = &lcd_panel,
- .phy.dpi.data_lines = 24,
+ .source = "dpi.0",
+
+ .data_lines = 24,
+
+ .display_timing = &devkit8000_lcd_videomode,
+
+ .enable_gpio = -1, /* filled in code */
+ .backlight_gpio = -1,
};
-static struct tfp410_platform_data dvi_panel = {
- .power_down_gpio = -1,
- .i2c_bus_num = 1,
+static struct platform_device devkit8000_lcd_device = {
+ .name = "panel-dpi",
+ .id = 0,
+ .dev.platform_data = &devkit8000_lcd_pdata,
};
-static struct omap_dss_device devkit8000_dvi_device = {
+static struct connector_dvi_platform_data devkit8000_dvi_connector_pdata = {
.name = "dvi",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .driver_name = "tfp410",
- .data = &dvi_panel,
- .phy.dpi.data_lines = 24,
+ .source = "tfp410.0",
+ .i2c_bus_num = 1,
};
-static struct omap_dss_device devkit8000_tv_device = {
- .name = "tv",
- .driver_name = "venc",
- .type = OMAP_DISPLAY_TYPE_VENC,
- .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
+static struct platform_device devkit8000_dvi_connector_device = {
+ .name = "connector-dvi",
+ .id = 0,
+ .dev.platform_data = &devkit8000_dvi_connector_pdata,
};
+static struct encoder_tfp410_platform_data devkit8000_tfp410_pdata = {
+ .name = "tfp410.0",
+ .source = "dpi.0",
+ .data_lines = 24,
+ .power_down_gpio = -1, /* filled in code */
+};
-static struct omap_dss_device *devkit8000_dss_devices[] = {
- &devkit8000_lcd_device,
- &devkit8000_dvi_device,
- &devkit8000_tv_device,
+static struct platform_device devkit8000_tfp410_device = {
+ .name = "tfp410",
+ .id = 0,
+ .dev.platform_data = &devkit8000_tfp410_pdata,
+};
+
+static struct connector_atv_platform_data devkit8000_tv_pdata = {
+ .name = "tv",
+ .source = "venc.0",
+ .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
+ .invert_polarity = false,
+};
+
+static struct platform_device devkit8000_tv_connector_device = {
+ .name = "connector-analog-tv",
+ .id = 0,
+ .dev.platform_data = &devkit8000_tv_pdata,
};
static struct omap_dss_board_info devkit8000_dss_data = {
- .num_devices = ARRAY_SIZE(devkit8000_dss_devices),
- .devices = devkit8000_dss_devices,
- .default_device = &devkit8000_lcd_device,
+ .default_display_name = "lcd",
};
static uint32_t board_keymap[] = {
@@ -204,11 +235,10 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
/* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
- lcd_panel.num_gpios = 1;
- lcd_panel.gpios[0] = gpio + TWL4030_GPIO_MAX + 0;
+ devkit8000_lcd_pdata.enable_gpio = gpio + TWL4030_GPIO_MAX + 0;
/* gpio + 7 is "DVI_PD" (out, active low) */
- dvi_panel.power_down_gpio = gpio + 7;
+ devkit8000_tfp410_pdata.power_down_gpio = gpio + 7;
return 0;
}
@@ -413,6 +443,10 @@ static struct platform_device *devkit8000_devices[] __initdata = {
&leds_gpio,
&keys_gpio,
&omap_dm9000_dev,
+ &devkit8000_lcd_device,
+ &devkit8000_tfp410_device,
+ &devkit8000_dvi_connector_device,
+ &devkit8000_tv_connector_device,
};
static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
diff --git a/arch/arm/mach-omap2/board-h4.c b/arch/arm/mach-omap2/board-h4.c
index 69c0acf5aa63..87e41a8b8d46 100644
--- a/arch/arm/mach-omap2/board-h4.c
+++ b/arch/arm/mach-omap2/board-h4.c
@@ -194,30 +194,48 @@ static struct platform_device h4_flash_device = {
.resource = &h4_flash_resource,
};
-static struct platform_device *h4_devices[] __initdata = {
- &h4_flash_device,
+static const struct display_timing cm_t35_lcd_videomode = {
+ .pixelclock = { 0, 6250000, 0 },
+
+ .hactive = { 0, 240, 0 },
+ .hfront_porch = { 0, 15, 0 },
+ .hback_porch = { 0, 60, 0 },
+ .hsync_len = { 0, 15, 0 },
+
+ .vactive = { 0, 320, 0 },
+ .vfront_porch = { 0, 1, 0 },
+ .vback_porch = { 0, 1, 0 },
+ .vsync_len = { 0, 1, 0 },
+
+ .flags = DISPLAY_FLAGS_HSYNC_HIGH | DISPLAY_FLAGS_VSYNC_HIGH |
+ DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
};
-static struct panel_generic_dpi_data h4_panel_data = {
- .name = "h4",
+static struct panel_dpi_platform_data cm_t35_lcd_pdata = {
+ .name = "lcd",
+ .source = "dpi.0",
+
+ .data_lines = 16,
+
+ .display_timing = &cm_t35_lcd_videomode,
+
+ .enable_gpio = -1,
+ .backlight_gpio = -1,
};
-static struct omap_dss_device h4_lcd_device = {
- .name = "lcd",
- .driver_name = "generic_dpi_panel",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .phy.dpi.data_lines = 16,
- .data = &h4_panel_data,
+static struct platform_device cm_t35_lcd_device = {
+ .name = "panel-dpi",
+ .id = 0,
+ .dev.platform_data = &cm_t35_lcd_pdata,
};
-static struct omap_dss_device *h4_dss_devices[] = {
- &h4_lcd_device,
+static struct platform_device *h4_devices[] __initdata = {
+ &h4_flash_device,
+ &cm_t35_lcd_device,
};
static struct omap_dss_board_info h4_dss_data = {
- .num_devices = ARRAY_SIZE(h4_dss_devices),
- .devices = h4_dss_devices,
- .default_device = &h4_lcd_device,
+ .default_display_name = "lcd",
};
/* 2420 Sysboot setup (2430 is different) */
diff --git a/arch/arm/mach-omap2/board-igep0020.c b/arch/arm/mach-omap2/board-igep0020.c
index 87e65dde8e13..06dbb2d3d38b 100644
--- a/arch/arm/mach-omap2/board-igep0020.c
+++ b/arch/arm/mach-omap2/board-igep0020.c
@@ -429,31 +429,39 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
.setup = igep_twl_gpio_setup,
};
-static struct tfp410_platform_data dvi_panel = {
- .i2c_bus_num = 3,
- .power_down_gpio = IGEP2_GPIO_DVI_PUP,
+static struct connector_dvi_platform_data omap3stalker_dvi_connector_pdata = {
+ .name = "dvi",
+ .source = "tfp410.0",
+ .i2c_bus_num = 3,
};
-static struct omap_dss_device igep2_dvi_device = {
- .type = OMAP_DISPLAY_TYPE_DPI,
- .name = "dvi",
- .driver_name = "tfp410",
- .data = &dvi_panel,
- .phy.dpi.data_lines = 24,
+static struct platform_device omap3stalker_dvi_connector_device = {
+ .name = "connector-dvi",
+ .id = 0,
+ .dev.platform_data = &omap3stalker_dvi_connector_pdata,
};
-static struct omap_dss_device *igep2_dss_devices[] = {
- &igep2_dvi_device
+static struct encoder_tfp410_platform_data omap3stalker_tfp410_pdata = {
+ .name = "tfp410.0",
+ .source = "dpi.0",
+ .data_lines = 24,
+ .power_down_gpio = IGEP2_GPIO_DVI_PUP,
+};
+
+static struct platform_device omap3stalker_tfp410_device = {
+ .name = "tfp410",
+ .id = 0,
+ .dev.platform_data = &omap3stalker_tfp410_pdata,
};
static struct omap_dss_board_info igep2_dss_data = {
- .num_devices = ARRAY_SIZE(igep2_dss_devices),
- .devices = igep2_dss_devices,
- .default_device = &igep2_dvi_device,
+ .default_display_name = "dvi",
};
static struct platform_device *igep_devices[] __initdata = {
&igep_vwlan_device,
+ &omap3stalker_tfp410_device,
+ &omap3stalker_dvi_connector_device,
};
static int igep2_keymap[] = {
diff --git a/arch/arm/mach-omap2/board-ldp.c b/arch/arm/mach-omap2/board-ldp.c
index 62e4f701b63b..dd8da2c5399f 100644
--- a/arch/arm/mach-omap2/board-ldp.c
+++ b/arch/arm/mach-omap2/board-ldp.c
@@ -184,45 +184,70 @@ static inline void __init ldp_init_smsc911x(void)
#define LCD_PANEL_RESET_GPIO 55
#define LCD_PANEL_QVGA_GPIO 56
-static struct panel_generic_dpi_data ldp_panel_data = {
- .name = "nec_nl2432dr22-11b",
- .num_gpios = 4,
- /* gpios filled in code */
+static const struct display_timing ldp_lcd_videomode = {
+ .pixelclock = { 0, 5400000, 0 },
+
+ .hactive = { 0, 240, 0 },
+ .hfront_porch = { 0, 3, 0 },
+ .hback_porch = { 0, 39, 0 },
+ .hsync_len = { 0, 3, 0 },
+
+ .vactive = { 0, 320, 0 },
+ .vfront_porch = { 0, 2, 0 },
+ .vback_porch = { 0, 7, 0 },
+ .vsync_len = { 0, 1, 0 },
+
+ .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
+ DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
};
-static struct omap_dss_device ldp_lcd_device = {
- .name = "lcd",
- .driver_name = "generic_dpi_panel",
- .type = OMAP_DISPLAY_TYPE_DPI,
- .phy.dpi.data_lines = 18,
- .data = &ldp_panel_data,
+static struct panel_dpi_platform_data ldp_lcd_pdata = {
+ .name = "lcd",
+ .source = "dpi.0",
+
+ .data_lines = 18,
+
+ .display_timing = &ldp_lcd_videomode,
+
+ .enable_gpio = -1, /* filled in code */
+ .backlight_gpio = -1, /* filled in code */
};
-static struct omap_dss_device *ldp_dss_devices[] = {
- &ldp_lcd_device,
+static struct platform_device ldp_lcd_device = {
+ .name = "panel-dpi",
+ .id = 0,
+ .dev.platform_data = &ldp_lcd_pdata,
};
static struct omap_dss_board_info ldp_dss_data = {
- .num_devices = ARRAY_SIZE(ldp_dss_devices),
- .devices = ldp_dss_devices,
- .default_device = &ldp_lcd_device,
+ .default_display_name = "lcd",
};
static void __init ldp_display_init(void)
{
- ldp_panel_data.gpios[2] = LCD_PANEL_RESET_GPIO;
- ldp_panel_data.gpios[3] = LCD_PANEL_QVGA_GPIO;
+ int r;
+
+ static struct gpio gpios[] __initdata = {
+ {LCD_PANEL_RESET_GPIO, GPIOF_OUT_INIT_HIGH, "LCD RESET"},
+ {LCD_PANEL_QVGA_GPIO, GPIOF_OUT_INIT_HIGH, "LCD QVGA"},
+ };
+
+ r = gpio_request_array(gpios, ARRAY_SIZE(gpios));
+ if (r) {
+ pr_err("Cannot request LCD GPIOs, error %d\n", r);
+ return;
+ }
omap_display_init(&ldp_dss_data);
}
static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
{
- ldp_panel_data.gpios[0] = gpio + 7;
- ldp_panel_data.gpio_invert[0] = true;
+ /* LCD enable GPIO */
+ ldp_lcd_pdata.enable_gpio = gpio + 7;
- ldp_panel_data.gpios[1] = gpio + 15;
- ldp_panel_data.gpio_invert[1] = true;
+ /* Backlight enable GPIO */
+ ldp_lcd_pdata.backlight_gpio = gpio + 15;
return 0;
}
@@ -322,6 +347,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
static struct platform_device *ldp_devices[] __initdata = {
&ldp_gpio_keys_device,
+ &ldp_lcd_device,
};
#ifdef CONFIG_OMAP_MUX
diff --git a/arch/arm/mach-omap2/board-omap3beagle.c b/arch/arm/mach-omap2/board-omap3beagle.c
index 1c6ae5f5bae7..f26918467efc 100644
--- a/arch/arm/mach-omap2/board-omap3beagle.c
+++ b/arch/arm/mach-omap2/board-omap3beagle.c
@@ -225,35 +225,46 @@ static struct mtd_partition omap3beagle_nand_partitions[] = {
/* DSS */
-static struct tfp410_platform_data dvi_panel = {
- .i2c_bus_num = 3,
- .power_down_gpio = -1,
+static struct connector_dvi_platform_data beagle_dvi_connector_pdata = {
+ .name = "dvi",
+ .source = "tfp410.0",
+ .i2c_bus_num = 3,
};
-static struct omap_dss_device beagle_dvi_device = {
- .type = OMAP_DISPLAY_TYPE_DPI,
- .name = "dvi",
- .driver_name = "tfp410",
- .data = &dvi_panel,
- .phy.dpi.data_lines = 24,