|
I'm trying to configure the Atmel driver for the LG LB070WV6 LCD display. I was hoping that someone has done this before and can give me values that work. I also have a question about what needs to be modified.
I changed the section in at91sam9263_devices.c as follows:
#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) static u64 lcdc_dmamask = DMA_BIT_MASK(32); static struct atmel_lcdfb_info lcdc_data;
static struct resource lcdc_resources[] = { [0] = { .start = AT91SAM9263_LCDC_BASE, .end = AT91SAM9263_LCDC_BASE + SZ_4K - 1, .flags = IORESOURCE_MEM, }, [1] = { .start = AT91SAM9263_ID_LCDC, .end = AT91SAM9263_ID_LCDC, .flags = IORESOURCE_IRQ, }, };
static struct platform_device at91_lcdc_device = { .name = "atmel_lcdfb", .id = 0, .dev = { .dma_mask = &lcdc_dmamask, .coherent_dma_mask = DMA_BIT_MASK(32), .platform_data = &lcdc_data, }, .resource = lcdc_resources, .num_resources = ARRAY_SIZE(lcdc_resources), };
void __init at91_add_device_lcdc(struct atmel_lcdfb_info *data) { if (!data) return;
at91_set_A_periph(AT91_PIN_PC0, 0); /* LCDVSYNC */ at91_set_A_periph(AT91_PIN_PC1, 0); /* LCDHSYNC */ at91_set_A_periph(AT91_PIN_PC2, 0); /* LCDDOTCK */ at91_set_A_periph(AT91_PIN_PC3, 0); /* LCDDEN */ at91_set_B_periph(AT91_PIN_PB9, 0); /* LCDCC */ at91_set_A_periph(AT91_PIN_PC6, 0); /* LCDD2 */ at91_set_A_periph(AT91_PIN_PC7, 0); /* LCDD3 */ at91_set_A_periph(AT91_PIN_PC8, 0); /* LCDD4 */ at91_set_A_periph(AT91_PIN_PC9, 0); /* LCDD5 */ at91_set_A_periph(AT91_PIN_PC10, 0); /* LCDD6 */ at91_set_A_periph(AT91_PIN_PC11, 0); /* LCDD7 */ at91_set_A_periph(AT91_PIN_PC14, 0); /* LCDD10 */ at91_set_A_periph(AT91_PIN_PC15, 0); /* LCDD11 */ at91_set_A_periph(AT91_PIN_PC16, 0); /* LCDD12 */ at91_set_B_periph(AT91_PIN_PC12, 0); /* LCDD13 */ at91_set_A_periph(AT91_PIN_PC18, 0); /* LCDD14 */ at91_set_A_periph(AT91_PIN_PC19, 0); /* LCDD15 */ at91_set_A_periph(AT91_PIN_PC22, 0); /* LCDD18 */ at91_set_A_periph(AT91_PIN_PC23, 0); /* LCDD19 */ at91_set_A_periph(AT91_PIN_PC24, 0); /* LCDD20 */ at91_set_A_periph(AT91_PIN_PC26, 0); /* LCDD21 */ at91_set_A_periph(AT91_PIN_PC27, 0); /* LCDD22 */ at91_set_A_periph(AT91_PIN_PC28, 0); /* LCDD23 */
lcdc_data = *data; platform_device_register(&at91_lcdc_device); } ------ I also changed the LCD Controller section in board-sam9263ek.c as follows: /* * LCD Controller */ #if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE) static struct fb_videomode at91_tft_vga_modes[] = { { .name = "LB070WV6 @ 60", .refresh = 60, .xres = 800, .yres = 480, .pixclock = KHZ2PICOS(36000),
.left_margin = 1, .right_margin = 33, .upper_margin = 1, .lower_margin = 0, .hsync_len = 5, .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 = "LG", .monitor = "LB070WV6",
.modedb = at91_tft_vga_modes, .modedb_len = ARRAY_SIZE(at91_tft_vga_modes), .hfmin = 15000, .hfmax = 64000, .vfmin = 50, .vfmax = 150, };
#define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \ | ATMEL_LCDC_DISTYPE_TFT \ | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
static void at91_lcdc_power_control(int on) { //at91_set_gpio_value(AT91_PIN_PA30, on); at91_set_gpio_value(AT91_PIN_PD11, on); at91_set_gpio_value(AT91_PIN_PD10, on); }
/* Driver datas */ static struct atmel_lcdfb_info __initdata ek_lcdc_data = { .lcdcon_is_backlight = true, .default_bpp = 16, .default_dmacon = ATMEL_LCDC_DMAEN, .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2, .default_monspecs = &at91fb_default_monspecs, .atmel_lcdfb_power_control = at91_lcdc_power_control, .guard_time = 1, };
---- I think that I am missing something as the configuration of the pins in at91sam9263_devices.c states the functions in comments and I haven't found code that would tell the driver which one is vertical sync?
|