aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--arch/arm/mach-at91/board-sam9261ek.c64
-rw-r--r--arch/arm/mach-at91/board-sam9263ek.c64
2 files changed, 128 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")
diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
index c164c8e58ae6..2a1cc73390b7 100644
--- a/arch/arm/mach-at91/board-sam9263ek.c
+++ b/arch/arm/mach-at91/board-sam9263ek.c
@@ -26,6 +26,9 @@
26#include <linux/platform_device.h> 26#include <linux/platform_device.h>
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/fb.h>
30
31#include <video/atmel_lcdc.h>
29 32
30#include <asm/hardware.h> 33#include <asm/hardware.h>
31#include <asm/setup.h> 34#include <asm/setup.h>
@@ -202,6 +205,65 @@ static struct at91_nand_data __initdata ek_nand_data = {
202 205
203 206
204/* 207/*
208 * LCD Controller
209 */
210#if defined(CONFIG_FB_ATMEL) || defined(CONFIG_FB_ATMEL_MODULE)
211static struct fb_videomode at91_tft_vga_modes[] = {
212 {
213 .name = "TX09D50VM1CCA @ 60",
214 .refresh = 60,
215 .xres = 240, .yres = 320,
216 .pixclock = KHZ2PICOS(4965),
217
218 .left_margin = 1, .right_margin = 33,
219 .upper_margin = 1, .lower_margin = 0,
220 .hsync_len = 5, .vsync_len = 1,
221
222 .sync = FB_SYNC_HOR_HIGH_ACT | FB_SYNC_VERT_HIGH_ACT,
223 .vmode = FB_VMODE_NONINTERLACED,
224 },
225};
226
227static struct fb_monspecs at91fb_default_monspecs = {
228 .manufacturer = "HIT",
229 .monitor = "TX09D70VM1CCA",
230
231 .modedb = at91_tft_vga_modes,
232 .modedb_len = ARRAY_SIZE(at91_tft_vga_modes),
233 .hfmin = 15000,
234 .hfmax = 64000,
235 .vfmin = 50,
236 .vfmax = 150,
237};
238
239#define AT91SAM9263_DEFAULT_LCDCON2 (ATMEL_LCDC_MEMOR_LITTLE \
240 | ATMEL_LCDC_DISTYPE_TFT \
241 | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE)
242
243static void at91_lcdc_power_control(int on)
244{
245 if (on)
246 at91_set_gpio_value(AT91_PIN_PD12, 0); /* power up */
247 else
248 at91_set_gpio_value(AT91_PIN_PD12, 1); /* power down */
249}
250
251/* Driver datas */
252static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
253 .default_bpp = 16,
254 .default_dmacon = ATMEL_LCDC_DMAEN,
255 .default_lcdcon2 = AT91SAM9263_DEFAULT_LCDCON2,
256 .default_monspecs = &at91fb_default_monspecs,
257 .atmel_lcdfb_power_control = at91_lcdc_power_control,
258 .guard_time = 1,
259};
260
261#else
262static struct atmel_lcdfb_info __initdata ek_lcdc_data;
263#endif
264
265
266/*
205 * AC97 267 * AC97
206 */ 268 */
207static struct atmel_ac97_data ek_ac97_data = { 269static struct atmel_ac97_data ek_ac97_data = {
@@ -230,6 +292,8 @@ static void __init ek_board_init(void)
230 at91_add_device_nand(&ek_nand_data); 292 at91_add_device_nand(&ek_nand_data);
231 /* I2C */ 293 /* I2C */
232 at91_add_device_i2c(); 294 at91_add_device_i2c();
295 /* LCD Controller */
296 at91_add_device_lcdc(&ek_lcdc_data);
233 /* AC97 */ 297 /* AC97 */
234 at91_add_device_ac97(&ek_ac97_data); 298 at91_add_device_ac97(&ek_ac97_data);
235} 299}