linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* Query abut 2410 LCD configuration
@ 2010-03-08 14:24 胡杨树
  2010-03-08 14:32 ` gianluca
  2010-11-24  0:34 ` Ben Dooks
  0 siblings, 2 replies; 5+ messages in thread
From: 胡杨树 @ 2010-03-08 14:24 UTC (permalink / raw)
  To: linux-arm-kernel

Hi all:)

      In arch/arm/mach-s3c2410/include/mach/fb.h, struct s3c2410fb_display defines lcd configurations, 
      Can figure out where does these values following pixclock come from?


/* LCD description */
struct s3c2410fb_display {
	/* LCD type */
	unsigned type;

	/* Screen size */
	unsigned short width;
	unsigned short height;

	/* Screen info */
	unsigned short xres;
	unsigned short yres;
	unsigned short bpp;

	unsigned pixclock;		/* pixclock in picoseconds */
	unsigned short left_margin;  /* value in pixels (TFT) or HCLKs (STN) */
	unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
	unsigned short hsync_len;    /* value in pixels (TFT) or HCLKs (STN) */
	unsigned short upper_margin;	/* value in lines (TFT) or 0 (STN) */
	unsigned short lower_margin;	/* value in lines (TFT) or 0 (STN) */
	unsigned short vsync_len;	/* value in lines (TFT) or 0 (STN) */

	/* lcd configuration registers */
	unsigned long	lcdcon5;
};



      Take LQ080V3DG01 for example,

-----------------             arch/arm/mach-s3c2410/mach-qt2410.c     ----------------------------
		/* Configuration for 640x480 SHARP LQ080V3DG01 */
		.lcdcon5 = S3C2410_LCDCON5_FRM565 |
			   S3C2410_LCDCON5_INVVLINE |
			   S3C2410_LCDCON5_INVVFRAME |
			   S3C2410_LCDCON5_PWREN |
			   S3C2410_LCDCON5_HWSWP,

		.type		= S3C2410_LCDCON1_TFT,
		.width		= 640,
		.height		= 480,

		.pixclock	= 40000, /* HCLK/4 */
		.xres		= 640,
		.yres		= 480,
		.bpp		= 16,
		.left_margin	= 44,
		.right_margin	= 116,
		.hsync_len	= 96,
		.upper_margin	= 19,
		.lower_margin	= 11,
		.vsync_len	= 15,
	},

pixclock is 40000 in picoseconds , 1/(40000*10^-12) = 25MHz, that correspond with LQ080V3DG01 clock frequency ranges.

wondering where does the rest of values come from?
any tips/ideas would be appreciated!

thanks
BR

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Query abut 2410 LCD configuration
  2010-03-08 14:24 胡杨树
@ 2010-03-08 14:32 ` gianluca
  2010-11-24  0:34 ` Ben Dooks
  1 sibling, 0 replies; 5+ messages in thread
From: gianluca @ 2010-03-08 14:32 UTC (permalink / raw)
  To: linux-arm-kernel

??? wrote:
> Hi all:)
> 
>       In arch/arm/mach-s3c2410/include/mach/fb.h, struct s3c2410fb_display defines lcd configurations, 
>       Can figure out where does these values following pixclock come from?
> 
> 
> /* LCD description */
> struct s3c2410fb_display {
> 	/* LCD type */
> 	unsigned type;
> 
> 	/* Screen size */
> 	unsigned short width;
> 	unsigned short height;
> 
> 	/* Screen info */
> 	unsigned short xres;
> 	unsigned short yres;
> 	unsigned short bpp;
> 
> 	unsigned pixclock;		/* pixclock in picoseconds */
> 	unsigned short left_margin;  /* value in pixels (TFT) or HCLKs (STN) */
> 	unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
> 	unsigned short hsync_len;    /* value in pixels (TFT) or HCLKs (STN) */
> 	unsigned short upper_margin;	/* value in lines (TFT) or 0 (STN) */
> 	unsigned short lower_margin;	/* value in lines (TFT) or 0 (STN) */
> 	unsigned short vsync_len;	/* value in lines (TFT) or 0 (STN) */
> 
> 	/* lcd configuration registers */
> 	unsigned long	lcdcon5;
> };
> 
> 
> 
>       Take LQ080V3DG01 for example,
> 
> -----------------             arch/arm/mach-s3c2410/mach-qt2410.c     ----------------------------
> 		/* Configuration for 640x480 SHARP LQ080V3DG01 */
> 		.lcdcon5 = S3C2410_LCDCON5_FRM565 |
> 			   S3C2410_LCDCON5_INVVLINE |
> 			   S3C2410_LCDCON5_INVVFRAME |
> 			   S3C2410_LCDCON5_PWREN |
> 			   S3C2410_LCDCON5_HWSWP,
> 
> 		.type		= S3C2410_LCDCON1_TFT,
> 		.width		= 640,
> 		.height		= 480,
> 
> 		.pixclock	= 40000, /* HCLK/4 */
> 		.xres		= 640,
> 		.yres		= 480,
> 		.bpp		= 16,
> 		.left_margin	= 44,
> 		.right_margin	= 116,
> 		.hsync_len	= 96,
> 		.upper_margin	= 19,
> 		.lower_margin	= 11,
> 		.vsync_len	= 15,
> 	},
> 
> pixclock is 40000 in picoseconds , 1/(40000*10^-12) = 25MHz, that correspond with LQ080V3DG01 clock frequency ranges.
> 
> wondering where does the rest of values come from?
> any tips/ideas would be appreciated!
Maybe the LQ080... datasheet? or other platform driver with the same LCD 
configuration, or they simply came from tests.


Regards,
-- 
            ,,,
           (o o)
======oOO==(_)==OOo======

Gianluca Renzi
R&D
phone: +39.0542.609120
fax:   +39.0542.609212

       .oooO  Oooo.
======(   )==(   )=======
        \ (    ) /
         \_)  (_/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Query abut 2410 LCD configuration
@ 2010-03-09  0:58 胡杨树
  2010-03-12 10:38 ` gianluca
  0 siblings, 1 reply; 5+ messages in thread
From: 胡杨树 @ 2010-03-09  0:58 UTC (permalink / raw)
  To: linux-arm-kernel

Im wondering these values DOES make any sense ?
 
 
------------------ Original ------------------
From:  "gianluca"<gianlucarenzi@eurekelettronica.it>;
Date:  Mon, Mar 8, 2010 10:32 PM
To:  "???"<914059751@qq.com>; 
Cc:  "linux-arm-kernel"<linux-arm-kernel@lists.infradead.org>; 
Subject:  Re: Query abut 2410 LCD configuration

 
 ??? wrote:
> Hi all:)
> 
>       In arch/arm/mach-s3c2410/include/mach/fb.h, struct s3c2410fb_display defines lcd configurations, 
>       Can figure out where does these values following pixclock come from?
> 
> 
> /* LCD description */
> struct s3c2410fb_display {
>     /* LCD type */
>     unsigned type;
> 
>     /* Screen size */
>     unsigned short width;
>     unsigned short height;
> 
>     /* Screen info */
>     unsigned short xres;
>     unsigned short yres;
>     unsigned short bpp;
> 
>     unsigned pixclock;        /* pixclock in picoseconds */
>     unsigned short left_margin;  /* value in pixels (TFT) or HCLKs (STN) */
>     unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
>     unsigned short hsync_len;    /* value in pixels (TFT) or HCLKs (STN) */
>     unsigned short upper_margin;    /* value in lines (TFT) or 0 (STN) */
>     unsigned short lower_margin;    /* value in lines (TFT) or 0 (STN) */
>     unsigned short vsync_len;    /* value in lines (TFT) or 0 (STN) */
> 
>     /* lcd configuration registers */
>     unsigned long    lcdcon5;
> };
> 
> 
> 
>       Take LQ080V3DG01 for example,
> 
> -----------------             arch/arm/mach-s3c2410/mach-qt2410.c     ----------------------------
>         /* Configuration for 640x480 SHARP LQ080V3DG01 */
>         .lcdcon5 = S3C2410_LCDCON5_FRM565 |
>                S3C2410_LCDCON5_INVVLINE |
>                S3C2410_LCDCON5_INVVFRAME |
>                S3C2410_LCDCON5_PWREN |
>                S3C2410_LCDCON5_HWSWP,
> 
>         .type        = S3C2410_LCDCON1_TFT,
>         .width        = 640,
>         .height        = 480,
> 
>         .pixclock    = 40000, /* HCLK/4 */
>         .xres        = 640,
>         .yres        = 480,
>         .bpp        = 16,
>         .left_margin    = 44,
>         .right_margin    = 116,
>         .hsync_len    = 96,
>         .upper_margin    = 19,
>         .lower_margin    = 11,
>         .vsync_len    = 15,
>     },
> 
> pixclock is 40000 in picoseconds , 1/(40000*10^-12) = 25MHz, that correspond with LQ080V3DG01 clock frequency ranges.
> 
> wondering where does the rest of values come from?
> any tips/ideas would be appreciated!
Maybe the LQ080... datasheet? or other platform driver with the same LCD 
configuration, or they simply came from tests.


Regards,
-- 
            ,,,
           (o o)
======oOO==(_)==OOo======

Gianluca Renzi
R&D
phone: +39.0542.609120
fax:   +39.0542.609212

       .oooO  Oooo.
======(   )==(   )=======
        \ (    ) /
         \_)  (_/

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100309/f110594e/attachment-0001.htm>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Query abut 2410 LCD configuration
  2010-03-09  0:58 Query abut 2410 LCD configuration 胡杨树
@ 2010-03-12 10:38 ` gianluca
  0 siblings, 0 replies; 5+ messages in thread
From: gianluca @ 2010-03-12 10:38 UTC (permalink / raw)
  To: linux-arm-kernel

?????? wrote:
> Im wondering these values DOES make any sense ?

Googling around you can find these settings for a board based on s3c2440
I think you can compare it with yours and noting the differences for 
you. What is the best configuration you get?

/* Configuration for 640x480 SHARP LQ080V3DG01 */
.lcdcon5 = S3C2410_LCDCON5_FRM565 |
S3C2410_LCDCON5_INVVLINE |
S3C2410_LCDCON5_INVVFRAME |
S3C2410_LCDCON5_PWREN |
S3C2410_LCDCON5_HWSWP,

.type        = S3C2410_LCDCON1_TFT,
.width        = 640,
.height        = 480,

.pixclock    = 166667, /* HCLK/4 */
.xres        = 640,
.yres        = 480,
.bpp        = 16,
.left_margin    = 48,
.right_margin    = 18,
.hsync_len    = 4,
.upper_margin    = 33,
.lower_margin    = 10,
.vsync_len    = 4,

Best luck!
-- 
            ,,,
           (o o)
======oOO==(_)==OOo======

Gianluca Renzi
R&D
phone: +39.0542.609120
fax:   +39.0542.609212

       .oooO  Oooo.
======(   )==(   )=======
        \ (    ) /
         \_)  (_/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Query abut 2410 LCD configuration
  2010-03-08 14:24 胡杨树
  2010-03-08 14:32 ` gianluca
@ 2010-11-24  0:34 ` Ben Dooks
  1 sibling, 0 replies; 5+ messages in thread
From: Ben Dooks @ 2010-11-24  0:34 UTC (permalink / raw)
  To: linux-arm-kernel

On 08/03/10 14:24, ??? wrote:
> Hi all:)
> 
>       In arch/arm/mach-s3c2410/include/mach/fb.h, struct s3c2410fb_display defines lcd configurations, 
>       Can figure out where does these values following pixclock come from?
> 
> 
> /* LCD description */
> struct s3c2410fb_display {
> 	/* LCD type */
> 	unsigned type;
> 
> 	/* Screen size */
> 	unsigned short width;
> 	unsigned short height;
> 
> 	/* Screen info */
> 	unsigned short xres;
> 	unsigned short yres;
> 	unsigned short bpp;
> 
> 	unsigned pixclock;		/* pixclock in picoseconds */
> 	unsigned short left_margin;  /* value in pixels (TFT) or HCLKs (STN) */
> 	unsigned short right_margin; /* value in pixels (TFT) or HCLKs (STN) */
> 	unsigned short hsync_len;    /* value in pixels (TFT) or HCLKs (STN) */
> 	unsigned short upper_margin;	/* value in lines (TFT) or 0 (STN) */
> 	unsigned short lower_margin;	/* value in lines (TFT) or 0 (STN) */
> 	unsigned short vsync_len;	/* value in lines (TFT) or 0 (STN) 


these values are generally found from the panel's data sheet, detailing
the size of the borders and the length of the sync pulses. These relate
to the standard framebuffer parameters

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-11-24  0:34 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-09  0:58 Query abut 2410 LCD configuration 胡杨树
2010-03-12 10:38 ` gianluca
  -- strict thread matches above, loose matches on Subject: below --
2010-03-08 14:24 胡杨树
2010-03-08 14:32 ` gianluca
2010-11-24  0:34 ` Ben Dooks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).