Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: LCD controller board setup code for LS037V7DW03 display
PostPosted: Sat May 21, 2011 6:08 am 
Offline

Joined: Fri Oct 22, 2010 4:25 am
Posts: 43
I would like to add the TFT Sharp LS037V7DW03 display (http://www.sharpsma.com/webfm_send/1519) to the Linux board setup code of an AT91SAM9RL system, and I am wondering how I might do this. It appears that this display could be similar to the one used in the Sharp Zaurus (http://www.penguin.cz/~utx/zaurus/datasheets/LCD/) The display is wired to the LCD data bus in the same way as the AT91SAM9RL evaluation kit, as shown on pg. 33 of the user guide (http://www.atmel.com/dyn/resources/prod ... oc6325.pdf) with the R0 and B0 bits grounded at the display connector. According to pg. 13 (Figure 6-3) of the LCD application note (http://www.atmel.com/dyn/resources/prod ... oc6300.pdf), this appears to be the "18-bit TFT Display Hardware Connection in 16-bit Mode: RGB 5-6-5 Format" connection.

The Sharp LS037V7DW03 is a 18-bit display (6 x 3 = 18). I've attempted to configure the LCD setup code in the following fashion, but nothing appears on the display. The display remains black. Is the LCD controller turned on in the Linux kernel, or is it set up in U-Boot?

Here is my attempt at adding the display to the board setup code. Could anyone comment on what I might have to add to the board setup code to be able to successfully use this display?

#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
static struct fb_videomode at91_tft_vga_modes[] = {
{
.name = "480x640 @ 30",
.refresh = 30,
.xres = 480,
.yres = 640,
.pixclock = KHZ2PICOS(25189),
.left_margin = 78,
.right_margin = 88,
.upper_margin = 1,
.lower_margin = 1,
.hsync_len = 2,
.vsync_len = 3,

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


static struct fb_monspecs at91fb_default_monspecs = {
.manufacturer = "SHP",
.monitor = "LS037V7DW03",

.modedb = at91_tft_vga_modes,
.modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
.hfmin = 15000,
.hfmax = 64000,
.vfmin = 50,
.vfmax = 150,
};

#define AT91SAM9RL_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
| ATMEL_LCDC_DISTYPE_TFT \
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)

static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
.lcdcon_is_backlight = true,
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN,
.default_lcdcon2 = AT91SAM9RL_DEFAULT_LCDCON2,
.default_monspecs = &at91fb_default_monspecs,
.atmel_lcdfb_power_control = at91_lcdc_power_control,
.guard_time = 1,
.lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
};

#else
static struct atmel_lcdfb_info __initdata ek_lcdc_data;
#endif


Top
 Profile  
 
 Post subject: Re: LCD controller board setup code for LS037V7DW03 display
PostPosted: Mon May 23, 2011 11:02 pm 
Offline

Joined: Fri Oct 22, 2010 4:25 am
Posts: 43
I think that I've managed to get the display up and running. Here is what I did.

In the at91_add_device_lcdc() function of the /arch/arm/mach-at91/at91sam9rl_devices.c file, I had to add the following to switch on the VSYNC pin:

at91_set_A_periph(AT91_PIN_PC4, 0);

Then, after much trial and error, I found that the following seems to work to turn on the display in QVGA mode:

static struct fb_videomode at91_tft_vga_modes[] = {

{
.name = "320x240 @ 60",
.refresh = 60,
.xres = 240,
.yres = 320,
.pixclock = KHZ2PICOS(6500),
.left_margin = 38,
.right_margin = 44,
.upper_margin = 1,
.lower_margin = 1,
.hsync_len = 2,
.vsync_len = 1,
.sync = 0,
.vmode = FB_VMODE_NONINTERLACED,
},
};


static struct fb_monspecs at91fb_default_monspecs = {
.manufacturer = "SHP",
.monitor = "LS037V7DW03",

.modedb = at91_tft_vga_modes,
.modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
.hfmin = 20000,
.hfmax = 70000,
.vfmin = 57,
.vfmax = 63,
};


static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
.lcdcon_is_backlight = true,
.default_bpp = 16,
.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
.default_lcdcon2 = ATMEL_LCDC_MEMOR_LITTLE
| ATMEL_LCDC_DISTYPE_TFT
| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE
| ATMEL_LCDC_INVFRAME_INVERTED
| ATMEL_LCDC_INVLINE_INVERTED
| ATMEL_LCDC_INVCLK_INVERTED
| ATMEL_LCDC_SCANMOD_SINGLE,
.default_monspecs = &at91fb_default_monspecs,
.atmel_lcdfb_power_control = at91_lcdc_power_control,
.guard_time = 2,
.lcd_wiring_mode = ATMEL_LCDC_WIRING_RGB,
};


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: