Merge tag 'boards' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / arm / mach-exynos / mach-nuri.c
index 021dc68e89b508a43d68f26ab5c46906bcd6ae73..5784b0abfe9d8edf09cfc09c6c375240cc05683a 100644 (file)
@@ -25,6 +25,7 @@
 #include <linux/mmc/host.h>
 #include <linux/fb.h>
 #include <linux/pwm_backlight.h>
+#include <drm/exynos_drm.h>
 
 #include <video/platform_lcd.h>
 #include <media/m5mols.h>
@@ -210,6 +211,29 @@ static struct platform_device nuri_gpio_keys = {
        },
 };
 
+#ifdef CONFIG_DRM_EXYNOS
+static struct exynos_drm_fimd_pdata drm_fimd_pdata = {
+       .panel = {
+               .timing = {
+                       .xres           = 1024,
+                       .yres           = 600,
+                       .hsync_len      = 40,
+                       .left_margin    = 79,
+                       .right_margin   = 200,
+                       .vsync_len      = 10,
+                       .upper_margin   = 10,
+                       .lower_margin   = 11,
+                       .refresh        = 60,
+               },
+       },
+       .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
+                         VIDCON0_CLKSEL_LCD,
+       .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+       .default_win    = 3,
+       .bpp            = 32,
+};
+
+#else
 /* Frame Buffer */
 static struct s3c_fb_pd_win nuri_fb_win0 = {
        .win_mode = {
@@ -236,6 +260,7 @@ static struct s3c_fb_platdata nuri_fb_pdata __initdata = {
        .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
        .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
 };
+#endif
 
 static void nuri_lcd_power_on(struct plat_lcd_data *pd, unsigned int power)
 {
@@ -1299,6 +1324,9 @@ static struct platform_device *nuri_devices[] __initdata = {
        &cam_vdda_fixed_rdev,
        &cam_8m_12v_fixed_rdev,
        &exynos4_bus_devfreq,
+#ifdef CONFIG_DRM_EXYNOS
+       &exynos_device_drm,
+#endif
 };
 
 static void __init nuri_map_io(void)
@@ -1331,7 +1359,12 @@ static void __init nuri_machine_init(void)
        i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
        s3c_i2c6_set_platdata(&nuri_i2c6_platdata);
 
+#ifdef CONFIG_DRM_EXYNOS
+       s5p_device_fimd0.dev.platform_data = &drm_fimd_pdata;
+       exynos4_fimd0_gpio_setup_24bpp();
+#else
        s5p_fimd0_set_platdata(&nuri_fb_pdata);
+#endif
 
        nuri_camera_init();