diff options
author | Ben Dooks <ben-linux@fluff.org> | 2008-07-03 06:24:33 -0400 |
---|---|---|
committer | Ben Dooks <ben-linux@fluff.org> | 2008-07-03 11:51:25 -0400 |
commit | c2c1708f9d2d0435ff136acbb98f8cfbeded09e4 (patch) | |
tree | 015be935b2e51331a8c479c4b710dc3c2cd9ff0a /arch | |
parent | a2ed4065159d87d88f2bdc5a3a53e96b76f5a198 (diff) |
[ARM] JIVE: Add LCD display setup information
Add the setup information for the LCD display
connected to the device.
Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-s3c2412/mach-jive.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/arch/arm/mach-s3c2412/mach-jive.c b/arch/arm/mach-s3c2412/mach-jive.c index ad6b942a2a8f..71bf9000e253 100644 --- a/arch/arm/mach-s3c2412/mach-jive.c +++ b/arch/arm/mach-s3c2412/mach-jive.c | |||
@@ -17,9 +17,12 @@ | |||
17 | #include <linux/timer.h> | 17 | #include <linux/timer.h> |
18 | #include <linux/init.h> | 18 | #include <linux/init.h> |
19 | #include <linux/sysdev.h> | 19 | #include <linux/sysdev.h> |
20 | #include <linux/delay.h> | ||
20 | #include <linux/serial_core.h> | 21 | #include <linux/serial_core.h> |
21 | #include <linux/platform_device.h> | 22 | #include <linux/platform_device.h> |
22 | 23 | ||
24 | #include <video/ili9320.h> | ||
25 | |||
23 | #include <linux/spi/spi.h> | 26 | #include <linux/spi/spi.h> |
24 | 27 | ||
25 | #include <linux/mtd/mtd.h> | 28 | #include <linux/mtd/mtd.h> |
@@ -349,6 +352,42 @@ struct s3c2410fb_mach_info jive_lcd_config = { | |||
349 | S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)), | 352 | S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)), |
350 | }; | 353 | }; |
351 | 354 | ||
355 | /* ILI9320 support. */ | ||
356 | |||
357 | static void jive_lcm_reset(unsigned int set) | ||
358 | { | ||
359 | printk(KERN_DEBUG "%s(%d)\n", __func__, set); | ||
360 | |||
361 | s3c2410_gpio_setpin(S3C2410_GPG13, set); | ||
362 | s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPIO_OUTPUT); | ||
363 | } | ||
364 | |||
365 | #undef LCD_UPPER_MARGIN | ||
366 | #define LCD_UPPER_MARGIN 2 | ||
367 | |||
368 | static struct ili9320_platdata jive_lcm_config = { | ||
369 | .hsize = LCD_XRES, | ||
370 | .vsize = LCD_YRES, | ||
371 | |||
372 | .reset = jive_lcm_reset, | ||
373 | .suspend = ILI9320_SUSPEND_DEEP, | ||
374 | |||
375 | .entry_mode = ILI9320_ENTRYMODE_ID(3) | ILI9320_ENTRYMODE_BGR, | ||
376 | .display2 = (ILI9320_DISPLAY2_FP(LCD_UPPER_MARGIN) | | ||
377 | ILI9320_DISPLAY2_BP(LCD_LOWER_MARGIN)), | ||
378 | .display3 = 0x0, | ||
379 | .display4 = 0x0, | ||
380 | .rgb_if1 = (ILI9320_RGBIF1_RIM_RGB18 | | ||
381 | ILI9320_RGBIF1_RM | ILI9320_RGBIF1_CLK_RGBIF), | ||
382 | .rgb_if2 = ILI9320_RGBIF2_DPL, | ||
383 | .interface2 = 0x0, | ||
384 | .interface3 = 0x3, | ||
385 | .interface4 = (ILI9320_INTERFACE4_RTNE(16) | | ||
386 | ILI9320_INTERFACE4_DIVE(1)), | ||
387 | .interface5 = 0x0, | ||
388 | .interface6 = 0x0, | ||
389 | }; | ||
390 | |||
352 | /* LCD SPI support */ | 391 | /* LCD SPI support */ |
353 | 392 | ||
354 | static void jive_lcd_spi_chipselect(struct s3c2410_spigpio_info *spi, int cs) | 393 | static void jive_lcd_spi_chipselect(struct s3c2410_spigpio_info *spi, int cs) |
@@ -380,6 +419,7 @@ static struct spi_board_info __initdata jive_spi_devs[] = { | |||
380 | .chip_select = 0, | 419 | .chip_select = 0, |
381 | .mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */ | 420 | .mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */ |
382 | .max_speed_hz = 100000, | 421 | .max_speed_hz = 100000, |
422 | .platform_data = &jive_lcm_config, | ||
383 | }, | 423 | }, |
384 | }; | 424 | }; |
385 | 425 | ||