Patchwork [U-Boot] video: Add SHARP LQ084S3LG01 LCD support on P1022DS

login
register
mail settings
Submitter Timur Tabi
Date May 3, 2011, 7:57 p.m.
Message ID <1304452673-24267-1-git-send-email-timur@freescale.com>
Download mbox | patch
Permalink /patch/93887/
State Superseded
Delegated to: Anatolij Gustschin
Headers show

Comments

Timur Tabi - May 3, 2011, 7:57 p.m.
The SHARP LQ084S3LG01 is a TFT LCD used on the P1022DS (revision "C") board.
This device only supports 800x600 resolution, so if that resolution is selected,
assume that this is the device.  The device is attached to the LVDS port
on the P1022DS board.

Also change the existing entry for 800x600 so that it is used only on the
PDM360NG board, to avoid confusion.  We should probably add a more robust
method for specifying display parameters.

Signed-off-by: Timur Tabi <timur@freescale.com>
---
 drivers/video/fsl_diu_fb.c |   23 +++++++++++++++++++----
 1 files changed, 19 insertions(+), 4 deletions(-)

Patch

diff --git a/drivers/video/fsl_diu_fb.c b/drivers/video/fsl_diu_fb.c
index 0709849..3546b90 100644
--- a/drivers/video/fsl_diu_fb.c
+++ b/drivers/video/fsl_diu_fb.c
@@ -78,10 +78,7 @@  struct fb_videomode {
 	unsigned int flag;
 };
 
-#define FB_SYNC_VERT_HIGH_ACT	2	/* vertical sync high active	*/
-#define FB_SYNC_COMP_HIGH_ACT	8	/* composite sync high active   */
-#define FB_VMODE_NONINTERLACED  0	/* non interlaced */
-
+#ifdef CONFIG_PDM360NG
 /* This setting is used for the ifm pdm360ng with PRIMEVIEW PM070WL3 */
 static struct fb_videomode fsl_diu_mode_800 = {
 	.name		= "800x600-60",
@@ -98,6 +95,24 @@  static struct fb_videomode fsl_diu_mode_800 = {
 	.sync		= 0,
 	.vmode		= FB_VMODE_NONINTERLACED
 };
+#else
+/* For the SHARP LQ084S3LG01, used on the P1022DS board */
+static struct fb_videomode fsl_diu_mode_800 = {
+	.name		= "800x600-60",
+	.refresh	= 60,
+	.xres		= 800,
+	.yres		= 600,
+	.pixclock	= 25000,
+	.left_margin	= 88,
+	.right_margin	= 40,
+	.upper_margin	= 23,
+	.lower_margin	= 1,
+	.hsync_len	= 128,
+	.vsync_len	= 4,
+	.sync		= FB_SYNC_COMP_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
+	.vmode		= FB_VMODE_NONINTERLACED
+};
+#endif
 
 /*
  * These parameters give default parameters