diff options
author | Jonas Larsson <jonas.larsson@martinsson.se> | 2009-03-27 10:18:14 +0100 |
---|---|---|
committer | Haavard Skinnemoen <haavard.skinnemoen@atmel.com> | 2009-03-27 15:02:34 +0100 |
commit | a16fffdd8eb95ebab7dc22414896fe6493951e0e (patch) | |
tree | 242e481f52bf05a684b362eeba8a1c5095ed6713 /arch/avr32/boards/merisc/display.c | |
parent | 9477ab2b2ae098423af2ed4fb1f7b864abfc14fc (diff) | |
download | op-kernel-dev-a16fffdd8eb95ebab7dc22414896fe6493951e0e.zip op-kernel-dev-a16fffdd8eb95ebab7dc22414896fe6493951e0e.tar.gz |
Add Merisc board support
Merisc is the family name for a range of AVR32-based boards.
The boards are designed to be used in a man-machine interfacing
environment, utilizing a touch-based graphical user interface. They host
a vast range of I/O peripherals as well as a large SDRAM & Flash memory
bank.
For more information see: http://www.martinsson.se/merisc
Signed-off-by: Jonas Larsson <jonas.larsson@martinsson.se>
Signed-off-by: Haavard Skinnemoen <haavard.skinnemoen@atmel.com>
Diffstat (limited to 'arch/avr32/boards/merisc/display.c')
-rw-r--r-- | arch/avr32/boards/merisc/display.c | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/arch/avr32/boards/merisc/display.c b/arch/avr32/boards/merisc/display.c new file mode 100644 index 0000000..85a543c --- /dev/null +++ b/arch/avr32/boards/merisc/display.c @@ -0,0 +1,65 @@ +/* + * Display setup code for the Merisc board + * + * Copyright (C) 2008 Martinsson Elektronik AB + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ +#include <linux/init.h> +#include <linux/platform_device.h> +#include <linux/fb.h> +#include <video/atmel_lcdc.h> +#include <asm/setup.h> +#include <mach/board.h> +#include "merisc.h" + +static struct fb_videomode merisc_fb_videomode[] = { + { + .refresh = 44, + .xres = 640, + .yres = 480, + .left_margin = 96, + .right_margin = 96, + .upper_margin = 34, + .lower_margin = 8, + .hsync_len = 64, + .vsync_len = 64, + .name = "640x480 @ 44", + .pixclock = KHZ2PICOS(25180), + .sync = 0, + .vmode = FB_VMODE_NONINTERLACED, + }, +}; + +static struct fb_monspecs merisc_fb_monspecs = { + .manufacturer = "Kyo", + .monitor = "TCG075VG2AD", + .modedb = merisc_fb_videomode, + .modedb_len = ARRAY_SIZE(merisc_fb_videomode), + .hfmin = 30000, + .hfmax = 33333, + .vfmin = 60, + .vfmax = 90, + .dclkmax = 30000000, +}; + +struct atmel_lcdfb_info merisc_lcdc_data = { + .default_bpp = 24, + .default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN, + .default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT + | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE + | ATMEL_LCDC_MEMOR_BIG), + .default_monspecs = &merisc_fb_monspecs, + .guard_time = 2, +}; + +static int __init merisc_display_init(void) +{ + at32_add_device_lcdc(0, &merisc_lcdc_data, fbmem_start, + fbmem_size, 0); + + return 0; +} +device_initcall(merisc_display_init); |