aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos4/mach-smdkv310.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-exynos4/mach-smdkv310.c')
-rw-r--r--arch/arm/mach-exynos4/mach-smdkv310.c78
1 files changed, 78 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/mach-smdkv310.c b/arch/arm/mach-exynos4/mach-smdkv310.c
index ea414955686..a16eb569a3e 100644
--- a/arch/arm/mach-exynos4/mach-smdkv310.c
+++ b/arch/arm/mach-exynos4/mach-smdkv310.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>
@@ -21,11 +23,14 @@
21#include <asm/mach/arch.h> 23#include <asm/mach/arch.h>
22#include <asm/mach-types.h> 24#include <asm/mach-types.h>
23 25
26#include <video/platform_lcd.h>
24#include <plat/regs-serial.h> 27#include <plat/regs-serial.h>
25#include <plat/regs-srom.h> 28#include <plat/regs-srom.h>
29#include <plat/regs-fb-v4.h>
26#include <plat/exynos4.h> 30#include <plat/exynos4.h>
27#include <plat/cpu.h> 31#include <plat/cpu.h>
28#include <plat/devs.h> 32#include <plat/devs.h>
33#include <plat/fb.h>
29#include <plat/keypad.h> 34#include <plat/keypad.h>
30#include <plat/sdhci.h> 35#include <plat/sdhci.h>
31#include <plat/iic.h> 36#include <plat/iic.h>
@@ -112,6 +117,67 @@ static struct s3c_sdhci_platdata smdkv310_hsmmc3_pdata __initdata = {
112 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, 117 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
113}; 118};
114 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 smdkv310_lcd_lte480wv_data = {
150 .set_power = lcd_lte480wv_set_power,
151};
152
153static struct platform_device smdkv310_lcd_lte480wv = {
154 .name = "platform-lcd",
155 .dev.parent = &s5p_device_fimd0.dev,
156 .dev.platform_data = &smdkv310_lcd_lte480wv_data,
157};
158
159static struct s3c_fb_pd_win smdkv310_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 smdkv310_lcd0_pdata __initdata = {
175 .win[0] = &smdkv310_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
115static struct resource smdkv310_smsc911x_resources[] = { 181static struct resource smdkv310_smsc911x_resources[] = {
116 [0] = { 182 [0] = {
117 .start = EXYNOS4_PA_SROM_BANK(1), 183 .start = EXYNOS4_PA_SROM_BANK(1),
@@ -188,6 +254,8 @@ static struct platform_device *smdkv310_devices[] __initdata = {
188 &exynos4_device_sysmmu, 254 &exynos4_device_sysmmu,
189 &samsung_asoc_dma, 255 &samsung_asoc_dma,
190 &samsung_asoc_idma, 256 &samsung_asoc_idma,
257 &s5p_device_fimd0,
258 &smdkv310_lcd_lte480wv,
191 &smdkv310_smsc911x, 259 &smdkv310_smsc911x,
192 &exynos4_device_ahci, 260 &exynos4_device_ahci,
193}; 261};
@@ -248,6 +316,7 @@ static void __init smdkv310_machine_init(void)
248 samsung_keypad_set_platdata(&smdkv310_keypad_data); 316 samsung_keypad_set_platdata(&smdkv310_keypad_data);
249 317
250 samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data); 318 samsung_bl_set(&smdkv310_bl_gpio_info, &smdkv310_bl_data);
319 s5p_fimd0_set_platdata(&smdkv310_lcd0_pdata);
251 320
252 platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices)); 321 platform_add_devices(smdkv310_devices, ARRAY_SIZE(smdkv310_devices));
253} 322}
@@ -261,3 +330,12 @@ MACHINE_START(SMDKV310, "SMDKV310")
261 .init_machine = smdkv310_machine_init, 330 .init_machine = smdkv310_machine_init,
262 .timer = &exynos4_timer, 331 .timer = &exynos4_timer,
263MACHINE_END 332MACHINE_END
333
334MACHINE_START(SMDKC210, "SMDKC210")
335 /* Maintainer: Kukjin Kim <kgene.kim@samsung.com> */
336 .boot_params = S5P_PA_SDRAM + 0x100,
337 .init_irq = exynos4_init_irq,
338 .map_io = smdkv310_map_io,
339 .init_machine = smdkv310_machine_init,
340 .timer = &exynos4_timer,
341MACHINE_END