aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos4/mach-smdkc210.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 20:41:04 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-07-26 20:41:04 -0400
commit69f1d1a6acbaa7d83ef3f4ee26209c58cd000204 (patch)
tree12be981f8a123b8361edd64b84fd72f339a9655d /arch/arm/mach-exynos4/mach-smdkc210.c
parent2d86a3f04e345b03d5e429bfe14985ce26bff4dc (diff)
parent1e09939bad24df95ddeeeca4fbec64fa94b66def (diff)
Merge branch 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc
* 'next/devel' of ssh://master.kernel.org/pub/scm/linux/kernel/git/arm/linux-arm-soc: (128 commits) ARM: S5P64X0: External Interrupt Support ARM: EXYNOS4: Enable MFC on Samsung NURI ARM: EXYNOS4: Enable MFC on universal_c210 ARM: S5PV210: Enable MFC on Goni ARM: S5P: Add support for MFC device ARM: EXYNOS4: Add support FIMD on SMDKC210 ARM: EXYNOS4: Add platform device and helper functions for FIMD ARM: EXYNOS4: Add resource definition for FIMD ARM: EXYNOS4: Change devname for FIMD clkdev ARM: SAMSUNG: Add IRQ_I2S0 definition ARM: SAMSUNG: Add platform device for idma ARM: EXYNOS4: Add more registers to be saved and restored for PM ARM: EXYNOS4: Add more register addresses of CMU ARM: EXYNOS4: Add platform device for dwmci driver ARM: EXYNOS4: configure rtc-s3c on NURI ARM: EXYNOS4: configure MAX8903 secondary charger on NURI ARM: EXYNOS4: configure ADC on NURI ARM: EXYNOS4: configure MAX17042 fuel gauge on NURI ARM: EXYNOS4: configure regulators and PMIC(MAX8997) on NURI ARM: EXYNOS4: Increase NR_IRQS for devices with more IRQs ... Fix up tons of silly conflicts: - arch/arm/mach-davinci/include/mach/psc.h - arch/arm/mach-exynos4/Kconfig - arch/arm/mach-exynos4/mach-smdkc210.c - arch/arm/mach-exynos4/pm.c - arch/arm/mach-imx/mm-imx1.c - arch/arm/mach-imx/mm-imx21.c - arch/arm/mach-imx/mm-imx25.c - arch/arm/mach-imx/mm-imx27.c - arch/arm/mach-imx/mm-imx31.c - arch/arm/mach-imx/mm-imx35.c - arch/arm/mach-mx5/mm.c - arch/arm/mach-s5pv210/mach-goni.c - arch/arm/mm/Kconfig
Diffstat (limited to 'arch/arm/mach-exynos4/mach-smdkc210.c')
-rw-r--r--arch/arm/mach-exynos4/mach-smdkc210.c70
1 files changed, 70 insertions, 0 deletions
diff --git a/arch/arm/mach-exynos4/mach-smdkc210.c b/arch/arm/mach-exynos4/mach-smdkc210.c
index f606ea75bf43..a7c65e05c1eb 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>
@@ -20,11 +22,15 @@
20#include <asm/mach/arch.h> 22#include <asm/mach/arch.h>
21#include <asm/mach-types.h> 23#include <asm/mach-types.h>
22 24
25#include <video/platform_lcd.h>
26
23#include <plat/regs-serial.h> 27#include <plat/regs-serial.h>
24#include <plat/regs-srom.h> 28#include <plat/regs-srom.h>
29#include <plat/regs-fb-v4.h>
25#include <plat/exynos4.h> 30#include <plat/exynos4.h>
26#include <plat/cpu.h> 31#include <plat/cpu.h>
27#include <plat/devs.h> 32#include <plat/devs.h>
33#include <plat/fb.h>
28#include <plat/sdhci.h> 34#include <plat/sdhci.h>
29#include <plat/iic.h> 35#include <plat/iic.h>
30#include <plat/pd.h> 36#include <plat/pd.h>
@@ -114,6 +120,67 @@ static struct s3c_sdhci_platdata smdkc210_hsmmc3_pdata __initdata = {
114 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL, 120 .clk_type = S3C_SDHCI_CLK_DIV_EXTERNAL,
115}; 121};
116 122
123static void lcd_lte480wv_set_power(struct plat_lcd_data *pd,
124 unsigned int power)
125{
126 if (power) {
127#if !defined(CONFIG_BACKLIGHT_PWM)
128 gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_HIGH, "GPD0");
129 gpio_free(EXYNOS4_GPD0(1));
130#endif
131 /* fire nRESET on power up */
132 gpio_request(EXYNOS4_GPX0(6), "GPX0");
133
134 gpio_direction_output(EXYNOS4_GPX0(6), 1);
135 mdelay(100);
136
137 gpio_set_value(EXYNOS4_GPX0(6), 0);
138 mdelay(10);
139
140 gpio_set_value(EXYNOS4_GPX0(6), 1);
141 mdelay(10);
142
143 gpio_free(EXYNOS4_GPX0(6));
144 } else {
145#if !defined(CONFIG_BACKLIGHT_PWM)
146 gpio_request_one(EXYNOS4_GPD0(1), GPIOF_OUT_INIT_LOW, "GPD0");
147 gpio_free(EXYNOS4_GPD0(1));
148#endif
149 }
150}
151
152static struct plat_lcd_data smdkc210_lcd_lte480wv_data = {
153 .set_power = lcd_lte480wv_set_power,
154};
155
156static struct platform_device smdkc210_lcd_lte480wv = {
157 .name = "platform-lcd",
158 .dev.parent = &s5p_device_fimd0.dev,
159 .dev.platform_data = &smdkc210_lcd_lte480wv_data,
160};
161
162static struct s3c_fb_pd_win smdkc210_fb_win0 = {
163 .win_mode = {
164 .left_margin = 13,
165 .right_margin = 8,
166 .upper_margin = 7,
167 .lower_margin = 5,
168 .hsync_len = 3,
169 .vsync_len = 1,
170 .xres = 800,
171 .yres = 480,
172 },
173 .max_bpp = 32,
174 .default_bpp = 24,
175};
176
177static struct s3c_fb_platdata smdkc210_lcd0_pdata __initdata = {
178 .win[0] = &smdkc210_fb_win0,
179 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
180 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
181 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
182};
183
117static struct resource smdkc210_smsc911x_resources[] = { 184static struct resource smdkc210_smsc911x_resources[] = {
118 [0] = { 185 [0] = {
119 .start = EXYNOS4_PA_SROM_BANK(1), 186 .start = EXYNOS4_PA_SROM_BANK(1),
@@ -168,6 +235,8 @@ static struct platform_device *smdkc210_devices[] __initdata = {
168 &exynos4_device_pd[PD_GPS], 235 &exynos4_device_pd[PD_GPS],
169 &exynos4_device_sysmmu, 236 &exynos4_device_sysmmu,
170 &samsung_asoc_dma, 237 &samsung_asoc_dma,
238 &s5p_device_fimd0,
239 &smdkc210_lcd_lte480wv,
171 &smdkc210_smsc911x, 240 &smdkc210_smsc911x,
172}; 241};
173 242
@@ -225,6 +294,7 @@ static void __init smdkc210_machine_init(void)
225 s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata); 294 s3c_sdhci3_set_platdata(&smdkc210_hsmmc3_pdata);
226 295
227 samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data); 296 samsung_bl_set(&smdkc210_bl_gpio_info, &smdkc210_bl_data);
297 s5p_fimd0_set_platdata(&smdkc210_lcd0_pdata);
228 298
229 platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices)); 299 platform_add_devices(smdkc210_devices, ARRAY_SIZE(smdkc210_devices));
230} 300}