Path: blob/master/arch/avr32/boards/merisc/display.c
10819 views
/*1* Display setup code for the Merisc board2*3* Copyright (C) 2008 Martinsson Elektronik AB4*5* This program is free software; you can redistribute it and/or modify6* it under the terms of the GNU General Public License version 2 as7* published by the Free Software Foundation.8*/9#include <linux/init.h>10#include <linux/platform_device.h>11#include <linux/fb.h>12#include <video/atmel_lcdc.h>13#include <asm/setup.h>14#include <mach/board.h>15#include "merisc.h"1617static struct fb_videomode merisc_fb_videomode[] = {18{19.refresh = 44,20.xres = 640,21.yres = 480,22.left_margin = 96,23.right_margin = 96,24.upper_margin = 34,25.lower_margin = 8,26.hsync_len = 64,27.vsync_len = 64,28.name = "640x480 @ 44",29.pixclock = KHZ2PICOS(25180),30.sync = 0,31.vmode = FB_VMODE_NONINTERLACED,32},33};3435static struct fb_monspecs merisc_fb_monspecs = {36.manufacturer = "Kyo",37.monitor = "TCG075VG2AD",38.modedb = merisc_fb_videomode,39.modedb_len = ARRAY_SIZE(merisc_fb_videomode),40.hfmin = 30000,41.hfmax = 33333,42.vfmin = 60,43.vfmax = 90,44.dclkmax = 30000000,45};4647struct atmel_lcdfb_info merisc_lcdc_data = {48.default_bpp = 24,49.default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,50.default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT51| ATMEL_LCDC_CLKMOD_ALWAYSACTIVE52| ATMEL_LCDC_MEMOR_BIG),53.default_monspecs = &merisc_fb_monspecs,54.guard_time = 2,55};5657static int __init merisc_display_init(void)58{59at32_add_device_lcdc(0, &merisc_lcdc_data, fbmem_start,60fbmem_size, 0);6162return 0;63}64device_initcall(merisc_display_init);656667