Drive Different LCD

This forum is for users of Atmel's SAM Series and who are interested in using Android.

Moderator: nferre

okida
Posts: 29
Joined: Tue May 22, 2012 10:19 pm

Drive Different LCD

Thu Jul 05, 2012 4:19 pm

Hi all.
Is it possible to drive different resolution LCD?

My EvalKit(9G5) came 800x480. If i make an adapter like this DM module with different LCD type, do i need any software based changing?

For example; I want to use 480x272 pixel TFT.
Embest
Contact:
Location: Shenzhen, China
Posts: 62
Joined: Tue Jun 08, 2004 3:29 am

Re: Drive Different LCD

Fri Jul 06, 2012 4:09 am

If you want to run Android,you need to change the lcd driver to adapt to your hardware.
okida
Posts: 29
Joined: Tue May 22, 2012 10:19 pm

Re: Drive Different LCD

Mon Jul 09, 2012 11:11 am

finally i found magic file.
"board_sam9x5ek.c"

My LCD is working now!

Thanks
woogoy
Posts: 9
Joined: Fri Jun 29, 2012 5:18 pm

Re: Drive Different LCD

Fri Oct 12, 2012 9:58 am

Hello ,okdia,How about my problem? please analyse for me.Print the last info following:
JFFS2 version 2.2. (NAND) (SUMMARY) �© 2001-2006 Red Hat, Inc.
msgmni has been set to 241
alg: No test for stdrng (krng)
io scheduler noop registered (default)
atmel_lcdfb atmel_lcdfb.0: 1500KiB frame buffer at 27600000 (mapped at c7600000)

my system suspends here ! LCD:AT070TN93 CPU:SAM9G35
CptTitanic
Posts: 877
Joined: Sat Oct 30, 2010 6:04 pm

Re: Drive Different LCD

Fri Oct 12, 2012 11:19 am

woogoy wrote:please analyse for me.
Insufficient Data

Perhaps it would be instructive if you provide details about your panel, how it differs in parameters to the default one, and how you've addressed that in the configuration.
xda_okida
Posts: 6
Joined: Fri Sep 14, 2012 11:14 am

Re: Drive Different LCD

Sat Oct 13, 2012 7:34 am

I just touch this.

Code: Select all

/*
 * LCD Controller
 */
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static struct fb_videomode at91_tft_vga_modes[] = {
	{
		.name           = "LG",
		.refresh	= 60,
		.xres		= 480,		.yres		= 270,
		.pixclock	= KHZ2PICOS(9000),

		.left_margin	= 2,		.right_margin	= 2,
		.upper_margin	= 2,		.lower_margin	= 2,
		.hsync_len	= 41,		.vsync_len	= 10,

		.sync		= 0,
		.vmode		= FB_VMODE_NONINTERLACED,
	},
};

static struct fb_monspecs at91fb_default_monspecs = {
	.manufacturer	= "LG",
	.monitor        = "LB043WQ1",

	.modedb		= at91_tft_vga_modes,
	.modedb_len	= ARRAY_SIZE(at91_tft_vga_modes),
	.hfmin		= 15000,
	.hfmax		= 17640,
	.vfmin		= 57,
	.vfmax		= 67,
};

/* Default output mode is TFT 24 bit */
#define AT91SAM9X5_DEFAULT_LCDCFG5	(LCDC_LCDCFG5_MODE_OUTPUT_24BPP)

/* Driver datas */
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
	.lcdcon_is_backlight		= true,
	.alpha_enabled			= false,
	.default_bpp			= 16,
	/* Reserve enough memory for 32bpp */
	.smem_len			= 480 * 272 * 4,
	/* In 9x5 default_lcdcon2 is used for LCDCFG5 */
	.default_lcdcon2		= AT91SAM9X5_DEFAULT_LCDCFG5,
	.default_monspecs		= &at91fb_default_monspecs,
	.guard_time			= 9,
	.lcd_wiring_mode		= ATMEL_LCDC_WIRING_RGB,
};
Get the values from LCD datasheet.
Like;
xres, yres, pixclock, margin values, hsynch, vsynch len.
Also we have hf,vf min max values. I leave both on original values. So they all same with datasheet's one.
woogoy
Posts: 9
Joined: Fri Jun 29, 2012 5:18 pm

Re: Drive Different LCD

Sun Oct 14, 2012 5:25 am

I'm confused where goes error.
My LCD configuration data:
/*
* LCD Controller
*/
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static struct fb_videomode at91_tft_vga_modes[] = {
{
.name = "AT070TN92",
.refresh = 60,
.xres = 800, .yres = 480,
.pixclock = KHZ2PICOS(33300),

.left_margin = 210, .right_margin = 45,
.upper_margin = 22, .lower_margin = 22,
.hsync_len = 1, .vsync_len =1,


.sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
.vmode = FB_VMODE_NONINTERLACED,
},
};

static struct fb_monspecs at91fb_default_monspecs = {
.manufacturer = "INNOLUX",
.monitor = "AT070TN92",

.modedb = at91_tft_vga_modes,
.modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
.hfmin = 31534,//hfmin = DCLK_frequency Type / (left_margin + .xres + right_margin + hsync_len)=
.hfmax = 44318,//hfmax =DCLK_frequency max / (left_margin + .xres + right_margin + hsync_len) =
.vfmin = 60,//vfmin = hfmin/ (upper_margin + .yres + lower_margin + vsync_len);
.vfmax = 84,//vfmax = hfmax/ (upper_margin + .yres + lower_margin + vsync_len);

};

/* Default output mode is TFT 24 bit */
#define AT91SAM9X5_DEFAULT_LCDCFG5 (LCDC_LCDCFG5_MODE_OUTPUT_24BPP)

/* Driver datas */
static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
.lcdcon_is_backlight = true,
.alpha_enabled = false,
.default_bpp = 16,
/* In 9x5 default_lcdcon2 is used for LCDCFG5 */
.default_lcdcon2 = AT91SAM9X5_DEFAULT_LCDCFG5,
.default_monspecs = &at91fb_default_monspecs,
.guard_time = 9,
.lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
};
Schematics :
(1)LCD signal:Image
(2) PWM backlight control:
Image
The LCD Timing Charateristics:
(1)Timing data
Image
(2)Timing Sequence
Image

Return to “ANDROID”

Who is online

Users browsing this forum: No registered users and 1 guest