Commit 8415d5c4 authored by Marek Szyprowski's avatar Marek Szyprowski Committed by Kukjin Kim

ARM: S5PV210: Add support for S6E63M0 LCD controller on GONI board

Add required platform definitions for S6E63M0 LCD controller on Samsung
Goni board.
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: default avatarKyungmin Park <kyungmin.park@samsung.com>
[kgene.kim@samsung.com: minor title fixes]
[kgene.kim@samsung.com: fix build error]
Signed-off-by: default avatarKukjin Kim <kgene.kim@samsung.com>
parent ea31fd43
...@@ -17,6 +17,9 @@ ...@@ -17,6 +17,9 @@
#include <linux/i2c-gpio.h> #include <linux/i2c-gpio.h>
#include <linux/mfd/max8998.h> #include <linux/mfd/max8998.h>
#include <linux/regulator/fixed.h> #include <linux/regulator/fixed.h>
#include <linux/spi/spi.h>
#include <linux/spi/spi_gpio.h>
#include <linux/lcd.h>
#include <linux/gpio_keys.h> #include <linux/gpio_keys.h>
#include <linux/input.h> #include <linux/input.h>
#include <linux/gpio.h> #include <linux/gpio.h>
...@@ -113,6 +116,65 @@ static struct s3c_fb_platdata goni_lcd_pdata __initdata = { ...@@ -113,6 +116,65 @@ static struct s3c_fb_platdata goni_lcd_pdata __initdata = {
.setup_gpio = s5pv210_fb_gpio_setup_24bpp, .setup_gpio = s5pv210_fb_gpio_setup_24bpp,
}; };
static int lcd_power_on(struct lcd_device *ld, int enable)
{
return 1;
}
static int reset_lcd(struct lcd_device *ld)
{
static unsigned int first = 1;
int reset_gpio = -1;
reset_gpio = S5PV210_MP05(5);
if (first) {
gpio_request(reset_gpio, "MLCD_RST");
first = 0;
}
gpio_direction_output(reset_gpio, 1);
return 1;
}
static struct lcd_platform_data goni_lcd_platform_data = {
.reset = reset_lcd,
.power_on = lcd_power_on,
.lcd_enabled = 0,
.reset_delay = 120, /* 120ms */
.power_on_delay = 25, /* 25ms */
.power_off_delay = 200, /* 200ms */
};
#define LCD_BUS_NUM 3
static struct spi_board_info spi_board_info[] __initdata = {
{
.modalias = "s6e63m0",
.platform_data = &goni_lcd_platform_data,
.max_speed_hz = 1200000,
.bus_num = LCD_BUS_NUM,
.chip_select = 0,
.mode = SPI_MODE_3,
.controller_data = (void *)S5PV210_MP01(1), /* DISPLAY_CS */
},
};
static struct spi_gpio_platform_data lcd_spi_gpio_data = {
.sck = S5PV210_MP04(1), /* DISPLAY_CLK */
.mosi = S5PV210_MP04(3), /* DISPLAY_SI */
.miso = SPI_GPIO_NO_MISO,
.num_chipselect = 1,
};
static struct platform_device goni_spi_gpio = {
.name = "spi_gpio",
.id = LCD_BUS_NUM,
.dev = {
.parent = &s3c_device_fb.dev,
.platform_data = &lcd_spi_gpio_data,
},
};
/* KEYPAD */ /* KEYPAD */
static uint32_t keymap[] __initdata = { static uint32_t keymap[] __initdata = {
/* KEY(row, col, keycode) */ /* KEY(row, col, keycode) */
...@@ -513,6 +575,7 @@ static void goni_setup_sdhci(void) ...@@ -513,6 +575,7 @@ static void goni_setup_sdhci(void)
static struct platform_device *goni_devices[] __initdata = { static struct platform_device *goni_devices[] __initdata = {
&s3c_device_fb, &s3c_device_fb,
&s5p_device_onenand, &s5p_device_onenand,
&goni_spi_gpio,
&goni_i2c_gpio_pmic, &goni_i2c_gpio_pmic,
&mmc2_fixed_voltage, &mmc2_fixed_voltage,
&goni_device_gpiokeys, &goni_device_gpiokeys,
...@@ -545,6 +608,9 @@ static void __init goni_machine_init(void) ...@@ -545,6 +608,9 @@ static void __init goni_machine_init(void)
/* FB */ /* FB */
s3c_fb_set_platdata(&goni_lcd_pdata); s3c_fb_set_platdata(&goni_lcd_pdata);
/* SPI */
spi_register_board_info(spi_board_info, ARRAY_SIZE(spi_board_info));
/* KEYPAD */ /* KEYPAD */
samsung_keypad_set_platdata(&keypad_data); samsung_keypad_set_platdata(&keypad_data);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment