*: Added Tizen board with audio support
authors.vorobiov <s.vorobiov@samsung.ru>
Mon, 23 Apr 2012 07:07:48 +0000 (11:07 +0400)
committerEvgeny Voevodin <e.voevodin@samsung.com>
Fri, 14 Sep 2012 05:42:17 +0000 (09:42 +0400)
arch/arm/configs/Tizen_defconfig
arch/arm/mach-exynos/Kconfig
arch/arm/mach-exynos/Makefile
arch/arm/mach-exynos/mach-tizen.c [new file with mode: 0644]
arch/arm/tools/mach-types
sound/soc/samsung/Kconfig
sound/soc/samsung/smdk_wm8994.c

index 125e8327f09618c278eef416dd867a20d1e391d0..e6441a3914dc05dbbfa07a37f1ae62e239baf4d1 100644 (file)
@@ -1,6 +1,6 @@
 #
 # Automatically generated file; DO NOT EDIT.
-# Linux/arm 3.4.0-rc2 Kernel Configuration
+# Linux/arm 3.4.0-rc4 Kernel Configuration
 #
 CONFIG_ARM=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
@@ -389,6 +389,7 @@ CONFIG_MACH_SMDKV310=y
 CONFIG_MACH_ARMLEX4210=y
 CONFIG_MACH_UNIVERSAL_C210=y
 CONFIG_MACH_NURI=y
+CONFIG_MACH_TIZEN=y
 CONFIG_MACH_ORIGEN=y
 
 #
@@ -405,7 +406,6 @@ CONFIG_MACH_SMDK4412=y
 # Flattened Device Tree based board for EXYNOS SoCs
 #
 # CONFIG_MACH_EXYNOS4_DT is not set
-# CONFIG_MACH_EXYNOS5_DT is not set
 
 #
 # Configuration for HSMMC 8-bit bus width
@@ -733,6 +733,9 @@ CONFIG_EXTRA_FIRMWARE=""
 # CONFIG_DEBUG_DEVRES is not set
 # CONFIG_SYS_HYPERVISOR is not set
 # CONFIG_GENERIC_CPU_DEVICES is not set
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_IRQ=y
 CONFIG_DMA_SHARED_BUFFER=y
 # CONFIG_CONNECTOR is not set
 # CONFIG_MTD is not set
@@ -1125,6 +1128,7 @@ CONFIG_GPIOLIB=y
 # CONFIG_GPIO_MAX732X is not set
 # CONFIG_GPIO_PCF857X is not set
 # CONFIG_GPIO_SX150X is not set
+# CONFIG_GPIO_WM8994 is not set
 # CONFIG_GPIO_ADP5588 is not set
 
 #
@@ -1164,7 +1168,7 @@ CONFIG_BCMA_POSSIBLE=y
 #
 # Multifunction device drivers
 #
-# CONFIG_MFD_CORE is not set
+CONFIG_MFD_CORE=y
 # CONFIG_MFD_88PM860X is not set
 # CONFIG_MFD_SM501 is not set
 # CONFIG_MFD_ASIC3 is not set
@@ -1179,6 +1183,7 @@ CONFIG_BCMA_POSSIBLE=y
 # CONFIG_MFD_TPS65910 is not set
 # CONFIG_MFD_TPS65912_I2C is not set
 # CONFIG_TWL4030_CORE is not set
+# CONFIG_TWL6040_CORE is not set
 # CONFIG_MFD_STMPE is not set
 # CONFIG_MFD_TC3589X is not set
 # CONFIG_MFD_TMIO is not set
@@ -1195,7 +1200,7 @@ CONFIG_BCMA_POSSIBLE=y
 # CONFIG_MFD_WM8400 is not set
 # CONFIG_MFD_WM831X_I2C is not set
 # CONFIG_MFD_WM8350_I2C is not set
-# CONFIG_MFD_WM8994 is not set
+CONFIG_MFD_WM8994=y
 # CONFIG_MFD_PCF50633 is not set
 # CONFIG_ABX500_CORE is not set
 # CONFIG_MFD_WL1273_CORE is not set
@@ -1248,6 +1253,7 @@ CONFIG_FB_CFB_IMAGEBLIT=y
 #
 # CONFIG_FB_ARMCLCD is not set
 # CONFIG_FB_S1D13XXX is not set
+# CONFIG_FB_TMIO is not set
 CONFIG_FB_S3C=y
 # CONFIG_FB_S3C_DEBUG_REGWRITE is not set
 # CONFIG_FB_VIRTUAL is not set
@@ -1270,12 +1276,54 @@ CONFIG_LOGO=y
 CONFIG_LOGO_LINUX_MONO=y
 CONFIG_LOGO_LINUX_VGA16=y
 CONFIG_LOGO_LINUX_CLUT224=y
-# CONFIG_SOUND is not set
+CONFIG_SOUND=y
+# CONFIG_SOUND_OSS_CORE is not set
+CONFIG_SND=y
+CONFIG_SND_TIMER=y
+CONFIG_SND_PCM=y
+CONFIG_SND_JACK=y
+CONFIG_SND_SEQUENCER=y
+# CONFIG_SND_SEQ_DUMMY is not set
+# CONFIG_SND_MIXER_OSS is not set
+# CONFIG_SND_PCM_OSS is not set
+# CONFIG_SND_SEQUENCER_OSS is not set
+# CONFIG_SND_HRTIMER is not set
+# CONFIG_SND_DYNAMIC_MINORS is not set
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_VERBOSE_PROCFS=y
+# CONFIG_SND_VERBOSE_PRINTK is not set
+# CONFIG_SND_DEBUG is not set
+# CONFIG_SND_RAWMIDI_SEQ is not set
+# CONFIG_SND_OPL3_LIB_SEQ is not set
+# CONFIG_SND_OPL4_LIB_SEQ is not set
+# CONFIG_SND_SBAWE_SEQ is not set
+# CONFIG_SND_EMU10K1_SEQ is not set
+CONFIG_SND_DRIVERS=y
+# CONFIG_SND_DUMMY is not set
+# CONFIG_SND_ALOOP is not set
+# CONFIG_SND_VIRMIDI is not set
+# CONFIG_SND_MTPAV is not set
+# CONFIG_SND_SERIAL_U16550 is not set
+# CONFIG_SND_MPU401 is not set
+CONFIG_SND_ARM=y
+# CONFIG_SND_ARMAACI is not set
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_SAMSUNG=y
+CONFIG_SND_SAMSUNG_I2S=y
+CONFIG_SND_SOC_SAMSUNG_SMDK_WM8994=y
+# CONFIG_SND_SOC_SAMSUNG_SMDK_WM9713 is not set
+# CONFIG_SND_SOC_SAMSUNG_SMDK_SPDIF is not set
+# CONFIG_SND_SOC_SMDK_WM8994_PCM is not set
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_ALL_CODECS is not set
+CONFIG_SND_SOC_WM_HUBS=y
+CONFIG_SND_SOC_WM8994=y
+# CONFIG_SOUND_PRIME is not set
 # CONFIG_HID_SUPPORT is not set
-# CONFIG_USB_SUPPORT is not set
 CONFIG_USB_ARCH_HAS_OHCI=y
 CONFIG_USB_ARCH_HAS_EHCI=y
 # CONFIG_USB_ARCH_HAS_XHCI is not set
+# CONFIG_USB_SUPPORT is not set
 CONFIG_MMC=y
 # CONFIG_MMC_DEBUG is not set
 # CONFIG_MMC_UNSAFE_RESUME is not set
@@ -1732,6 +1780,7 @@ CONFIG_CRC32_SLICEBY8=y
 # CONFIG_LIBCRC32C is not set
 # CONFIG_CRC8 is not set
 CONFIG_ZLIB_INFLATE=y
+CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_XZ_DEC=y
 CONFIG_XZ_DEC_X86=y
index b8df521fb68ec83c077681b2fc8cf155de55758f..d97fecc1dfadf8bb2f176832aba90aea01bbca88 100644 (file)
@@ -305,6 +305,45 @@ config MACH_NURI
        help
          Machine support for Samsung Mobile NURI Board.
 
+config MACH_TIZEN
+       bool "Tizen Board"
+       select CPU_EXYNOS4210
+       select S5P_GPIO_INT
+       select S3C_DEV_WDT
+       select S3C_DEV_RTC
+       select S5P_DEV_FIMD0
+       select S3C_DEV_HSMMC
+       select S3C_DEV_HSMMC2
+       select S3C_DEV_HSMMC3
+       select S3C_DEV_I2C1
+       select S3C_DEV_I2C3
+       select S3C_DEV_I2C5
+       select S3C_DEV_I2C6
+       select S5P_DEV_CSIS0
+       select S5P_DEV_JPEG
+       select S5P_DEV_FIMC0
+       select S5P_DEV_FIMC1
+       select S5P_DEV_FIMC2
+       select S5P_DEV_FIMC3
+       select S5P_DEV_G2D
+       select S5P_DEV_MFC
+       select S5P_DEV_USB_EHCI
+       select S5P_SETUP_MIPIPHY
+       select EXYNOS4_DEV_DMA
+       select EXYNOS4_SETUP_FIMC
+       select EXYNOS4_SETUP_FIMD0
+       select EXYNOS4_SETUP_I2C1
+       select EXYNOS4_SETUP_I2C3
+       select EXYNOS4_SETUP_I2C5
+       select EXYNOS4_SETUP_I2C6
+       select EXYNOS4_SETUP_SDHCI
+       select EXYNOS4_SETUP_USB_PHY
+       select S5P_SETUP_MIPIPHY
+       select SAMSUNG_DEV_PWM
+       select SAMSUNG_DEV_ADC
+       help
+         Machine support for Samsung Tizen Board.
+
 config MACH_ORIGEN
        bool "ORIGEN"
        select CPU_EXYNOS4210
index 8631840d1b5e85ce8d959430bcdbdeadb339afbb..b6ccaae4e802a9c20aa5ee09a7a6a1963bd06b20 100644 (file)
@@ -37,6 +37,7 @@ obj-$(CONFIG_MACH_SMDKV310)           += mach-smdkv310.o
 obj-$(CONFIG_MACH_ARMLEX4210)          += mach-armlex4210.o
 obj-$(CONFIG_MACH_UNIVERSAL_C210)      += mach-universal_c210.o
 obj-$(CONFIG_MACH_NURI)                        += mach-nuri.o
+obj-$(CONFIG_MACH_TIZEN)               += mach-tizen.o
 obj-$(CONFIG_MACH_ORIGEN)              += mach-origen.o
 
 obj-$(CONFIG_MACH_SMDK4212)            += mach-smdk4x12.o
diff --git a/arch/arm/mach-exynos/mach-tizen.c b/arch/arm/mach-exynos/mach-tizen.c
new file mode 100644 (file)
index 0000000..c949921
--- /dev/null
@@ -0,0 +1,1383 @@
+/*
+ * linux/arch/arm/mach-exynos4/mach-tizen.c
+ *
+ * Copyright (c) 2012 Samsung Electronics Co., Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#include <linux/platform_device.h>
+#include <linux/serial_core.h>
+#include <linux/input.h>
+#include <linux/i2c.h>
+#include <linux/i2c/atmel_mxt_ts.h>
+#include <linux/i2c-gpio.h>
+#include <linux/gpio_keys.h>
+#include <linux/gpio.h>
+#include <linux/power/max8903_charger.h>
+#include <linux/power/max17042_battery.h>
+#include <linux/regulator/machine.h>
+#include <linux/regulator/fixed.h>
+#include <linux/mfd/max8997.h>
+#include <linux/mfd/max8997-private.h>
+#include <linux/mmc/host.h>
+#include <linux/fb.h>
+#include <linux/pwm_backlight.h>
+#include <linux/mfd/wm8994/pdata.h>
+#include <linux/regulator/machine.h>
+
+#include <video/platform_lcd.h>
+#include <media/m5mols.h>
+#include <media/s5k6aa.h>
+#include <media/s5p_fimc.h>
+#include <media/v4l2-mediabus.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+#include <asm/mach-types.h>
+
+#include <plat/adc.h>
+#include <plat/regs-fb-v4.h>
+#include <plat/regs-serial.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/fb.h>
+#include <plat/sdhci.h>
+#include <plat/ehci.h>
+#include <plat/clock.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+#include <plat/mfc.h>
+#include <plat/pd.h>
+#include <plat/fimc-core.h>
+#include <plat/camport.h>
+#include <plat/mipi_csis.h>
+
+#include <mach/map.h>
+
+#include "common.h"
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define TIZEN_UCON_DEFAULT     (S3C2410_UCON_TXILEVEL |        \
+                                S3C2410_UCON_RXILEVEL |        \
+                                S3C2410_UCON_TXIRQMODE |       \
+                                S3C2410_UCON_RXIRQMODE |       \
+                                S3C2410_UCON_RXFIFO_TOI |      \
+                                S3C2443_UCON_RXERR_IRQEN)
+
+#define TIZEN_ULCON_DEFAULT    S3C2410_LCON_CS8
+
+#define TIZEN_UFCON_DEFAULT    (S3C2410_UFCON_FIFOMODE |       \
+                                S5PV210_UFCON_TXTRIG256 |      \
+                                S5PV210_UFCON_RXTRIG256)
+
+enum fixed_regulator_id {
+       FIXED_REG_ID_MMC = 0,
+       FIXED_REG_ID_MAX8903,
+       FIXED_REG_ID_CAM_A28V,
+       FIXED_REG_ID_CAM_12V,
+       FIXED_REG_ID_CAM_VT_15V,
+};
+
+static struct s3c2410_uartcfg tizen_uartcfgs[] __initdata = {
+       {
+               .hwport         = 0,
+               .ucon           = TIZEN_UCON_DEFAULT,
+               .ulcon          = TIZEN_ULCON_DEFAULT,
+               .ufcon          = TIZEN_UFCON_DEFAULT,
+       },
+       {
+               .hwport         = 1,
+               .ucon           = TIZEN_UCON_DEFAULT,
+               .ulcon          = TIZEN_ULCON_DEFAULT,
+               .ufcon          = TIZEN_UFCON_DEFAULT,
+       },
+       {
+               .hwport         = 2,
+               .ucon           = TIZEN_UCON_DEFAULT,
+               .ulcon          = TIZEN_ULCON_DEFAULT,
+               .ufcon          = TIZEN_UFCON_DEFAULT,
+       },
+       {
+               .hwport         = 3,
+               .ucon           = TIZEN_UCON_DEFAULT,
+               .ulcon          = TIZEN_ULCON_DEFAULT,
+               .ufcon          = TIZEN_UFCON_DEFAULT,
+       },
+};
+
+/* eMMC */
+static struct s3c_sdhci_platdata tizen_hsmmc0_data __initdata = {
+       .max_width              = 8,
+       .host_caps              = (MMC_CAP_8_BIT_DATA | MMC_CAP_4_BIT_DATA |
+                               MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED |
+                               MMC_CAP_ERASE),
+       .cd_type                = S3C_SDHCI_CD_PERMANENT,
+       .clk_type               = S3C_SDHCI_CLK_DIV_EXTERNAL,
+};
+
+static struct regulator_consumer_supply emmc_supplies[] = {
+       REGULATOR_SUPPLY("vmmc", "exynos4-sdhci.0"),
+       REGULATOR_SUPPLY("vmmc", "dw_mmc"),
+};
+
+static struct regulator_init_data emmc_fixed_voltage_init_data = {
+       .constraints            = {
+               .name           = "VMEM_VDD_2.8V",
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(emmc_supplies),
+       .consumer_supplies      = emmc_supplies,
+};
+
+static struct fixed_voltage_config emmc_fixed_voltage_config = {
+       .supply_name            = "MASSMEMORY_EN (inverted)",
+       .microvolts             = 2800000,
+       .gpio                   = EXYNOS4_GPL1(1),
+       .enable_high            = false,
+       .init_data              = &emmc_fixed_voltage_init_data,
+};
+
+static struct platform_device emmc_fixed_voltage = {
+       .name                   = "reg-fixed-voltage",
+       .id                     = FIXED_REG_ID_MMC,
+       .dev                    = {
+               .platform_data  = &emmc_fixed_voltage_config,
+       },
+};
+
+/* SD */
+static struct s3c_sdhci_platdata tizen_hsmmc2_data __initdata = {
+       .max_width              = 4,
+       .host_caps              = MMC_CAP_4_BIT_DATA |
+                               MMC_CAP_MMC_HIGHSPEED | MMC_CAP_SD_HIGHSPEED,
+       .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 */
+static struct s3c_sdhci_platdata tizen_hsmmc3_data __initdata = {
+       .max_width              = 4,
+       .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 tizen_sdhci_init(void)
+{
+       s3c_sdhci0_set_platdata(&tizen_hsmmc0_data);
+       s3c_sdhci2_set_platdata(&tizen_hsmmc2_data);
+       s3c_sdhci3_set_platdata(&tizen_hsmmc3_data);
+}
+
+/* GPIO KEYS */
+static struct gpio_keys_button tizen_gpio_keys_tables[] = {
+       {
+               .code                   = KEY_VOLUMEUP,
+               .gpio                   = EXYNOS4_GPX2(0),      /* XEINT16 */
+               .desc                   = "gpio-keys: KEY_VOLUMEUP",
+               .type                   = EV_KEY,
+               .active_low             = 1,
+               .debounce_interval      = 1,
+       }, {
+               .code                   = KEY_VOLUMEDOWN,
+               .gpio                   = EXYNOS4_GPX2(1),      /* XEINT17 */
+               .desc                   = "gpio-keys: KEY_VOLUMEDOWN",
+               .type                   = EV_KEY,
+               .active_low             = 1,
+               .debounce_interval      = 1,
+       }, {
+               .code                   = KEY_POWER,
+               .gpio                   = EXYNOS4_GPX2(7),      /* XEINT23 */
+               .desc                   = "gpio-keys: KEY_POWER",
+               .type                   = EV_KEY,
+               .active_low             = 1,
+               .wakeup                 = 1,
+               .debounce_interval      = 1,
+       },
+};
+
+static struct gpio_keys_platform_data tizen_gpio_keys_data = {
+       .buttons                = tizen_gpio_keys_tables,
+       .nbuttons               = ARRAY_SIZE(tizen_gpio_keys_tables),
+};
+
+static struct platform_device tizen_gpio_keys = {
+       .name                   = "gpio-keys",
+       .dev                    = {
+               .platform_data  = &tizen_gpio_keys_data,
+       },
+};
+
+/* Frame Buffer */
+static struct s3c_fb_pd_win tizen_fb_win0 = {
+       .win_mode = {
+               .left_margin    = 64,
+               .right_margin   = 16,
+               .upper_margin   = 64,
+               .lower_margin   = 1,
+               .hsync_len      = 48,
+               .vsync_len      = 3,
+               .xres           = 480,
+               .yres           = 800,
+               .refresh        = 60,
+       },
+       .max_bpp        = 32,
+       .default_bpp    = 24,
+       .virtual_x      = 480,
+       .virtual_y      = 800,
+};
+
+static struct s3c_fb_platdata tizen_fb_pdata __initdata = {
+       .win[0]         = &tizen_fb_win0,
+       .vidcon0        = VIDCON0_VIDOUT_RGB | VIDCON0_PNRMODE_RGB |
+                         VIDCON0_CLKSEL_LCD,
+       .vidcon1        = VIDCON1_INV_HSYNC | VIDCON1_INV_VSYNC,
+       .setup_gpio     = exynos4_fimd0_gpio_setup_24bpp,
+};
+
+static void tizen_lcd_power_on(struct plat_lcd_data *pd, unsigned int power)
+{
+       int gpio = EXYNOS4_GPE1(5);
+
+       gpio_request(gpio, "LVDS_nSHDN");
+       gpio_direction_output(gpio, power);
+       gpio_free(gpio);
+}
+
+static int tizen_bl_init(struct device *dev)
+{
+       return gpio_request_one(EXYNOS4_GPE2(3), GPIOF_OUT_INIT_LOW,
+                               "LCD_LD0_EN");
+}
+
+static int tizen_bl_notify(struct device *dev, int brightness)
+{
+       if (brightness < 1)
+               brightness = 0;
+
+       gpio_set_value(EXYNOS4_GPE2(3), 1);
+
+       return brightness;
+}
+
+static void tizen_bl_exit(struct device *dev)
+{
+       gpio_free(EXYNOS4_GPE2(3));
+}
+
+/* tizen pwm backlight */
+static struct platform_pwm_backlight_data tizen_backlight_data = {
+       .pwm_id                 = 0,
+       .pwm_period_ns          = 30000,
+       .max_brightness         = 100,
+       .dft_brightness         = 50,
+       .init                   = tizen_bl_init,
+       .notify                 = tizen_bl_notify,
+       .exit                   = tizen_bl_exit,
+};
+
+static struct platform_device tizen_backlight_device = {
+       .name                   = "pwm-backlight",
+       .id                     = -1,
+       .dev                    = {
+               .parent         = &s3c_device_timer[0].dev,
+               .platform_data  = &tizen_backlight_data,
+       },
+};
+
+static struct plat_lcd_data tizen_lcd_platform_data = {
+       .set_power              = tizen_lcd_power_on,
+};
+
+static struct platform_device tizen_lcd_device = {
+       .name                   = "platform-lcd",
+       .id                     = -1,
+       .dev                    = {
+               .platform_data  = &tizen_lcd_platform_data,
+       },
+};
+
+static struct regulator_init_data wm8994_ldo1_data = {
+       .constraints    = {
+               .name           = "AVDD1_3.0V",
+       },
+};
+
+static struct regulator_init_data wm8994_ldo2_data = {
+       .constraints    = {
+               .name           = "DCVDD_1.0V",
+       },
+};
+
+static struct wm8994_pdata wm8994_platform_data = {
+       .ldo[0] = { 0, &wm8994_ldo1_data },
+       .ldo[1] = { 0, &wm8994_ldo2_data },
+};
+
+/* I2C1 */
+static struct i2c_board_info i2c1_devs[] __initdata = {
+       {
+               I2C_BOARD_INFO("wm8994", 0x1a),
+               .platform_data  = &wm8994_platform_data,
+       },
+};
+
+/* TSP */
+static struct mxt_platform_data mxt_platform_data = {
+       .x_line                 = 18,
+       .y_line                 = 11,
+       .x_size                 = 800,
+       .y_size                 = 480,
+       .blen                   = 0x1,
+       .threshold              = 0x28,
+       .voltage                = 2800000,              /* 2.8V */
+       .orient                 = MXT_DIAGONAL_COUNTER,
+       .irqflags               = IRQF_TRIGGER_FALLING,
+};
+
+static struct s3c2410_platform_i2c i2c3_data __initdata = {
+       .flags          = 0,
+       .bus_num        = 3,
+       .slave_addr     = 0x10,
+       .frequency      = 400 * 1000,
+       .sda_delay      = 100,
+};
+
+static struct i2c_board_info i2c3_devs[] __initdata = {
+       {
+               I2C_BOARD_INFO("atmel_mxt_ts", 0x4a),
+               .platform_data  = &mxt_platform_data,
+               .irq            = IRQ_EINT(4),
+       },
+};
+
+static void __init tizen_tsp_init(void)
+{
+       int gpio;
+
+       /* TOUCH_INT: XEINT_4 */
+       gpio = EXYNOS4_GPX0(4);
+       gpio_request(gpio, "TOUCH_INT");
+       s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+       s3c_gpio_setpull(gpio, S3C_GPIO_PULL_UP);
+}
+
+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("vdd11", "s5p-mipi-csis.0"), /* MIPI */
+};
+static struct regulator_consumer_supply __initdata max8997_ldo4_[] = {
+       REGULATOR_SUPPLY("vdd18", "s5p-mipi-csis.0"), /* MIPI */
+};
+static struct regulator_consumer_supply __initdata max8997_ldo5_[] = {
+       REGULATOR_SUPPLY("vhsic", "modemctl"), /* MODEM */
+};
+static struct regulator_consumer_supply tizen_max8997_ldo6_consumer[] = {
+       REGULATOR_SUPPLY("vdd_reg", "6-003c"), /* S5K6AA camera */
+};
+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("vdac", NULL), /* Used by CPU */
+};
+static struct regulator_consumer_supply __initdata max8997_ldo11_[] = {
+       REGULATOR_SUPPLY("vcc", "platform-lcd"), /* U804 LVDS */
+};
+static struct regulator_consumer_supply __initdata max8997_ldo12_[] = {
+       REGULATOR_SUPPLY("vddio", "6-003c"), /* HDC802 */
+};
+static struct regulator_consumer_supply __initdata max8997_ldo13_[] = {
+       REGULATOR_SUPPLY("vmmc", "exynos4-sdhci.2"), /* TFLASH */
+};
+static struct regulator_consumer_supply __initdata max8997_ldo14_[] = {
+       REGULATOR_SUPPLY("inmotor", "max8997-haptic"),
+};
+static struct regulator_consumer_supply __initdata max8997_ldo15_[] = {
+       REGULATOR_SUPPLY("avdd", "3-004a"), /* Touch Screen */
+};
+static struct regulator_consumer_supply __initdata max8997_ldo16_[] = {
+       REGULATOR_SUPPLY("d_sensor", "0-001f"), /* HDC803 */
+};
+static struct regulator_consumer_supply __initdata max8997_ldo18_[] = {
+       REGULATOR_SUPPLY("vdd", "3-004a"), /* Touch Screen */
+};
+static struct regulator_consumer_supply __initdata max8997_buck1_[] = {
+       REGULATOR_SUPPLY("vdd_arm", NULL), /* CPUFREQ */
+};
+static struct regulator_consumer_supply __initdata max8997_buck2_[] = {
+       REGULATOR_SUPPLY("vdd_int", "exynos4210-busfreq.0"), /* CPUFREQ */
+};
+static struct regulator_consumer_supply __initdata max8997_buck3_[] = {
+       REGULATOR_SUPPLY("vdd", "mali_dev.0"), /* G3D of Exynos 4 */
+};
+static struct regulator_consumer_supply __initdata max8997_buck4_[] = {
+       REGULATOR_SUPPLY("core", "0-001f"), /* HDC803 */
+};
+static struct regulator_consumer_supply __initdata max8997_buck6_[] = {
+       REGULATOR_SUPPLY("dig_28", "0-001f"), /* pin "7" of HDC803 */
+};
+static struct regulator_consumer_supply __initdata max8997_esafeout1_[] = {
+       REGULATOR_SUPPLY("usb_vbus", NULL), /* CPU's USB OTG */
+};
+static struct regulator_consumer_supply __initdata max8997_esafeout2_[] = {
+       REGULATOR_SUPPLY("usb_vbus", "modemctl"), /* VBUS of Modem */
+};
+
+static struct regulator_consumer_supply __initdata max8997_charger_[] = {
+       REGULATOR_SUPPLY("vinchg1", "charger-manager.0"),
+};
+static struct regulator_consumer_supply __initdata max8997_chg_toff_[] = {
+       REGULATOR_SUPPLY("vinchg_stop", NULL), /* for jack interrupt handlers */
+};
+
+static struct regulator_consumer_supply __initdata max8997_32khz_ap_[] = {
+       REGULATOR_SUPPLY("gps_clk", "bcm4751"),
+       REGULATOR_SUPPLY("bt_clk", "bcm4330-b1"),
+       REGULATOR_SUPPLY("wifi_clk", "bcm433-b1"),
+};
+
+static struct regulator_init_data __initdata max8997_ldo1_data = {
+       .constraints    = {
+               .name           = "VADC_3.3V_C210",
+               .min_uV         = 3300000,
+               .max_uV         = 3300000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo1_),
+       .consumer_supplies      = max8997_ldo1_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo2_data = {
+       .constraints    = {
+               .name           = "VALIVE_1.1V_C210",
+               .min_uV         = 1100000,
+               .max_uV         = 1100000,
+               .apply_uV       = 1,
+               .always_on      = 1,
+               .state_mem      = {
+                       .enabled        = 1,
+               },
+       },
+};
+
+static struct regulator_init_data __initdata max8997_ldo3_data = {
+       .constraints    = {
+               .name           = "VUSB_1.1V_C210",
+               .min_uV         = 1100000,
+               .max_uV         = 1100000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo3_),
+       .consumer_supplies      = max8997_ldo3_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo4_data = {
+       .constraints    = {
+               .name           = "VMIPI_1.8V",
+               .min_uV         = 1800000,
+               .max_uV         = 1800000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo4_),
+       .consumer_supplies      = max8997_ldo4_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo5_data = {
+       .constraints    = {
+               .name           = "VHSIC_1.2V_C210",
+               .min_uV         = 1200000,
+               .max_uV         = 1200000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo5_),
+       .consumer_supplies      = max8997_ldo5_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo6_data = {
+       .constraints    = {
+               .name           = "VCC_1.8V_PDA",
+               .min_uV         = 1800000,
+               .max_uV         = 1800000,
+               .apply_uV       = 1,
+               .always_on      = 1,
+               .state_mem      = {
+                       .enabled        = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(tizen_max8997_ldo6_consumer),
+       .consumer_supplies      = tizen_max8997_ldo6_consumer,
+};
+
+static struct regulator_init_data __initdata max8997_ldo7_data = {
+       .constraints    = {
+               .name           = "CAM_ISP_1.8V",
+               .min_uV         = 1800000,
+               .max_uV         = 1800000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo7_),
+       .consumer_supplies      = max8997_ldo7_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo8_data = {
+       .constraints    = {
+               .name           = "VUSB+VDAC_3.3V_C210",
+               .min_uV         = 3300000,
+               .max_uV         = 3300000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo8_),
+       .consumer_supplies      = max8997_ldo8_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo9_data = {
+       .constraints    = {
+               .name           = "VCC_2.8V_PDA",
+               .min_uV         = 2800000,
+               .max_uV         = 2800000,
+               .apply_uV       = 1,
+               .always_on      = 1,
+               .state_mem      = {
+                       .enabled        = 1,
+               },
+       },
+};
+
+static struct regulator_init_data __initdata max8997_ldo10_data = {
+       .constraints    = {
+               .name           = "VPLL_1.1V_C210",
+               .min_uV         = 1100000,
+               .max_uV         = 1100000,
+               .apply_uV       = 1,
+               .always_on      = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+};
+
+static struct regulator_init_data __initdata max8997_ldo11_data = {
+       .constraints    = {
+               .name           = "LVDS_VDD3.3V",
+               .min_uV         = 3300000,
+               .max_uV         = 3300000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .boot_on        = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo11_),
+       .consumer_supplies      = max8997_ldo11_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo12_data = {
+       .constraints    = {
+               .name           = "VT_CAM_1.8V",
+               .min_uV         = 1800000,
+               .max_uV         = 1800000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo12_),
+       .consumer_supplies      = max8997_ldo12_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo13_data = {
+       .constraints    = {
+               .name           = "VTF_2.8V",
+               .min_uV         = 2800000,
+               .max_uV         = 2800000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo13_),
+       .consumer_supplies      = max8997_ldo13_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo14_data = {
+       .constraints    = {
+               .name           = "VCC_3.0V_MOTOR",
+               .min_uV         = 3000000,
+               .max_uV         = 3000000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo14_),
+       .consumer_supplies      = max8997_ldo14_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo15_data = {
+       .constraints    = {
+               .name           = "VTOUCH_ADVV2.8V",
+               .min_uV         = 2800000,
+               .max_uV         = 2800000,
+               .apply_uV       = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo15_),
+       .consumer_supplies      = max8997_ldo15_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo16_data = {
+       .constraints    = {
+               .name           = "CAM_SENSOR_IO_1.8V",
+               .min_uV         = 1800000,
+               .max_uV         = 1800000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo16_),
+       .consumer_supplies      = max8997_ldo16_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo18_data = {
+       .constraints    = {
+               .name           = "VTOUCH_VDD2.8V",
+               .min_uV         = 2800000,
+               .max_uV         = 2800000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .apply_uV       = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_ldo18_),
+       .consumer_supplies      = max8997_ldo18_,
+};
+
+static struct regulator_init_data __initdata max8997_ldo21_data = {
+       .constraints    = {
+               .name           = "VDDQ_M1M2_1.2V",
+               .min_uV         = 1200000,
+               .max_uV         = 1200000,
+               .apply_uV       = 1,
+               .always_on      = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+};
+
+static struct regulator_init_data __initdata max8997_buck1_data = {
+       .constraints    = {
+               .name           = "VARM_1.2V_C210",
+               .min_uV         = 900000,
+               .max_uV         = 1350000,
+               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+               .always_on      = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies = ARRAY_SIZE(max8997_buck1_),
+       .consumer_supplies = max8997_buck1_,
+};
+
+static struct regulator_init_data __initdata max8997_buck2_data = {
+       .constraints    = {
+               .name           = "VINT_1.1V_C210",
+               .min_uV         = 900000,
+               .max_uV         = 1200000,
+               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+               .always_on      = 1,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies = ARRAY_SIZE(max8997_buck2_),
+       .consumer_supplies = max8997_buck2_,
+};
+
+static struct regulator_init_data __initdata max8997_buck3_data = {
+       .constraints    = {
+               .name           = "VG3D_1.1V_C210",
+               .min_uV         = 900000,
+               .max_uV         = 1100000,
+               .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+                                 REGULATOR_CHANGE_STATUS,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies = ARRAY_SIZE(max8997_buck3_),
+       .consumer_supplies = max8997_buck3_,
+};
+
+static struct regulator_init_data __initdata max8997_buck4_data = {
+       .constraints    = {
+               .name           = "CAM_ISP_CORE_1.2V",
+               .min_uV         = 1200000,
+               .max_uV         = 1200000,
+               .apply_uV       = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies = ARRAY_SIZE(max8997_buck4_),
+       .consumer_supplies = max8997_buck4_,
+};
+
+static struct regulator_init_data __initdata max8997_buck5_data = {
+       .constraints    = {
+               .name           = "VMEM_1.2V_C210",
+               .min_uV         = 1200000,
+               .max_uV         = 1200000,
+               .apply_uV       = 1,
+               .always_on      = 1,
+               .state_mem      = {
+                       .enabled        = 1,
+               },
+       },
+};
+
+static struct regulator_init_data __initdata max8997_buck6_data = {
+       .constraints    = {
+               .name           = "CAM_AF_2.8V",
+               .min_uV         = 2800000,
+               .max_uV         = 2800000,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies = ARRAY_SIZE(max8997_buck6_),
+       .consumer_supplies = max8997_buck6_,
+};
+
+static struct regulator_init_data __initdata max8997_buck7_data = {
+       .constraints    = {
+               .name           = "VCC_SUB_2.0V",
+               .min_uV         = 2000000,
+               .max_uV         = 2000000,
+               .apply_uV       = 1,
+               .always_on      = 1,
+               .state_mem      = {
+                       .enabled        = 1,
+               },
+       },
+};
+
+static struct regulator_init_data __initdata max8997_32khz_ap_data = {
+       .constraints    = {
+               .name           = "32KHz AP",
+               .always_on      = 1,
+               .state_mem      = {
+                       .enabled        = 1,
+               },
+       },
+       .num_consumer_supplies = ARRAY_SIZE(max8997_32khz_ap_),
+       .consumer_supplies = max8997_32khz_ap_,
+};
+
+static struct regulator_init_data __initdata max8997_32khz_cp_data = {
+       .constraints    = {
+               .name           = "32KHz CP",
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+};
+
+static struct regulator_init_data __initdata max8997_vichg_data = {
+       .constraints    = {
+               .name           = "VICHG",
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+};
+
+static struct regulator_init_data __initdata max8997_esafeout1_data = {
+       .constraints    = {
+               .name           = "SAFEOUT1",
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_esafeout1_),
+       .consumer_supplies      = max8997_esafeout1_,
+};
+
+static struct regulator_init_data __initdata max8997_esafeout2_data = {
+       .constraints    = {
+               .name           = "SAFEOUT2",
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .state_mem      = {
+                       .disabled       = 1,
+               },
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_esafeout2_),
+       .consumer_supplies      = max8997_esafeout2_,
+};
+
+static struct regulator_init_data __initdata max8997_charger_cv_data = {
+       .constraints    = {
+               .name           = "CHARGER_CV",
+               .min_uV         = 4200000,
+               .max_uV         = 4200000,
+               .apply_uV       = 1,
+       },
+};
+
+static struct regulator_init_data __initdata max8997_charger_data = {
+       .constraints    = {
+               .name           = "CHARGER",
+               .min_uA         = 200000,
+               .max_uA         = 950000,
+               .boot_on        = 1,
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS |
+                               REGULATOR_CHANGE_CURRENT,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_charger_),
+       .consumer_supplies      = max8997_charger_,
+};
+
+static struct regulator_init_data __initdata max8997_charger_topoff_data = {
+       .constraints    = {
+               .name           = "CHARGER TOPOFF",
+               .min_uA         = 50000,
+               .max_uA         = 200000,
+               .valid_ops_mask = REGULATOR_CHANGE_CURRENT,
+       },
+       .num_consumer_supplies  = ARRAY_SIZE(max8997_chg_toff_),
+       .consumer_supplies      = max8997_chg_toff_,
+};
+
+static struct max8997_regulator_data __initdata tizen_max8997_regulators[] = {
+       { MAX8997_LDO1, &max8997_ldo1_data },
+       { MAX8997_LDO2, &max8997_ldo2_data },
+       { MAX8997_LDO3, &max8997_ldo3_data },
+       { MAX8997_LDO4, &max8997_ldo4_data },
+       { MAX8997_LDO5, &max8997_ldo5_data },
+       { MAX8997_LDO6, &max8997_ldo6_data },
+       { MAX8997_LDO7, &max8997_ldo7_data },
+       { MAX8997_LDO8, &max8997_ldo8_data },
+       { MAX8997_LDO9, &max8997_ldo9_data },
+       { MAX8997_LDO10, &max8997_ldo10_data },
+       { MAX8997_LDO11, &max8997_ldo11_data },
+       { MAX8997_LDO12, &max8997_ldo12_data },
+       { MAX8997_LDO13, &max8997_ldo13_data },
+       { MAX8997_LDO14, &max8997_ldo14_data },
+       { MAX8997_LDO15, &max8997_ldo15_data },
+       { MAX8997_LDO16, &max8997_ldo16_data },
+
+       { MAX8997_LDO18, &max8997_ldo18_data },
+       { MAX8997_LDO21, &max8997_ldo21_data },
+
+       { MAX8997_BUCK1, &max8997_buck1_data },
+       { MAX8997_BUCK2, &max8997_buck2_data },
+       { MAX8997_BUCK3, &max8997_buck3_data },
+       { MAX8997_BUCK4, &max8997_buck4_data },
+       { MAX8997_BUCK5, &max8997_buck5_data },
+       { MAX8997_BUCK6, &max8997_buck6_data },
+       { MAX8997_BUCK7, &max8997_buck7_data },
+
+       { MAX8997_EN32KHZ_AP, &max8997_32khz_ap_data },
+       { MAX8997_EN32KHZ_CP, &max8997_32khz_cp_data },
+
+       { MAX8997_ENVICHG, &max8997_vichg_data },
+       { MAX8997_ESAFEOUT1, &max8997_esafeout1_data },
+       { MAX8997_ESAFEOUT2, &max8997_esafeout2_data },
+       { MAX8997_CHARGER_CV, &max8997_charger_cv_data },
+       { MAX8997_CHARGER, &max8997_charger_data },
+       { MAX8997_CHARGER_TOPOFF, &max8997_charger_topoff_data },
+};
+
+static struct max8997_platform_data __initdata tizen_max8997_pdata = {
+       .wakeup                 = 1,
+
+       .num_regulators         = ARRAY_SIZE(tizen_max8997_regulators),
+       .regulators             = tizen_max8997_regulators,
+
+       .buck125_gpios = { EXYNOS4_GPX0(5), EXYNOS4_GPX0(6), EXYNOS4_GPL0(0) },
+
+       .buck1_voltage[0] = 1350000, /* 1.35V */
+       .buck1_voltage[1] = 1300000, /* 1.3V */
+       .buck1_voltage[2] = 1250000, /* 1.25V */
+       .buck1_voltage[3] = 1200000, /* 1.2V */
+       .buck1_voltage[4] = 1150000, /* 1.15V */
+       .buck1_voltage[5] = 1100000, /* 1.1V */
+       .buck1_voltage[6] = 1000000, /* 1.0V */
+       .buck1_voltage[7] = 950000, /* 0.95V */
+
+       .buck2_voltage[0] = 1100000, /* 1.1V */
+       .buck2_voltage[1] = 1000000, /* 1.0V */
+       .buck2_voltage[2] = 950000, /* 0.95V */
+       .buck2_voltage[3] = 900000, /* 0.9V */
+       .buck2_voltage[4] = 1100000, /* 1.1V */
+       .buck2_voltage[5] = 1000000, /* 1.0V */
+       .buck2_voltage[6] = 950000, /* 0.95V */
+       .buck2_voltage[7] = 900000, /* 0.9V */
+
+       .buck5_voltage[0] = 1200000, /* 1.2V */
+       .buck5_voltage[1] = 1200000, /* 1.2V */
+       .buck5_voltage[2] = 1200000, /* 1.2V */
+       .buck5_voltage[3] = 1200000, /* 1.2V */
+       .buck5_voltage[4] = 1200000, /* 1.2V */
+       .buck5_voltage[5] = 1200000, /* 1.2V */
+       .buck5_voltage[6] = 1200000, /* 1.2V */
+       .buck5_voltage[7] = 1200000, /* 1.2V */
+};
+
+/* GPIO I2C 5 (PMIC) */
+enum { I2C5_MAX8997 };
+static struct i2c_board_info i2c5_devs[] __initdata = {
+       [I2C5_MAX8997] = {
+               I2C_BOARD_INFO("max8997", 0xCC >> 1),
+               .platform_data  = &tizen_max8997_pdata,
+       },
+};
+
+static struct max17042_platform_data tizen_battery_platform_data = {
+};
+
+/* GPIO I2C 9 (Fuel Gauge) */
+static struct i2c_gpio_platform_data i2c9_gpio_data = {
+       .sda_pin                = EXYNOS4_GPY4(0),      /* XM0ADDR_8 */
+       .scl_pin                = EXYNOS4_GPY4(1),      /* XM0ADDR_9 */
+};
+static struct platform_device i2c9_gpio = {
+       .name                   = "i2c-gpio",
+       .id                     = 9,
+       .dev                    = {
+               .platform_data  = &i2c9_gpio_data,
+       },
+};
+enum { I2C9_MAX17042};
+static struct i2c_board_info i2c9_devs[] __initdata = {
+       [I2C9_MAX17042] = {
+               I2C_BOARD_INFO("max17042", 0x36),
+               .platform_data = &tizen_battery_platform_data,
+       },
+};
+
+/* MAX8903 Secondary Charger */
+static struct regulator_consumer_supply supplies_max8903[] = {
+       REGULATOR_SUPPLY("vinchg2", "charger-manager.0"),
+};
+
+static struct regulator_init_data max8903_charger_en_data = {
+       .constraints = {
+               .name           = "VOUT_CHARGER",
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS,
+               .boot_on        = 1,
+       },
+       .num_consumer_supplies = ARRAY_SIZE(supplies_max8903),
+       .consumer_supplies = supplies_max8903,
+};
+
+static struct fixed_voltage_config max8903_charger_en = {
+       .supply_name = "VOUT_CHARGER",
+       .microvolts = 5000000, /* Assume 5VDC */
+       .gpio = EXYNOS4_GPY4(5), /* TA_EN negaged */
+       .enable_high = 0, /* Enable = Low */
+       .enabled_at_boot = 1,
+       .init_data = &max8903_charger_en_data,
+};
+
+static struct platform_device max8903_fixed_reg_dev = {
+       .name = "reg-fixed-voltage",
+       .id = FIXED_REG_ID_MAX8903,
+       .dev = { .platform_data = &max8903_charger_en },
+};
+
+static struct max8903_pdata tizen_max8903 = {
+       /*
+        * cen: don't control with the driver, let it be
+        * controlled by regulator above
+        */
+       .dok = EXYNOS4_GPX1(4), /* TA_nCONNECTED */
+       /* uok, usus: not connected */
+       .chg = EXYNOS4_GPE2(0), /* TA_nCHG */
+       /* flt: vcc_1.8V_pda */
+       .dcm = EXYNOS4_GPL0(1), /* CURR_ADJ */
+
+       .dc_valid = true,
+       .usb_valid = false, /* USB is not wired to MAX8903 */
+};
+
+static struct platform_device tizen_max8903_device = {
+       .name                   = "max8903-charger",
+       .dev                    = {
+               .platform_data  = &tizen_max8903,
+       },
+};
+
+static void __init tizen_power_init(void)
+{
+       int gpio;
+       int irq_base = IRQ_GPIO_END + 1;
+       int ta_en = 0;
+
+       tizen_max8997_pdata.irq_base = irq_base;
+       irq_base += MAX8997_IRQ_NR;
+
+       gpio = EXYNOS4_GPX0(7);
+       gpio_request(gpio, "AP_PMIC_IRQ");
+       s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+       s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+
+       gpio = EXYNOS4_GPX2(3);
+       gpio_request(gpio, "FUEL_ALERT");
+       s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+       s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+
+       gpio = tizen_max8903.dok;
+       gpio_request(gpio, "TA_nCONNECTED");
+       s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(0xf));
+       s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE);
+       ta_en = gpio_get_value(gpio) ? 0 : 1;
+
+       gpio = tizen_max8903.chg;
+       gpio_request(gpio, "TA_nCHG");
+       gpio_direction_input(gpio);
+
+       gpio = tizen_max8903.dcm;
+       gpio_request(gpio, "CURR_ADJ");
+       gpio_direction_output(gpio, ta_en);
+}
+
+/* USB EHCI */
+static struct s5p_ehci_platdata tizen_ehci_pdata;
+
+static void __init tizen_ehci_init(void)
+{
+       struct s5p_ehci_platdata *pdata = &tizen_ehci_pdata;
+
+       s5p_ehci_set_platdata(pdata);
+}
+
+/* CAMERA */
+static struct regulator_consumer_supply cam_vt_cam15_supply =
+       REGULATOR_SUPPLY("vdd_core", "6-003c");
+
+static struct regulator_init_data cam_vt_cam15_reg_init_data = {
+       .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
+       .num_consumer_supplies = 1,
+       .consumer_supplies = &cam_vt_cam15_supply,
+};
+
+static struct fixed_voltage_config cam_vt_cam15_fixed_voltage_cfg = {
+       .supply_name    = "VT_CAM_1.5V",
+       .microvolts     = 1500000,
+       .gpio           = EXYNOS4_GPE2(2), /* VT_CAM_1.5V_EN */
+       .enable_high    = 1,
+       .init_data      = &cam_vt_cam15_reg_init_data,
+};
+
+static struct platform_device cam_vt_cam15_fixed_rdev = {
+       .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_VT_15V,
+       .dev = { .platform_data = &cam_vt_cam15_fixed_voltage_cfg },
+};
+
+static struct regulator_consumer_supply cam_vdda_supply[] = {
+       REGULATOR_SUPPLY("vdda", "6-003c"),
+       REGULATOR_SUPPLY("a_sensor", "0-001f"),
+};
+
+static struct regulator_init_data cam_vdda_reg_init_data = {
+       .constraints = { .valid_ops_mask = REGULATOR_CHANGE_STATUS },
+       .num_consumer_supplies = ARRAY_SIZE(cam_vdda_supply),
+       .consumer_supplies = cam_vdda_supply,
+};
+
+static struct fixed_voltage_config cam_vdda_fixed_voltage_cfg = {
+       .supply_name    = "CAM_IO_EN",
+       .microvolts     = 2800000,
+       .gpio           = EXYNOS4_GPE2(1), /* CAM_IO_EN */
+       .enable_high    = 1,
+       .init_data      = &cam_vdda_reg_init_data,
+};
+
+static struct platform_device cam_vdda_fixed_rdev = {
+       .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_A28V,
+       .dev = { .platform_data = &cam_vdda_fixed_voltage_cfg },
+};
+
+static struct regulator_consumer_supply camera_8m_12v_supply =
+       REGULATOR_SUPPLY("dig_12", "0-001f");
+
+static struct regulator_init_data cam_8m_12v_reg_init_data = {
+       .num_consumer_supplies  = 1,
+       .consumer_supplies      = &camera_8m_12v_supply,
+       .constraints = {
+               .valid_ops_mask = REGULATOR_CHANGE_STATUS
+       },
+};
+
+static struct fixed_voltage_config cam_8m_12v_fixed_voltage_cfg = {
+       .supply_name    = "8M_1.2V",
+       .microvolts     = 1200000,
+       .gpio           = EXYNOS4_GPE2(5), /* 8M_1.2V_EN */
+       .enable_high    = 1,
+       .init_data      = &cam_8m_12v_reg_init_data,
+};
+
+static struct platform_device cam_8m_12v_fixed_rdev = {
+       .name = "reg-fixed-voltage", .id = FIXED_REG_ID_CAM_12V,
+       .dev = { .platform_data = &cam_8m_12v_fixed_voltage_cfg },
+};
+
+static struct s5p_platform_mipi_csis mipi_csis_platdata = {
+       .clk_rate       = 166000000UL,
+       .lanes          = 2,
+       .alignment      = 32,
+       .hs_settle      = 12,
+       .phy_enable     = s5p_csis_phy_enable,
+};
+
+#define GPIO_CAM_MEGA_RST      EXYNOS4_GPY3(7) /* ISP_RESET */
+#define GPIO_CAM_8M_ISP_INT    EXYNOS4_GPL2(5)
+#define GPIO_CAM_VT_NSTBY      EXYNOS4_GPL2(0)
+#define GPIO_CAM_VT_NRST       EXYNOS4_GPL2(1)
+
+static struct s5k6aa_platform_data s5k6aa_pldata = {
+       .mclk_frequency = 24000000UL,
+       .gpio_reset     = { GPIO_CAM_VT_NRST, 0 },
+       .gpio_stby      = { GPIO_CAM_VT_NSTBY, 0 },
+       .bus_type       = V4L2_MBUS_PARALLEL,
+       .horiz_flip     = 1,
+};
+
+static struct i2c_board_info s5k6aa_board_info = {
+       I2C_BOARD_INFO("S5K6AA", 0x3c),
+       .platform_data = &s5k6aa_pldata,
+};
+
+static struct m5mols_platform_data m5mols_platdata = {
+       .gpio_reset = GPIO_CAM_MEGA_RST,
+};
+
+static struct i2c_board_info m5mols_board_info = {
+       I2C_BOARD_INFO("M5MOLS", 0x1F),
+       .platform_data  = &m5mols_platdata,
+};
+
+static struct s5p_fimc_isp_info tizen_camera_sensors[] = {
+       {
+               .flags          = V4L2_MBUS_PCLK_SAMPLE_RISING |
+                                 V4L2_MBUS_VSYNC_ACTIVE_LOW,
+               .bus_type       = FIMC_ITU_601,
+               .board_info     = &s5k6aa_board_info,
+               .clk_frequency  = 24000000UL,
+               .i2c_bus_num    = 6,
+       }, {
+               .flags          = V4L2_MBUS_PCLK_SAMPLE_FALLING |
+                                 V4L2_MBUS_VSYNC_ACTIVE_LOW,
+               .bus_type       = FIMC_MIPI_CSI2,
+               .board_info     = &m5mols_board_info,
+               .clk_frequency  = 24000000UL,
+               .csi_data_align = 32,
+       },
+};
+
+static struct s5p_platform_fimc fimc_md_platdata = {
+       .isp_info       = tizen_camera_sensors,
+       .num_clients    = ARRAY_SIZE(tizen_camera_sensors),
+};
+
+static struct gpio tizen_camera_gpios[] = {
+       { GPIO_CAM_VT_NSTBY,    GPIOF_OUT_INIT_LOW, "CAM_VGA_NSTBY" },
+       { GPIO_CAM_VT_NRST,     GPIOF_OUT_INIT_LOW, "CAM_VGA_NRST"  },
+       { GPIO_CAM_8M_ISP_INT,  GPIOF_IN,           "8M_ISP_INT"  },
+       { GPIO_CAM_MEGA_RST,    GPIOF_OUT_INIT_LOW, "CAM_8M_NRST" },
+};
+
+static void __init tizen_camera_init(void)
+{
+       s3c_set_platdata(&mipi_csis_platdata, sizeof(mipi_csis_platdata),
+                        &s5p_device_mipi_csis0);
+       s3c_set_platdata(&fimc_md_platdata,  sizeof(fimc_md_platdata),
+                        &s5p_device_fimc_md);
+
+       if (gpio_request_array(tizen_camera_gpios,
+                              ARRAY_SIZE(tizen_camera_gpios))) {
+               pr_err("%s: GPIO request failed\n", __func__);
+               return;
+       }
+
+       m5mols_board_info.irq = s5p_register_gpio_interrupt(GPIO_CAM_8M_ISP_INT);
+       if (!IS_ERR_VALUE(m5mols_board_info.irq))
+               s3c_gpio_cfgpin(GPIO_CAM_8M_ISP_INT, S3C_GPIO_SFN(0xF));
+       else
+               pr_err("%s: Failed to configure 8M_ISP_INT GPIO\n", __func__);
+
+       /* Free GPIOs controlled directly by the sensor drivers. */
+       gpio_free(GPIO_CAM_VT_NRST);
+       gpio_free(GPIO_CAM_VT_NSTBY);
+       gpio_free(GPIO_CAM_MEGA_RST);
+
+       if (exynos4_fimc_setup_gpio(S5P_CAMPORT_A)) {
+               pr_err("%s: Camera port A setup failed\n", __func__);
+               return;
+       }
+       /* Increase drive strength of the sensor clock output */
+       s5p_gpio_set_drvstr(EXYNOS4_GPJ1(3), S5P_GPIO_DRVSTR_LV4);
+}
+
+static struct s3c2410_platform_i2c tizen_i2c6_platdata __initdata = {
+       .frequency      = 400000U,
+       .sda_delay      = 200,
+       .bus_num        = 6,
+};
+
+static struct s3c2410_platform_i2c tizen_i2c0_platdata __initdata = {
+       .frequency      = 400000U,
+       .sda_delay      = 200,
+};
+
+/* DEVFREQ controlling memory/bus */
+static struct platform_device exynos4_bus_devfreq = {
+       .name                   = "exynos4210-busfreq",
+};
+
+static struct platform_device *tizen_devices[] __initdata = {
+       /* Samsung Platform Devices */
+       &s3c_device_i2c5, /* PMIC should initialize first */
+       &s3c_device_i2c0,
+       &s3c_device_i2c6,
+       &emmc_fixed_voltage,
+       &s5p_device_mipi_csis0,
+       &s5p_device_fimc0,
+       &s5p_device_fimc1,
+       &s5p_device_fimc2,
+       &s5p_device_fimc3,
+       &s5p_device_fimd0,
+       &s3c_device_hsmmc0,
+       &s3c_device_hsmmc2,
+       &s3c_device_hsmmc3,
+       &s3c_device_wdt,
+       &s3c_device_timer[0],
+       &s5p_device_ehci,
+       &s3c_device_i2c3,
+       &i2c9_gpio,
+       &s3c_device_adc,
+       &s5p_device_g2d,
+       &s5p_device_jpeg,
+       &s3c_device_rtc,
+       &s5p_device_mfc,
+       &s5p_device_mfc_l,
+       &s5p_device_mfc_r,
+       &s5p_device_fimc_md,
+       &s5p_virtio_mmio_blk_device,
+       &s5p_virtio_mmio_net_device,
+
+       /* Tizen Devices */
+       &tizen_gpio_keys,
+       &tizen_lcd_device,
+       &tizen_backlight_device,
+       &max8903_fixed_reg_dev,
+       &tizen_max8903_device,
+       &cam_vt_cam15_fixed_rdev,
+       &cam_vdda_fixed_rdev,
+       &cam_8m_12v_fixed_rdev,
+       &exynos4_bus_devfreq,
+       &s3c_device_i2c1,
+       &exynos4_device_i2s0,
+       &samsung_asoc_idma,
+};
+
+static void __init tizen_map_io(void)
+{
+       clk_xusbxti.rate = 24000000;
+       exynos_init_io(NULL, 0);
+       s3c24xx_init_clocks(24000000);
+       s3c24xx_init_uarts(tizen_uartcfgs, ARRAY_SIZE(tizen_uartcfgs));
+}
+
+static void __init tizen_reserve(void)
+{
+       s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
+static void __init tizen_machine_init(void)
+{
+       tizen_sdhci_init();
+       tizen_tsp_init();
+       tizen_power_init();
+
+       s3c_i2c0_set_platdata(&tizen_i2c0_platdata);
+       s3c_i2c1_set_platdata(NULL);
+       i2c_register_board_info(1, i2c1_devs, ARRAY_SIZE(i2c1_devs));
+       s3c_i2c3_set_platdata(&i2c3_data);
+       i2c_register_board_info(3, i2c3_devs, ARRAY_SIZE(i2c3_devs));
+       s3c_i2c5_set_platdata(NULL);
+       i2c5_devs[I2C5_MAX8997].irq = gpio_to_irq(EXYNOS4_GPX0(7));
+       i2c_register_board_info(5, i2c5_devs, ARRAY_SIZE(i2c5_devs));
+       i2c9_devs[I2C9_MAX17042].irq = gpio_to_irq(EXYNOS4_GPX2(3));
+       i2c_register_board_info(9, i2c9_devs, ARRAY_SIZE(i2c9_devs));
+       s3c_i2c6_set_platdata(&tizen_i2c6_platdata);
+
+       s5p_fimd0_set_platdata(&tizen_fb_pdata);
+
+       tizen_camera_init();
+
+       tizen_ehci_init();
+
+       /* Last */
+       platform_add_devices(tizen_devices, ARRAY_SIZE(tizen_devices));
+}
+
+MACHINE_START(TIZEN, "Tizen")
+       .atag_offset    = 0x100,
+       .init_irq       = exynos4_init_irq,
+       .map_io         = tizen_map_io,
+       .handle_irq     = gic_handle_irq,
+       .init_machine   = tizen_machine_init,
+       .timer          = &exynos4_timer,
+       .reserve        = &tizen_reserve,
+       .restart        = exynos4_restart,
+MACHINE_END
index f9c9f33f8cbe2f651277793400d8287eec0073c9..177bb411392cbf072fd35af523e64012d6d360ce 100644 (file)
@@ -682,6 +682,7 @@ tripel                      MACH_TRIPEL             TRIPEL                  3376
 endian_mini            MACH_ENDIAN_MINI        ENDIAN_MINI             3377
 xilinx_ep107           MACH_XILINX_EP107       XILINX_EP107            3378
 nuri                   MACH_NURI               NURI                    3379
+Tizen                  MACH_TIZEN              TIZEN                   3899
 janus                  MACH_JANUS              JANUS                   3380
 ddnas                  MACH_DDNAS              DDNAS                   3381
 tag                    MACH_TAG                TAG                     3382
index fe3995ce9b380f00674d0841e29269fdf422d1eb..ea858cdec9e6b9b26d8db382fed1e936bf8f10cd 100644 (file)
@@ -63,7 +63,7 @@ config SND_SOC_SAMSUNG_SMDK_WM8580
 
 config SND_SOC_SAMSUNG_SMDK_WM8994
        tristate "SoC I2S Audio support for WM8994 on SMDK"
-       depends on SND_SOC_SAMSUNG && (MACH_SMDKV310 || MACH_SMDKC210 || MACH_SMDK4212)
+       depends on SND_SOC_SAMSUNG && (MACH_SMDKV310 || MACH_SMDKC210 || MACH_SMDK4212 || MACH_TIZEN)
        depends on I2C=y && GENERIC_HARDIRQS
        select MFD_WM8994
        select SND_SOC_WM8994
index 8eb309f23d18247983df33970601a8993747c721..1dcd8c9c00e07a5af5ef609ead55aa545330fcc9 100644 (file)
@@ -127,11 +127,11 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .stream_name = "Pri_Dai",
                .cpu_dai_name = "samsung-i2s.0",
                .codec_dai_name = "wm8994-aif1",
-               .platform_name = "samsung-audio",
+               .platform_name = "samsung-idma",
                .codec_name = "wm8994-codec",
                .init = smdk_wm8994_init_paiftx,
                .ops = &smdk_ops,
-       }, { /* Sec_Fifo Playback i/f */
+       },/* { *//* Sec_Fifo Playback i/f */ /*
                .name = "Sec_FIFO TX",
                .stream_name = "Sec_Dai",
                .cpu_dai_name = "samsung-i2s.4",
@@ -139,7 +139,7 @@ static struct snd_soc_dai_link smdk_dai[] = {
                .platform_name = "samsung-audio",
                .codec_name = "wm8994-codec",
                .ops = &smdk_ops,
-       },
+       },*/
 };
 
 static struct snd_soc_card smdk = {