summaryrefslogtreecommitdiff
path: root/arch/arm/mach-s3c2412
diff options
context:
space:
mode:
authorBen Dooks <ben-linux@fluff.org>2008-07-03 10:24:33 (GMT)
committerBen Dooks <ben-linux@fluff.org>2008-07-03 15:51:25 (GMT)
commitc2c1708f9d2d0435ff136acbb98f8cfbeded09e4 (patch)
tree015be935b2e51331a8c479c4b710dc3c2cd9ff0a /arch/arm/mach-s3c2412
parenta2ed4065159d87d88f2bdc5a3a53e96b76f5a198 (diff)
downloadlinux-c2c1708f9d2d0435ff136acbb98f8cfbeded09e4.tar.xz
[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/arm/mach-s3c2412')
-rw-r--r--arch/arm/mach-s3c2412/mach-jive.c40
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 ad6b942..71bf900 100644
--- a/arch/arm/mach-s3c2412/mach-jive.c
+++ b/arch/arm/mach-s3c2412/mach-jive.c
@@ -17,9 +17,12 @@
#include <linux/timer.h>
#include <linux/init.h>
#include <linux/sysdev.h>
+#include <linux/delay.h>
#include <linux/serial_core.h>
#include <linux/platform_device.h>
+#include <video/ili9320.h>
+
#include <linux/spi/spi.h>
#include <linux/mtd/mtd.h>
@@ -349,6 +352,42 @@ struct s3c2410fb_mach_info jive_lcd_config = {
S3C2410_GPDCON_MASK(14) | S3C2410_GPDCON_MASK(15)),
};
+/* ILI9320 support. */
+
+static void jive_lcm_reset(unsigned int set)
+{
+ printk(KERN_DEBUG "%s(%d)\n", __func__, set);
+
+ s3c2410_gpio_setpin(S3C2410_GPG13, set);
+ s3c2410_gpio_cfgpin(S3C2410_GPG13, S3C2410_GPIO_OUTPUT);
+}
+
+#undef LCD_UPPER_MARGIN
+#define LCD_UPPER_MARGIN 2
+
+static struct ili9320_platdata jive_lcm_config = {
+ .hsize = LCD_XRES,
+ .vsize = LCD_YRES,
+
+ .reset = jive_lcm_reset,
+ .suspend = ILI9320_SUSPEND_DEEP,
+
+ .entry_mode = ILI9320_ENTRYMODE_ID(3) | ILI9320_ENTRYMODE_BGR,
+ .display2 = (ILI9320_DISPLAY2_FP(LCD_UPPER_MARGIN) |
+ ILI9320_DISPLAY2_BP(LCD_LOWER_MARGIN)),
+ .display3 = 0x0,
+ .display4 = 0x0,
+ .rgb_if1 = (ILI9320_RGBIF1_RIM_RGB18 |
+ ILI9320_RGBIF1_RM | ILI9320_RGBIF1_CLK_RGBIF),
+ .rgb_if2 = ILI9320_RGBIF2_DPL,
+ .interface2 = 0x0,
+ .interface3 = 0x3,
+ .interface4 = (ILI9320_INTERFACE4_RTNE(16) |
+ ILI9320_INTERFACE4_DIVE(1)),
+ .interface5 = 0x0,
+ .interface6 = 0x0,
+};
+
/* LCD SPI support */
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[] = {
.chip_select = 0,
.mode = SPI_MODE_3, /* CPOL=1, CPHA=1 */
.max_speed_hz = 100000,
+ .platform_data = &jive_lcm_config,
},
};