aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-exynos/mach-smdk4x12.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-exynos/mach-smdk4x12.c')
-rw-r--r--arch/arm/mach-exynos/mach-smdk4x12.c51
1 files changed, 47 insertions, 4 deletions
diff --git a/arch/arm/mach-exynos/mach-smdk4x12.c b/arch/arm/mach-exynos/mach-smdk4x12.c
index fb09c70e195a..2623f3bde3f9 100644
--- a/arch/arm/mach-exynos/mach-smdk4x12.c
+++ b/arch/arm/mach-exynos/mach-smdk4x12.c
@@ -13,12 +13,14 @@
13#include <linux/i2c.h> 13#include <linux/i2c.h>
14#include <linux/input.h> 14#include <linux/input.h>
15#include <linux/io.h> 15#include <linux/io.h>
16#include <linux/lcd.h>
16#include <linux/mfd/max8997.h> 17#include <linux/mfd/max8997.h>
17#include <linux/mmc/host.h> 18#include <linux/mmc/host.h>
18#include <linux/platform_device.h> 19#include <linux/platform_device.h>
19#include <linux/pwm_backlight.h> 20#include <linux/pwm_backlight.h>
20#include <linux/regulator/machine.h> 21#include <linux/regulator/machine.h>
21#include <linux/serial_core.h> 22#include <linux/serial_core.h>
23#include <linux/platform_data/s3c-hsotg.h>
22 24
23#include <asm/mach/arch.h> 25#include <asm/mach/arch.h>
24#include <asm/hardware/gic.h> 26#include <asm/hardware/gic.h>
@@ -28,10 +30,12 @@
28#include <plat/clock.h> 30#include <plat/clock.h>
29#include <plat/cpu.h> 31#include <plat/cpu.h>
30#include <plat/devs.h> 32#include <plat/devs.h>
33#include <plat/fb.h>
31#include <plat/gpio-cfg.h> 34#include <plat/gpio-cfg.h>
32#include <plat/iic.h> 35#include <plat/iic.h>
33#include <plat/keypad.h> 36#include <plat/keypad.h>
34#include <plat/mfc.h> 37#include <plat/mfc.h>
38#include <plat/regs-fb.h>
35#include <plat/regs-serial.h> 39#include <plat/regs-serial.h>
36#include <plat/sdhci.h> 40#include <plat/sdhci.h>
37 41
@@ -219,8 +223,10 @@ static struct platform_pwm_backlight_data smdk4x12_bl_data = {
219 223
220static uint32_t smdk4x12_keymap[] __initdata = { 224static uint32_t smdk4x12_keymap[] __initdata = {
221 /* KEY(row, col, keycode) */ 225 /* KEY(row, col, keycode) */
222 KEY(1, 0, KEY_D), KEY(1, 1, KEY_A), KEY(1, 2, KEY_B), 226 KEY(1, 3, KEY_1), KEY(1, 4, KEY_2), KEY(1, 5, KEY_3),
223 KEY(1, 3, KEY_E), KEY(1, 4, KEY_C) 227 KEY(1, 6, KEY_4), KEY(1, 7, KEY_5),
228 KEY(2, 5, KEY_D), KEY(2, 6, KEY_A), KEY(2, 7, KEY_B),
229 KEY(0, 7, KEY_E), KEY(0, 5, KEY_C)
224}; 230};
225 231
226static struct matrix_keymap_data smdk4x12_keymap_data __initdata = { 232static struct matrix_keymap_data smdk4x12_keymap_data __initdata = {
@@ -230,10 +236,41 @@ static struct matrix_keymap_data smdk4x12_keymap_data __initdata = {
230 236
231static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = { 237static struct samsung_keypad_platdata smdk4x12_keypad_data __initdata = {
232 .keymap_data = &smdk4x12_keymap_data, 238 .keymap_data = &smdk4x12_keymap_data,
233 .rows = 2, 239 .rows = 3,
234 .cols = 5, 240 .cols = 8,
235}; 241};
236 242
243static struct s3c_fb_pd_win smdk4x12_fb_win0 = {
244 .xres = 480,
245 .yres = 800,
246 .virtual_x = 480,
247 .virtual_y = 800 * 2,
248 .max_bpp = 32,
249 .default_bpp = 24,
250};
251
252static struct fb_videomode smdk4x12_lcd_timing = {
253 .left_margin = 8,
254 .right_margin = 8,
255 .upper_margin = 6,
256 .lower_margin = 6,
257 .hsync_len = 6,
258 .vsync_len = 4,
259 .xres = 480,
260 .yres = 800,
261};
262
263static struct s3c_fb_platdata smdk4x12_lcd_pdata __initdata = {
264 .win[0] = &smdk4x12_fb_win0,
265 .vtiming = &smdk4x12_lcd_timing,
266 .vidcon0 = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB,
267 .vidcon1 = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
268 .setup_gpio = exynos4_fimd0_gpio_setup_24bpp,
269};
270
271/* USB OTG */
272static struct s3c_hsotg_plat smdk4x12_hsotg_pdata;
273
237static struct platform_device *smdk4x12_devices[] __initdata = { 274static struct platform_device *smdk4x12_devices[] __initdata = {
238 &s3c_device_hsmmc2, 275 &s3c_device_hsmmc2,
239 &s3c_device_hsmmc3, 276 &s3c_device_hsmmc3,
@@ -242,12 +279,14 @@ static struct platform_device *smdk4x12_devices[] __initdata = {
242 &s3c_device_i2c3, 279 &s3c_device_i2c3,
243 &s3c_device_i2c7, 280 &s3c_device_i2c7,
244 &s3c_device_rtc, 281 &s3c_device_rtc,
282 &s3c_device_usb_hsotg,
245 &s3c_device_wdt, 283 &s3c_device_wdt,
246 &s5p_device_fimc0, 284 &s5p_device_fimc0,
247 &s5p_device_fimc1, 285 &s5p_device_fimc1,
248 &s5p_device_fimc2, 286 &s5p_device_fimc2,
249 &s5p_device_fimc3, 287 &s5p_device_fimc3,
250 &s5p_device_fimc_md, 288 &s5p_device_fimc_md,
289 &s5p_device_fimd0,
251 &s5p_device_mfc, 290 &s5p_device_mfc,
252 &s5p_device_mfc_l, 291 &s5p_device_mfc_l,
253 &s5p_device_mfc_r, 292 &s5p_device_mfc_r,
@@ -293,6 +332,10 @@ static void __init smdk4x12_machine_init(void)
293 s3c_sdhci2_set_platdata(&smdk4x12_hsmmc2_pdata); 332 s3c_sdhci2_set_platdata(&smdk4x12_hsmmc2_pdata);
294 s3c_sdhci3_set_platdata(&smdk4x12_hsmmc3_pdata); 333 s3c_sdhci3_set_platdata(&smdk4x12_hsmmc3_pdata);
295 334
335 s3c_hsotg_set_platdata(&smdk4x12_hsotg_pdata);
336
337 s5p_fimd0_set_platdata(&smdk4x12_lcd_pdata);
338
296 platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices)); 339 platform_add_devices(smdk4x12_devices, ARRAY_SIZE(smdk4x12_devices));
297} 340}
298 341