OMAP LDP supporting DSS2 lib
Subsystems (4)
RFC PATCH 1/1 OMAP LDP supporting DSS2 lib
From: Subramani <subramani@subbuv30-laptop.(none)>
This patch adds code in board-ldp to support omapdss platform device Currently it supports two displays on LDP
LCD and TV.
TV Output is not working due to i2c issues
TV output is tested with other branch, works on NTSC, but PAL has sync issues.
Signed-off-by SUbramani Venkatesh <[email protected]>
--- arch/arm/mach-omap2/board-ldp.c | 74 +++++++++++ drivers/video/omap2/displays/Kconfig | 5 + drivers/video/omap2/displays/Makefile | 1 + drivers/video/omap2/displays/panel-ldp.c | 199 ++++++++++++++++++++++++++++++ 4 files changed, 279 insertions(+), 0 deletions(-) create mode 100644 drivers/video/omap2/displays/panel-ldp.c
arch/arm/mach-omap2/board-ldp.c +74 -0
@@ -41,6 +41,7 @@#include <asm/io.h> #include <asm/delay.h> #include <mach/control.h> +#include <mach/display.h> #include "mmc-twl4030.h"
@@ -312,12 +313,85 @@ static struct spi_board_info ldp_spi_board_info[] __initdata = { }, }; +#ifdef CONFIG_OMAP2_DSS +static int omap_ldp_panel_enable_tv (struct omap_display *display) +{ +#define ENABLE_VDAC_DEDICATED 0x03 +#define ENABLE_VDAC_DEV_GRP 0x20 + +twl4030_i2c_write_u8 (TWL4030_MODULE_PM_RECEIVER , +ENABLE_VDAC_DEDICATED , +TWL4030_VDAC_DEDICATED ); + +twl4030_i2c_write_u8 (TWL4030_MODULE_PM_RECEIVER , +ENABLE_VDAC_DEV_GRP ,TWL4030_VDAC_DEV_GRP ); + +return 0 ; +} + +static void omap_ldp_panel_disable_tv (struct omap_display *display) +{ +twl4030_i2c_write_u8 (TWL4030_MODULE_PM_RECEIVER ,0x00 , +TWL4030_VDAC_DEDICATED ); + +twl4030_i2c_write_u8 (TWL4030_MODULE_PM_RECEIVER ,0x00 , +TWL4030_VDAC_DEV_GRP ); + +} + +static struct omap_dss_display_config omap_ldp_display_data_tv = { + .type =OMAP_DISPLAY_TYPE_VENC , + .name ="tv" , + .u.venc.type =OMAP_DSS_VENC_TYPE_SVIDEO , + .panel_enable = omap_ldp_panel_enable_tv, + .panel_disable = omap_ldp_panel_disable_tv, +}; + +static int omap_ldp_panel_enable_lcd (struct omap_display *display) +{ +return 0 ; +} + +static void omap_ldp_panel_disable_lcd (struct omap_display *display) +{ +} + +static struct omap_dss_display_config omap_ldp_display_data_lcd = { + .type =OMAP_DISPLAY_TYPE_DPI , + .name ="lcd" , + .panel_name ="panel-zoom1" , + .u.dpi.data_lines =18 , + .panel_enable = omap_ldp_panel_enable_lcd, + .panel_disable = omap_ldp_panel_disable_lcd, +}; + +static struct omap_dss_board_info omap_ldp_dss_data = { + .num_displays =2 , + .displays = { + &omap_ldp_display_data_lcd, + &omap_ldp_display_data_tv, + }, +}; + +static struct platform_device omap_ldp_dss_device = { + .name ="omapdss" , + .id =-1 , + .dev = { + .platform_data = &omap_ldp_dss_data, + }, +}; +#endif + +static struct platform_device ldp_lcd_device = { .name ="ldp_lcd" , .id =-1 , };static struct platform_device *ldp_devices[]__initdata = { +#ifdef CONFIG_OMAP2_DSS + &omap_ldp_dss_device, +#endif &ldp_smsc911x_device, &ldp_lcd_device, &ldp_gpio_keys_device,
drivers/video/omap2/displays/Kconfig +5 -0
@@ -24,6 +24,11 @@ config PANEL_N800 help N8x0 LCD (hack) +config PANEL_LDP + tristate "TI OMAP LDP Panel" + help + LCD Panel used in the TI OMAP LDP + config CTRL_BLIZZARD tristate "Blizzard Controller" help
drivers/video/omap2/displays/Makefile +1 -0
@@ -6,3 +6,4 @@ obj-$(CONFIG_CTRL_BLIZZARD) += ctrl-blizzard.o obj-$(CONFIG_PANEL_N800) += panel-n800.o obj-$(CONFIG_PANEL_ACX565AKM) += panel-acx565akm.o +obj-$(CONFIG_PANEL_LDP) += panel-ldp.o
drivers/video/omap2/displays/panel-ldp.c new file +199 -0
199 lines not on this page · raw message
Signature · 1 line
1.5.6.3