diff mbox

[[RFC] PATCH v1] davinci: VGA support for Omapl138-Hawkboard

Message ID 1285895755-29129-1-git-send-email-vm.rod25@gmail.com (mailing list archive)
State RFC
Headers show

Commit Message

Victor Rodriguez Oct. 1, 2010, 1:15 a.m. UTC
None
diff mbox

Patch

diff --git a/arch/arm/mach-davinci/board-omapl138-hawk.c b/arch/arm/mach-davinci/board-omapl138-hawk.c
index d752244..ff009ad 100644
--- a/arch/arm/mach-davinci/board-omapl138-hawk.c
+++ b/arch/arm/mach-davinci/board-omapl138-hawk.c
@@ -183,6 +183,11 @@  static __init void omapl138_hawk_init(void)
 				ret);
 	da8xx_register_mcasp(0, &omapl138_hawk_snd_data);
 
+	ret = da8xx_register_lcdc(&vga_monitor_pdata);
+	if (ret)
+		pr_warning("omapl138_hawk_init: "
+			"lcdc registration failed: %d\n",
+				ret);
 
 	ret = da8xx_register_watchdog();
 	if (ret)
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c
index 9eec630..ad6fac2 100644
--- a/arch/arm/mach-davinci/devices-da8xx.c
+++ b/arch/arm/mach-davinci/devices-da8xx.c
@@ -528,6 +528,12 @@  struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata = {
 	.type			= "Sharp_LK043T1DG01",
 };
 
+struct da8xx_lcdc_platform_data vga_monitor_pdata = {
+	.manu_name		= "vga_mon",
+	.controller_data	= &lcd_cfg,
+	.type			= "VGA_Monitor",
+};
+
 static struct resource da8xx_lcdc_resources[] = {
 	[0] = { /* registers */
 		.start  = DA8XX_LCD_CNTRL_BASE,
diff --git a/arch/arm/mach-davinci/include/mach/da8xx.h b/arch/arm/mach-davinci/include/mach/da8xx.h
index 4247b3f..6dae1d1 100644
--- a/arch/arm/mach-davinci/include/mach/da8xx.h
+++ b/arch/arm/mach-davinci/include/mach/da8xx.h
@@ -88,6 +88,7 @@  extern struct platform_device da8xx_serial_device;
 extern struct emac_platform_data da8xx_emac_pdata;
 extern struct da8xx_lcdc_platform_data sharp_lcd035q3dg01_pdata;
 extern struct da8xx_lcdc_platform_data sharp_lk043t1dg01_pdata;
+extern struct da8xx_lcdc_platform_data vga_monitor_pdata;
 
 extern struct platform_device da8xx_wdt_device;
 
diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c
index cad7d45..eea7264 100644
--- a/drivers/video/da8xx-fb.c
+++ b/drivers/video/da8xx-fb.c
@@ -212,6 +212,21 @@  static struct da8xx_panel known_lcd_panels[] = {
 		.pxl_clk = 7833600,
 		.invert_pxl_clk = 0,
 	},
+
+	/* CRT Monitor or LCD Screen */
+	[2] = {
+		.name = "VGA_Monitor",
+		.width = 640,
+		.height = 480,
+		.hfp = 48,
+		.hbp = 48,
+		.hsw = 63,
+		.vfp = 11,
+		.vbp = 31,
+		.vsw = 1,
+		.pxl_clk = 25000000,
+		.invert_pxl_clk = 1,
+	},
 };
 
 /* Enable the Raster Engine of the LCD Controller */