aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/board-sam9261ek.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/board-sam9261ek.c')
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c64
1 files changed, 64 insertions, 0 deletions
diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c
index 26ca8ab3f62a..579b41f0c328 100644
--- a/arch/arm/mach-at91/board-sam9261ek.c
+++ b/arch/arm/mach-at91/board-sam9261ek.c
@@ -27,6 +27,9 @@
27#include <linux/spi/spi.h> 27#include <linux/spi/spi.h>
28#include <linux/spi/ads7846.h> 28#include <linux/spi/ads7846.h>
29#include <linux/dm9000.h> 29#include <linux/dm9000.h>
30#include <linux/fb.h>
31
32#include <video/atmel_lcdc.h>
30 33
31#include <asm/hardware.h> 34#include <asm/hardware.h>
32#include <asm/setup.h> 35#include <asm/setup.h>
@@ -271,6 +274,65 @@ static struct spi_board_info ek_spi_devices[] = {
271}; 274};
272 275
273 276
277/*
278 * LCD Controller
279 */
280#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
281static struct fb_videomode at91_tft_vga_modes[] = {
282 {
283 .name = "TX09D50VM1CCA @ 60",
284 .refresh = 60,
285 .xres = 240, .yres = 320,
286 .pixclock = KHZ2PICOS(4965),
287
288 .left_margin = 1, .right_margin = 33,
289 .upper_margin = 1, .lower_margin = 0,
290 .hsync_len = 5, .vsync_len = 1,
291
292 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
293 .vmode = FB_VMODE_NONINTERLACED,
294 },
295};
296
297static struct fb_monspecs at91fb_default_monspecs = {
298 .manufacturer = "HIT",
299 .monitor = "TX09D50VM1CCA",
300
301 .modedb = at91_tft_vga_modes,
302 .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
303 .hfmin = 15000,
304 .hfmax = 64000,
305 .vfmin = 50,
306 .vfmax = 150,
307};
308
309#define AT91SAM9261_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
310 | ATMEL_LCDC_DISTYPE_TFT \
311 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
312
313static void at91_lcdc_power_control(int on)
314{
315 if (on)
316 at91_set_gpio_value(AT91_PIN_PA12, 0); /* power up */
317 else
318 at91_set_gpio_value(AT91_PIN_PA12, 1); /* power down */
319}
320
321/* Driver datas */
322static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
323 .default_bpp = 16,
324 .default_dmacon = ATMEL_LCDC_DMAEN,
325 .default_lcdcon2 = AT91SAM9261_DEFAULT_LCDCON2,
326 .default_monspecs = &at91fb_default_monspecs,
327 .atmel_lcdfb_power_control = at91_lcdc_power_control,
328 .guard_time = 1,
329};
330
331#else
332static struct atmel_lcdfb_info __initdata ek_lcdc_data;
333#endif
334
335
274static void __init ek_board_init(void) 336static void __init ek_board_init(void)
275{ 337{
276 /* Serial */ 338 /* Serial */
@@ -296,6 +358,8 @@ static void __init ek_board_init(void)
296 /* MMC */ 358 /* MMC */
297 at91_add_device_mmc(0, &ek_mmc_data); 359 at91_add_device_mmc(0, &ek_mmc_data);
298#endif 360#endif
361 /* LCD Controller */
362 at91_add_device_lcdc(&ek_lcdc_data);
299} 363}
300 364
301MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") 365MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK")