aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos4
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2011-07-21 02:46:32 -0400
committerKukjin Kim <kgene.kim@samsung.com>2011-07-21 04:28:55 -0400
commit35ce909ee6dacb0cb74ad04fd04e869fd5f83a7f (patch)
treeeae4a6c69a06424d3a662907ce53ba3347265a13 /arch/arm/mach-exynos4
parente61b170139225ccb808eb98a047dd2a8d3af830d (diff)
ARM: EXYNOS4: Add support FIMD on SMDKC210
This patch adds support EXYNOS4 FIMD0 and LTE480WV LCD pannel on Samsung SMDKC210 board. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Jonghun Han <jonghun.han@samsung.com> Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-exynos4')
-rw-r--r--arch/arm/mach-exynos4/mach-smdkc210.c71
1 files changed, 71 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-exynos4/mach-smdkc210.c
index e645f7a955f0..31cfcd64a20a 100644
--- a/arch/arm/mach-exynos4/mach-smdkc210.c
+++ b/arch/arm/mach-exynos4/mach-smdkc210.c
@@ -9,7 +9,9 @@
9*/ 9*/
10 10
11#include <linux/serial_core.h> 11#include <linux/serial_core.h>
12#include <linux/delay.h>
12#include <linux/gpio.h> 13#include <linux/gpio.h>
14#include <linux/lcd.h>
13#include <linux/mmc/host.h> 15#include <linux/mmc/host.h>
14#include <linux/platform_device.h> 16#include <linux/platform_device.h>
15#include <linux/smsc911x.h> 17#include <linux/smsc911x.h>
@@ -19,11 +21,15 @@
19#include <asm/mach/arch.h> 21#include <asm/mach/arch.h>
20#include <asm/mach-types.h> 22#include <asm/mach-types.h>
21 23
24#include <video/platform_lcd.h>
25
22#include <plat/regs-serial.h> 26#include <plat/regs-serial.h>
23#include <plat/regs-srom.h> 27#include <plat/regs-srom.h>
28#include <plat/regs-fb-v4.h>
24#include <plat/exynos4.h> 29#include <plat/exynos4.h>
25#include <plat/cpu.h> 30#include <plat/cpu.h>
26#include <plat/devs.h> 31#include <plat/devs.h>
32#include <plat/fb.h>
27#include <plat/sdhci.h> 33#include <plat/sdhci.h>
28#include <plat/iic.h> 34#include <plat/iic.h>
29#include <plat/pd.h> 35#include <plat/pd.h>
@@ -111,6 +117,67 @@ static struct s3c_sdhci_platdata smdkc210_hsmmc3_pdata __initdata = {
111 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, 117 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
112}; 118};
113 119
120static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
121 unsigned int power)
122{
123 if (power) {
124#if !defined(CONFIG_BACKLIGHT_PWM)
125 gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_HIGH, "GPD0");
126 gpio_free(EXYNOS4_GPD0(1));
127#endif
128 /* fire nRESET on power up */
129 gpio_request(EXYNOS4_GPX0(6), "GPX0");
130
131 gpio_direction_output(EXYNOS4_GPX0(6), 1);
132 mdelay(100);
133
134 gpio_set_value(EXYNOS4_GPX0(6), 0);
135 mdelay(10);
136
137 gpio_set_value(EXYNOS4_GPX0(6), 1);
138 mdelay(10);
139
140 gpio_free(EXYNOS4_GPX0(6));
141 } else {
142#if !defined(CONFIG_BACKLIGHT_PWM)
143 gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
144 gpio_free(EXYNOS4_GPD0(1));
145#endif
146 }
147}
148
149static struct plat_lcd_data smdkc210_lcd_lte480wv_data = {
150 .set_power = lcd_lte480wv_set_power,
151};
152
153static struct platform_device smdkc210_lcd_lte480wv = {
154 .name = "platform-lcd",
155 .dev.parent = &s5p_device_fimd0.dev,
156 .dev.platform_data = &smdkc210_lcd_lte480wv_data,
157};
158
159static struct s3c_fb_pd_win smdkc210_fb_win0 = {
160 .win_mode = {
161 .left_margin = 13,
162 .right_margin = 8,
163 .upper_margin = 7,
164 .lower_margin = 5,
165 .hsync_len = 3,
166 .vsync_len = 1,
167 .xres = 800,
168 .yres = 480,
169 },
170 .max_bpp = 32,
171 .default_bpp = 24,
172};
173
174static struct s3c_fb_platdata smdkc210_lcd0_pdata __initdata = {
175 .win[0] = &smdkc210_fb_win0,
176 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
177 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
178 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
179};
180
114static struct resource smdkc210_smsc911x_resources[] = { 181static struct resource smdkc210_smsc911x_resources[] = {
115 [0] = { 182 [0] = {
116 .start = EXYNOS4_PA_SROM_BANK(1), 183 .start = EXYNOS4_PA_SROM_BANK(1),
@@ -165,6 +232,8 @@ static struct platform_device *smdkc210_devices[] __initdata = {
165 &exynos4_device_pd[PD_GPS], 232 &exynos4_device_pd[PD_GPS],
166 &exynos4_device_sysmmu, 233 &exynos4_device_sysmmu,
167 &samsung_asoc_dma, 234 &samsung_asoc_dma,
235 &s5p_device_fimd0,
236 &smdkc210_lcd_lte480wv,
168 &smdkc210_smsc911x, 237 &smdkc210_smsc911x,
169}; 238};
170 239
@@ -210,6 +279,8 @@ static void __init smdkc210_machine_init(void)
210 s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata); 279 s3c_sdhci2_set_platdata(&smdkc210_hsmmc2_pdata);
211 s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata); 280 s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
212 281
282 s5p_fimd0_set_platdata(&smdkc210_lcd0_pdata);
283
213 platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices)); 284 platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
214} 285}
215 286