summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos4
diff options
context:
space:
mode:
authorTushar Behera <tushar.behera@linaro.org>2011-10-03 09:12:56 +0900
committerKukjin Kim <kgene.kim@samsung.com>2011-10-04 12:57:25 +0900
commit9421a76d2bfec62b89b395033d03eea44bb2a4ac (patch)
treeb5e28e319e8a08efe4a1edf1ee60ec5fc7d00c93 /arch/arm/mach-exynos4
parent6e01280f34be02e5e7635debb045aab3705bb5bf (diff)
downloadop-kernel-dev-9421a76d2bfec62b89b395033d03eea44bb2a4ac.zip
op-kernel-dev-9421a76d2bfec62b89b395033d03eea44bb2a4ac.tar.gz
ARM: EXYNOS4: Add machine support for 7" LCD on ORIGEN
ORIGEN board is fitted with 7" LCD panel HV070WSA. The pixel resolution of the LCD panel is 1024x600. Also power domain device for LCD0 is registered. Signed-off-by: Tushar Behera <tushar.behera@linaro.org> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos4')
-rw-r--r--arch/arm/mach-exynos4/Kconfig5
-rw-r--r--arch/arm/mach-exynos4/mach-origen.c63
2 files changed, 66 insertions, 2 deletions
diff --git a/arch/arm/mach-exynos4/Kconfig b/arch/arm/mach-exynos4/Kconfig
index 257dbaa..6fc1722 100644
--- a/arch/arm/mach-exynos4/Kconfig
+++ b/arch/arm/mach-exynos4/Kconfig
@@ -229,11 +229,14 @@ config MACH_ORIGEN
select S5P_DEV_FIMC1
select S5P_DEV_FIMC2
select S5P_DEV_FIMC3
+ select S5P_DEV_FIMD0
select S5P_DEV_I2C_HDMIPHY
- select S5P_DEV_USB_EHCI
select S5P_DEV_TV
+ select S5P_DEV_USB_EHCI
+ select EXYNOS4_DEV_PD
select SAMSUNG_DEV_BACKLIGHT
select SAMSUNG_DEV_PWM
+ select EXYNOS4_SETUP_FIMD0
select EXYNOS4_SETUP_SDHCI
select EXYNOS4_SETUP_USB_PHY
help
diff --git a/arch/arm/mach-exynos4/mach-origen.c b/arch/arm/mach-exynos4/mach-origen.c
index 3da7776..349e297 100644
--- a/arch/arm/mach-exynos4/mach-origen.c
+++ b/arch/arm/mach-exynos4/mach-origen.c
@@ -19,11 +19,15 @@
#include <linux/i2c.h>
#include <linux/regulator/machine.h>
#include <linux/mfd/max8997.h>
+#include <linux/lcd.h>
#include <asm/mach/arch.h>
#include <asm/mach-types.h>
+#include <video/platform_lcd.h>
+
#include <plat/regs-serial.h>
+#include <plat/regs-fb-v4.h>
#include <plat/exynos4.h>
#include <plat/cpu.h>
#include <plat/devs.h>
@@ -33,6 +37,8 @@
#include <plat/clock.h>
#include <plat/gpio-cfg.h>
#include <plat/backlight.h>
+#include <plat/pd.h>
+#include <plat/fb.h>
#include <mach/map.h>
@@ -529,10 +535,59 @@ static struct platform_device origen_device_gpiokeys = {
},
};
+static void lcd_hv070wsa_set_power(struct plat_lcd_data *pd, unsigned int power)
+{
+ int ret;
+
+ if (power)
+ ret = gpio_request_one(EXYNOS4_GPE3(4),
+ GPIOF_OUT_INIT_HIGH, "GPE3_4");
+ else
+ ret = gpio_request_one(EXYNOS4_GPE3(4),
+ GPIOF_OUT_INIT_LOW, "GPE3_4");
+
+ gpio_free(EXYNOS4_GPE3(4));
+
+ if (ret)
+ pr_err("failed to request gpio for LCD power: %d\n", ret);
+}
+
+static struct plat_lcd_data origen_lcd_hv070wsa_data = {
+ .set_power = lcd_hv070wsa_set_power,
+};
+
+static struct platform_device origen_lcd_hv070wsa = {
+ .name = "platform-lcd",
+ .dev.parent = &s5p_device_fimd0.dev,
+ .dev.platform_data = &origen_lcd_hv070wsa_data,
+};
+
+static struct s3c_fb_pd_win origen_fb_win0 = {
+ .win_mode = {
+ .left_margin = 64,
+ .right_margin = 16,
+ .upper_margin = 64,
+ .lower_margin = 16,
+ .hsync_len = 48,
+ .vsync_len = 3,
+ .xres = 1024,
+ .yres = 600,
+ },
+ .max_bpp = 32,
+ .default_bpp = 24,
+};
+
+static struct s3c_fb_platdata origen_lcd_pdata __initdata = {
+ .win[0] = &origen_fb_win0,
+ .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
+ .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+ .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
+};
+
static struct platform_device *origen_devices[] __initdata = {
- &s3c_device_i2c0,
&s3c_device_hsmmc2,
&s3c_device_hsmmc0,
+ &s3c_device_i2c0,
&s3c_device_rtc,
&s3c_device_wdt,
&s5p_device_ehci,
@@ -540,10 +595,13 @@ static struct platform_device *origen_devices[] __initdata = {
&s5p_device_fimc1,
&s5p_device_fimc2,
&s5p_device_fimc3,
+ &s5p_device_fimd0,
&s5p_device_hdmi,
&s5p_device_i2c_hdmiphy,
&s5p_device_mixer,
+ &exynos4_device_pd[PD_LCD0],
&origen_device_gpiokeys,
+ &origen_lcd_hv070wsa,
};
/* LCD Backlight data */
@@ -590,7 +648,10 @@ static void __init origen_machine_init(void)
s5p_i2c_hdmiphy_set_platdata(NULL);
+ s5p_fimd0_set_platdata(&origen_lcd_pdata);
+
platform_add_devices(origen_devices, ARRAY_SIZE(origen_devices));
+ s5p_device_fimd0.dev.parent = &exynos4_device_pd[PD_LCD0].dev;
samsung_bl_set(&origen_bl_gpio_info, &origen_bl_data);
}
OpenPOWER on IntegriCloud