aboutsummaryrefslogtreecommitdiffstats
path: root/arch/avr32/boards
diff options
context:
space:
mode:
Diffstat (limited to 'arch/avr32/boards')
-rw-r--r--arch/avr32/boards/atngw100/Kconfig35
-rw-r--r--arch/avr32/boards/atngw100/Makefile3
-rw-r--r--arch/avr32/boards/atngw100/evklcd10x.c155
-rw-r--r--arch/avr32/boards/atngw100/setup.c5
4 files changed, 197 insertions, 1 deletions
diff --git a/arch/avr32/boards/atngw100/Kconfig b/arch/avr32/boards/atngw100/Kconfig
new file mode 100644
index 000000000000..b3f99477bbeb
--- /dev/null
+++ b/arch/avr32/boards/atngw100/Kconfig
@@ -0,0 +1,35 @@
1# NGW100 customization
2
3if BOARD_ATNGW100
4
5config BOARD_ATNGW100_EVKLCD10X
6 bool "Add support for EVKLCD10X addon board"
7 help
8 This enables support for the EVKLCD100 (QVGA) or EVKLCD101 (VGA)
9 addon board for the NGW100. By enabling this the LCD controller and
10 AC97 controller is added as platform devices.
11
12 This choice disables the detect pin and the write-protect pin for the
13 MCI platform device, since it conflicts with the LCD platform device.
14 The MCI pins can be reenabled by editing the "add device function" but
15 this may break the setup for other displays that use these pins.
16
17 Choose 'Y' here if you have a EVKLCD100/101 connected to the NGW100.
18
19choice
20 prompt "LCD panel resolution on EVKLCD10X"
21 depends on BOARD_ATNGW100_EVKLCD10X
22 default BOARD_ATNGW100_EVKLCD10X_VGA
23
24config BOARD_ATNGW100_EVKLCD10X_QVGA
25 bool "QVGA (320x240)"
26
27config BOARD_ATNGW100_EVKLCD10X_VGA
28 bool "VGA (640x480)"
29
30config BOARD_ATNGW100_EVKLCD10X_POW_QVGA
31 bool "Powertip QVGA (320x240)"
32
33endchoice
34
35endif # BOARD_ATNGW100
diff --git a/arch/avr32/boards/atngw100/Makefile b/arch/avr32/boards/atngw100/Makefile
index c740aa116755..6376f5322e4d 100644
--- a/arch/avr32/boards/atngw100/Makefile
+++ b/arch/avr32/boards/atngw100/Makefile
@@ -1 +1,2 @@
1obj-y += setup.o flash.o 1obj-y += setup.o flash.o
2obj-$(CONFIG_BOARD_ATNGW100_EVKLCD10X) += evklcd10x.o
diff --git a/arch/avr32/boards/atngw100/evklcd10x.c b/arch/avr32/boards/atngw100/evklcd10x.c
new file mode 100644
index 000000000000..8140b22b3461
--- /dev/null
+++ b/arch/avr32/boards/atngw100/evklcd10x.c
@@ -0,0 +1,155 @@
1/*
2 * Board-specific setup code for the ATEVKLCD10X addon board to the ATNGW100
3 * Network Gateway
4 *
5 * Copyright (C) 2008 Atmel Corporation
6 *
7 * This program is free software; you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License version 2 as published by
9 * the Free Software Foundation.
10 */
11
12#include <linux/init.h>
13#include <linux/linkage.h>
14#include <linux/fb.h>
15#include <linux/platform_device.h>
16
17#include <video/atmel_lcdc.h>
18
19#include <asm/setup.h>
20
21#include <mach/at32ap700x.h>
22#include <mach/board.h>
23
24static struct ac97c_platform_data __initdata ac97c0_data = {
25 .dma_rx_periph_id = 3,
26 .dma_tx_periph_id = 4,
27 .dma_controller_id = 0,
28 .reset_pin = GPIO_PIN_PB(19),
29};
30
31#ifdef CONFIG_BOARD_ATNGW100_EVKLCD10X_VGA
32static struct fb_videomode __initdata tcg057vglad_modes[] = {
33 {
34 .name = "640x480 @ 60",
35 .refresh = 60,
36 .xres = 640, .yres = 480,
37 .pixclock = KHZ2PICOS(25180),
38
39 .left_margin = 64, .right_margin = 31,
40 .upper_margin = 34, .lower_margin = 2,
41 .hsync_len = 96, .vsync_len = 4,
42
43 .sync = 0,
44 .vmode = FB_VMODE_NONINTERLACED,
45 },
46};
47
48static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
49 .manufacturer = "KYO",
50 .monitor = "TCG057VGLAD",
51 .modedb = tcg057vglad_modes,
52 .modedb_len = ARRAY_SIZE(tcg057vglad_modes),
53 .hfmin = 19948,
54 .hfmax = 31478,
55 .vfmin = 50,
56 .vfmax = 67,
57 .dclkmax = 28330000,
58};
59
60static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
61 .default_bpp = 16,
62 .default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
63 .default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
64 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE
65 | ATMEL_LCDC_MEMOR_BIG),
66 .default_monspecs = &atevklcd10x_default_monspecs,
67 .guard_time = 2,
68};
69#elif CONFIG_BOARD_ATNGW100_EVKLCD10X_QVGA
70static struct fb_videomode __initdata tcg057qvlad_modes[] = {
71 {
72 .name = "320x240 @ 60",
73 .refresh = 60,
74 .xres = 320, .yres = 240,
75 .pixclock = KHZ2PICOS(6300),
76
77 .left_margin = 52, .right_margin = 28,
78 .upper_margin = 7, .lower_margin = 2,
79 .hsync_len = 96, .vsync_len = 4,
80
81 .sync = 0,
82 .vmode = FB_VMODE_NONINTERLACED,
83 },
84};
85
86static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
87 .manufacturer = "KYO",
88 .monitor = "TCG057QVLAD",
89 .modedb = tcg057qvlad_modes,
90 .modedb_len = ARRAY_SIZE(tcg057qvlad_modes),
91 .hfmin = 19948,
92 .hfmax = 31478,
93 .vfmin = 50,
94 .vfmax = 67,
95 .dclkmax = 7000000,
96};
97
98static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
99 .default_bpp = 16,
100 .default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
101 .default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
102 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE
103 | ATMEL_LCDC_MEMOR_BIG),
104 .default_monspecs = &atevklcd10x_default_monspecs,
105 .guard_time = 2,
106};
107#elif CONFIG_BOARD_ATNGW100_EVKLCD10X_POW_QVGA
108static struct fb_videomode __initdata ph320240t_modes[] = {
109 {
110 .name = "320x240 @ 60",
111 .refresh = 60,
112 .xres = 320, .yres = 240,
113 .pixclock = KHZ2PICOS(6300),
114
115 .left_margin = 38, .right_margin = 20,
116 .upper_margin = 15, .lower_margin = 5,
117 .hsync_len = 30, .vsync_len = 3,
118
119 .sync = 0,
120 .vmode = FB_VMODE_NONINTERLACED,
121 },
122};
123
124static struct fb_monspecs __initdata atevklcd10x_default_monspecs = {
125 .manufacturer = "POW",
126 .monitor = "PH320240T",
127 .modedb = ph320240t_modes,
128 .modedb_len = ARRAY_SIZE(ph320240t_modes),
129 .hfmin = 14400,
130 .hfmax = 21600,
131 .vfmin = 50,
132 .vfmax = 90,
133 .dclkmax = 6400000,
134};
135
136static struct atmel_lcdfb_info __initdata atevklcd10x_lcdc_data = {
137 .default_bpp = 16,
138 .default_dmacon = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
139 .default_lcdcon2 = (ATMEL_LCDC_DISTYPE_TFT
140 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE
141 | ATMEL_LCDC_MEMOR_BIG),
142 .default_monspecs = &atevklcd10x_default_monspecs,
143 .guard_time = 2,
144};
145#endif
146
147static int __init atevklcd10x_init(void)
148{
149 at32_add_device_ac97c(0, &ac97c0_data);
150
151 at32_add_device_lcdc(0, &atevklcd10x_lcdc_data,
152 fbmem_start, fbmem_size, 1);
153 return 0;
154}
155postcore_initcall(atevklcd10x_init);
diff --git a/arch/avr32/boards/atngw100/setup.c b/arch/avr32/boards/atngw100/setup.c
index 6c54580a66df..af38ab3e4502 100644
--- a/arch/avr32/boards/atngw100/setup.c
+++ b/arch/avr32/boards/atngw100/setup.c
@@ -56,8 +56,13 @@ static struct spi_board_info spi0_board_info[] __initdata = {
56static struct mci_platform_data __initdata mci0_data = { 56static struct mci_platform_data __initdata mci0_data = {
57 .slot[0] = { 57 .slot[0] = {
58 .bus_width = 4, 58 .bus_width = 4,
59#ifndef CONFIG_BOARD_ATNGW100_EVKLCD10X
59 .detect_pin = GPIO_PIN_PC(25), 60 .detect_pin = GPIO_PIN_PC(25),
60 .wp_pin = GPIO_PIN_PE(0), 61 .wp_pin = GPIO_PIN_PE(0),
62#else
63 .detect_pin = GPIO_PIN_NONE,
64 .wp_pin = GPIO_PIN_NONE,
65#endif
61 }, 66 },
62}; 67};
63 68