Commit eced5a0a authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'fbdev-3.12-omap-legacy-removal' of...

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
  ...
parents 7c049d08 9560dc10
...@@ -186,13 +186,11 @@ CONFIG_OMAP2_DSS_RFBI=y ...@@ -186,13 +186,11 @@ CONFIG_OMAP2_DSS_RFBI=y
CONFIG_OMAP2_DSS_SDI=y CONFIG_OMAP2_DSS_SDI=y
CONFIG_OMAP2_DSS_DSI=y CONFIG_OMAP2_DSS_DSI=y
CONFIG_FB_OMAP2=m CONFIG_FB_OMAP2=m
CONFIG_PANEL_GENERIC_DPI=m CONFIG_DISPLAY_ENCODER_TFP410=m
CONFIG_PANEL_TFP410=m CONFIG_DISPLAY_ENCODER_TPD12S015=m
CONFIG_PANEL_SHARP_LS037V7DW01=m CONFIG_DISPLAY_CONNECTOR_DVI=m
CONFIG_PANEL_NEC_NL8048HL11_01B=m CONFIG_DISPLAY_CONNECTOR_HDMI=m
CONFIG_PANEL_TAAL=m CONFIG_DISPLAY_PANEL_DPI=m
CONFIG_PANEL_TPO_TD043MTEA1=m
CONFIG_PANEL_ACX565AKM=m
CONFIG_BACKLIGHT_LCD_SUPPORT=y CONFIG_BACKLIGHT_LCD_SUPPORT=y
CONFIG_LCD_CLASS_DEVICE=y CONFIG_LCD_CLASS_DEVICE=y
CONFIG_LCD_PLATFORM=y CONFIG_LCD_PLATFORM=y
......
...@@ -100,39 +100,52 @@ static struct platform_device sdp2430_flash_device = { ...@@ -100,39 +100,52 @@ static struct platform_device sdp2430_flash_device = {
.resource = &sdp2430_flash_resource, .resource = &sdp2430_flash_resource,
}; };
static struct platform_device *sdp2430_devices[] __initdata = {
&sdp2430_flash_device,
};
/* LCD */ /* LCD */
#define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91 #define SDP2430_LCD_PANEL_BACKLIGHT_GPIO 91
#define SDP2430_LCD_PANEL_ENABLE_GPIO 154 #define SDP2430_LCD_PANEL_ENABLE_GPIO 154
static struct panel_generic_dpi_data sdp2430_panel_data = { static const struct display_timing sdp2430_lcd_videomode = {
.name = "nec_nl2432dr22-11b", .pixelclock = { 0, 5400000, 0 },
.num_gpios = 2,
.gpios = { .hactive = { 0, 240, 0 },
SDP2430_LCD_PANEL_ENABLE_GPIO, .hfront_porch = { 0, 3, 0 },
SDP2430_LCD_PANEL_BACKLIGHT_GPIO, .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 = { static struct panel_dpi_platform_data sdp2430_lcd_pdata = {
.name = "lcd", .name = "lcd",
.driver_name = "generic_dpi_panel", .source = "dpi.0",
.type = OMAP_DISPLAY_TYPE_DPI,
.phy.dpi.data_lines = 16, .data_lines = 16,
.data = &sdp2430_panel_data,
.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[] = { static struct platform_device sdp2430_lcd_device = {
&sdp2430_lcd_device, .name = "panel-dpi",
.id = 0,
.dev.platform_data = &sdp2430_lcd_pdata,
}; };
static struct omap_dss_board_info sdp2430_dss_data = { static struct omap_dss_board_info sdp2430_dss_data = {
.num_devices = ARRAY_SIZE(sdp2430_dss_devices), .default_display_name = "lcd",
.devices = sdp2430_dss_devices, };
.default_device = &sdp2430_lcd_device,
static struct platform_device *sdp2430_devices[] __initdata = {
&sdp2430_flash_device,
&sdp2430_lcd_device,
}; };
#if IS_ENABLED(CONFIG_SMC91X) #if IS_ENABLED(CONFIG_SMC91X)
......
...@@ -126,53 +126,65 @@ static void __init sdp3430_display_init(void) ...@@ -126,53 +126,65 @@ static void __init sdp3430_display_init(void)
} }
static struct panel_sharp_ls037v7dw01_data sdp3430_lcd_data = { static struct panel_sharp_ls037v7dw01_platform_data sdp3430_lcd_pdata = {
.resb_gpio = SDP3430_LCD_PANEL_ENABLE_GPIO, .name = "lcd",
.ini_gpio = -1, .source = "dpi.0",
.mo_gpio = -1,
.lr_gpio = -1, .data_lines = 16,
.ud_gpio = -1,
.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 = { static struct connector_dvi_platform_data sdp3430_dvi_connector_pdata = {
.name = "lcd", .name = "dvi",
.driver_name = "sharp_ls_panel", .source = "tfp410.0",
.type = OMAP_DISPLAY_TYPE_DPI, .i2c_bus_num = -1,
.phy.dpi.data_lines = 16,
.data = &sdp3430_lcd_data,
}; };
static struct tfp410_platform_data dvi_panel = { static struct platform_device sdp3430_dvi_connector_device = {
.power_down_gpio = -1, .name = "connector-dvi",
.i2c_bus_num = -1, .id = 0,
.dev.platform_data = &sdp3430_dvi_connector_pdata,
}; };
static struct omap_dss_device sdp3430_dvi_device = { static struct encoder_tfp410_platform_data sdp3430_tfp410_pdata = {
.name = "dvi", .name = "tfp410.0",
.type = OMAP_DISPLAY_TYPE_DPI, .source = "dpi.0",
.driver_name = "tfp410", .data_lines = 24,
.data = &dvi_panel, .power_down_gpio = -1,
.phy.dpi.data_lines = 24,
}; };
static struct omap_dss_device sdp3430_tv_device = { static struct platform_device sdp3430_tfp410_device = {
.name = "tv", .name = "tfp410",
.driver_name = "venc", .id = 0,
.type = OMAP_DISPLAY_TYPE_VENC, .dev.platform_data = &sdp3430_tfp410_pdata,
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
}; };
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[] = { static struct platform_device sdp3430_tv_connector_device = {
&sdp3430_lcd_device, .name = "connector-analog-tv",
&sdp3430_dvi_device, .id = 0,
&sdp3430_tv_device, .dev.platform_data = &sdp3430_tv_pdata,
}; };
static struct omap_dss_board_info sdp3430_dss_data = { static struct omap_dss_board_info sdp3430_dss_data = {
.num_devices = ARRAY_SIZE(sdp3430_dss_devices), .default_display_name = "lcd",
.devices = sdp3430_dss_devices,
.default_device = &sdp3430_lcd_device,
}; };
static struct omap2_hsmmc_info mmc[] = { static struct omap2_hsmmc_info mmc[] = {
...@@ -583,6 +595,11 @@ static void __init omap_3430sdp_init(void) ...@@ -583,6 +595,11 @@ static void __init omap_3430sdp_init(void)
omap_hsmmc_init(mmc); omap_hsmmc_init(mmc);
omap3430_i2c_init(); omap3430_i2c_init();
omap_display_init(&sdp3430_dss_data); 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) if (omap_rev() > OMAP3430_REV_ES1_0)
gpio_pendown = SDP3430_TS_GPIO_IRQ_SDPV2; gpio_pendown = SDP3430_TS_GPIO_IRQ_SDPV2;
else else
......
...@@ -120,56 +120,95 @@ static int __init am3517_evm_i2c_init(void) ...@@ -120,56 +120,95 @@ static int __init am3517_evm_i2c_init(void)
return 0; return 0;
} }
static struct panel_generic_dpi_data lcd_panel = { static const struct display_timing am3517_evm_lcd_videomode = {
.name = "sharp_lq", .pixelclock = { 0, 9000000, 0 },
.num_gpios = 3,
.gpios = { .hactive = { 0, 480, 0 },
LCD_PANEL_PWR, .hfront_porch = { 0, 3, 0 },
LCD_PANEL_BKLIGHT_PWR, .hback_porch = { 0, 2, 0 },
LCD_PANEL_PWM, .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 = { static struct connector_dvi_platform_data am3517_evm_dvi_connector_pdata = {
.type = OMAP_DISPLAY_TYPE_DPI, .name = "dvi",
.name = "lcd", .source = "tfp410.0",
.driver_name = "generic_dpi_panel", .i2c_bus_num = -1,
.data = &lcd_panel,
.phy.dpi.data_lines = 16,
}; };
static struct omap_dss_device am3517_evm_tv_device = { static struct platform_device am3517_evm_dvi_connector_device = {
.type = OMAP_DISPLAY_TYPE_VENC, .name = "connector-dvi",
.name = "tv", .id = 0,
.driver_name = "venc", .dev.platform_data = &am3517_evm_dvi_connector_pdata,
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
}; };
static struct tfp410_platform_data dvi_panel = { static struct encoder_tfp410_platform_data am3517_evm_tfp410_pdata = {
.power_down_gpio = -1, .name = "tfp410.0",
.i2c_bus_num = -1, .source = "dpi.0",
.data_lines = 24,
.power_down_gpio = -1,
}; };
static struct omap_dss_device am3517_evm_dvi_device = { static struct platform_device am3517_evm_tfp410_device = {
.type = OMAP_DISPLAY_TYPE_DPI, .name = "tfp410",
.name = "dvi", .id = 0,
.driver_name = "tfp410", .dev.platform_data = &am3517_evm_tfp410_pdata,
.data = &dvi_panel,
.phy.dpi.data_lines = 24,
}; };
static struct omap_dss_device *am3517_evm_dss_devices[] = { static struct connector_atv_platform_data am3517_evm_tv_pdata = {
&am3517_evm_lcd_device, .name = "tv",
&am3517_evm_tv_device, .source = "venc.0",
&am3517_evm_dvi_device, .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 = { static struct omap_dss_board_info am3517_evm_dss_data = {
.num_devices = ARRAY_SIZE(am3517_evm_dss_devices), .default_display_name = "lcd",
.devices = am3517_evm_dss_devices,
.default_device = &am3517_evm_lcd_device,
}; };
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 * Board initialization
*/ */
...@@ -295,7 +334,9 @@ static void __init am3517_evm_init(void) ...@@ -295,7 +334,9 @@ static void __init am3517_evm_init(void)
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
am3517_evm_i2c_init(); am3517_evm_i2c_init();
omap_display_init(&am3517_evm_dss_data);
am3517_evm_display_init();
omap_serial_init(); omap_serial_init();
omap_sdrc_init(NULL, NULL); omap_sdrc_init(NULL, NULL);
......
...@@ -190,52 +190,81 @@ static inline void cm_t35_init_nand(void) {} ...@@ -190,52 +190,81 @@ static inline void cm_t35_init_nand(void) {}
#define CM_T35_LCD_BL_GPIO 58 #define CM_T35_LCD_BL_GPIO 58
#define CM_T35_DVI_EN_GPIO 54 #define CM_T35_DVI_EN_GPIO 54
static struct panel_generic_dpi_data lcd_panel = { static const struct display_timing cm_t35_lcd_videomode = {
.name = "toppoly_tdo35s", .pixelclock = { 0, 26000000, 0 },
.num_gpios = 1,
.gpios = { .hactive = { 0, 480, 0 },
CM_T35_LCD_BL_GPIO, .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 = { static struct connector_dvi_platform_data cm_t35_dvi_connector_pdata = {
.name = "lcd", .name = "dvi",
.type = OMAP_DISPLAY_TYPE_DPI, .source = "tfp410.0",
.driver_name = "generic_dpi_panel", .i2c_bus_num = -1,
.data = &lcd_panel,
.phy.dpi.data_lines = 18,
}; };
static struct tfp410_platform_data dvi_panel = { static struct platform_device cm_t35_dvi_connector_device = {
.power_down_gpio = CM_T35_DVI_EN_GPIO, .name = "connector-dvi",
.i2c_bus_num = -1, .id = 0,
.dev.platform_data = &cm_t35_dvi_connector_pdata,
}; };
static struct omap_dss_device cm_t35_dvi_device = { static struct encoder_tfp410_platform_data cm_t35_tfp410_pdata = {
.name = "dvi", .name = "tfp410.0",
.type = OMAP_DISPLAY_TYPE_DPI, .source = "dpi.0",
.driver_name = "tfp410", .data_lines = 24,
.data = &dvi_panel, .power_down_gpio = CM_T35_DVI_EN_GPIO,
.phy.dpi.data_lines = 24,
}; };
static struct omap_dss_device cm_t35_tv_device = { static struct platform_device cm_t35_tfp410_device = {
.name = "tv", .name = "tfp410",
.driver_name = "venc", .id = 0,
.type = OMAP_DISPLAY_TYPE_VENC, .dev.platform_data = &cm_t35_tfp410_pdata,
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
}; };
static struct omap_dss_device *cm_t35_dss_devices[] = { static struct connector_atv_platform_data cm_t35_tv_pdata = {
&cm_t35_lcd_device, .name = "tv",
&cm_t35_dvi_device, .source = "venc.0",
&cm_t35_tv_device, .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 = { static struct omap_dss_board_info cm_t35_dss_data = {
.num_devices = ARRAY_SIZE(cm_t35_dss_devices), .default_display_name = "dvi",
.devices = cm_t35_dss_devices,
.default_device = &cm_t35_dvi_device,
}; };
static struct omap2_mcspi_device_config tdo24m_mcspi_config = { static struct omap2_mcspi_device_config tdo24m_mcspi_config = {
...@@ -280,6 +309,11 @@ static void __init cm_t35_init_display(void) ...@@ -280,6 +309,11 @@ static void __init cm_t35_init_display(void)
pr_err("CM-T35: failed to register DSS device\n"); pr_err("CM-T35: failed to register DSS device\n");
gpio_free(CM_T35_LCD_EN_GPIO); 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[] = { static struct regulator_consumer_supply cm_t35_vmmc1_supply[] = {
......
...@@ -112,50 +112,81 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = { ...@@ -112,50 +112,81 @@ static struct regulator_consumer_supply devkit8000_vio_supply[] = {
REGULATOR_SUPPLY("vcc", "spi2.0"), REGULATOR_SUPPLY("vcc", "spi2.0"),
}; };
static struct panel_generic_dpi_data lcd_panel = { static const struct display_timing devkit8000_lcd_videomode = {
.name = "innolux_at070tn83", .pixelclock = { 0, 40000000, 0 },
/* gpios filled in code */
.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", .name = "lcd",
.type = OMAP_DISPLAY_TYPE_DPI, .source = "dpi.0",
.driver_name = "generic_dpi_panel",
.data = &lcd_panel, .data_lines = 24,
.phy.dpi.data_lines = 24,
.display_timing = &devkit8000_lcd_videomode,
.enable_gpio = -1, /* filled in code */
.backlight_gpio = -1,
}; };
static struct tfp410_platform_data dvi_panel = { static struct platform_device devkit8000_lcd_device = {
.power_down_gpio = -1, .name = "panel-dpi",
.i2c_bus_num = 1, .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", .name = "dvi",
.type = OMAP_DISPLAY_TYPE_DPI, .source = "tfp410.0",
.driver_name = "tfp410", .i2c_bus_num = 1,
.data = &dvi_panel,
.phy.dpi.data_lines = 24,
}; };
static struct omap_dss_device devkit8000_tv_device = { static struct platform_device devkit8000_dvi_connector_device = {
.name = "tv", .name = "connector-dvi",
.driver_name = "venc", .id = 0,
.type = OMAP_DISPLAY_TYPE_VENC, .dev.platform_data = &devkit8000_dvi_connector_pdata,
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
}; };
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[] = { static struct platform_device devkit8000_tfp410_device = {
&devkit8000_lcd_device, .name = "tfp410",
&devkit8000_dvi_device, .id = 0,
&devkit8000_tv_device, .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 = { static struct omap_dss_board_info devkit8000_dss_data = {
.num_devices = ARRAY_SIZE(devkit8000_dss_devices), .default_display_name = "lcd",
.devices = devkit8000_dss_devices,
.default_device = &devkit8000_lcd_device,
}; };
static uint32_t board_keymap[] = { static uint32_t board_keymap[] = {
...@@ -204,11 +235,10 @@ static int devkit8000_twl_gpio_setup(struct device *dev, ...@@ -204,11 +235,10 @@ static int devkit8000_twl_gpio_setup(struct device *dev,
gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1; gpio_leds[2].gpio = gpio + TWL4030_GPIO_MAX + 1;
/* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */ /* TWL4030_GPIO_MAX + 0 is "LCD_PWREN" (out, active high) */
lcd_panel.num_gpios = 1; devkit8000_lcd_pdata.enable_gpio = gpio + TWL4030_GPIO_MAX + 0;
lcd_panel.gpios[0] = gpio + TWL4030_GPIO_MAX + 0;
/* gpio + 7 is "DVI_PD" (out, active low) */ /* 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; return 0;
} }
...@@ -413,6 +443,10 @@ static struct platform_device *devkit8000_devices[] __initdata = { ...@@ -413,6 +443,10 @@ static struct platform_device *devkit8000_devices[] __initdata = {
&leds_gpio, &leds_gpio,
&keys_gpio, &keys_gpio,
&omap_dm9000_dev, &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 = { static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
......
...@@ -194,30 +194,48 @@ static struct platform_device h4_flash_device = { ...@@ -194,30 +194,48 @@ static struct platform_device h4_flash_device = {
.resource = &h4_flash_resource, .resource = &h4_flash_resource,
}; };
static struct platform_device *h4_devices[] __initdata = { static const struct display_timing cm_t35_lcd_videomode = {
&h4_flash_device, .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 = { static struct panel_dpi_platform_data cm_t35_lcd_pdata = {
.name = "h4", .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 = { static struct platform_device cm_t35_lcd_device = {
.name = "lcd", .name = "panel-dpi",
.driver_name = "generic_dpi_panel", .id = 0,
.type = OMAP_DISPLAY_TYPE_DPI, .dev.platform_data = &cm_t35_lcd_pdata,
.phy.dpi.data_lines = 16,
.data = &h4_panel_data,
}; };
static struct omap_dss_device *h4_dss_devices[] = { static struct platform_device *h4_devices[] __initdata = {
&h4_lcd_device, &h4_flash_device,
&cm_t35_lcd_device,
}; };
static struct omap_dss_board_info h4_dss_data = { static struct omap_dss_board_info h4_dss_data = {
.num_devices = ARRAY_SIZE(h4_dss_devices), .default_display_name = "lcd",
.devices = h4_dss_devices,
.default_device = &h4_lcd_device,
}; };
/* 2420 Sysboot setup (2430 is different) */ /* 2420 Sysboot setup (2430 is different) */
......
...@@ -429,31 +429,39 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = { ...@@ -429,31 +429,39 @@ static struct twl4030_gpio_platform_data igep_twl4030_gpio_pdata = {
.setup = igep_twl_gpio_setup, .setup = igep_twl_gpio_setup,
}; };
static struct tfp410_platform_data dvi_panel = { static struct connector_dvi_platform_data omap3stalker_dvi_connector_pdata = {
.i2c_bus_num = 3, .name = "dvi",
.power_down_gpio = IGEP2_GPIO_DVI_PUP, .source = "tfp410.0",
.i2c_bus_num = 3,
}; };
static struct omap_dss_device igep2_dvi_device = { static struct platform_device omap3stalker_dvi_connector_device = {
.type = OMAP_DISPLAY_TYPE_DPI, .name = "connector-dvi",
.name = "dvi", .id = 0,
.driver_name = "tfp410", .dev.platform_data = &omap3stalker_dvi_connector_pdata,
.data = &dvi_panel,
.phy.dpi.data_lines = 24,
}; };
static struct omap_dss_device *igep2_dss_devices[] = { static struct encoder_tfp410_platform_data omap3stalker_tfp410_pdata = {
&igep2_dvi_device .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 = { static struct omap_dss_board_info igep2_dss_data = {
.num_devices = ARRAY_SIZE(igep2_dss_devices), .default_display_name = "dvi",
.devices = igep2_dss_devices,
.default_device = &igep2_dvi_device,
}; };
static struct platform_device *igep_devices[] __initdata = { static struct platform_device *igep_devices[] __initdata = {
&igep_vwlan_device, &igep_vwlan_device,
&omap3stalker_tfp410_device,
&omap3stalker_dvi_connector_device,
}; };
static int igep2_keymap[] = { static int igep2_keymap[] = {
......
...@@ -184,45 +184,70 @@ static inline void __init ldp_init_smsc911x(void) ...@@ -184,45 +184,70 @@ static inline void __init ldp_init_smsc911x(void)
#define LCD_PANEL_RESET_GPIO 55 #define LCD_PANEL_RESET_GPIO 55
#define LCD_PANEL_QVGA_GPIO 56 #define LCD_PANEL_QVGA_GPIO 56
static struct panel_generic_dpi_data ldp_panel_data = { static const struct display_timing ldp_lcd_videomode = {
.name = "nec_nl2432dr22-11b", .pixelclock = { 0, 5400000, 0 },
.num_gpios = 4,
/* gpios filled in code */ .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 = { static struct panel_dpi_platform_data ldp_lcd_pdata = {
.name = "lcd", .name = "lcd",
.driver_name = "generic_dpi_panel", .source = "dpi.0",
.type = OMAP_DISPLAY_TYPE_DPI,
.phy.dpi.data_lines = 18, .data_lines = 18,
.data = &ldp_panel_data,
.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[] = { static struct platform_device ldp_lcd_device = {
&ldp_lcd_device, .name = "panel-dpi",
.id = 0,
.dev.platform_data = &ldp_lcd_pdata,
}; };
static struct omap_dss_board_info ldp_dss_data = { static struct omap_dss_board_info ldp_dss_data = {
.num_devices = ARRAY_SIZE(ldp_dss_devices), .default_display_name = "lcd",
.devices = ldp_dss_devices,
.default_device = &ldp_lcd_device,
}; };
static void __init ldp_display_init(void) static void __init ldp_display_init(void)
{ {
ldp_panel_data.gpios[2] = LCD_PANEL_RESET_GPIO; int r;
ldp_panel_data.gpios[3] = LCD_PANEL_QVGA_GPIO;
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); omap_display_init(&ldp_dss_data);
} }
static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio) static int ldp_twl_gpio_setup(struct device *dev, unsigned gpio, unsigned ngpio)
{ {
ldp_panel_data.gpios[0] = gpio + 7; /* LCD enable GPIO */
ldp_panel_data.gpio_invert[0] = true; ldp_lcd_pdata.enable_gpio = gpio + 7;
ldp_panel_data.gpios[1] = gpio + 15; /* Backlight enable GPIO */
ldp_panel_data.gpio_invert[1] = true; ldp_lcd_pdata.backlight_gpio = gpio + 15;
return 0; return 0;
} }
...@@ -322,6 +347,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = { ...@@ -322,6 +347,7 @@ static struct omap2_hsmmc_info mmc[] __initdata = {
static struct platform_device *ldp_devices[] __initdata = { static struct platform_device *ldp_devices[] __initdata = {
&ldp_gpio_keys_device, &ldp_gpio_keys_device,
&ldp_lcd_device,
}; };
#ifdef CONFIG_OMAP_MUX #ifdef CONFIG_OMAP_MUX
......
...@@ -225,35 +225,46 @@ static struct mtd_partition omap3beagle_nand_partitions[] = { ...@@ -225,35 +225,46 @@ static struct mtd_partition omap3beagle_nand_partitions[] = {
/* DSS */ /* DSS */
static struct tfp410_platform_data dvi_panel = { static struct connector_dvi_platform_data beagle_dvi_connector_pdata = {
.i2c_bus_num = 3, .name = "dvi",
.power_down_gpio = -1, .source = "tfp410.0",
.i2c_bus_num = 3,
}; };
static struct omap_dss_device beagle_dvi_device = { static struct platform_device beagle_dvi_connector_device = {
.type = OMAP_DISPLAY_TYPE_DPI, .name = "connector-dvi",
.name = "dvi", .id = 0,
.driver_name = "tfp410", .dev.platform_data = &beagle_dvi_connector_pdata,
.data = &dvi_panel,
.phy.dpi.data_lines = 24,
}; };
static struct omap_dss_device beagle_tv_device = { static struct encoder_tfp410_platform_data beagle_tfp410_pdata = {
.name = "tfp410.0",
.source = "dpi.0",
.data_lines = 24,
.power_down_gpio = -1,
};
static struct platform_device beagle_tfp410_device = {
.name = "tfp410",
.id = 0,
.dev.platform_data = &beagle_tfp410_pdata,
};
static struct connector_atv_platform_data beagle_tv_pdata = {
.name = "tv", .name = "tv",
.driver_name = "venc", .source = "venc.0",
.type = OMAP_DISPLAY_TYPE_VENC, .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, .invert_polarity = false,
}; };
static struct omap_dss_device *beagle_dss_devices[] = { static struct platform_device beagle_tv_connector_device = {
&beagle_dvi_device, .name = "connector-analog-tv",
&beagle_tv_device, .id = 0,
.dev.platform_data = &beagle_tv_pdata,
}; };
static struct omap_dss_board_info beagle_dss_data = { static struct omap_dss_board_info beagle_dss_data = {
.num_devices = ARRAY_SIZE(beagle_dss_devices), .default_display_name = "dvi",
.devices = beagle_dss_devices,
.default_device = &beagle_dvi_device,
}; };
#include "sdram-micron-mt46h32m32lf-6.h" #include "sdram-micron-mt46h32m32lf-6.h"
...@@ -332,7 +343,11 @@ static int beagle_twl_gpio_setup(struct device *dev, ...@@ -332,7 +343,11 @@ static int beagle_twl_gpio_setup(struct device *dev,
if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC")) if (gpio_request_one(gpio + 1, GPIOF_IN, "EHCI_nOC"))
pr_err("%s: unable to configure EHCI_nOC\n", __func__); pr_err("%s: unable to configure EHCI_nOC\n", __func__);
} }
dvi_panel.power_down_gpio = beagle_config.dvi_pd_gpio; beagle_tfp410_pdata.power_down_gpio = beagle_config.dvi_pd_gpio;
platform_device_register(&beagle_tfp410_device);
platform_device_register(&beagle_dvi_connector_device);
platform_device_register(&beagle_tv_connector_device);
/* TWL4030_GPIO_MAX i.e. LED_GPO controls HS USB Port 2 power */ /* TWL4030_GPIO_MAX i.e. LED_GPO controls HS USB Port 2 power */
phy_data[0].vcc_gpio = gpio + TWL4030_GPIO_MAX; phy_data[0].vcc_gpio = gpio + TWL4030_GPIO_MAX;
...@@ -547,6 +562,7 @@ static void __init omap3_beagle_init(void) ...@@ -547,6 +562,7 @@ static void __init omap3_beagle_init(void)
if (gpio_is_valid(beagle_config.dvi_pd_gpio)) if (gpio_is_valid(beagle_config.dvi_pd_gpio))
omap_mux_init_gpio(beagle_config.dvi_pd_gpio, OMAP_PIN_OUTPUT); omap_mux_init_gpio(beagle_config.dvi_pd_gpio, OMAP_PIN_OUTPUT);
omap_display_init(&beagle_dss_data); omap_display_init(&beagle_dss_data);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params); mt46h32m32lf6_sdrc_params);
......
...@@ -166,14 +166,6 @@ static inline void __init omap3evm_init_smsc911x(void) { return; } ...@@ -166,14 +166,6 @@ static inline void __init omap3evm_init_smsc911x(void) { return; }
*/ */
#define OMAP3EVM_DVI_PANEL_EN_GPIO 199 #define OMAP3EVM_DVI_PANEL_EN_GPIO 199
static struct panel_sharp_ls037v7dw01_data omap3_evm_lcd_data = {
.resb_gpio = OMAP3EVM_LCD_PANEL_RESB,
.ini_gpio = OMAP3EVM_LCD_PANEL_INI,
.mo_gpio = OMAP3EVM_LCD_PANEL_QVGA,
.lr_gpio = OMAP3EVM_LCD_PANEL_LR,
.ud_gpio = OMAP3EVM_LCD_PANEL_UD,
};
#ifdef CONFIG_BROKEN #ifdef CONFIG_BROKEN
static void __init omap3_evm_display_init(void) static void __init omap3_evm_display_init(void)
{ {
...@@ -196,44 +188,65 @@ static void __init omap3_evm_display_init(void) ...@@ -196,44 +188,65 @@ static void __init omap3_evm_display_init(void)
} }
#endif #endif
static struct omap_dss_device omap3_evm_lcd_device = { static struct panel_sharp_ls037v7dw01_platform_data omap3_evm_lcd_pdata = {
.name = "lcd", .name = "lcd",
.driver_name = "sharp_ls_panel", .source = "dpi.0",
.type = OMAP_DISPLAY_TYPE_DPI,
.phy.dpi.data_lines = 18, .data_lines = 18,
.data = &omap3_evm_lcd_data,
.resb_gpio = OMAP3EVM_LCD_PANEL_RESB,
.ini_gpio = OMAP3EVM_LCD_PANEL_INI,
.mo_gpio = OMAP3EVM_LCD_PANEL_QVGA,
.lr_gpio = OMAP3EVM_LCD_PANEL_LR,
.ud_gpio = OMAP3EVM_LCD_PANEL_UD,
};
static struct platform_device omap3_evm_lcd_device = {
.name = "panel-sharp-ls037v7dw01",
.id = 0,
.dev.platform_data = &omap3_evm_lcd_pdata,
};
static struct connector_dvi_platform_data omap3_evm_dvi_connector_pdata = {
.name = "dvi",
.source = "tfp410.0",
.i2c_bus_num = -1,
};
static struct platform_device omap3_evm_dvi_connector_device = {
.name = "connector-dvi",
.id = 0,
.dev.platform_data = &omap3_evm_dvi_connector_pdata,
}; };
static struct omap_dss_device omap3_evm_tv_device = { static struct encoder_tfp410_platform_data omap3_evm_tfp410_pdata = {
.name = "tv", .name = "tfp410.0",
.driver_name = "venc", .source = "dpi.0",
.type = OMAP_DISPLAY_TYPE_VENC, .data_lines = 24,
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, .power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO,
}; };
static struct tfp410_platform_data dvi_panel = { static struct platform_device omap3_evm_tfp410_device = {
.power_down_gpio = OMAP3EVM_DVI_PANEL_EN_GPIO, .name = "tfp410",
.i2c_bus_num = -1, .id = 0,
.dev.platform_data = &omap3_evm_tfp410_pdata,
}; };
static struct omap_dss_device omap3_evm_dvi_device = { static struct connector_atv_platform_data omap3_evm_tv_pdata = {
.name = "dvi", .name = "tv",
.type = OMAP_DISPLAY_TYPE_DPI, .source = "venc.0",
.driver_name = "tfp410", .connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
.data = &dvi_panel, .invert_polarity = false,
.phy.dpi.data_lines = 24,
}; };
static struct omap_dss_device *omap3_evm_dss_devices[] = { static struct platform_device omap3_evm_tv_connector_device = {
&omap3_evm_lcd_device, .name = "connector-analog-tv",
&omap3_evm_tv_device, .id = 0,
&omap3_evm_dvi_device, .dev.platform_data = &omap3_evm_tv_pdata,
}; };
static struct omap_dss_board_info omap3_evm_dss_data = { static struct omap_dss_board_info omap3_evm_dss_data = {
.num_devices = ARRAY_SIZE(omap3_evm_dss_devices), .default_display_name = "lcd",
.devices = omap3_evm_dss_devices,
.default_device = &omap3_evm_lcd_device,
}; };
static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = { static struct regulator_consumer_supply omap3evm_vmmc1_supply[] = {
...@@ -678,6 +691,10 @@ static void __init omap3_evm_init(void) ...@@ -678,6 +691,10 @@ static void __init omap3_evm_init(void)
omap3_evm_i2c_init(); omap3_evm_i2c_init();
omap_display_init(&omap3_evm_dss_data); omap_display_init(&omap3_evm_dss_data);
platform_device_register(&omap3_evm_lcd_device);
platform_device_register(&omap3_evm_tfp410_device);
platform_device_register(&omap3_evm_dvi_connector_device);
platform_device_register(&omap3_evm_tv_connector_device);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL); omap_sdrc_init(mt46h32m32lf6_sdrc_params, NULL);
......
...@@ -231,34 +231,21 @@ static struct twl4030_keypad_data pandora_kp_data = { ...@@ -231,34 +231,21 @@ static struct twl4030_keypad_data pandora_kp_data = {
.rep = 1, .rep = 1,
}; };
static struct panel_tpo_td043_data lcd_data = { static struct connector_atv_platform_data pandora_tv_pdata = {
.nreset_gpio = 157, .name = "tv",
}; .source = "venc.0",
.connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
static struct omap_dss_device pandora_lcd_device = { .invert_polarity = false,
.name = "lcd",
.driver_name = "tpo_td043mtea1_panel",
.type = OMAP_DISPLAY_TYPE_DPI,
.phy.dpi.data_lines = 24,
.data = &lcd_data,
};
static struct omap_dss_device pandora_tv_device = {
.name = "tv",
.driver_name = "venc",
.type = OMAP_DISPLAY_TYPE_VENC,
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
}; };
static struct omap_dss_device *pandora_dss_devices[] = { static struct platform_device pandora_tv_connector_device = {
&pandora_lcd_device, .name = "connector-analog-tv",
&pandora_tv_device, .id = 0,
.dev.platform_data = &pandora_tv_pdata,
}; };
static struct omap_dss_board_info pandora_dss_data = { static struct omap_dss_board_info pandora_dss_data = {
.num_devices = ARRAY_SIZE(pandora_dss_devices), .default_display_name = "lcd",
.devices = pandora_dss_devices,
.default_device = &pandora_lcd_device,
}; };
static void pandora_wl1251_init_card(struct mmc_card *card) static void pandora_wl1251_init_card(struct mmc_card *card)
...@@ -348,7 +335,7 @@ static struct regulator_consumer_supply pandora_vdds_supplies[] = { ...@@ -348,7 +335,7 @@ static struct regulator_consumer_supply pandora_vdds_supplies[] = {
}; };
static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = { static struct regulator_consumer_supply pandora_vcc_lcd_supply[] = {
REGULATOR_SUPPLY("vcc", "display0"), REGULATOR_SUPPLY("vcc", "spi1.1"),
}; };
static struct regulator_consumer_supply pandora_usb_phy_supply[] = { static struct regulator_consumer_supply pandora_usb_phy_supply[] = {
...@@ -529,13 +516,21 @@ static int __init omap3pandora_i2c_init(void) ...@@ -529,13 +516,21 @@ static int __init omap3pandora_i2c_init(void)
return 0; return 0;
} }
static struct panel_tpo_td043mtea1_platform_data pandora_lcd_pdata = {
.name = "lcd",
.source = "dpi.0",
.data_lines = 24,
.nreset_gpio = 157,
};
static struct spi_board_info omap3pandora_spi_board_info[] __initdata = { static struct spi_board_info omap3pandora_spi_board_info[] __initdata = {
{ {
.modalias = "tpo_td043mtea1_panel_spi", .modalias = "panel-tpo-td043mtea1",
.bus_num = 1, .bus_num = 1,
.chip_select = 1, .chip_select = 1,
.max_speed_hz = 375000, .max_speed_hz = 375000,
.platform_data = &pandora_lcd_device, .platform_data = &pandora_lcd_pdata,
} }
}; };
...@@ -580,6 +575,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = { ...@@ -580,6 +575,7 @@ static struct platform_device *omap3pandora_devices[] __initdata = {
&pandora_keys_gpio, &pandora_keys_gpio,
&pandora_vwlan_device, &pandora_vwlan_device,
&pandora_backlight, &pandora_backlight,
&pandora_tv_connector_device,
}; };
static struct usbhs_omap_platform_data usbhs_bdata __initdata = { static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
......
...@@ -93,40 +93,50 @@ static void __init omap3_stalker_display_init(void) ...@@ -93,40 +93,50 @@ static void __init omap3_stalker_display_init(void)
{ {
return; return;
} }
static struct connector_dvi_platform_data omap3stalker_dvi_connector_pdata = {
.name = "dvi",
.source = "tfp410.0",
.i2c_bus_num = -1,
};
static struct omap_dss_device omap3_stalker_tv_device = { static struct platform_device omap3stalker_dvi_connector_device = {
.name = "tv", .name = "connector-dvi",
.driver_name = "venc", .id = 0,
.type = OMAP_DISPLAY_TYPE_VENC, .dev.platform_data = &omap3stalker_dvi_connector_pdata,
#if defined(CONFIG_OMAP2_VENC_OUT_TYPE_SVIDEO)
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
#elif defined(CONFIG_OMAP2_VENC_OUT_TYPE_COMPOSITE)
.u.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE,
#endif
}; };
static struct tfp410_platform_data dvi_panel = { static struct encoder_tfp410_platform_data omap3stalker_tfp410_pdata = {
.power_down_gpio = DSS_ENABLE_GPIO, .name = "tfp410.0",
.i2c_bus_num = -1, .source = "dpi.0",
.data_lines = 24,
.power_down_gpio = DSS_ENABLE_GPIO,
}; };
static struct omap_dss_device omap3_stalker_dvi_device = { static struct platform_device omap3stalker_tfp410_device = {
.name = "dvi", .name = "tfp410",
.type = OMAP_DISPLAY_TYPE_DPI, .id = 0,
.driver_name = "tfp410", .dev.platform_data = &omap3stalker_tfp410_pdata,
.data = &dvi_panel, };
.phy.dpi.data_lines = 24,
static struct connector_atv_platform_data omap3stalker_tv_pdata = {
.name = "tv",
.source = "venc.0",
#if defined(CONFIG_OMAP2_VENC_OUT_TYPE_SVIDEO)
.connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
#elif defined(CONFIG_OMAP2_VENC_OUT_TYPE_COMPOSITE)
.connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
#endif
.invert_polarity = false,
}; };
static struct omap_dss_device *omap3_stalker_dss_devices[] = { static struct platform_device omap3stalker_tv_connector_device = {
&omap3_stalker_tv_device, .name = "connector-analog-tv",
&omap3_stalker_dvi_device, .id = 0,
.dev.platform_data = &omap3stalker_tv_pdata,
}; };
static struct omap_dss_board_info omap3_stalker_dss_data = { static struct omap_dss_board_info omap3_stalker_dss_data = {
.num_devices = ARRAY_SIZE(omap3_stalker_dss_devices), .default_display_name = "dvi",
.devices = omap3_stalker_dss_devices,
.default_device = &omap3_stalker_dvi_device,
}; };
static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = { static struct regulator_consumer_supply omap3stalker_vmmc1_supply[] = {
...@@ -356,6 +366,9 @@ static struct usbhs_phy_data phy_data[] __initdata = { ...@@ -356,6 +366,9 @@ static struct usbhs_phy_data phy_data[] __initdata = {
static struct platform_device *omap3_stalker_devices[] __initdata = { static struct platform_device *omap3_stalker_devices[] __initdata = {
&keys_gpio, &keys_gpio,
&omap3stalker_tfp410_device,
&omap3stalker_dvi_connector_device,
&omap3stalker_tv_connector_device,
}; };
static struct usbhs_omap_platform_data usbhs_bdata __initdata = { static struct usbhs_omap_platform_data usbhs_bdata __initdata = {
......
...@@ -72,6 +72,9 @@ ...@@ -72,6 +72,9 @@
#define OVERO_SMSC911X2_CS 4 #define OVERO_SMSC911X2_CS 4
#define OVERO_SMSC911X2_GPIO 65 #define OVERO_SMSC911X2_GPIO 65
/* whether to register LCD35 instead of LCD43 */
static bool overo_use_lcd35;
#if defined(CONFIG_TOUCHSCREEN_ADS7846) || \ #if defined(CONFIG_TOUCHSCREEN_ADS7846) || \
defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE) defined(CONFIG_TOUCHSCREEN_ADS7846_MODULE)
...@@ -149,78 +152,94 @@ static inline void __init overo_init_smsc911x(void) { return; } ...@@ -149,78 +152,94 @@ static inline void __init overo_init_smsc911x(void) { return; }
#define OVERO_GPIO_LCD_EN 144 #define OVERO_GPIO_LCD_EN 144
#define OVERO_GPIO_LCD_BL 145 #define OVERO_GPIO_LCD_BL 145
static struct tfp410_platform_data dvi_panel = { static struct connector_atv_platform_data overo_tv_pdata = {
.i2c_bus_num = 3, .name = "tv",
.power_down_gpio = -1, .source = "venc.0",
.connector_type = OMAP_DSS_VENC_TYPE_SVIDEO,
.invert_polarity = false,
}; };
static struct omap_dss_device overo_dvi_device = { static struct platform_device overo_tv_connector_device = {
.name = "dvi", .name = "connector-analog-tv",
.type = OMAP_DISPLAY_TYPE_DPI, .id = 0,
.driver_name = "tfp410", .dev.platform_data = &overo_tv_pdata,
.data = &dvi_panel,
.phy.dpi.data_lines = 24,
}; };
static struct omap_dss_device overo_tv_device = { static const struct display_timing overo_lcd43_videomode = {
.name = "tv", .pixelclock = { 0, 9200000, 0 },
.driver_name = "venc",
.type = OMAP_DISPLAY_TYPE_VENC, .hactive = { 0, 480, 0 },
.phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO, .hfront_porch = { 0, 8, 0 },
.hback_porch = { 0, 4, 0 },
.hsync_len = { 0, 41, 0 },
.vactive = { 0, 272, 0 },
.vfront_porch = { 0, 4, 0 },
.vback_porch = { 0, 2, 0 },
.vsync_len = { 0, 10, 0 },
.flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW |
DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_POSEDGE,
}; };
static struct panel_generic_dpi_data lcd43_panel = { static struct panel_dpi_platform_data overo_lcd43_pdata = {
.name = "samsung_lte430wq_f0c", .name = "lcd43",
.num_gpios = 2, .source = "dpi.0",
.gpios = {
OVERO_GPIO_LCD_EN, .data_lines = 24,
OVERO_GPIO_LCD_BL
}, .display_timing = &overo_lcd43_videomode,
.enable_gpio = OVERO_GPIO_LCD_EN,
.backlight_gpio = OVERO_GPIO_LCD_BL,
}; };
static struct omap_dss_device overo_lcd43_device = { static struct platform_device overo_lcd43_device = {
.name = "lcd43", .name = "panel-dpi",
.type = OMAP_DISPLAY_TYPE_DPI, .id = 0,
.driver_name = "generic_dpi_panel", .dev.platform_data = &overo_lcd43_pdata,
.data = &lcd43_panel,
.phy.dpi.data_lines = 24,
}; };
#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \ static struct connector_dvi_platform_data overo_dvi_connector_pdata = {
defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE) .name = "dvi",
static struct panel_generic_dpi_data lcd35_panel = { .source = "tfp410.0",
.num_gpios = 2, .i2c_bus_num = 3,
.gpios = {
OVERO_GPIO_LCD_EN,
OVERO_GPIO_LCD_BL
},
}; };
static struct omap_dss_device overo_lcd35_device = { static struct platform_device overo_dvi_connector_device = {
.type = OMAP_DISPLAY_TYPE_DPI, .name = "connector-dvi",
.name = "lcd35", .id = 0,
.driver_name = "lgphilips_lb035q02_panel", .dev.platform_data = &overo_dvi_connector_pdata,
.phy.dpi.data_lines = 24,
.data = &lcd35_panel,
}; };
#endif
static struct omap_dss_device *overo_dss_devices[] = { static struct encoder_tfp410_platform_data overo_tfp410_pdata = {
&overo_dvi_device, .name = "tfp410.0",
&overo_tv_device, .source = "dpi.0",
#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \ .data_lines = 24,
defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE) .power_down_gpio = -1,
&overo_lcd35_device, };
#endif
&overo_lcd43_device, static struct platform_device overo_tfp410_device = {
.name = "tfp410",
.id = 0,
.dev.platform_data = &overo_tfp410_pdata,
}; };
static struct omap_dss_board_info overo_dss_data = { static struct omap_dss_board_info overo_dss_data = {
.num_devices = ARRAY_SIZE(overo_dss_devices), .default_display_name = "lcd43",
.devices = overo_dss_devices,
.default_device = &overo_dvi_device,
}; };
static void __init overo_display_init(void)
{
omap_display_init(&overo_dss_data);
if (!overo_use_lcd35)
platform_device_register(&overo_lcd43_device);
platform_device_register(&overo_tfp410_device);
platform_device_register(&overo_dvi_connector_device);
platform_device_register(&overo_tv_connector_device);
}
static struct mtd_partition overo_nand_partitions[] = { static struct mtd_partition overo_nand_partitions[] = {
{ {
.name = "xloader", .name = "xloader",
...@@ -408,24 +427,41 @@ static int __init overo_i2c_init(void) ...@@ -408,24 +427,41 @@ static int __init overo_i2c_init(void)
return 0; return 0;
} }
static struct panel_lb035q02_platform_data overo_lcd35_pdata = {
.name = "lcd35",
.source = "dpi.0",
.data_lines = 24,
.enable_gpio = OVERO_GPIO_LCD_EN,
.backlight_gpio = OVERO_GPIO_LCD_BL,
};
/*
* NOTE: We need to add either the lgphilips panel, or the lcd43 panel. The
* selection is done based on the overo_use_lcd35 field. If new SPI
* devices are added here, extra work is needed to make only the lgphilips panel
* affected by the overo_use_lcd35 field.
*/
static struct spi_board_info overo_spi_board_info[] __initdata = { static struct spi_board_info overo_spi_board_info[] __initdata = {
#if defined(CONFIG_PANEL_LGPHILIPS_LB035Q02) || \
defined(CONFIG_PANEL_LGPHILIPS_LB035Q02_MODULE)
{ {
.modalias = "lgphilips_lb035q02_panel-spi", .modalias = "panel_lgphilips_lb035q02",
.bus_num = 1, .bus_num = 1,
.chip_select = 1, .chip_select = 1,
.max_speed_hz = 500000, .max_speed_hz = 500000,
.mode = SPI_MODE_3, .mode = SPI_MODE_3,
.platform_data = &overo_lcd35_pdata,
}, },
#endif
}; };
static int __init overo_spi_init(void) static int __init overo_spi_init(void)
{ {
overo_ads7846_init(); overo_ads7846_init();
spi_register_board_info(overo_spi_board_info,
ARRAY_SIZE(overo_spi_board_info)); if (overo_use_lcd35) {
spi_register_board_info(overo_spi_board_info,
ARRAY_SIZE(overo_spi_board_info));
}
return 0; return 0;
} }
...@@ -463,11 +499,13 @@ static void __init overo_init(void) ...@@ -463,11 +499,13 @@ static void __init overo_init(void)
{ {
int ret; int ret;
if (strstr(boot_command_line, "omapdss.def_disp=lcd35"))
overo_use_lcd35 = true;
regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies)); regulator_register_fixed(0, dummy_supplies, ARRAY_SIZE(dummy_supplies));
omap3_mux_init(board_mux, OMAP_PACKAGE_CBB); omap3_mux_init(board_mux, OMAP_PACKAGE_CBB);
overo_i2c_init(); overo_i2c_init();
omap_hsmmc_init(mmc); omap_hsmmc_init(mmc);
omap_display_init(&overo_dss_data);
omap_serial_init(); omap_serial_init();
omap_sdrc_init(mt46h32m32lf6_sdrc_params, omap_sdrc_init(mt46h32m32lf6_sdrc_params,
mt46h32m32lf6_sdrc_params); mt46h32m32lf6_sdrc_params);
...@@ -484,6 +522,8 @@ static void __init overo_init(void) ...@@ -484,6 +522,8 @@ static void __init overo_init(void)
overo_init_keys(); overo_init_keys();
omap_twl4030_audio_init("overo", NULL); omap_twl4030_audio_init("overo", NULL);
overo_display_init();
/* Ensure SDRC pins are mux'd for self-refresh */ /* Ensure SDRC pins are mux'd for self-refresh */
omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke0", OMAP_PIN_OUTPUT);
omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT); omap_mux_init_signal("sdrc_cke1", OMAP_PIN_OUTPUT);
......
...@@ -45,6 +45,8 @@ ...@@ -45,6 +45,8 @@
#include <linux/platform_data/tsl2563.h> #include <linux/platform_data/tsl2563.h>
#include <linux/lis3lv02d.h> #include <linux/lis3lv02d.h>
#include <video/omap-panel-data.h>
#if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE) #if defined(CONFIG_IR_RX51) || defined(CONFIG_IR_RX51_MODULE)
#include <media/ir-rx51.h> #include <media/ir-rx51.h>
#endif #endif
...@@ -226,6 +228,15 @@ static struct lp55xx_platform_data rx51_lp5523_platform_data = { ...@@ -226,6 +228,15 @@ static struct lp55xx_platform_data rx51_lp5523_platform_data = {
}; };
#endif #endif
#define RX51_LCD_RESET_GPIO 90
static struct panel_acx565akm_platform_data acx_pdata = {
.name = "lcd",
.source = "sdi.0",
.reset_gpio = RX51_LCD_RESET_GPIO,
.datapairs = 2,
};
static struct omap2_mcspi_device_config wl1251_mcspi_config = { static struct omap2_mcspi_device_config wl1251_mcspi_config = {
.turbo_mode = 0, .turbo_mode = 0,
}; };
...@@ -254,6 +265,7 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = { ...@@ -254,6 +265,7 @@ static struct spi_board_info rx51_peripherals_spi_board_info[] __initdata = {
.chip_select = 2, .chip_select = 2,
.max_speed_hz = 6000000, .max_speed_hz = 6000000,
.controller_data = &mipid_mcspi_config, .controller_data = &mipid_mcspi_config,
.platform_data = &acx_pdata,
}, },
[RX51_SPI_TSC2005] = { [RX51_SPI_TSC2005] = {
.modalias = "tsc2005", .modalias = "tsc2005",
......
...@@ -29,34 +29,21 @@ ...@@ -29,34 +29,21 @@
#if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE) #if defined(CONFIG_FB_OMAP2) || defined(CONFIG_FB_OMAP2_MODULE)
static struct panel_acx565akm_data lcd_data = { static struct connector_atv_platform_data rx51_tv_pdata = {
.reset_gpio = RX51_LCD_RESET_GPIO, .name = "tv",
.source = "venc.0",
.connector_type = OMAP_DSS_VENC_TYPE_COMPOSITE,
.invert_polarity = false,
}; };
static struct omap_dss_device rx51_lcd_device = { static struct platform_device rx51_tv_connector_device = {
.name = "lcd", .name = "connector-analog-tv",
.driver_name = "panel-acx565akm", .id = 0,
.type = OMAP_DISPLAY_TYPE_SDI, .dev.platform_data = &rx51_tv_pdata,
.phy.sdi.datapairs = 2,
.data = &lcd_data,
};
static struct omap_dss_device rx51_tv_device = {
.name = "tv",
.type = OMAP_DISPLAY_TYPE_VENC,
.driver_name = "venc",
.phy.venc.type = OMAP_DSS_VENC_TYPE_COMPOSITE,
};
static struct omap_dss_device *rx51_dss_devices[] = {
&rx51_lcd_device,
&rx51_tv_device,
}; };
static struct omap_dss_board_info rx51_dss_board_info = { static struct omap_dss_board_info rx51_dss_board_info = {
.num_devices = ARRAY_SIZE(rx51_dss_devices), .default_display_name = "lcd",
.devices = rx51_dss_devices,
.default_device = &rx51_lcd_device,
}; };
static int __init rx51_video_init(void) static int __init rx51_video_init(void)
...@@ -71,6 +58,8 @@ static int __init rx51_video_init(void) ...@@ -71,6 +58,8 @@ static int __init rx51_video_init(void)
omap_display_init(&rx51_dss_board_info); omap_display_init(&rx51_dss_board_info);
platform_device_register(&rx51_tv_connector_device);
return 0; return 0;
} }
......
...@@ -25,32 +25,23 @@ ...@@ -25,32 +25,23 @@
#define LCD_PANEL_RESET_GPIO_PILOT 55 #define LCD_PANEL_RESET_GPIO_PILOT 55
#define LCD_PANEL_QVGA_GPIO 56 #define LCD_PANEL_QVGA_GPIO 56
static struct panel_nec_nl8048_data zoom_lcd_data = { static struct panel_nec_nl8048hl11_platform_data zoom_lcd_pdata = {
/* res_gpio filled in code */ .name = "lcd",
.qvga_gpio = LCD_PANEL_QVGA_GPIO, .source = "dpi.0",
};
static struct omap_dss_device zoom_lcd_device = { .data_lines = 24,
.name = "lcd",
.driver_name = "NEC_8048_panel",
.type = OMAP_DISPLAY_TYPE_DPI,
.phy.dpi.data_lines = 24,
.data = &zoom_lcd_data,
};
static struct omap_dss_device *zoom_dss_devices[] = { .res_gpio = -1, /* filled in code */
&zoom_lcd_device, .qvga_gpio = LCD_PANEL_QVGA_GPIO,
}; };
static struct omap_dss_board_info zoom_dss_data = { static struct omap_dss_board_info zoom_dss_data = {
.num_devices = ARRAY_SIZE(zoom_dss_devices), .default_display_name = "lcd",
.devices = zoom_dss_devices,
.default_device = &zoom_lcd_device,
}; };
static void __init zoom_lcd_panel_init(void) static void __init zoom_lcd_panel_init(void)
{ {
zoom_lcd_data.res_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ? zoom_lcd_pdata.res_gpio = (omap_rev() > OMAP3430_REV_ES3_0) ?
LCD_PANEL_RESET_GPIO_PROD : LCD_PANEL_RESET_GPIO_PROD :
LCD_PANEL_RESET_GPIO_PILOT; LCD_PANEL_RESET_GPIO_PILOT;
} }
...@@ -61,19 +52,20 @@ static struct omap2_mcspi_device_config dss_lcd_mcspi_config = { ...@@ -61,19 +52,20 @@ static struct omap2_mcspi_device_config dss_lcd_mcspi_config = {
static struct spi_board_info nec_8048_spi_board_info[] __initdata = { static struct spi_board_info nec_8048_spi_board_info[] __initdata = {
[0] = { [0] = {
.modalias = "nec_8048_spi", .modalias = "panel-nec-nl8048hl11",
.bus_num = 1, .bus_num = 1,
.chip_select = 2, .chip_select = 2,
.max_speed_hz = 375000, .max_speed_hz = 375000,
.controller_data = &dss_lcd_mcspi_config, .controller_data = &dss_lcd_mcspi_config,
.platform_data = &zoom_lcd_pdata,
}, },
}; };
void __init zoom_display_init(void) void __init zoom_display_init(void)
{ {
omap_display_init(&zoom_dss_data); omap_display_init(&zoom_dss_data);
zoom_lcd_panel_init();
spi_register_board_info(nec_8048_spi_board_info, spi_register_board_info(nec_8048_spi_board_info,
ARRAY_SIZE(nec_8048_spi_board_info)); ARRAY_SIZE(nec_8048_spi_board_info));
zoom_lcd_panel_init();
} }
...@@ -400,7 +400,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) ...@@ -400,7 +400,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
/* Create devices for DPI and SDI */ /* Create devices for DPI and SDI */
pdev = create_simple_dss_pdev("omapdss_dpi", -1, pdev = create_simple_dss_pdev("omapdss_dpi", 0,
board_data, sizeof(*board_data), dss_pdev); board_data, sizeof(*board_data), dss_pdev);
if (IS_ERR(pdev)) { if (IS_ERR(pdev)) {
pr_err("Could not build platform_device for omapdss_dpi\n"); pr_err("Could not build platform_device for omapdss_dpi\n");
...@@ -408,7 +408,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data) ...@@ -408,7 +408,7 @@ int __init omap_display_init(struct omap_dss_board_info *board_data)
} }
if (cpu_is_omap34xx()) { if (cpu_is_omap34xx()) {
pdev = create_simple_dss_pdev("omapdss_sdi", -1, pdev = create_simple_dss_pdev("omapdss_sdi", 0,
board_data, sizeof(*board_data), dss_pdev); board_data, sizeof(*board_data), dss_pdev);
if (IS_ERR(pdev)) { if (IS_ERR(pdev)) {
pr_err("Could not build platform_device for omapdss_sdi\n"); pr_err("Could not build platform_device for omapdss_sdi\n");
......
...@@ -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,70 +38,76 @@ ...@@ -37,70 +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,
}; };
static struct omap_dss_hdmi_data omap4_panda_hdmi_data = { /* 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,
};
/* 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(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);
* OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and platform_device_register(&omap4_panda_dvi_connector_device);
* later have external pull up on the HDMI I2C lines
*/
if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
else
omap_hdmi_init(0);
omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
}
void __init omap4_panda_display_init_of(void) platform_device_register(&omap4_panda_tpd_device);
{ platform_device_register(&omap4_panda_hdmi_connector_device);
omap_display_init(&omap4_panda_dss_data);
} }
...@@ -109,93 +116,73 @@ void __init omap4_panda_display_init_of(void) ...@@ -109,93 +116,73 @@ 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 = {
.ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD, .name = "panel-dsi-cm",
.ls_oe_gpio = HDMI_GPIO_LS_OE, .id = 1,
.hpd_gpio = HDMI_GPIO_HPD, .dev.platform_data = &dsi2_panel,
}; };
static struct omap_dss_device sdp4430_hdmi_device = { /* HDMI Connector */
.name = "hdmi", static struct connector_hdmi_platform_data sdp4430_hdmi_connector_pdata = {
.driver_name = "hdmi_panel", .name = "hdmi",
.type = OMAP_DISPLAY_TYPE_HDMI, .source = "tpd12s015.0",
.channel = OMAP_DSS_CHANNEL_DIGIT,
.data = &sdp4430_hdmi_data,
}; };
static struct picodlp_panel_data sdp4430_picodlp_pdata = { static struct platform_device sdp4430_hdmi_connector_device = {
.picodlp_adapter_id = 2, .name = "connector-hdmi",
.emu_done_gpio = 44, .id = 0,
.pwrgood_gpio = 45, .dev.platform_data = &sdp4430_hdmi_connector_pdata,
}; };
static struct omap_dss_device sdp4430_picodlp_device = { /* TPD12S015 HDMI ESD protection & level shifter chip */
.name = "picodlp", static struct encoder_tpd12s015_platform_data sdp4430_tpd_pdata = {
.driver_name = "picodlp_panel", .name = "tpd12s015.0",
.type = OMAP_DISPLAY_TYPE_DPI, .source = "hdmi.0",
.phy.dpi.data_lines = 24,
.channel = OMAP_DSS_CHANNEL_LCD2, .ct_cp_hpd_gpio = HDMI_GPIO_CT_CP_HPD,
.data = &sdp4430_picodlp_pdata, .ls_oe_gpio = HDMI_GPIO_LS_OE,
.hpd_gpio = HDMI_GPIO_HPD,
}; };
static struct omap_dss_device *sdp4430_dss_devices[] = { static struct platform_device sdp4430_tpd_device = {
&sdp4430_lcd_device, .name = "tpd12s015",
&sdp4430_lcd2_device, .id = 0,
&sdp4430_hdmi_device, .dev.platform_data = &sdp4430_tpd_pdata,
&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), .default_display_name = "lcd",
.devices = sdp4430_dss_devices,
.default_device = &sdp4430_lcd_device,
}; };
/* /*
...@@ -204,7 +191,7 @@ static struct omap_dss_board_info sdp4430_dss_data = { ...@@ -204,7 +191,7 @@ static struct omap_dss_board_info sdp4430_dss_data = {
* used by picodlp on the 4430sdp platform. Keep this gpio disabled as LCD2 is * used by picodlp on the 4430sdp platform. Keep this gpio disabled as LCD2 is
* selected by default * selected by default
*/ */
void __init omap_4430sdp_display_init(void) void __init omap_4430sdp_display_init_of(void)
{ {
int r; int r;
...@@ -219,33 +206,10 @@ void __init omap_4430sdp_display_init(void) ...@@ -219,33 +206,10 @@ void __init omap_4430sdp_display_init(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);
/*
* OMAP4460SDP/Blaze and OMAP4430 ES2.3 SDP/Blaze boards and
* later have external pull up on the HDMI I2C lines
*/
if (cpu_is_omap446x() || omap_rev() > OMAP4430_REV_ES2_2)
omap_hdmi_init(OMAP_HDMI_SDA_SCL_EXTERNAL_PULLUP);
else
omap_hdmi_init(0);
omap_mux_init_gpio(HDMI_GPIO_LS_OE, OMAP_PIN_OUTPUT);
omap_mux_init_gpio(HDMI_GPIO_CT_CP_HPD, OMAP_PIN_OUTPUT);
omap_mux_init_gpio(HDMI_GPIO_HPD, OMAP_PIN_INPUT_PULLDOWN);
}
void __init omap_4430sdp_display_init_of(void)
{
int r;
r = gpio_request_one(DISPLAY_SEL_GPIO, GPIOF_OUT_INIT_HIGH, platform_device_register(&sdp4430_lcd_device);
"display_sel"); platform_device_register(&sdp4430_lcd2_device);
if (r)
pr_err("%s: Could not get display_sel GPIO\n", __func__);
r = gpio_request_one(DLP_POWER_ON_GPIO, GPIOF_OUT_INIT_LOW,
"DLP POWER ON");
if (r)
pr_err("%s: Could not get DLP POWER ON GPIO\n", __func__);
omap_display_init(&sdp4430_dss_data); platform_device_register(&sdp4430_tpd_device);
platform_device_register(&sdp4430_hdmi_connector_device);
} }
...@@ -6,9 +6,7 @@ ...@@ -6,9 +6,7 @@
* This file will be removed when DSS supports DT. * This file will be removed when DSS supports DT.
*/ */
void __init omap4_panda_display_init(void);
void __init omap4_panda_display_init_of(void); void __init omap4_panda_display_init_of(void);
void __init omap_4430sdp_display_init(void);
void __init omap_4430sdp_display_init_of(void); void __init omap_4430sdp_display_init_of(void);
#endif #endif
...@@ -133,7 +133,7 @@ int omap_encoder_update(struct drm_encoder *encoder, ...@@ -133,7 +133,7 @@ int omap_encoder_update(struct drm_encoder *encoder,
struct omap_dss_driver *dssdrv = dssdev->driver; struct omap_dss_driver *dssdrv = dssdev->driver;
int ret; int ret;
dssdev->output->manager = mgr; dssdev->src->manager = mgr;
if (dssdrv->check_timings) { if (dssdrv->check_timings) {
ret = dssdrv->check_timings(dssdev, timings); ret = dssdrv->check_timings(dssdev, timings);
......
...@@ -5,7 +5,6 @@ if ARCH_OMAP2PLUS ...@@ -5,7 +5,6 @@ if ARCH_OMAP2PLUS
source "drivers/video/omap2/dss/Kconfig" source "drivers/video/omap2/dss/Kconfig"
source "drivers/video/omap2/omapfb/Kconfig" source "drivers/video/omap2/omapfb/Kconfig"
source "drivers/video/omap2/displays/Kconfig"
source "drivers/video/omap2/displays-new/Kconfig" source "drivers/video/omap2/displays-new/Kconfig"
endif endif
obj-$(CONFIG_OMAP2_VRFB) += vrfb.o obj-$(CONFIG_OMAP2_VRFB) += vrfb.o
obj-$(CONFIG_OMAP2_DSS) += dss/ obj-$(CONFIG_OMAP2_DSS) += dss/
obj-y += displays/
obj-y += displays-new/ obj-y += displays-new/
obj-$(CONFIG_FB_OMAP2) += omapfb/ obj-$(CONFIG_FB_OMAP2) += omapfb/
...@@ -43,8 +43,8 @@ static int tfp410_connect(struct omap_dss_device *dssdev, ...@@ -43,8 +43,8 @@ static int tfp410_connect(struct omap_dss_device *dssdev,
if (r) if (r)
return r; return r;
dst->output = dssdev; dst->src = dssdev;
dssdev->device = dst; dssdev->dst = dst;
return 0; return 0;
} }
...@@ -59,12 +59,12 @@ static void tfp410_disconnect(struct omap_dss_device *dssdev, ...@@ -59,12 +59,12 @@ static void tfp410_disconnect(struct omap_dss_device *dssdev,
if (!omapdss_device_is_connected(dssdev)) if (!omapdss_device_is_connected(dssdev))
return; return;
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
dst->output = NULL; dst->src = NULL;
dssdev->device = NULL; dssdev->dst = NULL;
in->ops.dpi->disconnect(in, &ddata->dssdev); in->ops.dpi->disconnect(in, &ddata->dssdev);
} }
...@@ -244,7 +244,7 @@ static int __exit tfp410_remove(struct platform_device *pdev) ...@@ -244,7 +244,7 @@ static int __exit tfp410_remove(struct platform_device *pdev)
WARN_ON(omapdss_device_is_connected(dssdev)); WARN_ON(omapdss_device_is_connected(dssdev));
if (omapdss_device_is_connected(dssdev)) if (omapdss_device_is_connected(dssdev))
tfp410_disconnect(dssdev, dssdev->device); tfp410_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in); omap_dss_put_device(in);
......
...@@ -66,8 +66,8 @@ static int tpd_connect(struct omap_dss_device *dssdev, ...@@ -66,8 +66,8 @@ static int tpd_connect(struct omap_dss_device *dssdev,
if (r) if (r)
return r; return r;
dst->output = dssdev; dst->src = dssdev;
dssdev->device = dst; dssdev->dst = dst;
INIT_COMPLETION(ddata->hpd_completion); INIT_COMPLETION(ddata->hpd_completion);
...@@ -95,15 +95,15 @@ static void tpd_disconnect(struct omap_dss_device *dssdev, ...@@ -95,15 +95,15 @@ static void tpd_disconnect(struct omap_dss_device *dssdev,
struct panel_drv_data *ddata = to_panel_data(dssdev); struct panel_drv_data *ddata = to_panel_data(dssdev);
struct omap_dss_device *in = ddata->in; struct omap_dss_device *in = ddata->in;
WARN_ON(dst != dssdev->device); WARN_ON(dst != dssdev->dst);
if (dst != dssdev->device) if (dst != dssdev->dst)
return; return;
gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0); gpio_set_value_cansleep(ddata->ct_cp_hpd_gpio, 0);
dst->output = NULL; dst->src = NULL;
dssdev->device = NULL; dssdev->dst = NULL;
in->ops.hdmi->disconnect(in, &ddata->dssdev); in->ops.hdmi->disconnect(in, &ddata->dssdev);
} }
...@@ -372,7 +372,7 @@ static int __exit tpd_remove(struct platform_device *pdev) ...@@ -372,7 +372,7 @@ static int __exit tpd_remove(struct platform_device *pdev)
WARN_ON(omapdss_device_is_connected(dssdev)); WARN_ON(omapdss_device_is_connected(dssdev));
if (omapdss_device_is_connected(dssdev)) if (omapdss_device_is_connected(dssdev))
tpd_disconnect(dssdev, dssdev->device); tpd_disconnect(dssdev, dssdev->dst);
omap_dss_put_device(in); omap_dss_put_device(in);
......
menu "OMAP2/3 Display Device Drivers (old device model)"
depends on OMAP2_DSS
config PANEL_GENERIC_DPI
tristate "Generic DPI Panel"
depends on OMAP2_DSS_DPI
help
Generic DPI panel driver.
Supports DVI output for Beagle and OMAP3 SDP.
Supports LCD Panel used in TI SDP3430 and EVM boards,
OMAP3517 EVM boards and CM-T35.
config PANEL_TFP410
tristate "TFP410 DPI-to-DVI chip"
depends on OMAP2_DSS_DPI && I2C
help
Driver for TFP410 DPI-to-DVI chip. The driver uses i2c to read EDID
information from the monitor.
config PANEL_LGPHILIPS_LB035Q02
tristate "LG.Philips LB035Q02 LCD Panel"
depends on OMAP2_DSS_DPI && SPI
help
LCD Panel used on the Gumstix Overo Palo35
config PANEL_SHARP_LS037V7DW01
tristate "Sharp LS037V7DW01 LCD Panel"
depends on OMAP2_DSS_DPI
depends on BACKLIGHT_CLASS_DEVICE
help
LCD Panel used in TI's SDP3430 and EVM boards
config PANEL_NEC_NL8048HL11_01B
tristate "NEC NL8048HL11-01B Panel"
depends on OMAP2_DSS_DPI
depends on SPI
depends on BACKLIGHT_CLASS_DEVICE
help
This NEC NL8048HL11-01B panel is TFT LCD
used in the Zoom2/3/3630 sdp boards.
config PANEL_PICODLP
tristate "TI PICO DLP mini-projector"
depends on OMAP2_DSS_DPI && I2C
help
A mini-projector used in TI's SDP4430 and EVM boards
For more info please visit http://www.dlp.com/projector/
config PANEL_TAAL
tristate "Taal DSI Panel"
depends on OMAP2_DSS_DSI
depends on BACKLIGHT_CLASS_DEVICE
help
Taal DSI command mode panel from TPO.
config PANEL_TPO_TD043MTEA1
tristate "TPO TD043MTEA1 LCD Panel"
depends on OMAP2_DSS_DPI && SPI
help
LCD Panel used in OMAP3 Pandora
config PANEL_ACX565AKM
tristate "ACX565AKM Panel"
depends on OMAP2_DSS_SDI && SPI
depends on BACKLIGHT_CLASS_DEVICE
help
This is the LCD panel used on Nokia N900
config PANEL_N8X0
tristate "N8X0 Panel"
depends on OMAP2_DSS_RFBI && SPI
depends on BACKLIGHT_CLASS_DEVICE
help
This is the LCD panel used on Nokia N8x0
endmenu
obj-$(CONFIG_PANEL_GENERIC_DPI) += panel-generic-dpi.o
obj-$(CONFIG_PANEL_TFP410) += panel-tfp410.o
obj-$(CONFIG_PANEL_LGPHILIPS_LB035Q02) += panel-lgphilips-lb035q02.o
obj-$(CONFIG_PANEL_SHARP_LS037V7DW01) += panel-sharp-ls037v7dw01.o
obj-$(CONFIG_PANEL_NEC_NL8048HL11_01B) += panel-nec-nl8048hl11-01b.o
obj-$(CONFIG_PANEL_TAAL) += panel-taal.o
obj-$(CONFIG_PANEL_PICODLP) += panel-picodlp.o
obj-$(CONFIG_PANEL_TPO_TD043MTEA1) += panel-tpo-td043mtea1.o
obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o
obj-$(CONFIG_PANEL_N8X0) += panel-n8x0.o
This diff is collapsed.
This diff is collapsed.
/*
* LCD panel driver for LG.Philips LB035Q02
*
* Author: Steve Sakoman <steve@sakoman.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/spi/spi.h>
#include <linux/mutex.h>
#include <linux/gpio.h>
#include <video/omapdss.h>
#include <video/omap-panel-data.h>
struct lb035q02_data {
struct mutex lock;
};
static struct omap_video_timings lb035q02_timings = {
.x_res = 320,
.y_res = 240,
.pixel_clock = 6500,
.hsw = 2,
.hfp = 20,
.hbp = 68,
.vsw = 2,
.vfp = 4,
.vbp = 18,
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
};
static inline struct panel_generic_dpi_data
*get_panel_data(const struct omap_dss_device *dssdev)
{
return (struct panel_generic_dpi_data *) dssdev->data;
}
static int lb035q02_panel_power_on(struct omap_dss_device *dssdev)
{
struct panel_generic_dpi_data *panel_data = get_panel_data(dssdev);
int r, i;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;
for (i = 0; i < panel_data->num_gpios; ++i) {
gpio_set_value_cansleep(panel_data->gpios[i],
panel_data->gpio_invert[i] ? 0 : 1);
}
return 0;
err0:
return r;
}
static void lb035q02_panel_power_off(struct omap_dss_device *dssdev)
{
struct panel_generic_dpi_data *panel_data = get_panel_data(dssdev);
int i;
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;
for (i = panel_data->num_gpios - 1; i >= 0; --i) {
gpio_set_value_cansleep(panel_data->gpios[i],
panel_data->gpio_invert[i] ? 1 : 0);
}
omapdss_dpi_display_disable(dssdev);
}
static int lb035q02_panel_probe(struct omap_dss_device *dssdev)
{
struct panel_generic_dpi_data *panel_data = get_panel_data(dssdev);
struct lb035q02_data *ld;
int r, i;
if (!panel_data)
return -EINVAL;
dssdev->panel.timings = lb035q02_timings;
ld = devm_kzalloc(dssdev->dev, sizeof(*ld), GFP_KERNEL);
if (!ld)
return -ENOMEM;
for (i = 0; i < panel_data->num_gpios; ++i) {
r = devm_gpio_request_one(dssdev->dev, panel_data->gpios[i],
panel_data->gpio_invert[i] ?
GPIOF_OUT_INIT_HIGH : GPIOF_OUT_INIT_LOW,
"panel gpio");
if (r)
return r;
}
mutex_init(&ld->lock);
dev_set_drvdata(dssdev->dev, ld);
return 0;
}
static void lb035q02_panel_remove(struct omap_dss_device *dssdev)
{
}
static int lb035q02_panel_enable(struct omap_dss_device *dssdev)
{
struct lb035q02_data *ld = dev_get_drvdata(dssdev->dev);
int r;
mutex_lock(&ld->lock);
r = lb035q02_panel_power_on(dssdev);
if (r)
goto err;
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
mutex_unlock(&ld->lock);
return 0;
err:
mutex_unlock(&ld->lock);
return r;
}
static void lb035q02_panel_disable(struct omap_dss_device *dssdev)
{
struct lb035q02_data *ld = dev_get_drvdata(dssdev->dev);
mutex_lock(&ld->lock);
lb035q02_panel_power_off(dssdev);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
mutex_unlock(&ld->lock);
}
static struct omap_dss_driver lb035q02_driver = {
.probe = lb035q02_panel_probe,
.remove = lb035q02_panel_remove,
.enable = lb035q02_panel_enable,
.disable = lb035q02_panel_disable,
.driver = {
.name = "lgphilips_lb035q02_panel",
.owner = THIS_MODULE,
},
};
static int lb035q02_write_reg(struct spi_device *spi, u8 reg, u16 val)
{
struct spi_message msg;
struct spi_transfer index_xfer = {
.len = 3,
.cs_change = 1,
};
struct spi_transfer value_xfer = {
.len = 3,
};
u8 buffer[16];
spi_message_init(&msg);
/* register index */
buffer[0] = 0x70;
buffer[1] = 0x00;
buffer[2] = reg & 0x7f;
index_xfer.tx_buf = buffer;
spi_message_add_tail(&index_xfer, &msg);
/* register value */
buffer[4] = 0x72;
buffer[5] = val >> 8;
buffer[6] = val;
value_xfer.tx_buf = buffer + 4;
spi_message_add_tail(&value_xfer, &msg);
return spi_sync(spi, &msg);
}
static void init_lb035q02_panel(struct spi_device *spi)
{
/* Init sequence from page 28 of the lb035q02 spec */
lb035q02_write_reg(spi, 0x01, 0x6300);
lb035q02_write_reg(spi, 0x02, 0x0200);
lb035q02_write_reg(spi, 0x03, 0x0177);
lb035q02_write_reg(spi, 0x04, 0x04c7);
lb035q02_write_reg(spi, 0x05, 0xffc0);
lb035q02_write_reg(spi, 0x06, 0xe806);
lb035q02_write_reg(spi, 0x0a, 0x4008);
lb035q02_write_reg(spi, 0x0b, 0x0000);
lb035q02_write_reg(spi, 0x0d, 0x0030);
lb035q02_write_reg(spi, 0x0e, 0x2800);
lb035q02_write_reg(spi, 0x0f, 0x0000);
lb035q02_write_reg(spi, 0x16, 0x9f80);
lb035q02_write_reg(spi, 0x17, 0x0a0f);
lb035q02_write_reg(spi, 0x1e, 0x00c1);
lb035q02_write_reg(spi, 0x30, 0x0300);
lb035q02_write_reg(spi, 0x31, 0x0007);
lb035q02_write_reg(spi, 0x32, 0x0000);
lb035q02_write_reg(spi, 0x33, 0x0000);
lb035q02_write_reg(spi, 0x34, 0x0707);
lb035q02_write_reg(spi, 0x35, 0x0004);
lb035q02_write_reg(spi, 0x36, 0x0302);
lb035q02_write_reg(spi, 0x37, 0x0202);
lb035q02_write_reg(spi, 0x3a, 0x0a0d);
lb035q02_write_reg(spi, 0x3b, 0x0806);
}
static int lb035q02_panel_spi_probe(struct spi_device *spi)
{
init_lb035q02_panel(spi);
return omap_dss_register_driver(&lb035q02_driver);
}
static int lb035q02_panel_spi_remove(struct spi_device *spi)
{
omap_dss_unregister_driver(&lb035q02_driver);
return 0;
}
static struct spi_driver lb035q02_spi_driver = {
.driver = {
.name = "lgphilips_lb035q02_panel-spi",
.owner = THIS_MODULE,
},
.probe = lb035q02_panel_spi_probe,
.remove = lb035q02_panel_spi_remove,
};
module_spi_driver(lb035q02_spi_driver);
MODULE_LICENSE("GPL");
This diff is collapsed.
/*
* Support for NEC-nl8048hl11-01b panel driver
*
* Copyright (C) 2010 Texas Instruments Inc.
* Author: Erik Gilling <konkers@android.com>
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/spi/spi.h>
#include <linux/fb.h>
#include <linux/gpio.h>
#include <video/omapdss.h>
#include <video/omap-panel-data.h>
#define LCD_XRES 800
#define LCD_YRES 480
/*
* NEC PIX Clock Ratings
* MIN:21.8MHz TYP:23.8MHz MAX:25.7MHz
*/
#define LCD_PIXEL_CLOCK 23800
static const struct {
unsigned char addr;
unsigned char dat;
} nec_8048_init_seq[] = {
{ 3, 0x01 }, { 0, 0x00 }, { 1, 0x01 }, { 4, 0x00 }, { 5, 0x14 },
{ 6, 0x24 }, { 16, 0xD7 }, { 17, 0x00 }, { 18, 0x00 }, { 19, 0x55 },
{ 20, 0x01 }, { 21, 0x70 }, { 22, 0x1E }, { 23, 0x25 }, { 24, 0x25 },
{ 25, 0x02 }, { 26, 0x02 }, { 27, 0xA0 }, { 32, 0x2F }, { 33, 0x0F },
{ 34, 0x0F }, { 35, 0x0F }, { 36, 0x0F }, { 37, 0x0F }, { 38, 0x0F },
{ 39, 0x00 }, { 40, 0x02 }, { 41, 0x02 }, { 42, 0x02 }, { 43, 0x0F },
{ 44, 0x0F }, { 45, 0x0F }, { 46, 0x0F }, { 47, 0x0F }, { 48, 0x0F },
{ 49, 0x0F }, { 50, 0x00 }, { 51, 0x02 }, { 52, 0x02 }, { 53, 0x02 },
{ 80, 0x0C }, { 83, 0x42 }, { 84, 0x42 }, { 85, 0x41 }, { 86, 0x14 },
{ 89, 0x88 }, { 90, 0x01 }, { 91, 0x00 }, { 92, 0x02 }, { 93, 0x0C },
{ 94, 0x1C }, { 95, 0x27 }, { 98, 0x49 }, { 99, 0x27 }, { 102, 0x76 },
{ 103, 0x27 }, { 112, 0x01 }, { 113, 0x0E }, { 114, 0x02 },
{ 115, 0x0C }, { 118, 0x0C }, { 121, 0x30 }, { 130, 0x00 },
{ 131, 0x00 }, { 132, 0xFC }, { 134, 0x00 }, { 136, 0x00 },
{ 138, 0x00 }, { 139, 0x00 }, { 140, 0x00 }, { 141, 0xFC },
{ 143, 0x00 }, { 145, 0x00 }, { 147, 0x00 }, { 148, 0x00 },
{ 149, 0x00 }, { 150, 0xFC }, { 152, 0x00 }, { 154, 0x00 },
{ 156, 0x00 }, { 157, 0x00 }, { 2, 0x00 },
};
/*
* NEC NL8048HL11-01B Manual
* defines HFB, HSW, HBP, VFP, VSW, VBP as shown below
*/
static struct omap_video_timings nec_8048_panel_timings = {
/* 800 x 480 @ 60 Hz Reduced blanking VESA CVT 0.31M3-R */
.x_res = LCD_XRES,
.y_res = LCD_YRES,
.pixel_clock = LCD_PIXEL_CLOCK,
.hfp = 6,
.hsw = 1,
.hbp = 4,
.vfp = 3,
.vsw = 1,
.vbp = 4,
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
};
static inline struct panel_nec_nl8048_data
*get_panel_data(const struct omap_dss_device *dssdev)
{
return (struct panel_nec_nl8048_data *) dssdev->data;
}
static int nec_8048_panel_probe(struct omap_dss_device *dssdev)
{
struct panel_nec_nl8048_data *pd = get_panel_data(dssdev);
int r;
if (!pd)
return -EINVAL;
dssdev->panel.timings = nec_8048_panel_timings;
if (gpio_is_valid(pd->qvga_gpio)) {
r = devm_gpio_request_one(dssdev->dev, pd->qvga_gpio,
GPIOF_OUT_INIT_HIGH, "lcd QVGA");
if (r)
return r;
}
if (gpio_is_valid(pd->res_gpio)) {
r = devm_gpio_request_one(dssdev->dev, pd->res_gpio,
GPIOF_OUT_INIT_LOW, "lcd RES");
if (r)
return r;
}
return 0;
}
static void nec_8048_panel_remove(struct omap_dss_device *dssdev)
{
}
static int nec_8048_panel_power_on(struct omap_dss_device *dssdev)
{
struct panel_nec_nl8048_data *pd = get_panel_data(dssdev);
int r;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;
if (gpio_is_valid(pd->res_gpio))
gpio_set_value_cansleep(pd->res_gpio, 1);
return 0;
err0:
return r;
}
static void nec_8048_panel_power_off(struct omap_dss_device *dssdev)
{
struct panel_nec_nl8048_data *pd = get_panel_data(dssdev);
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;
if (gpio_is_valid(pd->res_gpio))
gpio_set_value_cansleep(pd->res_gpio, 0);
omapdss_dpi_display_disable(dssdev);
}
static int nec_8048_panel_enable(struct omap_dss_device *dssdev)
{
int r;
r = nec_8048_panel_power_on(dssdev);
if (r)
return r;
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
return 0;
}
static void nec_8048_panel_disable(struct omap_dss_device *dssdev)
{
nec_8048_panel_power_off(dssdev);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
static int nec_8048_recommended_bpp(struct omap_dss_device *dssdev)
{
return 16;
}
static struct omap_dss_driver nec_8048_driver = {
.probe = nec_8048_panel_probe,
.remove = nec_8048_panel_remove,
.enable = nec_8048_panel_enable,
.disable = nec_8048_panel_disable,
.get_recommended_bpp = nec_8048_recommended_bpp,
.driver = {
.name = "NEC_8048_panel",
.owner = THIS_MODULE,
},
};
static int nec_8048_spi_send(struct spi_device *spi, unsigned char reg_addr,
unsigned char reg_data)
{
int ret = 0;
unsigned int cmd = 0, data = 0;
cmd = 0x0000 | reg_addr; /* register address write */
data = 0x0100 | reg_data ; /* register data write */
data = (cmd << 16) | data;
ret = spi_write(spi, (unsigned char *)&data, 4);
if (ret)
pr_err("error in spi_write %x\n", data);
return ret;
}
static int init_nec_8048_wvga_lcd(struct spi_device *spi)
{
unsigned int i;
/* Initialization Sequence */
/* nec_8048_spi_send(spi, REG, VAL) */
for (i = 0; i < (ARRAY_SIZE(nec_8048_init_seq) - 1); i++)
nec_8048_spi_send(spi, nec_8048_init_seq[i].addr,
nec_8048_init_seq[i].dat);
udelay(20);
nec_8048_spi_send(spi, nec_8048_init_seq[i].addr,
nec_8048_init_seq[i].dat);
return 0;
}
static int nec_8048_spi_probe(struct spi_device *spi)
{
spi->mode = SPI_MODE_0;
spi->bits_per_word = 32;
spi_setup(spi);
init_nec_8048_wvga_lcd(spi);
return omap_dss_register_driver(&nec_8048_driver);
}
static int nec_8048_spi_remove(struct spi_device *spi)
{
omap_dss_unregister_driver(&nec_8048_driver);
return 0;
}
#ifdef CONFIG_PM_SLEEP
static int nec_8048_spi_suspend(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
nec_8048_spi_send(spi, 2, 0x01);
mdelay(40);
return 0;
}
static int nec_8048_spi_resume(struct device *dev)
{
struct spi_device *spi = to_spi_device(dev);
/* reinitialize the panel */
spi_setup(spi);
nec_8048_spi_send(spi, 2, 0x00);
init_nec_8048_wvga_lcd(spi);
return 0;
}
static SIMPLE_DEV_PM_OPS(nec_8048_spi_pm_ops, nec_8048_spi_suspend,
nec_8048_spi_resume);
#define NEC_8048_SPI_PM_OPS (&nec_8048_spi_pm_ops)
#else
#define NEC_8048_SPI_PM_OPS NULL
#endif
static struct spi_driver nec_8048_spi_driver = {
.probe = nec_8048_spi_probe,
.remove = nec_8048_spi_remove,
.driver = {
.name = "nec_8048_spi",
.owner = THIS_MODULE,
.pm = NEC_8048_SPI_PM_OPS,
},
};
module_spi_driver(nec_8048_spi_driver);
MODULE_AUTHOR("Erik Gilling <konkers@android.com>");
MODULE_DESCRIPTION("NEC-nl8048hl11-01b Driver");
MODULE_LICENSE("GPL");
This diff is collapsed.
This diff is collapsed.
/*
* LCD panel driver for Sharp LS037V7DW01
*
* Copyright (C) 2008 Nokia Corporation
* Author: Tomi Valkeinen <tomi.valkeinen@nokia.com>
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 as published by
* the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along with
* this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/module.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/fb.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/gpio.h>
#include <video/omapdss.h>
#include <video/omap-panel-data.h>
static struct omap_video_timings sharp_ls_timings = {
.x_res = 480,
.y_res = 640,
.pixel_clock = 19200,
.hsw = 2,
.hfp = 1,
.hbp = 28,
.vsw = 1,
.vfp = 1,
.vbp = 1,
.vsync_level = OMAPDSS_SIG_ACTIVE_LOW,
.hsync_level = OMAPDSS_SIG_ACTIVE_LOW,
.data_pclk_edge = OMAPDSS_DRIVE_SIG_RISING_EDGE,
.de_level = OMAPDSS_SIG_ACTIVE_HIGH,
.sync_pclk_edge = OMAPDSS_DRIVE_SIG_OPPOSITE_EDGES,
};
static inline struct panel_sharp_ls037v7dw01_data
*get_panel_data(const struct omap_dss_device *dssdev)
{
return (struct panel_sharp_ls037v7dw01_data *) dssdev->data;
}
static int sharp_ls_panel_probe(struct omap_dss_device *dssdev)
{
struct panel_sharp_ls037v7dw01_data *pd = get_panel_data(dssdev);
int r;
if (!pd)
return -EINVAL;
dssdev->panel.timings = sharp_ls_timings;
if (gpio_is_valid(pd->mo_gpio)) {
r = devm_gpio_request_one(dssdev->dev, pd->mo_gpio,
GPIOF_OUT_INIT_LOW, "lcd MO");
if (r)
return r;
}
if (gpio_is_valid(pd->lr_gpio)) {
r = devm_gpio_request_one(dssdev->dev, pd->lr_gpio,
GPIOF_OUT_INIT_HIGH, "lcd LR");
if (r)
return r;
}
if (gpio_is_valid(pd->ud_gpio)) {
r = devm_gpio_request_one(dssdev->dev, pd->ud_gpio,
GPIOF_OUT_INIT_HIGH, "lcd UD");
if (r)
return r;
}
if (gpio_is_valid(pd->resb_gpio)) {
r = devm_gpio_request_one(dssdev->dev, pd->resb_gpio,
GPIOF_OUT_INIT_LOW, "lcd RESB");
if (r)
return r;
}
if (gpio_is_valid(pd->ini_gpio)) {
r = devm_gpio_request_one(dssdev->dev, pd->ini_gpio,
GPIOF_OUT_INIT_LOW, "lcd INI");
if (r)
return r;
}
return 0;
}
static void __exit sharp_ls_panel_remove(struct omap_dss_device *dssdev)
{
}
static int sharp_ls_power_on(struct omap_dss_device *dssdev)
{
struct panel_sharp_ls037v7dw01_data *pd = get_panel_data(dssdev);
int r = 0;
if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE)
return 0;
omapdss_dpi_set_timings(dssdev, &dssdev->panel.timings);
omapdss_dpi_set_data_lines(dssdev, dssdev->phy.dpi.data_lines);
r = omapdss_dpi_display_enable(dssdev);
if (r)
goto err0;
/* wait couple of vsyncs until enabling the LCD */
msleep(50);
if (gpio_is_valid(pd->resb_gpio))
gpio_set_value_cansleep(pd->resb_gpio, 1);
if (gpio_is_valid(pd->ini_gpio))
gpio_set_value_cansleep(pd->ini_gpio, 1);
return 0;
err0:
return r;
}
static void sharp_ls_power_off(struct omap_dss_device *dssdev)
{
struct panel_sharp_ls037v7dw01_data *pd = get_panel_data(dssdev);
if (dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return;
if (gpio_is_valid(pd->ini_gpio))
gpio_set_value_cansleep(pd->ini_gpio, 0);
if (gpio_is_valid(pd->resb_gpio))
gpio_set_value_cansleep(pd->resb_gpio, 0);
/* wait at least 5 vsyncs after disabling the LCD */
msleep(100);
omapdss_dpi_display_disable(dssdev);
}
static int sharp_ls_panel_enable(struct omap_dss_device *dssdev)
{
int r;
r = sharp_ls_power_on(dssdev);
dssdev->state = OMAP_DSS_DISPLAY_ACTIVE;
return r;
}
static void sharp_ls_panel_disable(struct omap_dss_device *dssdev)
{
sharp_ls_power_off(dssdev);
dssdev->state = OMAP_DSS_DISPLAY_DISABLED;
}
static struct omap_dss_driver sharp_ls_driver = {
.probe = sharp_ls_panel_probe,
.remove = __exit_p(sharp_ls_panel_remove),
.enable = sharp_ls_panel_enable,
.disable = sharp_ls_panel_disable,
.driver = {
.name = "sharp_ls_panel",
.owner = THIS_MODULE,
},
};
static int __init sharp_ls_panel_drv_init(void)
{
return omap_dss_register_driver(&sharp_ls_driver);
}
static void __exit sharp_ls_panel_drv_exit(void)
{
omap_dss_unregister_driver(&sharp_ls_driver);
}
module_init(sharp_ls_panel_drv_init);
module_exit(sharp_ls_panel_drv_exit);
MODULE_LICENSE("GPL");
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -42,6 +42,7 @@ config OMAP2_DSS_DPI ...@@ -42,6 +42,7 @@ config OMAP2_DSS_DPI
config OMAP2_DSS_RFBI config OMAP2_DSS_RFBI
bool "RFBI support" bool "RFBI support"
depends on BROKEN
default n default n
help help
MIPI DBI support (RFBI, Remote Framebuffer Interface, in Texas MIPI DBI support (RFBI, Remote Framebuffer Interface, in Texas
......
...@@ -7,9 +7,8 @@ omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \ ...@@ -7,9 +7,8 @@ omapdss-y += manager.o manager-sysfs.o overlay.o overlay-sysfs.o apply.o \
dispc-compat.o display-sysfs.o dispc-compat.o display-sysfs.o
omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o omapdss-$(CONFIG_OMAP2_DSS_DPI) += dpi.o
omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o omapdss-$(CONFIG_OMAP2_DSS_RFBI) += rfbi.o
omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o venc_panel.o omapdss-$(CONFIG_OMAP2_DSS_VENC) += venc.o
omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o omapdss-$(CONFIG_OMAP2_DSS_SDI) += sdi.o
omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o omapdss-$(CONFIG_OMAP2_DSS_DSI) += dsi.o
omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o \ omapdss-$(CONFIG_OMAP4_DSS_HDMI) += hdmi.o ti_hdmi_4xxx_ip.o
hdmi_panel.o ti_hdmi_4xxx_ip.o
ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG ccflags-$(CONFIG_OMAP2_DSS_DEBUG) += -DDEBUG
...@@ -428,8 +428,8 @@ static struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *m ...@@ -428,8 +428,8 @@ static struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *m
if (dssdev == NULL) if (dssdev == NULL)
return NULL; return NULL;
while (dssdev->device) while (dssdev->dst)
dssdev = dssdev->device; dssdev = dssdev->dst;
if (dssdev->driver) if (dssdev->driver)
return dssdev; return dssdev;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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