Merge tag 'fbdev-updates-for-3.5' of git://github.com/schandinat/linux-2.6
[pandora-kernel.git] / arch / arm / mach-exynos / mach-nuri.c
index d109aeb..656f8fc 100644 (file)
@@ -25,6 +25,8 @@
 #include <linux/mmc/host.h>
 #include <linux/fb.h>
 #include <linux/pwm_backlight.h>
+#include <linux/platform_data/s3c-hsotg.h>
+#include <drm/exynos_drm.h>
 
 #include <video/platform_lcd.h>
 #include <media/m5mols.h>
@@ -112,8 +114,8 @@ static struct s3c_sdhci_platdata nuri_hsmmc0_data __initdata = {
        .host_caps              = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
                                MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
                                MMC_CAP_ERASE),
+       .host_caps2             = MMC_CAP2_BROKEN_VOLTAGE,
        .cd_type                = S3C_SDHCI_CD_PERMANENT,
-       .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
 };
 
 static struct regulator_consumer_supply emmc_supplies[] = {
@@ -154,7 +156,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc2_data __initdata = {
        .ext_cd_gpio            = EXYNOS4_GPX3(3),      /* XEINT_27 */
        .ext_cd_gpio_invert     = 1,
        .cd_type                = S3C_SDHCI_CD_GPIO,
-       .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
 };
 
 /* WLAN */
@@ -163,7 +164,6 @@ static struct s3c_sdhci_platdata nuri_hsmmc3_data __initdata = {
        .host_caps              = MMC_CAP_4_BIT_DATA |
                                MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
        .cd_type                = S3C_SDHCI_CD_EXTERNAL,
-       .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
 };
 
 static void __init nuri_sdhci_init(void)
@@ -212,6 +212,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 = {
        .max_bpp        = 24,
@@ -242,6 +265,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)
 {
@@ -354,6 +378,7 @@ static struct regulator_consumer_supply __initdata max8997_ldo1_[] = {
        REGULATOR_SUPPLY("vdd", "s5p-adc"), /* Used by CPU's ADC drv */
 };
 static struct regulator_consumer_supply __initdata max8997_ldo3_[] = {
+       REGULATOR_SUPPLY("vusb_d", "s3c-hsotg"), /* USB */
        REGULATOR_SUPPLY("vdd11", "s5p-mipi-csis.0"), /* MIPI */
 };
 static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
@@ -369,7 +394,7 @@ static struct regulator_consumer_supply __initdata max8997_ldo7_[] = {
        REGULATOR_SUPPLY("dig_18", "0-001f"), /* HCD803 */
 };
 static struct regulator_consumer_supply __initdata max8997_ldo8_[] = {
-       REGULATOR_SUPPLY("vusb_d", NULL), /* Used by CPU */
+       REGULATOR_SUPPLY("vusb_a", "s3c-hsotg"), /* USB */
        REGULATOR_SUPPLY("vdac", NULL), /* Used by CPU */
 };
 static struct regulator_consumer_supply __initdata max8997_ldo11_[] = {
@@ -825,6 +850,7 @@ static struct regulator_init_data __initdata max8997_esafeout1_data = {
        .constraints    = {
                .name           = "SAFEOUT1",
                .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .always_on      = 1,
                .state_mem      = {
                        .disabled       = 1,
                },
@@ -1082,6 +1108,9 @@ static void __init nuri_ehci_init(void)
        s5p_ehci_set_platdata(pdata);
 }
 
+/* USB OTG */
+static struct s3c_hsotg_plat nuri_hsotg_pdata;
+
 /* CAMERA */
 static struct regulator_consumer_supply cam_vt_cam15_supply =
        REGULATOR_SUPPLY("vdd_core", "6-003c");
@@ -1294,6 +1323,7 @@ static struct platform_device *nuri_devices[] __initdata = {
        &s5p_device_mfc_l,
        &s5p_device_mfc_r,
        &s5p_device_fimc_md,
+       &s3c_device_usb_hsotg,
 
        /* NURI Devices */
        &nuri_gpio_keys,
@@ -1305,6 +1335,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)
@@ -1337,11 +1370,17 @@ 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();
 
        nuri_ehci_init();
+       s3c_hsotg_set_platdata(&nuri_hsotg_pdata);
 
        /* Last */
        platform_add_devices(nuri_devices, ARRAY_SIZE(nuri_devices));
@@ -1354,6 +1393,7 @@ MACHINE_START(NURI, "NURI")
        .map_io         = nuri_map_io,
        .handle_irq     = gic_handle_irq,
        .init_machine   = nuri_machine_init,
+       .init_late      = exynos_init_late,
        .timer          = &exynos4_timer,
        .reserve        = &nuri_reserve,
        .restart        = exynos4_restart,