All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-06 14:10 ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-06 14:10 UTC (permalink / raw)
  Cc: Dongjin Kim, Kukjin Kim, Russell King, Tony Lindgren,
	Jon Medhurst, Shawn Guo, Uwe Kleine-König, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

The HKDK4412 is the CPU module developed by Hardkernel which is based on
Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
(4289) is registered.

Change-Id: I3af02808c03b9acea916c310390a4904ad92d761
Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
---
 arch/arm/mach-exynos/Kconfig         |   23 +
 arch/arm/mach-exynos/Makefile        |    1 +
 arch/arm/mach-exynos/mach-hkdk4412.c |  979 ++++++++++++++++++++++++++++++++++
 arch/arm/tools/mach-types            |    1 +
 4 files changed, 1004 insertions(+)
 create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index b5b4c8c..ae90773 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -54,6 +54,9 @@ config SOC_EXYNOS4412
 	default y
 	depends on ARCH_EXYNOS4
 	select SAMSUNG_DMADEV
+	select S5P_PM if PM
+	select S5P_SLEEP if PM
+	select PM_GENERIC_DOMAINS
 	help
 	  Enable EXYNOS4412 SoC support
 
@@ -394,6 +397,26 @@ config MACH_SMDK4412
 	select MACH_SMDK4212
 	help
 	  Machine support for Samsung SMDK4412
+
+config MACH_HKDK4412
+	bool "HKDK4412"
+	select SOC_EXYNOS4412
+	select MACH_SMDK4212
+	select S3C_DEV_HSMMC
+	select S3C_DEV_HSMMC1
+	select S3C_DEV_USB_HSOTG
+	select S5P_DEV_CSIS0
+	select S5P_DEV_G2D
+	select S5P_DEV_JPEG
+	select S5P_DEV_USB_EHCI
+	select S5P_DEV_I2C_HDMIPHY
+	select S5P_DEV_TV
+	select S5P_GPIO_INT
+	select EXYNOS4_DEV_USB_OHCI
+	select SAMSUNG_DEV_ADC
+	help
+	  Machine support for Odroid-X based on Samsung EXYNOS4412
+
 endif
 
 comment "Flattened Device Tree based board for EXYNOS SoCs"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 9b58024..dccc381 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
+obj-$(CONFIG_MACH_HKDK4412)		+= mach-hkdk4412.o
 
 obj-$(CONFIG_MACH_EXYNOS4_DT)		+= mach-exynos4-dt.o
 obj-$(CONFIG_MACH_EXYNOS5_DT)		+= mach-exynos5-dt.o
diff --git a/arch/arm/mach-exynos/mach-hkdk4412.c b/arch/arm/mach-exynos/mach-hkdk4412.c
new file mode 100644
index 0000000..3b090ae
--- /dev/null
+++ b/arch/arm/mach-exynos/mach-hkdk4412.c
@@ -0,0 +1,979 @@
+/*
+ * linux/arch/arm/mach-exynos4/mach-hkdk4412.c
+ *
+ * Copyright (c) 2012 AgreeYa Mobility Co., Ltd.
+ *		http://www.agreeyamobility.net
+ *
+ * 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/gpio.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/io.h>
+#include <linux/mfd/max77686.h>
+#include <linux/mmc/host.h>
+#include <linux/platform_device.h>
+#include <linux/pwm_backlight.h>
+#include <linux/regulator/machine.h>
+#include <linux/serial_core.h>
+#include <linux/platform_data/s3c-hsotg.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+#include <asm/mach-types.h>
+
+#include <plat/backlight.h>
+#include <plat/clock.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+#include <plat/keypad.h>
+#include <plat/mfc.h>
+#include <plat/regs-serial.h>
+#include <plat/sdhci.h>
+#include <plat/ehci.h>
+
+#include <mach/ohci.h>
+#include <mach/map.h>
+
+#include "common.h"
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define HKDK4412_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define HKDK4412_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define HKDK4412_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG4 |	\
+				 S5PV210_UFCON_RXTRIG4)
+
+static struct s3c2410_uartcfg hkdk4412_uartcfgs[] __initdata = {
+	[0] = {
+		.hwport		= 0,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[1] = {
+		.hwport		= 1,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[2] = {
+		.hwport		= 2,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[3] = {
+		.hwport		= 3,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc2_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
+	.max_width	= 8,
+	.host_caps	= MMC_CAP_8_BIT_DATA,
+#endif
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc3_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_mif", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck2_consumer[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck3_consumer[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] = {
+	REGULATOR_SUPPLY("vdd_g3d", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_alive", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo3_consumer[] = {
+	REGULATOR_SUPPLY("vddq_aud", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo4_consumer[] = {
+	REGULATOR_SUPPLY("vddq_mmc2", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo5_consumer[] = {
+	REGULATOR_SUPPLY("vddq_mmc1", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo8_consumer[] = {
+	REGULATOR_SUPPLY("vdd10_mipi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo10_consumer[] = {
+	REGULATOR_SUPPLY("vdd18_mipi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo11_consumer[] = {
+	REGULATOR_SUPPLY("vdd_ldo11", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo13_consumer[] = {
+	REGULATOR_SUPPLY("vdd18_mipihsi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo14_consumer[] = {
+	REGULATOR_SUPPLY("vdd_ldo14", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo17_consumer[] = {
+	REGULATOR_SUPPLY("vddq_cam", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo18_consumer[] = {
+	REGULATOR_SUPPLY("vddq_isp", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo19_consumer[] = {
+	REGULATOR_SUPPLY("vt_cam", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo23_consumer[] = {
+	REGULATOR_SUPPLY("vdd_touch", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo24_consumer[] = {
+	REGULATOR_SUPPLY("vdd_touchled", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo25_consumer[] = {
+	REGULATOR_SUPPLY("vddq_lcd", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo26_consumer[] = {
+	REGULATOR_SUPPLY("vdd_motor", NULL),
+};
+
+static struct regulator_init_data __initdata max77686_buck1_data = {
+	.constraints = {
+		.name		= "vdd_mif range",
+		.min_uV		= 800000,
+		.max_uV		= 1050000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck1_consumer),
+	.consumer_supplies = max77686_buck1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck2_data = {
+	.constraints = {
+		.name		= "vdd_arm range",
+		.min_uV		= 800000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck2_consumer),
+	.consumer_supplies = max77686_buck2_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck3_data = {
+	.constraints = {
+		.name		= "vdd_int range",
+		.min_uV		= 800000,
+		.max_uV		= 1150000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck3_consumer),
+	.consumer_supplies = max77686_buck3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck4_data = {
+	.constraints = {
+		.name		= "vdd_g3d range",
+		.min_uV		= 850000,
+		.max_uV		= 1200000,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				  REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck4_consumer),
+	.consumer_supplies = max77686_buck4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck5_data = {
+	.constraints = {
+		.name		= "BUCK5 VDDQ_CKEM1_2",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck6_data = {
+	.constraints = {
+		.name		= "BUCK6 1V35",
+		.min_uV		= 1350000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1350000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck7_data = {
+	.constraints = {
+		.name		= "BUCK7 2V0",
+		.min_uV		= 2000000,
+		.max_uV		= 2000000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2000000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck8_data = {
+	.constraints = {
+		.name		= "BUCK8 3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck9_data = {
+	.constraints = {
+		.name		= "BUCK9 1V2",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo1_data = {
+	.constraints = {
+		.name		= "LDO1 VDD_ALIVE",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo1_consumer),
+	.consumer_supplies = max77686_ldo1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo2_data = {
+	.constraints = {
+		.name		= "LDO2 VDDQ_M1_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo3_data = {
+	.constraints = {
+		.name		= "LDO3 VDDQ_AUD_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo3_consumer),
+	.consumer_supplies = max77686_ldo3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo4_data = {
+	.constraints = {
+		.name		= "LDO4 VDDQ_MMC2_2V8",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo4_consumer),
+	.consumer_supplies = max77686_ldo4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo5_data = {
+	.constraints = {
+		.name		= "LDO5 VDDQ_MMC1_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo5_consumer),
+	.consumer_supplies = max77686_ldo5_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo6_data = {
+	.constraints = {
+		.name		= "LDO6 VDD10_MPLL_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo7_data = {
+	.constraints = {
+		.name		= "LDO7 VDD10_EPLL_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo8_data = {
+	.constraints = {
+		.name		= "LDO8 VDD10_MIPI_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo8_consumer),
+	.consumer_supplies = max77686_ldo8_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo9_data = {
+	.constraints = {
+		.name		= "LDO9 VT_CORE_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo10_data = {
+	.constraints = {
+		.name		= "LDO10 VDD18_MIPI_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo10_consumer),
+	.consumer_supplies = max77686_ldo10_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo11_data = {
+	.constraints = {
+		.name		= "vdd_ldo11 range",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo11_consumer),
+	.consumer_supplies	= max77686_ldo11_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo12_data = {
+	.constraints = {
+		.name		= "LDO12 VDD33_UOTG_3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo13_data = {
+	.constraints = {
+		.name		= "LDO13 VDD18_MIPIHSI_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo13_consumer),
+	.consumer_supplies = max77686_ldo13_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo14_data = {
+	.constraints = {
+		.name		= "vdd_ldo14 range",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo14_consumer),
+	.consumer_supplies	= max77686_ldo14_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo15_data = {
+	.constraints = {
+		.name		= "LDO15 VDD10_OTG",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo16_data = {
+	.constraints = {
+		.name		= "LDO16 VDD18_HSIC",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo17_data = {
+	.constraints = {
+		.name		= "LDO17 VDDQ_CAM_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo17_consumer),
+	.consumer_supplies = max77686_ldo17_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo18_data = {
+	.constraints = {
+		.name		= "LDO18 VDDQ_ISP_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo18_consumer),
+	.consumer_supplies = max77686_ldo18_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo19_data = {
+	.constraints = {
+		.name		= "LDO19 VT_CAM_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 0,
+		.always_on	= 0,
+		.boot_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo19_consumer),
+	.consumer_supplies = max77686_ldo19_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo20_data = {
+	.constraints = {
+		.name		= "LDO20 EMMC_IO_1V8",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo21_data = {
+	.constraints = {
+		.name		= "LDO21 TFLASH_2V8",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo22_data = {
+	.constraints = {
+		.name		= "LDO22",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo23_data = {
+	.constraints = {
+		.name		= "LDO23 VDD_TOUCH_2V8",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo23_consumer),
+	.consumer_supplies = max77686_ldo23_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo24_data = {
+	.constraints = {
+		.name		= "LDO24 VDD_TOUCHLED_3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo24_consumer),
+	.consumer_supplies = max77686_ldo24_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo25_data = {
+	.constraints = {
+		.name		= "LDO25 VDDQ_LCD_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo25_consumer),
+	.consumer_supplies = max77686_ldo25_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo26_data = {
+	.constraints = {
+		.name		= "LDO26 VDD_MOTOR_3V0",
+		.min_uV		= 3000000,
+		.max_uV		= 3000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem	= {
+			.uV	= 3000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo26_consumer),
+	.consumer_supplies = max77686_ldo26_consumer,
+};
+
+struct max77686_opmode_data max77686_opmode_data[MAX77686_REG_MAX] = {
+	[MAX77686_LDO11] = {MAX77686_LDO11, MAX77686_OPMODE_STANDBY},
+	[MAX77686_LDO14] = {MAX77686_LDO14, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK1] = {MAX77686_BUCK1, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK2] = {MAX77686_BUCK2, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK3] = {MAX77686_BUCK3, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK4] = {MAX77686_BUCK4, MAX77686_OPMODE_STANDBY},
+};
+
+static struct max77686_regulator_data max77686_regulators[] = {
+	{ MAX77686_LDO1,	&max77686_ldo1_data },
+	{ MAX77686_LDO2,	&max77686_ldo2_data },
+	{ MAX77686_LDO3,	&max77686_ldo3_data },
+	{ MAX77686_LDO4,	&max77686_ldo4_data },
+	{ MAX77686_LDO5,	&max77686_ldo5_data },
+	{ MAX77686_LDO6,	&max77686_ldo6_data },
+	{ MAX77686_LDO7,	&max77686_ldo7_data },
+	{ MAX77686_LDO8,	&max77686_ldo8_data },
+	{ MAX77686_LDO9,	&max77686_ldo9_data },
+	{ MAX77686_LDO10,	&max77686_ldo10_data },
+	{ MAX77686_LDO11,	&max77686_ldo11_data },
+	{ MAX77686_LDO12,	&max77686_ldo12_data },
+	{ MAX77686_LDO13,	&max77686_ldo13_data },
+	{ MAX77686_LDO14,	&max77686_ldo14_data },
+	{ MAX77686_LDO15,	&max77686_ldo15_data },
+	{ MAX77686_LDO16,	&max77686_ldo16_data },
+	{ MAX77686_LDO17,	&max77686_ldo17_data },
+	{ MAX77686_LDO18,	&max77686_ldo18_data },
+	{ MAX77686_LDO19,	&max77686_ldo19_data },
+	{ MAX77686_LDO20,	&max77686_ldo20_data },
+	{ MAX77686_LDO21,	&max77686_ldo21_data },
+	{ MAX77686_LDO22,	&max77686_ldo22_data },
+	{ MAX77686_LDO23,	&max77686_ldo23_data },
+	{ MAX77686_LDO24,	&max77686_ldo24_data },
+	{ MAX77686_LDO25,	&max77686_ldo25_data },
+	{ MAX77686_LDO26,	&max77686_ldo26_data },
+
+	{ MAX77686_BUCK1,	&max77686_buck1_data },
+	{ MAX77686_BUCK2,	&max77686_buck2_data },
+	{ MAX77686_BUCK3,	&max77686_buck3_data },
+	{ MAX77686_BUCK4,	&max77686_buck4_data },
+	{ MAX77686_BUCK5,	&max77686_buck5_data },
+	{ MAX77686_BUCK6,	&max77686_buck6_data },
+	{ MAX77686_BUCK7,	&max77686_buck7_data },
+	{ MAX77686_BUCK8,	&max77686_buck8_data },
+	{ MAX77686_BUCK9,	&max77686_buck9_data },
+};
+
+static struct max77686_platform_data hkdk4412_max77686_info = {
+	.num_regulators	= ARRAY_SIZE(max77686_regulators),
+	.regulators	= max77686_regulators,
+	.irq_gpio	= 0,
+	.wakeup		= 0,
+
+	.opmode_data	= max77686_opmode_data,
+
+	.buck234_gpio_dvs[0]	= EXYNOS4_GPX2(3),
+	.buck234_gpio_dvs[1]	= EXYNOS4_GPX2(4),
+	.buck234_gpio_dvs[2]	= EXYNOS4_GPX2(5),
+
+	.buck2_voltage[0] = 1300000,	/* 1.3V */
+	.buck2_voltage[1] = 1000000,	/* 1.0V */
+	.buck2_voltage[2] = 950000,	/* 0.95V */
+	.buck2_voltage[3] = 900000,	/* 0.9V */
+	.buck2_voltage[4] = 1000000,	/* 1.0V */
+	.buck2_voltage[5] = 1000000,	/* 1.0V */
+	.buck2_voltage[6] = 950000,	/* 0.95V */
+	.buck2_voltage[7] = 900000,	/* 0.9V */
+
+	.buck3_voltage[0] = 1037500,	/* 1.0375V */
+	.buck3_voltage[1] = 1000000,	/* 1.0V */
+	.buck3_voltage[2] = 950000,	/* 0.95V */
+	.buck3_voltage[3] = 900000,	/* 0.9V */
+	.buck3_voltage[4] = 1000000,	/* 1.0V */
+	.buck3_voltage[5] = 1000000,	/* 1.0V */
+	.buck3_voltage[6] = 950000,	/* 0.95V */
+	.buck3_voltage[7] = 900000,	/* 0.9V */
+
+	.buck4_voltage[0] = 1100000,	/* 1.1V */
+	.buck4_voltage[1] = 1000000,	/* 1.0V */
+	.buck4_voltage[2] = 950000,	/* 0.95V */
+	.buck4_voltage[3] = 900000,	/* 0.9V */
+	.buck4_voltage[4] = 1000000,	/* 1.0V */
+	.buck4_voltage[5] = 1000000,	/* 1.0V */
+	.buck4_voltage[6] = 950000,	/* 0.95V */
+	.buck4_voltage[7] = 900000,	/* 0.9V */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs0[] __initdata = {
+	{
+		I2C_BOARD_INFO("max77686", (0x12 >> 1)),
+		.platform_data	= &hkdk4412_max77686_info,
+	}
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs1[] __initdata = {
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs3[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs7[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct gpio_led hkdk4412_gpio_leds[] = {
+	{
+		.name		= "led1",	/* D5 on ODROID-X */
+		.default_trigger	= "oneshot",
+		.gpio		= EXYNOS4_GPC1(0),
+		.active_low	= 1,
+	},
+	{
+		.name		= "led2",	/* D6 on ODROID-X */
+		.default_trigger	= "heartbeat",
+		.gpio		= EXYNOS4_GPC1(2),
+		.active_low	= 1,
+	},
+};
+
+static struct gpio_led_platform_data hkdk4412_gpio_led_info = {
+	.leds		= hkdk4412_gpio_leds,
+	.num_leds	= ARRAY_SIZE(hkdk4412_gpio_leds),
+};
+
+static struct platform_device hkdk4412_leds_gpio = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &hkdk4412_gpio_led_info,
+	},
+};
+
+/* USB EHCI */
+static struct s5p_ehci_platdata hkdk4412_ehci_pdata;
+
+static void __init hkdk4412_ehci_init(void)
+{
+	struct s5p_ehci_platdata *pdata = &hkdk4412_ehci_pdata;
+
+	s5p_ehci_set_platdata(pdata);
+}
+
+/* USB OHCI */
+static struct exynos4_ohci_platdata hkdk4412_ohci_pdata;
+
+static void __init hkdk4412_ohci_init(void)
+{
+	struct exynos4_ohci_platdata *pdata = &hkdk4412_ohci_pdata;
+
+	exynos4_ohci_set_platdata(pdata);
+}
+
+/* USB OTG */
+static struct s3c_hsotg_plat hkdk4412_hsotg_pdata;
+
+static struct platform_device *hkdk4412_devices[] __initdata = {
+	&s3c_device_hsmmc2,
+	&s3c_device_hsmmc3,
+	&s3c_device_i2c0,
+	&s3c_device_i2c1,
+	&s3c_device_i2c3,
+	&s3c_device_i2c7,
+	&s3c_device_rtc,
+	&s3c_device_usb_hsotg,
+	&s3c_device_wdt,
+	&s5p_device_ehci,
+	&s5p_device_fimc0,
+	&s5p_device_fimc1,
+	&s5p_device_fimc2,
+	&s5p_device_fimc3,
+	&s5p_device_fimc_md,
+	&s5p_device_mfc,
+	&s5p_device_mfc_l,
+	&s5p_device_mfc_r,
+	&exynos4_device_ohci,
+	&hkdk4412_leds_gpio,
+};
+
+static void __init hkdk4412_map_io(void)
+{
+	clk_xusbxti.rate = 24000000;
+
+	exynos_init_io(NULL, 0);
+	s3c24xx_init_clocks(clk_xusbxti.rate);
+	s3c24xx_init_uarts(hkdk4412_uartcfgs, ARRAY_SIZE(hkdk4412_uartcfgs));
+}
+
+static void __init hkdk4412_reserve(void)
+{
+	s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
+static void __init hkdk4412_gpio_init(void)
+{
+	/* Peripheral power enable (P3V3) */
+	gpio_request_one(EXYNOS4_GPA1(1), GPIOF_OUT_INIT_HIGH, "p3v3_en");
+}
+
+static void __init hkdk4412_machine_init(void)
+{
+	hkdk4412_gpio_init();
+
+	s3c_i2c0_set_platdata(NULL);
+	i2c_register_board_info(0, hkdk4412_i2c_devs0,
+				ARRAY_SIZE(hkdk4412_i2c_devs0));
+
+	s3c_i2c1_set_platdata(NULL);
+	i2c_register_board_info(1, hkdk4412_i2c_devs1,
+				ARRAY_SIZE(hkdk4412_i2c_devs1));
+
+	s3c_i2c3_set_platdata(NULL);
+	i2c_register_board_info(3, hkdk4412_i2c_devs3,
+				ARRAY_SIZE(hkdk4412_i2c_devs3));
+
+	s3c_i2c7_set_platdata(NULL);
+	i2c_register_board_info(7, hkdk4412_i2c_devs7,
+				ARRAY_SIZE(hkdk4412_i2c_devs7));
+
+	s3c_sdhci2_set_platdata(&hkdk4412_hsmmc2_pdata);
+	s3c_sdhci3_set_platdata(&hkdk4412_hsmmc3_pdata);
+
+	hkdk4412_ehci_init();
+	hkdk4412_ohci_init();
+	s3c_hsotg_set_platdata(&hkdk4412_hsotg_pdata);
+
+	platform_add_devices(hkdk4412_devices, ARRAY_SIZE(hkdk4412_devices));
+}
+
+MACHINE_START(ODROIDX, "ODROID-X")
+	/* Maintainer: Dongjin Kim <dongjin.kim@agreeyamobiity.net> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= hkdk4412_map_io,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= hkdk4412_machine_init,
+	.init_late	= exynos_init_late,
+	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
+	.reserve	= &hkdk4412_reserve,
+MACHINE_END
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 2997e56..e80ed9f 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -1206,3 +1206,4 @@ baileys			MACH_BAILEYS		BAILEYS			4169
 familybox		MACH_FAMILYBOX		FAMILYBOX		4170
 ensemble_mx35		MACH_ENSEMBLE_MX35	ENSEMBLE_MX35		4171
 sc_sps_1		MACH_SC_SPS_1		SC_SPS_1		4172
+odroidx		MACH_ODROIDX		ODROIDX			4289
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-06 14:10 ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-06 14:10 UTC (permalink / raw)
  Cc: Dongjin Kim, Kukjin Kim, Russell King, Tony Lindgren,
	Jon Medhurst, Shawn Guo, Uwe Kleine-König, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

The HKDK4412 is the CPU module developed by Hardkernel which is based on
Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
(4289) is registered.

Change-Id: I3af02808c03b9acea916c310390a4904ad92d761
Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
---
 arch/arm/mach-exynos/Kconfig         |   23 +
 arch/arm/mach-exynos/Makefile        |    1 +
 arch/arm/mach-exynos/mach-hkdk4412.c |  979 ++++++++++++++++++++++++++++++++++
 arch/arm/tools/mach-types            |    1 +
 4 files changed, 1004 insertions(+)
 create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index b5b4c8c..ae90773 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -54,6 +54,9 @@ config SOC_EXYNOS4412
 	default y
 	depends on ARCH_EXYNOS4
 	select SAMSUNG_DMADEV
+	select S5P_PM if PM
+	select S5P_SLEEP if PM
+	select PM_GENERIC_DOMAINS
 	help
 	  Enable EXYNOS4412 SoC support
 
@@ -394,6 +397,26 @@ config MACH_SMDK4412
 	select MACH_SMDK4212
 	help
 	  Machine support for Samsung SMDK4412
+
+config MACH_HKDK4412
+	bool "HKDK4412"
+	select SOC_EXYNOS4412
+	select MACH_SMDK4212
+	select S3C_DEV_HSMMC
+	select S3C_DEV_HSMMC1
+	select S3C_DEV_USB_HSOTG
+	select S5P_DEV_CSIS0
+	select S5P_DEV_G2D
+	select S5P_DEV_JPEG
+	select S5P_DEV_USB_EHCI
+	select S5P_DEV_I2C_HDMIPHY
+	select S5P_DEV_TV
+	select S5P_GPIO_INT
+	select EXYNOS4_DEV_USB_OHCI
+	select SAMSUNG_DEV_ADC
+	help
+	  Machine support for Odroid-X based on Samsung EXYNOS4412
+
 endif
 
 comment "Flattened Device Tree based board for EXYNOS SoCs"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 9b58024..dccc381 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
+obj-$(CONFIG_MACH_HKDK4412)		+= mach-hkdk4412.o
 
 obj-$(CONFIG_MACH_EXYNOS4_DT)		+= mach-exynos4-dt.o
 obj-$(CONFIG_MACH_EXYNOS5_DT)		+= mach-exynos5-dt.o
diff --git a/arch/arm/mach-exynos/mach-hkdk4412.c b/arch/arm/mach-exynos/mach-hkdk4412.c
new file mode 100644
index 0000000..3b090ae
--- /dev/null
+++ b/arch/arm/mach-exynos/mach-hkdk4412.c
@@ -0,0 +1,979 @@
+/*
+ * linux/arch/arm/mach-exynos4/mach-hkdk4412.c
+ *
+ * Copyright (c) 2012 AgreeYa Mobility Co., Ltd.
+ *		http://www.agreeyamobility.net
+ *
+ * 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/gpio.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/io.h>
+#include <linux/mfd/max77686.h>
+#include <linux/mmc/host.h>
+#include <linux/platform_device.h>
+#include <linux/pwm_backlight.h>
+#include <linux/regulator/machine.h>
+#include <linux/serial_core.h>
+#include <linux/platform_data/s3c-hsotg.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+#include <asm/mach-types.h>
+
+#include <plat/backlight.h>
+#include <plat/clock.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+#include <plat/keypad.h>
+#include <plat/mfc.h>
+#include <plat/regs-serial.h>
+#include <plat/sdhci.h>
+#include <plat/ehci.h>
+
+#include <mach/ohci.h>
+#include <mach/map.h>
+
+#include "common.h"
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define HKDK4412_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define HKDK4412_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define HKDK4412_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG4 |	\
+				 S5PV210_UFCON_RXTRIG4)
+
+static struct s3c2410_uartcfg hkdk4412_uartcfgs[] __initdata = {
+	[0] = {
+		.hwport		= 0,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[1] = {
+		.hwport		= 1,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[2] = {
+		.hwport		= 2,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[3] = {
+		.hwport		= 3,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc2_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
+	.max_width	= 8,
+	.host_caps	= MMC_CAP_8_BIT_DATA,
+#endif
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc3_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_mif", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck2_consumer[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck3_consumer[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] = {
+	REGULATOR_SUPPLY("vdd_g3d", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_alive", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo3_consumer[] = {
+	REGULATOR_SUPPLY("vddq_aud", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo4_consumer[] = {
+	REGULATOR_SUPPLY("vddq_mmc2", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo5_consumer[] = {
+	REGULATOR_SUPPLY("vddq_mmc1", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo8_consumer[] = {
+	REGULATOR_SUPPLY("vdd10_mipi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo10_consumer[] = {
+	REGULATOR_SUPPLY("vdd18_mipi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo11_consumer[] = {
+	REGULATOR_SUPPLY("vdd_ldo11", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo13_consumer[] = {
+	REGULATOR_SUPPLY("vdd18_mipihsi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo14_consumer[] = {
+	REGULATOR_SUPPLY("vdd_ldo14", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo17_consumer[] = {
+	REGULATOR_SUPPLY("vddq_cam", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo18_consumer[] = {
+	REGULATOR_SUPPLY("vddq_isp", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo19_consumer[] = {
+	REGULATOR_SUPPLY("vt_cam", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo23_consumer[] = {
+	REGULATOR_SUPPLY("vdd_touch", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo24_consumer[] = {
+	REGULATOR_SUPPLY("vdd_touchled", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo25_consumer[] = {
+	REGULATOR_SUPPLY("vddq_lcd", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo26_consumer[] = {
+	REGULATOR_SUPPLY("vdd_motor", NULL),
+};
+
+static struct regulator_init_data __initdata max77686_buck1_data = {
+	.constraints = {
+		.name		= "vdd_mif range",
+		.min_uV		= 800000,
+		.max_uV		= 1050000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck1_consumer),
+	.consumer_supplies = max77686_buck1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck2_data = {
+	.constraints = {
+		.name		= "vdd_arm range",
+		.min_uV		= 800000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck2_consumer),
+	.consumer_supplies = max77686_buck2_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck3_data = {
+	.constraints = {
+		.name		= "vdd_int range",
+		.min_uV		= 800000,
+		.max_uV		= 1150000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck3_consumer),
+	.consumer_supplies = max77686_buck3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck4_data = {
+	.constraints = {
+		.name		= "vdd_g3d range",
+		.min_uV		= 850000,
+		.max_uV		= 1200000,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				  REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck4_consumer),
+	.consumer_supplies = max77686_buck4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck5_data = {
+	.constraints = {
+		.name		= "BUCK5 VDDQ_CKEM1_2",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck6_data = {
+	.constraints = {
+		.name		= "BUCK6 1V35",
+		.min_uV		= 1350000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1350000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck7_data = {
+	.constraints = {
+		.name		= "BUCK7 2V0",
+		.min_uV		= 2000000,
+		.max_uV		= 2000000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2000000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck8_data = {
+	.constraints = {
+		.name		= "BUCK8 3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck9_data = {
+	.constraints = {
+		.name		= "BUCK9 1V2",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo1_data = {
+	.constraints = {
+		.name		= "LDO1 VDD_ALIVE",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo1_consumer),
+	.consumer_supplies = max77686_ldo1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo2_data = {
+	.constraints = {
+		.name		= "LDO2 VDDQ_M1_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo3_data = {
+	.constraints = {
+		.name		= "LDO3 VDDQ_AUD_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo3_consumer),
+	.consumer_supplies = max77686_ldo3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo4_data = {
+	.constraints = {
+		.name		= "LDO4 VDDQ_MMC2_2V8",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo4_consumer),
+	.consumer_supplies = max77686_ldo4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo5_data = {
+	.constraints = {
+		.name		= "LDO5 VDDQ_MMC1_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo5_consumer),
+	.consumer_supplies = max77686_ldo5_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo6_data = {
+	.constraints = {
+		.name		= "LDO6 VDD10_MPLL_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo7_data = {
+	.constraints = {
+		.name		= "LDO7 VDD10_EPLL_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo8_data = {
+	.constraints = {
+		.name		= "LDO8 VDD10_MIPI_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo8_consumer),
+	.consumer_supplies = max77686_ldo8_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo9_data = {
+	.constraints = {
+		.name		= "LDO9 VT_CORE_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo10_data = {
+	.constraints = {
+		.name		= "LDO10 VDD18_MIPI_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo10_consumer),
+	.consumer_supplies = max77686_ldo10_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo11_data = {
+	.constraints = {
+		.name		= "vdd_ldo11 range",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo11_consumer),
+	.consumer_supplies	= max77686_ldo11_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo12_data = {
+	.constraints = {
+		.name		= "LDO12 VDD33_UOTG_3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo13_data = {
+	.constraints = {
+		.name		= "LDO13 VDD18_MIPIHSI_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo13_consumer),
+	.consumer_supplies = max77686_ldo13_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo14_data = {
+	.constraints = {
+		.name		= "vdd_ldo14 range",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo14_consumer),
+	.consumer_supplies	= max77686_ldo14_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo15_data = {
+	.constraints = {
+		.name		= "LDO15 VDD10_OTG",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo16_data = {
+	.constraints = {
+		.name		= "LDO16 VDD18_HSIC",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo17_data = {
+	.constraints = {
+		.name		= "LDO17 VDDQ_CAM_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo17_consumer),
+	.consumer_supplies = max77686_ldo17_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo18_data = {
+	.constraints = {
+		.name		= "LDO18 VDDQ_ISP_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo18_consumer),
+	.consumer_supplies = max77686_ldo18_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo19_data = {
+	.constraints = {
+		.name		= "LDO19 VT_CAM_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 0,
+		.always_on	= 0,
+		.boot_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo19_consumer),
+	.consumer_supplies = max77686_ldo19_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo20_data = {
+	.constraints = {
+		.name		= "LDO20 EMMC_IO_1V8",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo21_data = {
+	.constraints = {
+		.name		= "LDO21 TFLASH_2V8",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo22_data = {
+	.constraints = {
+		.name		= "LDO22",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo23_data = {
+	.constraints = {
+		.name		= "LDO23 VDD_TOUCH_2V8",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo23_consumer),
+	.consumer_supplies = max77686_ldo23_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo24_data = {
+	.constraints = {
+		.name		= "LDO24 VDD_TOUCHLED_3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo24_consumer),
+	.consumer_supplies = max77686_ldo24_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo25_data = {
+	.constraints = {
+		.name		= "LDO25 VDDQ_LCD_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo25_consumer),
+	.consumer_supplies = max77686_ldo25_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo26_data = {
+	.constraints = {
+		.name		= "LDO26 VDD_MOTOR_3V0",
+		.min_uV		= 3000000,
+		.max_uV		= 3000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem	= {
+			.uV	= 3000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo26_consumer),
+	.consumer_supplies = max77686_ldo26_consumer,
+};
+
+struct max77686_opmode_data max77686_opmode_data[MAX77686_REG_MAX] = {
+	[MAX77686_LDO11] = {MAX77686_LDO11, MAX77686_OPMODE_STANDBY},
+	[MAX77686_LDO14] = {MAX77686_LDO14, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK1] = {MAX77686_BUCK1, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK2] = {MAX77686_BUCK2, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK3] = {MAX77686_BUCK3, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK4] = {MAX77686_BUCK4, MAX77686_OPMODE_STANDBY},
+};
+
+static struct max77686_regulator_data max77686_regulators[] = {
+	{ MAX77686_LDO1,	&max77686_ldo1_data },
+	{ MAX77686_LDO2,	&max77686_ldo2_data },
+	{ MAX77686_LDO3,	&max77686_ldo3_data },
+	{ MAX77686_LDO4,	&max77686_ldo4_data },
+	{ MAX77686_LDO5,	&max77686_ldo5_data },
+	{ MAX77686_LDO6,	&max77686_ldo6_data },
+	{ MAX77686_LDO7,	&max77686_ldo7_data },
+	{ MAX77686_LDO8,	&max77686_ldo8_data },
+	{ MAX77686_LDO9,	&max77686_ldo9_data },
+	{ MAX77686_LDO10,	&max77686_ldo10_data },
+	{ MAX77686_LDO11,	&max77686_ldo11_data },
+	{ MAX77686_LDO12,	&max77686_ldo12_data },
+	{ MAX77686_LDO13,	&max77686_ldo13_data },
+	{ MAX77686_LDO14,	&max77686_ldo14_data },
+	{ MAX77686_LDO15,	&max77686_ldo15_data },
+	{ MAX77686_LDO16,	&max77686_ldo16_data },
+	{ MAX77686_LDO17,	&max77686_ldo17_data },
+	{ MAX77686_LDO18,	&max77686_ldo18_data },
+	{ MAX77686_LDO19,	&max77686_ldo19_data },
+	{ MAX77686_LDO20,	&max77686_ldo20_data },
+	{ MAX77686_LDO21,	&max77686_ldo21_data },
+	{ MAX77686_LDO22,	&max77686_ldo22_data },
+	{ MAX77686_LDO23,	&max77686_ldo23_data },
+	{ MAX77686_LDO24,	&max77686_ldo24_data },
+	{ MAX77686_LDO25,	&max77686_ldo25_data },
+	{ MAX77686_LDO26,	&max77686_ldo26_data },
+
+	{ MAX77686_BUCK1,	&max77686_buck1_data },
+	{ MAX77686_BUCK2,	&max77686_buck2_data },
+	{ MAX77686_BUCK3,	&max77686_buck3_data },
+	{ MAX77686_BUCK4,	&max77686_buck4_data },
+	{ MAX77686_BUCK5,	&max77686_buck5_data },
+	{ MAX77686_BUCK6,	&max77686_buck6_data },
+	{ MAX77686_BUCK7,	&max77686_buck7_data },
+	{ MAX77686_BUCK8,	&max77686_buck8_data },
+	{ MAX77686_BUCK9,	&max77686_buck9_data },
+};
+
+static struct max77686_platform_data hkdk4412_max77686_info = {
+	.num_regulators	= ARRAY_SIZE(max77686_regulators),
+	.regulators	= max77686_regulators,
+	.irq_gpio	= 0,
+	.wakeup		= 0,
+
+	.opmode_data	= max77686_opmode_data,
+
+	.buck234_gpio_dvs[0]	= EXYNOS4_GPX2(3),
+	.buck234_gpio_dvs[1]	= EXYNOS4_GPX2(4),
+	.buck234_gpio_dvs[2]	= EXYNOS4_GPX2(5),
+
+	.buck2_voltage[0] = 1300000,	/* 1.3V */
+	.buck2_voltage[1] = 1000000,	/* 1.0V */
+	.buck2_voltage[2] = 950000,	/* 0.95V */
+	.buck2_voltage[3] = 900000,	/* 0.9V */
+	.buck2_voltage[4] = 1000000,	/* 1.0V */
+	.buck2_voltage[5] = 1000000,	/* 1.0V */
+	.buck2_voltage[6] = 950000,	/* 0.95V */
+	.buck2_voltage[7] = 900000,	/* 0.9V */
+
+	.buck3_voltage[0] = 1037500,	/* 1.0375V */
+	.buck3_voltage[1] = 1000000,	/* 1.0V */
+	.buck3_voltage[2] = 950000,	/* 0.95V */
+	.buck3_voltage[3] = 900000,	/* 0.9V */
+	.buck3_voltage[4] = 1000000,	/* 1.0V */
+	.buck3_voltage[5] = 1000000,	/* 1.0V */
+	.buck3_voltage[6] = 950000,	/* 0.95V */
+	.buck3_voltage[7] = 900000,	/* 0.9V */
+
+	.buck4_voltage[0] = 1100000,	/* 1.1V */
+	.buck4_voltage[1] = 1000000,	/* 1.0V */
+	.buck4_voltage[2] = 950000,	/* 0.95V */
+	.buck4_voltage[3] = 900000,	/* 0.9V */
+	.buck4_voltage[4] = 1000000,	/* 1.0V */
+	.buck4_voltage[5] = 1000000,	/* 1.0V */
+	.buck4_voltage[6] = 950000,	/* 0.95V */
+	.buck4_voltage[7] = 900000,	/* 0.9V */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs0[] __initdata = {
+	{
+		I2C_BOARD_INFO("max77686", (0x12 >> 1)),
+		.platform_data	= &hkdk4412_max77686_info,
+	}
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs1[] __initdata = {
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs3[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs7[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct gpio_led hkdk4412_gpio_leds[] = {
+	{
+		.name		= "led1",	/* D5 on ODROID-X */
+		.default_trigger	= "oneshot",
+		.gpio		= EXYNOS4_GPC1(0),
+		.active_low	= 1,
+	},
+	{
+		.name		= "led2",	/* D6 on ODROID-X */
+		.default_trigger	= "heartbeat",
+		.gpio		= EXYNOS4_GPC1(2),
+		.active_low	= 1,
+	},
+};
+
+static struct gpio_led_platform_data hkdk4412_gpio_led_info = {
+	.leds		= hkdk4412_gpio_leds,
+	.num_leds	= ARRAY_SIZE(hkdk4412_gpio_leds),
+};
+
+static struct platform_device hkdk4412_leds_gpio = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &hkdk4412_gpio_led_info,
+	},
+};
+
+/* USB EHCI */
+static struct s5p_ehci_platdata hkdk4412_ehci_pdata;
+
+static void __init hkdk4412_ehci_init(void)
+{
+	struct s5p_ehci_platdata *pdata = &hkdk4412_ehci_pdata;
+
+	s5p_ehci_set_platdata(pdata);
+}
+
+/* USB OHCI */
+static struct exynos4_ohci_platdata hkdk4412_ohci_pdata;
+
+static void __init hkdk4412_ohci_init(void)
+{
+	struct exynos4_ohci_platdata *pdata = &hkdk4412_ohci_pdata;
+
+	exynos4_ohci_set_platdata(pdata);
+}
+
+/* USB OTG */
+static struct s3c_hsotg_plat hkdk4412_hsotg_pdata;
+
+static struct platform_device *hkdk4412_devices[] __initdata = {
+	&s3c_device_hsmmc2,
+	&s3c_device_hsmmc3,
+	&s3c_device_i2c0,
+	&s3c_device_i2c1,
+	&s3c_device_i2c3,
+	&s3c_device_i2c7,
+	&s3c_device_rtc,
+	&s3c_device_usb_hsotg,
+	&s3c_device_wdt,
+	&s5p_device_ehci,
+	&s5p_device_fimc0,
+	&s5p_device_fimc1,
+	&s5p_device_fimc2,
+	&s5p_device_fimc3,
+	&s5p_device_fimc_md,
+	&s5p_device_mfc,
+	&s5p_device_mfc_l,
+	&s5p_device_mfc_r,
+	&exynos4_device_ohci,
+	&hkdk4412_leds_gpio,
+};
+
+static void __init hkdk4412_map_io(void)
+{
+	clk_xusbxti.rate = 24000000;
+
+	exynos_init_io(NULL, 0);
+	s3c24xx_init_clocks(clk_xusbxti.rate);
+	s3c24xx_init_uarts(hkdk4412_uartcfgs, ARRAY_SIZE(hkdk4412_uartcfgs));
+}
+
+static void __init hkdk4412_reserve(void)
+{
+	s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
+static void __init hkdk4412_gpio_init(void)
+{
+	/* Peripheral power enable (P3V3) */
+	gpio_request_one(EXYNOS4_GPA1(1), GPIOF_OUT_INIT_HIGH, "p3v3_en");
+}
+
+static void __init hkdk4412_machine_init(void)
+{
+	hkdk4412_gpio_init();
+
+	s3c_i2c0_set_platdata(NULL);
+	i2c_register_board_info(0, hkdk4412_i2c_devs0,
+				ARRAY_SIZE(hkdk4412_i2c_devs0));
+
+	s3c_i2c1_set_platdata(NULL);
+	i2c_register_board_info(1, hkdk4412_i2c_devs1,
+				ARRAY_SIZE(hkdk4412_i2c_devs1));
+
+	s3c_i2c3_set_platdata(NULL);
+	i2c_register_board_info(3, hkdk4412_i2c_devs3,
+				ARRAY_SIZE(hkdk4412_i2c_devs3));
+
+	s3c_i2c7_set_platdata(NULL);
+	i2c_register_board_info(7, hkdk4412_i2c_devs7,
+				ARRAY_SIZE(hkdk4412_i2c_devs7));
+
+	s3c_sdhci2_set_platdata(&hkdk4412_hsmmc2_pdata);
+	s3c_sdhci3_set_platdata(&hkdk4412_hsmmc3_pdata);
+
+	hkdk4412_ehci_init();
+	hkdk4412_ohci_init();
+	s3c_hsotg_set_platdata(&hkdk4412_hsotg_pdata);
+
+	platform_add_devices(hkdk4412_devices, ARRAY_SIZE(hkdk4412_devices));
+}
+
+MACHINE_START(ODROIDX, "ODROID-X")
+	/* Maintainer: Dongjin Kim <dongjin.kim@agreeyamobiity.net> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= hkdk4412_map_io,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= hkdk4412_machine_init,
+	.init_late	= exynos_init_late,
+	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
+	.reserve	= &hkdk4412_reserve,
+MACHINE_END
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 2997e56..e80ed9f 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -1206,3 +1206,4 @@ baileys			MACH_BAILEYS		BAILEYS			4169
 familybox		MACH_FAMILYBOX		FAMILYBOX		4170
 ensemble_mx35		MACH_ENSEMBLE_MX35	ENSEMBLE_MX35		4171
 sc_sps_1		MACH_SC_SPS_1		SC_SPS_1		4172
+odroidx		MACH_ODROIDX		ODROIDX			4289
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-06 14:10 ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-06 14:10 UTC (permalink / raw)
  To: linux-arm-kernel

The HKDK4412 is the CPU module developed by Hardkernel which is based on
Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
(4289) is registered.

Change-Id: I3af02808c03b9acea916c310390a4904ad92d761
Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
---
 arch/arm/mach-exynos/Kconfig         |   23 +
 arch/arm/mach-exynos/Makefile        |    1 +
 arch/arm/mach-exynos/mach-hkdk4412.c |  979 ++++++++++++++++++++++++++++++++++
 arch/arm/tools/mach-types            |    1 +
 4 files changed, 1004 insertions(+)
 create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index b5b4c8c..ae90773 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -54,6 +54,9 @@ config SOC_EXYNOS4412
 	default y
 	depends on ARCH_EXYNOS4
 	select SAMSUNG_DMADEV
+	select S5P_PM if PM
+	select S5P_SLEEP if PM
+	select PM_GENERIC_DOMAINS
 	help
 	  Enable EXYNOS4412 SoC support
 
@@ -394,6 +397,26 @@ config MACH_SMDK4412
 	select MACH_SMDK4212
 	help
 	  Machine support for Samsung SMDK4412
+
+config MACH_HKDK4412
+	bool "HKDK4412"
+	select SOC_EXYNOS4412
+	select MACH_SMDK4212
+	select S3C_DEV_HSMMC
+	select S3C_DEV_HSMMC1
+	select S3C_DEV_USB_HSOTG
+	select S5P_DEV_CSIS0
+	select S5P_DEV_G2D
+	select S5P_DEV_JPEG
+	select S5P_DEV_USB_EHCI
+	select S5P_DEV_I2C_HDMIPHY
+	select S5P_DEV_TV
+	select S5P_GPIO_INT
+	select EXYNOS4_DEV_USB_OHCI
+	select SAMSUNG_DEV_ADC
+	help
+	  Machine support for Odroid-X based on Samsung EXYNOS4412
+
 endif
 
 comment "Flattened Device Tree based board for EXYNOS SoCs"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 9b58024..dccc381 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
+obj-$(CONFIG_MACH_HKDK4412)		+= mach-hkdk4412.o
 
 obj-$(CONFIG_MACH_EXYNOS4_DT)		+= mach-exynos4-dt.o
 obj-$(CONFIG_MACH_EXYNOS5_DT)		+= mach-exynos5-dt.o
diff --git a/arch/arm/mach-exynos/mach-hkdk4412.c b/arch/arm/mach-exynos/mach-hkdk4412.c
new file mode 100644
index 0000000..3b090ae
--- /dev/null
+++ b/arch/arm/mach-exynos/mach-hkdk4412.c
@@ -0,0 +1,979 @@
+/*
+ * linux/arch/arm/mach-exynos4/mach-hkdk4412.c
+ *
+ * Copyright (c) 2012 AgreeYa Mobility Co., Ltd.
+ *		http://www.agreeyamobility.net
+ *
+ * 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/gpio.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/io.h>
+#include <linux/mfd/max77686.h>
+#include <linux/mmc/host.h>
+#include <linux/platform_device.h>
+#include <linux/pwm_backlight.h>
+#include <linux/regulator/machine.h>
+#include <linux/serial_core.h>
+#include <linux/platform_data/s3c-hsotg.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+#include <asm/mach-types.h>
+
+#include <plat/backlight.h>
+#include <plat/clock.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+#include <plat/keypad.h>
+#include <plat/mfc.h>
+#include <plat/regs-serial.h>
+#include <plat/sdhci.h>
+#include <plat/ehci.h>
+
+#include <mach/ohci.h>
+#include <mach/map.h>
+
+#include "common.h"
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define HKDK4412_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define HKDK4412_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define HKDK4412_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG4 |	\
+				 S5PV210_UFCON_RXTRIG4)
+
+static struct s3c2410_uartcfg hkdk4412_uartcfgs[] __initdata = {
+	[0] = {
+		.hwport		= 0,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[1] = {
+		.hwport		= 1,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[2] = {
+		.hwport		= 2,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[3] = {
+		.hwport		= 3,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc2_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
+	.max_width	= 8,
+	.host_caps	= MMC_CAP_8_BIT_DATA,
+#endif
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc3_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_mif", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck2_consumer[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck3_consumer[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] = {
+	REGULATOR_SUPPLY("vdd_g3d", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_alive", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo3_consumer[] = {
+	REGULATOR_SUPPLY("vddq_aud", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo4_consumer[] = {
+	REGULATOR_SUPPLY("vddq_mmc2", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo5_consumer[] = {
+	REGULATOR_SUPPLY("vddq_mmc1", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo8_consumer[] = {
+	REGULATOR_SUPPLY("vdd10_mipi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo10_consumer[] = {
+	REGULATOR_SUPPLY("vdd18_mipi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo11_consumer[] = {
+	REGULATOR_SUPPLY("vdd_ldo11", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo13_consumer[] = {
+	REGULATOR_SUPPLY("vdd18_mipihsi", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo14_consumer[] = {
+	REGULATOR_SUPPLY("vdd_ldo14", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo17_consumer[] = {
+	REGULATOR_SUPPLY("vddq_cam", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo18_consumer[] = {
+	REGULATOR_SUPPLY("vddq_isp", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo19_consumer[] = {
+	REGULATOR_SUPPLY("vt_cam", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo23_consumer[] = {
+	REGULATOR_SUPPLY("vdd_touch", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo24_consumer[] = {
+	REGULATOR_SUPPLY("vdd_touchled", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo25_consumer[] = {
+	REGULATOR_SUPPLY("vddq_lcd", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo26_consumer[] = {
+	REGULATOR_SUPPLY("vdd_motor", NULL),
+};
+
+static struct regulator_init_data __initdata max77686_buck1_data = {
+	.constraints = {
+		.name		= "vdd_mif range",
+		.min_uV		= 800000,
+		.max_uV		= 1050000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck1_consumer),
+	.consumer_supplies = max77686_buck1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck2_data = {
+	.constraints = {
+		.name		= "vdd_arm range",
+		.min_uV		= 800000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck2_consumer),
+	.consumer_supplies = max77686_buck2_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck3_data = {
+	.constraints = {
+		.name		= "vdd_int range",
+		.min_uV		= 800000,
+		.max_uV		= 1150000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck3_consumer),
+	.consumer_supplies = max77686_buck3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck4_data = {
+	.constraints = {
+		.name		= "vdd_g3d range",
+		.min_uV		= 850000,
+		.max_uV		= 1200000,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				  REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck4_consumer),
+	.consumer_supplies = max77686_buck4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck5_data = {
+	.constraints = {
+		.name		= "BUCK5 VDDQ_CKEM1_2",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck6_data = {
+	.constraints = {
+		.name		= "BUCK6 1V35",
+		.min_uV		= 1350000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1350000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck7_data = {
+	.constraints = {
+		.name		= "BUCK7 2V0",
+		.min_uV		= 2000000,
+		.max_uV		= 2000000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2000000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck8_data = {
+	.constraints = {
+		.name		= "BUCK8 3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck9_data = {
+	.constraints = {
+		.name		= "BUCK9 1V2",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo1_data = {
+	.constraints = {
+		.name		= "LDO1 VDD_ALIVE",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo1_consumer),
+	.consumer_supplies = max77686_ldo1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo2_data = {
+	.constraints = {
+		.name		= "LDO2 VDDQ_M1_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo3_data = {
+	.constraints = {
+		.name		= "LDO3 VDDQ_AUD_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo3_consumer),
+	.consumer_supplies = max77686_ldo3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo4_data = {
+	.constraints = {
+		.name		= "LDO4 VDDQ_MMC2_2V8",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo4_consumer),
+	.consumer_supplies = max77686_ldo4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo5_data = {
+	.constraints = {
+		.name		= "LDO5 VDDQ_MMC1_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo5_consumer),
+	.consumer_supplies = max77686_ldo5_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo6_data = {
+	.constraints = {
+		.name		= "LDO6 VDD10_MPLL_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo7_data = {
+	.constraints = {
+		.name		= "LDO7 VDD10_EPLL_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo8_data = {
+	.constraints = {
+		.name		= "LDO8 VDD10_MIPI_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo8_consumer),
+	.consumer_supplies = max77686_ldo8_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo9_data = {
+	.constraints = {
+		.name		= "LDO9 VT_CORE_1V0",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo10_data = {
+	.constraints = {
+		.name		= "LDO10 VDD18_MIPI_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo10_consumer),
+	.consumer_supplies = max77686_ldo10_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo11_data = {
+	.constraints = {
+		.name		= "vdd_ldo11 range",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo11_consumer),
+	.consumer_supplies	= max77686_ldo11_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo12_data = {
+	.constraints = {
+		.name		= "LDO12 VDD33_UOTG_3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo13_data = {
+	.constraints = {
+		.name		= "LDO13 VDD18_MIPIHSI_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo13_consumer),
+	.consumer_supplies = max77686_ldo13_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo14_data = {
+	.constraints = {
+		.name		= "vdd_ldo14 range",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo14_consumer),
+	.consumer_supplies	= max77686_ldo14_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo15_data = {
+	.constraints = {
+		.name		= "LDO15 VDD10_OTG",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo16_data = {
+	.constraints = {
+		.name		= "LDO16 VDD18_HSIC",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo17_data = {
+	.constraints = {
+		.name		= "LDO17 VDDQ_CAM_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo17_consumer),
+	.consumer_supplies = max77686_ldo17_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo18_data = {
+	.constraints = {
+		.name		= "LDO18 VDDQ_ISP_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo18_consumer),
+	.consumer_supplies = max77686_ldo18_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo19_data = {
+	.constraints = {
+		.name		= "LDO19 VT_CAM_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 0,
+		.always_on	= 0,
+		.boot_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo19_consumer),
+	.consumer_supplies = max77686_ldo19_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo20_data = {
+	.constraints = {
+		.name		= "LDO20 EMMC_IO_1V8",
+		.min_uV		= 1900000,
+		.max_uV		= 1900000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1900000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo21_data = {
+	.constraints = {
+		.name		= "LDO21 TFLASH_2V8",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo22_data = {
+	.constraints = {
+		.name		= "LDO22",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo23_data = {
+	.constraints = {
+		.name		= "LDO23 VDD_TOUCH_2V8",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo23_consumer),
+	.consumer_supplies = max77686_ldo23_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo24_data = {
+	.constraints = {
+		.name		= "LDO24 VDD_TOUCHLED_3V3",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo24_consumer),
+	.consumer_supplies = max77686_ldo24_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo25_data = {
+	.constraints = {
+		.name		= "LDO25 VDDQ_LCD_1V8",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo25_consumer),
+	.consumer_supplies = max77686_ldo25_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo26_data = {
+	.constraints = {
+		.name		= "LDO26 VDD_MOTOR_3V0",
+		.min_uV		= 3000000,
+		.max_uV		= 3000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem	= {
+			.uV	= 3000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo26_consumer),
+	.consumer_supplies = max77686_ldo26_consumer,
+};
+
+struct max77686_opmode_data max77686_opmode_data[MAX77686_REG_MAX] = {
+	[MAX77686_LDO11] = {MAX77686_LDO11, MAX77686_OPMODE_STANDBY},
+	[MAX77686_LDO14] = {MAX77686_LDO14, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK1] = {MAX77686_BUCK1, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK2] = {MAX77686_BUCK2, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK3] = {MAX77686_BUCK3, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK4] = {MAX77686_BUCK4, MAX77686_OPMODE_STANDBY},
+};
+
+static struct max77686_regulator_data max77686_regulators[] = {
+	{ MAX77686_LDO1,	&max77686_ldo1_data },
+	{ MAX77686_LDO2,	&max77686_ldo2_data },
+	{ MAX77686_LDO3,	&max77686_ldo3_data },
+	{ MAX77686_LDO4,	&max77686_ldo4_data },
+	{ MAX77686_LDO5,	&max77686_ldo5_data },
+	{ MAX77686_LDO6,	&max77686_ldo6_data },
+	{ MAX77686_LDO7,	&max77686_ldo7_data },
+	{ MAX77686_LDO8,	&max77686_ldo8_data },
+	{ MAX77686_LDO9,	&max77686_ldo9_data },
+	{ MAX77686_LDO10,	&max77686_ldo10_data },
+	{ MAX77686_LDO11,	&max77686_ldo11_data },
+	{ MAX77686_LDO12,	&max77686_ldo12_data },
+	{ MAX77686_LDO13,	&max77686_ldo13_data },
+	{ MAX77686_LDO14,	&max77686_ldo14_data },
+	{ MAX77686_LDO15,	&max77686_ldo15_data },
+	{ MAX77686_LDO16,	&max77686_ldo16_data },
+	{ MAX77686_LDO17,	&max77686_ldo17_data },
+	{ MAX77686_LDO18,	&max77686_ldo18_data },
+	{ MAX77686_LDO19,	&max77686_ldo19_data },
+	{ MAX77686_LDO20,	&max77686_ldo20_data },
+	{ MAX77686_LDO21,	&max77686_ldo21_data },
+	{ MAX77686_LDO22,	&max77686_ldo22_data },
+	{ MAX77686_LDO23,	&max77686_ldo23_data },
+	{ MAX77686_LDO24,	&max77686_ldo24_data },
+	{ MAX77686_LDO25,	&max77686_ldo25_data },
+	{ MAX77686_LDO26,	&max77686_ldo26_data },
+
+	{ MAX77686_BUCK1,	&max77686_buck1_data },
+	{ MAX77686_BUCK2,	&max77686_buck2_data },
+	{ MAX77686_BUCK3,	&max77686_buck3_data },
+	{ MAX77686_BUCK4,	&max77686_buck4_data },
+	{ MAX77686_BUCK5,	&max77686_buck5_data },
+	{ MAX77686_BUCK6,	&max77686_buck6_data },
+	{ MAX77686_BUCK7,	&max77686_buck7_data },
+	{ MAX77686_BUCK8,	&max77686_buck8_data },
+	{ MAX77686_BUCK9,	&max77686_buck9_data },
+};
+
+static struct max77686_platform_data hkdk4412_max77686_info = {
+	.num_regulators	= ARRAY_SIZE(max77686_regulators),
+	.regulators	= max77686_regulators,
+	.irq_gpio	= 0,
+	.wakeup		= 0,
+
+	.opmode_data	= max77686_opmode_data,
+
+	.buck234_gpio_dvs[0]	= EXYNOS4_GPX2(3),
+	.buck234_gpio_dvs[1]	= EXYNOS4_GPX2(4),
+	.buck234_gpio_dvs[2]	= EXYNOS4_GPX2(5),
+
+	.buck2_voltage[0] = 1300000,	/* 1.3V */
+	.buck2_voltage[1] = 1000000,	/* 1.0V */
+	.buck2_voltage[2] = 950000,	/* 0.95V */
+	.buck2_voltage[3] = 900000,	/* 0.9V */
+	.buck2_voltage[4] = 1000000,	/* 1.0V */
+	.buck2_voltage[5] = 1000000,	/* 1.0V */
+	.buck2_voltage[6] = 950000,	/* 0.95V */
+	.buck2_voltage[7] = 900000,	/* 0.9V */
+
+	.buck3_voltage[0] = 1037500,	/* 1.0375V */
+	.buck3_voltage[1] = 1000000,	/* 1.0V */
+	.buck3_voltage[2] = 950000,	/* 0.95V */
+	.buck3_voltage[3] = 900000,	/* 0.9V */
+	.buck3_voltage[4] = 1000000,	/* 1.0V */
+	.buck3_voltage[5] = 1000000,	/* 1.0V */
+	.buck3_voltage[6] = 950000,	/* 0.95V */
+	.buck3_voltage[7] = 900000,	/* 0.9V */
+
+	.buck4_voltage[0] = 1100000,	/* 1.1V */
+	.buck4_voltage[1] = 1000000,	/* 1.0V */
+	.buck4_voltage[2] = 950000,	/* 0.95V */
+	.buck4_voltage[3] = 900000,	/* 0.9V */
+	.buck4_voltage[4] = 1000000,	/* 1.0V */
+	.buck4_voltage[5] = 1000000,	/* 1.0V */
+	.buck4_voltage[6] = 950000,	/* 0.95V */
+	.buck4_voltage[7] = 900000,	/* 0.9V */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs0[] __initdata = {
+	{
+		I2C_BOARD_INFO("max77686", (0x12 >> 1)),
+		.platform_data	= &hkdk4412_max77686_info,
+	}
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs1[] __initdata = {
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs3[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs7[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct gpio_led hkdk4412_gpio_leds[] = {
+	{
+		.name		= "led1",	/* D5 on ODROID-X */
+		.default_trigger	= "oneshot",
+		.gpio		= EXYNOS4_GPC1(0),
+		.active_low	= 1,
+	},
+	{
+		.name		= "led2",	/* D6 on ODROID-X */
+		.default_trigger	= "heartbeat",
+		.gpio		= EXYNOS4_GPC1(2),
+		.active_low	= 1,
+	},
+};
+
+static struct gpio_led_platform_data hkdk4412_gpio_led_info = {
+	.leds		= hkdk4412_gpio_leds,
+	.num_leds	= ARRAY_SIZE(hkdk4412_gpio_leds),
+};
+
+static struct platform_device hkdk4412_leds_gpio = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &hkdk4412_gpio_led_info,
+	},
+};
+
+/* USB EHCI */
+static struct s5p_ehci_platdata hkdk4412_ehci_pdata;
+
+static void __init hkdk4412_ehci_init(void)
+{
+	struct s5p_ehci_platdata *pdata = &hkdk4412_ehci_pdata;
+
+	s5p_ehci_set_platdata(pdata);
+}
+
+/* USB OHCI */
+static struct exynos4_ohci_platdata hkdk4412_ohci_pdata;
+
+static void __init hkdk4412_ohci_init(void)
+{
+	struct exynos4_ohci_platdata *pdata = &hkdk4412_ohci_pdata;
+
+	exynos4_ohci_set_platdata(pdata);
+}
+
+/* USB OTG */
+static struct s3c_hsotg_plat hkdk4412_hsotg_pdata;
+
+static struct platform_device *hkdk4412_devices[] __initdata = {
+	&s3c_device_hsmmc2,
+	&s3c_device_hsmmc3,
+	&s3c_device_i2c0,
+	&s3c_device_i2c1,
+	&s3c_device_i2c3,
+	&s3c_device_i2c7,
+	&s3c_device_rtc,
+	&s3c_device_usb_hsotg,
+	&s3c_device_wdt,
+	&s5p_device_ehci,
+	&s5p_device_fimc0,
+	&s5p_device_fimc1,
+	&s5p_device_fimc2,
+	&s5p_device_fimc3,
+	&s5p_device_fimc_md,
+	&s5p_device_mfc,
+	&s5p_device_mfc_l,
+	&s5p_device_mfc_r,
+	&exynos4_device_ohci,
+	&hkdk4412_leds_gpio,
+};
+
+static void __init hkdk4412_map_io(void)
+{
+	clk_xusbxti.rate = 24000000;
+
+	exynos_init_io(NULL, 0);
+	s3c24xx_init_clocks(clk_xusbxti.rate);
+	s3c24xx_init_uarts(hkdk4412_uartcfgs, ARRAY_SIZE(hkdk4412_uartcfgs));
+}
+
+static void __init hkdk4412_reserve(void)
+{
+	s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
+static void __init hkdk4412_gpio_init(void)
+{
+	/* Peripheral power enable (P3V3) */
+	gpio_request_one(EXYNOS4_GPA1(1), GPIOF_OUT_INIT_HIGH, "p3v3_en");
+}
+
+static void __init hkdk4412_machine_init(void)
+{
+	hkdk4412_gpio_init();
+
+	s3c_i2c0_set_platdata(NULL);
+	i2c_register_board_info(0, hkdk4412_i2c_devs0,
+				ARRAY_SIZE(hkdk4412_i2c_devs0));
+
+	s3c_i2c1_set_platdata(NULL);
+	i2c_register_board_info(1, hkdk4412_i2c_devs1,
+				ARRAY_SIZE(hkdk4412_i2c_devs1));
+
+	s3c_i2c3_set_platdata(NULL);
+	i2c_register_board_info(3, hkdk4412_i2c_devs3,
+				ARRAY_SIZE(hkdk4412_i2c_devs3));
+
+	s3c_i2c7_set_platdata(NULL);
+	i2c_register_board_info(7, hkdk4412_i2c_devs7,
+				ARRAY_SIZE(hkdk4412_i2c_devs7));
+
+	s3c_sdhci2_set_platdata(&hkdk4412_hsmmc2_pdata);
+	s3c_sdhci3_set_platdata(&hkdk4412_hsmmc3_pdata);
+
+	hkdk4412_ehci_init();
+	hkdk4412_ohci_init();
+	s3c_hsotg_set_platdata(&hkdk4412_hsotg_pdata);
+
+	platform_add_devices(hkdk4412_devices, ARRAY_SIZE(hkdk4412_devices));
+}
+
+MACHINE_START(ODROIDX, "ODROID-X")
+	/* Maintainer: Dongjin Kim <dongjin.kim@agreeyamobiity.net> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= hkdk4412_map_io,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= hkdk4412_machine_init,
+	.init_late	= exynos_init_late,
+	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
+	.reserve	= &hkdk4412_reserve,
+MACHINE_END
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 2997e56..e80ed9f 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -1206,3 +1206,4 @@ baileys			MACH_BAILEYS		BAILEYS			4169
 familybox		MACH_FAMILYBOX		FAMILYBOX		4170
 ensemble_mx35		MACH_ENSEMBLE_MX35	ENSEMBLE_MX35		4171
 sc_sps_1		MACH_SC_SPS_1		SC_SPS_1		4172
+odroidx		MACH_ODROIDX		ODROIDX			4289
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 29+ messages in thread

* Re: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-06 14:10 ` Dongjin Kim
@ 2012-08-06 14:57   ` Mark Brown
  -1 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2012-08-06 14:57 UTC (permalink / raw)
  To: Dongjin Kim
  Cc: Kukjin Kim, Russell King, Tony Lindgren, Jon Medhurst,
	linux-kernel, linux-samsung-soc, Uwe Kleine-K??nig, Shawn Guo,
	linux-arm-kernel, Dongjin Kim

On Mon, Aug 06, 2012 at 11:10:51PM +0900, Dongjin Kim wrote:

> +static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] = {
> +	REGULATOR_SUPPLY("vdd_g3d", NULL),
> +};

Not that it matters much since new board drivers won't get merged but
all your regulator setup here is problematic.  These look like names
from the board schematic as opposed to mappings of the supplies onto the
consumer devices.

> +static struct regulator_init_data __initdata max77686_buck1_data = {
> +	.constraints = {
> +		.name		= "vdd_mif range",

This would normally just be the name of the supply for display purposes.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-06 14:57   ` Mark Brown
  0 siblings, 0 replies; 29+ messages in thread
From: Mark Brown @ 2012-08-06 14:57 UTC (permalink / raw)
  To: linux-arm-kernel

On Mon, Aug 06, 2012 at 11:10:51PM +0900, Dongjin Kim wrote:

> +static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] = {
> +	REGULATOR_SUPPLY("vdd_g3d", NULL),
> +};

Not that it matters much since new board drivers won't get merged but
all your regulator setup here is problematic.  These look like names
from the board schematic as opposed to mappings of the supplies onto the
consumer devices.

> +static struct regulator_init_data __initdata max77686_buck1_data = {
> +	.constraints = {
> +		.name		= "vdd_mif range",

This would normally just be the name of the supply for display purposes.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-06 14:10 ` Dongjin Kim
@ 2012-08-06 17:37   ` Thomas Abraham
  -1 siblings, 0 replies; 29+ messages in thread
From: Thomas Abraham @ 2012-08-06 17:37 UTC (permalink / raw)
  To: Dongjin Kim
  Cc: Dongjin Kim, Kukjin Kim, Russell King, Tony Lindgren,
	Jon Medhurst, Shawn Guo, Uwe Kleine-König, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

On 6 August 2012 19:40, Dongjin Kim <tobetter@gmail.com> wrote:
> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
> (4289) is registered.
>
> Change-Id: I3af02808c03b9acea916c310390a4904ad92d761
> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  979 ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 1004 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

How about looking at using device tree option for this board. That
might require additional effort but would be helpful in the long run.

Thanks,
Thomas.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-06 17:37   ` Thomas Abraham
  0 siblings, 0 replies; 29+ messages in thread
From: Thomas Abraham @ 2012-08-06 17:37 UTC (permalink / raw)
  To: linux-arm-kernel

On 6 August 2012 19:40, Dongjin Kim <tobetter@gmail.com> wrote:
> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
> (4289) is registered.
>
> Change-Id: I3af02808c03b9acea916c310390a4904ad92d761
> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  979 ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 1004 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

How about looking at using device tree option for this board. That
might require additional effort but would be helpful in the long run.

Thanks,
Thomas.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-06 17:37   ` Thomas Abraham
  (?)
@ 2012-08-06 18:16     ` Dongjin Kim
  -1 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-06 18:16 UTC (permalink / raw)
  To: Thomas Abraham, Dongjin Kim
  Cc: Kukjin Kim, Russell King, Tony Lindgren, Jon Medhurst, Shawn Guo,
	Uwe Kleine-König, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1821 bytes --]

Hello Tomas,

I am agree with you to look at using device tree and I have some plan for it.
But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it.
I also need some time to look at the requirement of device tree, because I am not familiar with it yet.

Any advice will be welcomed.

Thanks,
Dongjin.
________________________________________
보낸 사람: Thomas Abraham [thomas.abraham@linaro.org]
보낸 날짜: 2012년 8월 7일 화요일 오전 2:37
받는 사람: Dongjin Kim
참조: Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
제목: Re: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

On 6 August 2012 19:40, Dongjin Kim <tobetter@gmail.com> wrote:
> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
> (4289) is registered.
>
> Change-Id: I3af02808c03b9acea916c310390a4904ad92d761
> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  979 ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 1004 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

How about looking at using device tree option for this board. That
might require additional effort but would be helpful in the long run.

Thanks,
Thomas.

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-06 18:16     ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-06 18:16 UTC (permalink / raw)
  To: Thomas Abraham, Dongjin Kim
  Cc: Kukjin Kim, Russell King, Tony Lindgren, Jon Medhurst, Shawn Guo,
	Uwe Kleine-König, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

Hello Tomas,

I am agree with you to look at using device tree and I have some plan for it.
But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it.
I also need some time to look at the requirement of device tree, because I am not familiar with it yet.

Any advice will be welcomed.

Thanks,
Dongjin.
________________________________________
보낸 사람: Thomas Abraham [thomas.abraham@linaro.org]
보낸 날짜: 2012년 8월 7일 화요일 오전 2:37
받는 사람: Dongjin Kim
참조: Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
제목: Re: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

On 6 August 2012 19:40, Dongjin Kim <tobetter@gmail.com> wrote:
> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
> (4289) is registered.
>
> Change-Id: I3af02808c03b9acea916c310390a4904ad92d761
> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  979 ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 1004 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

How about looking at using device tree option for this board. That
might require additional effort but would be helpful in the long run.

Thanks,
Thomas.


^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-06 18:16     ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-06 18:16 UTC (permalink / raw)
  To: linux-arm-kernel

Hello Tomas,

I am agree with you to look at using device tree and I have some plan for it.
But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it.
I also need some time to look at the requirement of device tree, because I am not familiar with it yet.

Any advice will be welcomed.

Thanks,
Dongjin.
________________________________________
?? ??: Thomas Abraham [thomas.abraham at linaro.org]
?? ??: 2012? 8? 7? ??? ?? 2:37
?? ??: Dongjin Kim
??: Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-K?nig; linux-arm-kernel at lists.infradead.org; linux-samsung-soc at vger.kernel.org; linux-kernel at vger.kernel.org
??: Re: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

On 6 August 2012 19:40, Dongjin Kim <tobetter@gmail.com> wrote:
> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
> (4289) is registered.
>
> Change-Id: I3af02808c03b9acea916c310390a4904ad92d761
> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  979 ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 1004 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

How about looking at using device tree option for this board. That
might require additional effort but would be helpful in the long run.

Thanks,
Thomas.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-06 18:16     ` Dongjin Kim
@ 2012-08-06 18:33       ` Olof Johansson
  -1 siblings, 0 replies; 29+ messages in thread
From: Olof Johansson @ 2012-08-06 18:33 UTC (permalink / raw)
  To: Dongjin Kim
  Cc: Thomas Abraham, Dongjin Kim, Kukjin Kim, Russell King,
	Tony Lindgren, Jon Medhurst, Shawn Guo, Uwe Kleine-König,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

Hi,

On Mon, Aug 6, 2012 at 11:16 AM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello Tomas,
>
> I am agree with you to look at using device tree and I have some plan for it.
> But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it.
> I also need some time to look at the requirement of device tree, because I am not familiar with it yet.
>
> Any advice will be welcomed.

Basic rule (that has some flexibility for legacy platforms) is that
the net movement of board support should move from board files to
device-tree based. Introduction of a brand new board like this is a
prime example of something that should be using device tree from day
1.


-Olof

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-06 18:33       ` Olof Johansson
  0 siblings, 0 replies; 29+ messages in thread
From: Olof Johansson @ 2012-08-06 18:33 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

On Mon, Aug 6, 2012 at 11:16 AM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello Tomas,
>
> I am agree with you to look at using device tree and I have some plan for it.
> But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it.
> I also need some time to look at the requirement of device tree, because I am not familiar with it yet.
>
> Any advice will be welcomed.

Basic rule (that has some flexibility for legacy platforms) is that
the net movement of board support should move from board files to
device-tree based. Introduction of a brand new board like this is a
prime example of something that should be using device tree from day
1.


-Olof

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-06 18:33       ` Olof Johansson
  (?)
@ 2012-08-07  2:05         ` Dongjin Kim
  -1 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07  2:05 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Thomas Abraham, Dongjin Kim, Kukjin Kim, Russell King,
	Tony Lindgren, Jon Medhurst, Shawn Guo, Uwe Kleine-König,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 1939 bytes --]

Hello,

I am trying to understand what I have to do for device tree.

In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC.
But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi.
Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it.

So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files?

What's your suggestion?

Regards,
Dongjin.
________________________________________
보낸 사람: Olof Johansson [olof@lixom.net]
보낸 날짜: 2012년 8월 7일 화요일 오전 3:33
받는 사람: Dongjin Kim
참조: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
제목: Re: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Hi,

On Mon, Aug 6, 2012 at 11:16 AM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello Tomas,
>
> I am agree with you to look at using device tree and I have some plan for it.
> But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it.
> I also need some time to look at the requirement of device tree, because I am not familiar with it yet.
>
> Any advice will be welcomed.

Basic rule (that has some flexibility for legacy platforms) is that
the net movement of board support should move from board files to
device-tree based. Introduction of a brand new board like this is a
prime example of something that should be using device tree from day
1.


-Olof
ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-07  2:05         ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07  2:05 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Thomas Abraham, Dongjin Kim, Kukjin Kim, Russell King,
	Tony Lindgren, Jon Medhurst, Shawn Guo, Uwe Kleine-König,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

Hello,

I am trying to understand what I have to do for device tree.

In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC.
But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi.
Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it.

So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files?

What's your suggestion?

Regards,
Dongjin.
________________________________________
보낸 사람: Olof Johansson [olof@lixom.net]
보낸 날짜: 2012년 8월 7일 화요일 오전 3:33
받는 사람: Dongjin Kim
참조: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
제목: Re: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Hi,

On Mon, Aug 6, 2012 at 11:16 AM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello Tomas,
>
> I am agree with you to look at using device tree and I have some plan for it.
> But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it.
> I also need some time to look at the requirement of device tree, because I am not familiar with it yet.
>
> Any advice will be welcomed.

Basic rule (that has some flexibility for legacy platforms) is that
the net movement of board support should move from board files to
device-tree based. Introduction of a brand new board like this is a
prime example of something that should be using device tree from day
1.


-Olof

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-07  2:05         ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07  2:05 UTC (permalink / raw)
  To: linux-arm-kernel

Hello,

I am trying to understand what I have to do for device tree.

In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC.
But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi.
Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it.

So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files?

What's your suggestion?

Regards,
Dongjin.
________________________________________
?? ??: Olof Johansson [olof at lixom.net]
?? ??: 2012? 8? 7? ??? ?? 3:33
?? ??: Dongjin Kim
??: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-K?nig; linux-arm-kernel at lists.infradead.org; linux-samsung-soc at vger.kernel.org; linux-kernel at vger.kernel.org
??: Re: ??: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Hi,

On Mon, Aug 6, 2012 at 11:16 AM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello Tomas,
>
> I am agree with you to look at using device tree and I have some plan for it.
> But as of now I am focusing to bring up the hardware itself with mainline kernel and merge into it.
> I also need some time to look at the requirement of device tree, because I am not familiar with it yet.
>
> Any advice will be welcomed.

Basic rule (that has some flexibility for legacy platforms) is that
the net movement of board support should move from board files to
device-tree based. Introduction of a brand new board like this is a
prime example of something that should be using device tree from day
1.


-Olof

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-07  2:05         ` Dongjin Kim
  (?)
  (?)
@ 2012-08-07  2:28         ` Olof Johansson
  2012-08-07  2:56             ` Dongjin Kim
  2012-08-07  4:14           ` Thomas Abraham
  -1 siblings, 2 replies; 29+ messages in thread
From: Olof Johansson @ 2012-08-07  2:28 UTC (permalink / raw)
  To: Dongjin Kim
  Cc: Thomas Abraham, Dongjin Kim, Kukjin Kim, Russell King,
	Tony Lindgren, Jon Medhurst, Shawn Guo, Uwe Kleine-König,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

Hi,

On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello,
>
> I am trying to understand what I have to do for device tree.
>
> In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC.
> But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi.
> Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it.
>
> So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files?

Ideally they already have one waiting to be submitted, but that might
not be the case. Given that the origenboard design with 4412 is not
yet shipping, I'm guessing the Linaro Samsung engineers might not have
done much work on 4412 yet. Kukjin? Thomas?

> What's your suggestion?

The alternative is to use the data you have available -- i.e. sources
and patches, and craft the device tree from there. The design of 4412
is a derivative from 4210, so that's a good start. Next step would be
to describe the board on top of the SoC, peripherals, etc. Take a look
at how the origen board support was added, and so on.

I ordered an odroid-x several weeks ago but I haven't have a confirmed
shipping date yet. :( I'm not sure how long it'll be before I can help
out, unfortunately.


-Olof

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-07  2:28         ` Olof Johansson
  2012-08-07  2:56             ` Dongjin Kim
@ 2012-08-07  2:56             ` Dongjin Kim
  1 sibling, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07  2:56 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Thomas Abraham, Dongjin Kim, Kukjin Kim, Russell King,
	Tony Lindgren, Jon Medhurst, Shawn Guo, Uwe Kleine-König,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2335 bytes --]

Hi,

Thank you for your advice.
Fortunately I got ODROID-X hardware earlier and am able to boot with mainline kernel.

I will try to do alternative way first with source code kernel 3.0.15, and hope you review the patch if ready.

Regards,
Dongjin.
________________________________________
보낸 사람: Olof Johansson [olof@lixom.net]
보낸 날짜: 2012년 8월 7일 화요일 오전 11:28
받는 사람: Dongjin Kim
참조: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
제목: Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Hi,

On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello,
>
> I am trying to understand what I have to do for device tree.
>
> In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC.
> But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi.
> Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it.
>
> So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files?

Ideally they already have one waiting to be submitted, but that might
not be the case. Given that the origenboard design with 4412 is not
yet shipping, I'm guessing the Linaro Samsung engineers might not have
done much work on 4412 yet. Kukjin? Thomas?

> What's your suggestion?

The alternative is to use the data you have available -- i.e. sources
and patches, and craft the device tree from there. The design of 4412
is a derivative from 4210, so that's a good start. Next step would be
to describe the board on top of the SoC, peripherals, etc. Take a look
at how the origen board support was added, and so on.

I ordered an odroid-x several weeks ago but I haven't have a confirmed
shipping date yet. :( I'm not sure how long it'll be before I can help
out, unfortunately.


-Olof

ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-07  2:56             ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07  2:56 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Thomas Abraham, Dongjin Kim, Kukjin Kim, Russell King,
	Tony Lindgren, Jon Medhurst, Shawn Guo, Uwe Kleine-König,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

Hi,

Thank you for your advice.
Fortunately I got ODROID-X hardware earlier and am able to boot with mainline kernel.

I will try to do alternative way first with source code kernel 3.0.15, and hope you review the patch if ready.

Regards,
Dongjin.
________________________________________
보낸 사람: Olof Johansson [olof@lixom.net]
보낸 날짜: 2012년 8월 7일 화요일 오전 11:28
받는 사람: Dongjin Kim
참조: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-König; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
제목: Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Hi,

On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello,
>
> I am trying to understand what I have to do for device tree.
>
> In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC.
> But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi.
> Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it.
>
> So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files?

Ideally they already have one waiting to be submitted, but that might
not be the case. Given that the origenboard design with 4412 is not
yet shipping, I'm guessing the Linaro Samsung engineers might not have
done much work on 4412 yet. Kukjin? Thomas?

> What's your suggestion?

The alternative is to use the data you have available -- i.e. sources
and patches, and craft the device tree from there. The design of 4412
is a derivative from 4210, so that's a good start. Next step would be
to describe the board on top of the SoC, peripherals, etc. Take a look
at how the origen board support was added, and so on.

I ordered an odroid-x several weeks ago but I haven't have a confirmed
shipping date yet. :( I'm not sure how long it'll be before I can help
out, unfortunately.


-Olof


^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-07  2:56             ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07  2:56 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Thank you for your advice.
Fortunately I got ODROID-X hardware earlier and am able to boot with mainline kernel.

I will try to do alternative way first with source code kernel 3.0.15, and hope you review the patch if ready.

Regards,
Dongjin.
________________________________________
?? ??: Olof Johansson [olof at lixom.net]
?? ??: 2012? 8? 7? ??? ?? 11:28
?? ??: Dongjin Kim
??: Thomas Abraham; Dongjin Kim; Kukjin Kim; Russell King; Tony Lindgren; Jon Medhurst; Shawn Guo; Uwe Kleine-K?nig; linux-arm-kernel at lists.infradead.org; linux-samsung-soc at vger.kernel.org; linux-kernel at vger.kernel.org
??: Re: ??: ??: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Hi,

On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim
<Dongjin.Kim@agreeyamobility.net> wrote:
> Hello,
>
> I am trying to understand what I have to do for device tree.
>
> In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC.
> But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi.
> Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it.
>
> So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files?

Ideally they already have one waiting to be submitted, but that might
not be the case. Given that the origenboard design with 4412 is not
yet shipping, I'm guessing the Linaro Samsung engineers might not have
done much work on 4412 yet. Kukjin? Thomas?

> What's your suggestion?

The alternative is to use the data you have available -- i.e. sources
and patches, and craft the device tree from there. The design of 4412
is a derivative from 4210, so that's a good start. Next step would be
to describe the board on top of the SoC, peripherals, etc. Take a look
at how the origen board support was added, and so on.

I ordered an odroid-x several weeks ago but I haven't have a confirmed
shipping date yet. :( I'm not sure how long it'll be before I can help
out, unfortunately.


-Olof

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-07  2:28         ` Olof Johansson
  2012-08-07  2:56             ` Dongjin Kim
@ 2012-08-07  4:14           ` Thomas Abraham
  2012-08-07  4:38             ` Kyungmin Park
  1 sibling, 1 reply; 29+ messages in thread
From: Thomas Abraham @ 2012-08-07  4:14 UTC (permalink / raw)
  To: Olof Johansson
  Cc: Dongjin Kim, Dongjin Kim, Kukjin Kim, Russell King,
	Tony Lindgren, Jon Medhurst, Shawn Guo, Uwe Kleine-König,
	linux-arm-kernel, linux-samsung-soc, linux-kernel

On 7 August 2012 07:58, Olof Johansson <olof@lixom.net> wrote:
> Hi,
>
> On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim
> <Dongjin.Kim@agreeyamobility.net> wrote:
>> Hello,
>>
>> I am trying to understand what I have to do for device tree.
>>
>> In order to create dts file for ODROID-X hardware, it seems I may need dts file of EXYNOS4412 SoC.
>> But maybe exynos4412.dtsi is not merged yet or not exist, like exynos4210.dtsi or exynos5250.dtsi.
>> Obviously it seems not easy to create such a file without SoC datasheet, and I do not have it.
>>
>> So do I wait for the file to be merged by Samsung or better to create initial dts file cloned from exynos4210.dtsi and modify to have verified nodes with the source/header files?
>
> Ideally they already have one waiting to be submitted, but that might
> not be the case. Given that the origenboard design with 4412 is not
> yet shipping, I'm guessing the Linaro Samsung engineers might not have
> done much work on 4412 yet. Kukjin? Thomas?
>
>> What's your suggestion?
>
> The alternative is to use the data you have available -- i.e. sources
> and patches, and craft the device tree from there. The design of 4412
> is a derivative from 4210, so that's a good start. Next step would be
> to describe the board on top of the SoC, peripherals, etc. Take a look
> at how the origen board support was added, and so on.
>
> I ordered an odroid-x several weeks ago but I haven't have a confirmed
> shipping date yet. :( I'm not sure how long it'll be before I can help
> out, unfortunately.
>
>
> -Olof

Most of the Exynos4210 device tree support can be reused for
Exynos4412 as well. Looking at the hardware differences between the
two, it might be better to create a new exynos4.dtsi file (kind of
creating it out of the existing exynos4210.dtsi) which will have all
the common bits across all SoC's in the Exynos4 family.

Further, there can be exynos4210.dtsi and exynos4412.dtsi which would
specify SoC specific differences such as the GIC cpu-offset property
and the additional groups available in the interrupt combiner.

There are differences in the gpio/pinmux controllers as well which
have to be described using device tree. The current gpio/pinmux device
tree support depends entirely on the gpio-samsung driver which handles
both gpio and pinmux but requires listing all the banks available in
Exynos4412. I would prefer not to do that since we are switching over
to using a pin controller driver and I am currently working on this
driver.

The pin controller driver is important without which the
gpio/pinmux/pinconf setting for devices such as i2c and sdhci
controller cannot be setup. The basic pinctrl driver for Exynos4 has
already been posted and now I am working on adding gpio and wakeup
interrupt support into that driver (hoping to complete it this week).

So the probable steps in getting started with using device tree for
Exynos4412 would be

1. Create a new exynos4.dtsi file with all the Exynos4 common
properties for all dt supported controllers.
2. Update the exynos4210.dtsi file accordingly and add the new
exynos4412.dtsi file.
3. With this, it will be possible to boot the kernel and test
peripherals that do not depend on gpio/pinmux (rtc, wdt, etc).
4. When the Exynos4 pinctrl driver is available, start adding device
nodes for i2c and sdhci controllers.
5. Incrementally add device tree coverage for the board and other
peripherals on Exynos4412.

Thanks,
Thomas.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* Re: 회신: 회신: [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-07  4:14           ` Thomas Abraham
@ 2012-08-07  4:38             ` Kyungmin Park
  0 siblings, 0 replies; 29+ messages in thread
From: Kyungmin Park @ 2012-08-07  4:38 UTC (permalink / raw)
  To: Thomas Abraham
  Cc: Olof Johansson, Dongjin Kim, Dongjin Kim, Kukjin Kim,
	Russell King, Tony Lindgren, Jon Medhurst, Shawn Guo,
	Uwe Kleine-König, linux-arm-kernel, linux-samsung-soc,
	linux-kernel

On 8/7/12, Thomas Abraham <thomas.abraham@linaro.org> wrote:
> On 7 August 2012 07:58, Olof Johansson <olof@lixom.net> wrote:
>> Hi,
>>
>> On Mon, Aug 6, 2012 at 7:05 PM, Dongjin Kim
>> <Dongjin.Kim@agreeyamobility.net> wrote:
>>> Hello,
>>>
>>> I am trying to understand what I have to do for device tree.
>>>
>>> In order to create dts file for ODROID-X hardware, it seems I may need
>>> dts file of EXYNOS4412 SoC.
>>> But maybe exynos4412.dtsi is not merged yet or not exist, like
>>> exynos4210.dtsi or exynos5250.dtsi.
>>> Obviously it seems not easy to create such a file without SoC datasheet,
>>> and I do not have it.
>>>
>>> So do I wait for the file to be merged by Samsung or better to create
>>> initial dts file cloned from exynos4210.dtsi and modify to have verified
>>> nodes with the source/header files?
>>
>> Ideally they already have one waiting to be submitted, but that might
>> not be the case. Given that the origenboard design with 4412 is not
>> yet shipping, I'm guessing the Linaro Samsung engineers might not have
>> done much work on 4412 yet. Kukjin? Thomas?
>>
>>> What's your suggestion?
>>
>> The alternative is to use the data you have available -- i.e. sources
>> and patches, and craft the device tree from there. The design of 4412
>> is a derivative from 4210, so that's a good start. Next step would be
>> to describe the board on top of the SoC, peripherals, etc. Take a look
>> at how the origen board support was added, and so on.
>>
>> I ordered an odroid-x several weeks ago but I haven't have a confirmed
>> shipping date yet. :( I'm not sure how long it'll be before I can help
>> out, unfortunately.
>>
>>
>> -Olof
>
> Most of the Exynos4210 device tree support can be reused for
> Exynos4412 as well. Looking at the hardware differences between the
> two, it might be better to create a new exynos4.dtsi file (kind of
> creating it out of the existing exynos4210.dtsi) which will have all
> the common bits across all SoC's in the Exynos4 family.
>
> Further, there can be exynos4210.dtsi and exynos4412.dtsi which would
> specify SoC specific differences such as the GIC cpu-offset property
> and the additional groups available in the interrupt combiner.
>
> There are differences in the gpio/pinmux controllers as well which
> have to be described using device tree. The current gpio/pinmux device
> tree support depends entirely on the gpio-samsung driver which handles
> both gpio and pinmux but requires listing all the banks available in
> Exynos4412. I would prefer not to do that since we are switching over
> to using a pin controller driver and I am currently working on this
> driver.
>
> The pin controller driver is important without which the
> gpio/pinmux/pinconf setting for devices such as i2c and sdhci
> controller cannot be setup. The basic pinctrl driver for Exynos4 has
> already been posted and now I am working on adding gpio and wakeup
> interrupt support into that driver (hoping to complete it this week).
>
> So the probable steps in getting started with using device tree for
> Exynos4412 would be
>
> 1. Create a new exynos4.dtsi file with all the Exynos4 common
> properties for all dt supported controllers.
> 2. Update the exynos4210.dtsi file accordingly and add the new
> exynos4412.dtsi file.
> 3. With this, it will be possible to boot the kernel and test
> peripherals that do not depend on gpio/pinmux (rtc, wdt, etc).
> 4. When the Exynos4 pinctrl driver is available, start adding device
> nodes for i2c and sdhci controllers.
> 5. Incrementally add device tree coverage for the board and other
> peripherals on Exynos4412.
Nice!
Good plan as I thnk.

Thank you,
Kyungmin Park

^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-06 14:10 ` Dongjin Kim
  (?)
@ 2012-08-07 18:49   ` Dongjin Kim
  -1 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07 18:49 UTC (permalink / raw)
  Cc: Dongjin Kim, Kukjin Kim, Russell King, Tony Lindgren,
	Jon Medhurst, Shawn Guo, Uwe Kleine-König, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

The HKDK4412 is the CPU module developed by Hardkernel which is based on
Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
(4289) is registered.

Changes in v2:
  -. Change regulator's display names

Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df
Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
---
 arch/arm/mach-exynos/Kconfig         |   23 +
 arch/arm/mach-exynos/Makefile        |    1 +
 arch/arm/mach-exynos/mach-hkdk4412.c |  964 ++++++++++++++++++++++++++++++++++
 arch/arm/tools/mach-types            |    1 +
 4 files changed, 989 insertions(+)
 create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index b5b4c8c..ae90773 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -54,6 +54,9 @@ config SOC_EXYNOS4412
 	default y
 	depends on ARCH_EXYNOS4
 	select SAMSUNG_DMADEV
+	select S5P_PM if PM
+	select S5P_SLEEP if PM
+	select PM_GENERIC_DOMAINS
 	help
 	  Enable EXYNOS4412 SoC support
 
@@ -394,6 +397,26 @@ config MACH_SMDK4412
 	select MACH_SMDK4212
 	help
 	  Machine support for Samsung SMDK4412
+
+config MACH_HKDK4412
+	bool "HKDK4412"
+	select SOC_EXYNOS4412
+	select MACH_SMDK4212
+	select S3C_DEV_HSMMC
+	select S3C_DEV_HSMMC1
+	select S3C_DEV_USB_HSOTG
+	select S5P_DEV_CSIS0
+	select S5P_DEV_G2D
+	select S5P_DEV_JPEG
+	select S5P_DEV_USB_EHCI
+	select S5P_DEV_I2C_HDMIPHY
+	select S5P_DEV_TV
+	select S5P_GPIO_INT
+	select EXYNOS4_DEV_USB_OHCI
+	select SAMSUNG_DEV_ADC
+	help
+	  Machine support for Odroid-X based on Samsung EXYNOS4412
+
 endif
 
 comment "Flattened Device Tree based board for EXYNOS SoCs"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 9b58024..dccc381 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
+obj-$(CONFIG_MACH_HKDK4412)		+= mach-hkdk4412.o
 
 obj-$(CONFIG_MACH_EXYNOS4_DT)		+= mach-exynos4-dt.o
 obj-$(CONFIG_MACH_EXYNOS5_DT)		+= mach-exynos5-dt.o
diff --git a/arch/arm/mach-exynos/mach-hkdk4412.c b/arch/arm/mach-exynos/mach-hkdk4412.c
new file mode 100644
index 0000000..0bd1e6d
--- /dev/null
+++ b/arch/arm/mach-exynos/mach-hkdk4412.c
@@ -0,0 +1,964 @@
+/*
+ * linux/arch/arm/mach-exynos4/mach-hkdk4412.c
+ *
+ * Copyright (c) 2012 AgreeYa Mobility Co., Ltd.
+ *		http://www.agreeyamobility.net
+ *
+ * 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/gpio.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/io.h>
+#include <linux/mfd/max77686.h>
+#include <linux/mmc/host.h>
+#include <linux/platform_device.h>
+#include <linux/pwm_backlight.h>
+#include <linux/regulator/machine.h>
+#include <linux/serial_core.h>
+#include <linux/platform_data/s3c-hsotg.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+#include <asm/mach-types.h>
+
+#include <plat/backlight.h>
+#include <plat/clock.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+#include <plat/keypad.h>
+#include <plat/mfc.h>
+#include <plat/regs-serial.h>
+#include <plat/sdhci.h>
+#include <plat/ehci.h>
+
+#include <mach/ohci.h>
+#include <mach/map.h>
+
+#include "common.h"
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define HKDK4412_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define HKDK4412_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define HKDK4412_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG4 |	\
+				 S5PV210_UFCON_RXTRIG4)
+
+static struct s3c2410_uartcfg hkdk4412_uartcfgs[] __initdata = {
+	[0] = {
+		.hwport		= 0,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[1] = {
+		.hwport		= 1,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[2] = {
+		.hwport		= 2,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[3] = {
+		.hwport		= 3,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc2_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
+	.max_width	= 8,
+	.host_caps	= MMC_CAP_8_BIT_DATA,
+#endif
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc3_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck1_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck2_consumer[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL),	/* CPUFREQ */
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck3_consumer[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL),	/* CPUFREQ */
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] = {
+	REGULATOR_SUPPLY("vdd_g3d", "mali_drm"),	/* G3D */
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_alive", NULL),	/* ALIVE */
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo3_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo4_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo5_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo8_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo10_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo11_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo13_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo14_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo17_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo18_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo19_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo23_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo24_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo25_consumer[] = {
+	REGULATOR_SUPPLY("vddq_lcd", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo26_consumer[] = {
+};
+
+static struct regulator_init_data __initdata max77686_buck1_data = {
+	.constraints = {
+		.name		= "VDD_MIF_1.0V",
+		.min_uV		= 800000,
+		.max_uV		= 1050000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck1_consumer),
+	.consumer_supplies = max77686_buck1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck2_data = {
+	.constraints = {
+		.name		= "VDD_ARM_1.3V",
+		.min_uV		= 800000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck2_consumer),
+	.consumer_supplies = max77686_buck2_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck3_data = {
+	.constraints = {
+		.name		= "VDD_INT_1.0V",
+		.min_uV		= 800000,
+		.max_uV		= 1150000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck3_consumer),
+	.consumer_supplies = max77686_buck3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck4_data = {
+	.constraints = {
+		.name		= "VDD_G3D_1.0V",
+		.min_uV		= 850000,
+		.max_uV		= 1200000,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				  REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck4_consumer),
+	.consumer_supplies = max77686_buck4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck5_data = {
+	.constraints = {
+		.name		= "VDDQ_CKEM1M2_1.2V",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck6_data = {
+	.constraints = {
+		.name		= "VDD_INL_1.35V",
+		.min_uV		= 1350000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1350000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck7_data = {
+	.constraints = {
+		.name		= "VDD_INL_2.0V",
+		.min_uV		= 2000000,
+		.max_uV		= 2000000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2000000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck8_data = {
+	.constraints = {
+		.name		= "VDD_BUCK8_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck9_data = {
+	.constraints = {
+		.name		= "VDD_BUCK9_1.2V",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo1_data = {
+	.constraints = {
+		.name		= "VDD_ALIVE_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo1_consumer),
+	.consumer_supplies = max77686_ldo1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo2_data = {
+	.constraints = {
+		.name		= "VDDQ_M1M2_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo3_data = {
+	.constraints = {
+		.name		= "VDDQ_M0_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo3_consumer),
+	.consumer_supplies = max77686_ldo3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo4_data = {
+	.constraints = {
+		.name		= "VDDQ_MMC2_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo4_consumer),
+	.consumer_supplies = max77686_ldo4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo5_data = {
+	.constraints = {
+		.name		= "VDDQ_MMC13_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo5_consumer),
+	.consumer_supplies = max77686_ldo5_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo6_data = {
+	.constraints = {
+		.name		= "VDD_MPLL_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo7_data = {
+	.constraints = {
+		.name		= "VDD_VPLL_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo8_data = {
+	.constraints = {
+		.name		= "VDD10_HDMI_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo8_consumer),
+	.consumer_supplies = max77686_ldo8_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo9_data = {
+	.constraints = {
+		.name		= "VDD_VTCORE_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo10_data = {
+	.constraints = {
+		.name		= "VDDQ_MIPIHSI_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo10_consumer),
+	.consumer_supplies = max77686_ldo10_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo11_data = {
+	.constraints = {
+		.name		= "VDD18_ABB1_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo11_consumer),
+	.consumer_supplies	= max77686_ldo11_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo12_data = {
+	.constraints = {
+		.name		= "VDD33_UOTG_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo13_data = {
+	.constraints = {
+		.name		= "VDDQ_C2C_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo13_consumer),
+	.consumer_supplies = max77686_ldo13_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo14_data = {
+	.constraints = {
+		.name		= "VDD18_ABB2_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo14_consumer),
+	.consumer_supplies	= max77686_ldo14_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo15_data = {
+	.constraints = {
+		.name		= "VDD10_HSIC_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo16_data = {
+	.constraints = {
+		.name		= "VDD18_HSIC_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo17_data = {
+	.constraints = {
+		.name		= "VDDQ_CAM_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo17_consumer),
+	.consumer_supplies = max77686_ldo17_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo18_data = {
+	.constraints = {
+		.name		= "VDD_LDO18_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo18_consumer),
+	.consumer_supplies = max77686_ldo18_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo19_data = {
+	.constraints = {
+		.name		= "VDD_VTCAM_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 0,
+		.always_on	= 0,
+		.boot_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo19_consumer),
+	.consumer_supplies = max77686_ldo19_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo20_data = {
+	.constraints = {
+		.name		= "VDD_LDO20_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo21_data = {
+	.constraints = {
+		.name		= "VDD_SDCARD_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo22_data = {
+	.constraints = {
+		.name		= "VDD_LDO22_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo23_data = {
+	.constraints = {
+		.name		= "VDD_TOUCH_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo23_consumer),
+	.consumer_supplies = max77686_ldo23_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo24_data = {
+	.constraints = {
+		.name		= "VDD_TOUCHLED_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo24_consumer),
+	.consumer_supplies = max77686_ldo24_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo25_data = {
+	.constraints = {
+		.name		= "VDDQ_LCD_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo25_consumer),
+	.consumer_supplies = max77686_ldo25_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo26_data = {
+	.constraints = {
+		.name		= "VDD_MOTOR_3.0V",
+		.min_uV		= 3000000,
+		.max_uV		= 3000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem	= {
+			.uV	= 3000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo26_consumer),
+	.consumer_supplies = max77686_ldo26_consumer,
+};
+
+struct max77686_opmode_data max77686_opmode_data[MAX77686_REG_MAX] = {
+	[MAX77686_LDO11] = {MAX77686_LDO11, MAX77686_OPMODE_STANDBY},
+	[MAX77686_LDO14] = {MAX77686_LDO14, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK1] = {MAX77686_BUCK1, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK2] = {MAX77686_BUCK2, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK3] = {MAX77686_BUCK3, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK4] = {MAX77686_BUCK4, MAX77686_OPMODE_STANDBY},
+};
+
+static struct max77686_regulator_data max77686_regulators[] = {
+	{ MAX77686_LDO1,	&max77686_ldo1_data },
+	{ MAX77686_LDO2,	&max77686_ldo2_data },
+	{ MAX77686_LDO3,	&max77686_ldo3_data },
+	{ MAX77686_LDO4,	&max77686_ldo4_data },
+	{ MAX77686_LDO5,	&max77686_ldo5_data },
+	{ MAX77686_LDO6,	&max77686_ldo6_data },
+	{ MAX77686_LDO7,	&max77686_ldo7_data },
+	{ MAX77686_LDO8,	&max77686_ldo8_data },
+	{ MAX77686_LDO9,	&max77686_ldo9_data },
+	{ MAX77686_LDO10,	&max77686_ldo10_data },
+	{ MAX77686_LDO11,	&max77686_ldo11_data },
+	{ MAX77686_LDO12,	&max77686_ldo12_data },
+	{ MAX77686_LDO13,	&max77686_ldo13_data },
+	{ MAX77686_LDO14,	&max77686_ldo14_data },
+	{ MAX77686_LDO15,	&max77686_ldo15_data },
+	{ MAX77686_LDO16,	&max77686_ldo16_data },
+	{ MAX77686_LDO17,	&max77686_ldo17_data },
+	{ MAX77686_LDO18,	&max77686_ldo18_data },
+	{ MAX77686_LDO19,	&max77686_ldo19_data },
+	{ MAX77686_LDO20,	&max77686_ldo20_data },
+	{ MAX77686_LDO21,	&max77686_ldo21_data },
+	{ MAX77686_LDO22,	&max77686_ldo22_data },
+	{ MAX77686_LDO23,	&max77686_ldo23_data },
+	{ MAX77686_LDO24,	&max77686_ldo24_data },
+	{ MAX77686_LDO25,	&max77686_ldo25_data },
+	{ MAX77686_LDO26,	&max77686_ldo26_data },
+
+	{ MAX77686_BUCK1,	&max77686_buck1_data },
+	{ MAX77686_BUCK2,	&max77686_buck2_data },
+	{ MAX77686_BUCK3,	&max77686_buck3_data },
+	{ MAX77686_BUCK4,	&max77686_buck4_data },
+	{ MAX77686_BUCK5,	&max77686_buck5_data },
+	{ MAX77686_BUCK6,	&max77686_buck6_data },
+	{ MAX77686_BUCK7,	&max77686_buck7_data },
+	{ MAX77686_BUCK8,	&max77686_buck8_data },
+	{ MAX77686_BUCK9,	&max77686_buck9_data },
+};
+
+static struct max77686_platform_data hkdk4412_max77686_info = {
+	.num_regulators	= ARRAY_SIZE(max77686_regulators),
+	.regulators	= max77686_regulators,
+	.irq_gpio	= 0,
+	.wakeup		= 0,
+
+	.opmode_data	= max77686_opmode_data,
+
+	.buck234_gpio_dvs[0]	= EXYNOS4_GPX2(3),
+	.buck234_gpio_dvs[1]	= EXYNOS4_GPX2(4),
+	.buck234_gpio_dvs[2]	= EXYNOS4_GPX2(5),
+
+	.buck2_voltage[0] = 1300000,	/* 1.3V */
+	.buck2_voltage[1] = 1000000,	/* 1.0V */
+	.buck2_voltage[2] = 950000,	/* 0.95V */
+	.buck2_voltage[3] = 900000,	/* 0.9V */
+	.buck2_voltage[4] = 1000000,	/* 1.0V */
+	.buck2_voltage[5] = 1000000,	/* 1.0V */
+	.buck2_voltage[6] = 950000,	/* 0.95V */
+	.buck2_voltage[7] = 900000,	/* 0.9V */
+
+	.buck3_voltage[0] = 1037500,	/* 1.0375V */
+	.buck3_voltage[1] = 1000000,	/* 1.0V */
+	.buck3_voltage[2] = 950000,	/* 0.95V */
+	.buck3_voltage[3] = 900000,	/* 0.9V */
+	.buck3_voltage[4] = 1000000,	/* 1.0V */
+	.buck3_voltage[5] = 1000000,	/* 1.0V */
+	.buck3_voltage[6] = 950000,	/* 0.95V */
+	.buck3_voltage[7] = 900000,	/* 0.9V */
+
+	.buck4_voltage[0] = 1100000,	/* 1.1V */
+	.buck4_voltage[1] = 1000000,	/* 1.0V */
+	.buck4_voltage[2] = 950000,	/* 0.95V */
+	.buck4_voltage[3] = 900000,	/* 0.9V */
+	.buck4_voltage[4] = 1000000,	/* 1.0V */
+	.buck4_voltage[5] = 1000000,	/* 1.0V */
+	.buck4_voltage[6] = 950000,	/* 0.95V */
+	.buck4_voltage[7] = 900000,	/* 0.9V */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs0[] __initdata = {
+	{
+		I2C_BOARD_INFO("max77686", (0x12 >> 1)),
+		.platform_data	= &hkdk4412_max77686_info,
+	}
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs1[] __initdata = {
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs3[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs7[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct gpio_led hkdk4412_gpio_leds[] = {
+	{
+		.name		= "led1",	/* D5 on ODROID-X */
+		.default_trigger	= "oneshot",
+		.gpio		= EXYNOS4_GPC1(0),
+		.active_low	= 1,
+	},
+	{
+		.name		= "led2",	/* D6 on ODROID-X */
+		.default_trigger	= "heartbeat",
+		.gpio		= EXYNOS4_GPC1(2),
+		.active_low	= 1,
+	},
+};
+
+static struct gpio_led_platform_data hkdk4412_gpio_led_info = {
+	.leds		= hkdk4412_gpio_leds,
+	.num_leds	= ARRAY_SIZE(hkdk4412_gpio_leds),
+};
+
+static struct platform_device hkdk4412_leds_gpio = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &hkdk4412_gpio_led_info,
+	},
+};
+
+/* USB EHCI */
+static struct s5p_ehci_platdata hkdk4412_ehci_pdata;
+
+static void __init hkdk4412_ehci_init(void)
+{
+	struct s5p_ehci_platdata *pdata = &hkdk4412_ehci_pdata;
+
+	s5p_ehci_set_platdata(pdata);
+}
+
+/* USB OHCI */
+static struct exynos4_ohci_platdata hkdk4412_ohci_pdata;
+
+static void __init hkdk4412_ohci_init(void)
+{
+	struct exynos4_ohci_platdata *pdata = &hkdk4412_ohci_pdata;
+
+	exynos4_ohci_set_platdata(pdata);
+}
+
+/* USB OTG */
+static struct s3c_hsotg_plat hkdk4412_hsotg_pdata;
+
+static struct platform_device *hkdk4412_devices[] __initdata = {
+	&s3c_device_hsmmc2,
+	&s3c_device_hsmmc3,
+	&s3c_device_i2c0,
+	&s3c_device_i2c1,
+	&s3c_device_i2c3,
+	&s3c_device_i2c7,
+	&s3c_device_rtc,
+	&s3c_device_usb_hsotg,
+	&s3c_device_wdt,
+	&s5p_device_ehci,
+	&s5p_device_fimc0,
+	&s5p_device_fimc1,
+	&s5p_device_fimc2,
+	&s5p_device_fimc3,
+	&s5p_device_fimc_md,
+	&s5p_device_mfc,
+	&s5p_device_mfc_l,
+	&s5p_device_mfc_r,
+	&exynos4_device_ohci,
+	&hkdk4412_leds_gpio,
+};
+
+static void __init hkdk4412_map_io(void)
+{
+	clk_xusbxti.rate = 24000000;
+
+	exynos_init_io(NULL, 0);
+	s3c24xx_init_clocks(clk_xusbxti.rate);
+	s3c24xx_init_uarts(hkdk4412_uartcfgs, ARRAY_SIZE(hkdk4412_uartcfgs));
+}
+
+static void __init hkdk4412_reserve(void)
+{
+	s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
+static void __init hkdk4412_gpio_init(void)
+{
+	/* Peripheral power enable (P3V3) */
+	gpio_request_one(EXYNOS4_GPA1(1), GPIOF_OUT_INIT_HIGH, "p3v3_en");
+}
+
+static void __init hkdk4412_machine_init(void)
+{
+	hkdk4412_gpio_init();
+
+	s3c_i2c0_set_platdata(NULL);
+	i2c_register_board_info(0, hkdk4412_i2c_devs0,
+				ARRAY_SIZE(hkdk4412_i2c_devs0));
+
+	s3c_i2c1_set_platdata(NULL);
+	i2c_register_board_info(1, hkdk4412_i2c_devs1,
+				ARRAY_SIZE(hkdk4412_i2c_devs1));
+
+	s3c_i2c3_set_platdata(NULL);
+	i2c_register_board_info(3, hkdk4412_i2c_devs3,
+				ARRAY_SIZE(hkdk4412_i2c_devs3));
+
+	s3c_i2c7_set_platdata(NULL);
+	i2c_register_board_info(7, hkdk4412_i2c_devs7,
+				ARRAY_SIZE(hkdk4412_i2c_devs7));
+
+	s3c_sdhci2_set_platdata(&hkdk4412_hsmmc2_pdata);
+	s3c_sdhci3_set_platdata(&hkdk4412_hsmmc3_pdata);
+
+	hkdk4412_ehci_init();
+	hkdk4412_ohci_init();
+	s3c_hsotg_set_platdata(&hkdk4412_hsotg_pdata);
+
+	platform_add_devices(hkdk4412_devices, ARRAY_SIZE(hkdk4412_devices));
+}
+
+MACHINE_START(ODROIDX, "ODROID-X")
+	/* Maintainer: Dongjin Kim <dongjin.kim@agreeyamobiity.net> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= hkdk4412_map_io,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= hkdk4412_machine_init,
+	.init_late	= exynos_init_late,
+	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
+	.reserve	= &hkdk4412_reserve,
+MACHINE_END
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 2997e56..e80ed9f 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -1206,3 +1206,4 @@ baileys			MACH_BAILEYS		BAILEYS			4169
 familybox		MACH_FAMILYBOX		FAMILYBOX		4170
 ensemble_mx35		MACH_ENSEMBLE_MX35	ENSEMBLE_MX35		4171
 sc_sps_1		MACH_SC_SPS_1		SC_SPS_1		4172
+odroidx			MACH_ODROIDX		ODROIDX			4289
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-07 18:49   ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07 18:49 UTC (permalink / raw)
  Cc: Dongjin Kim, Kukjin Kim, Russell King, Tony Lindgren,
	Jon Medhurst, Shawn Guo, Uwe Kleine-König, linux-arm-kernel,
	linux-samsung-soc, linux-kernel

The HKDK4412 is the CPU module developed by Hardkernel which is based on
Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
(4289) is registered.

Changes in v2:
  -. Change regulator's display names

Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df
Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
---
 arch/arm/mach-exynos/Kconfig         |   23 +
 arch/arm/mach-exynos/Makefile        |    1 +
 arch/arm/mach-exynos/mach-hkdk4412.c |  964 ++++++++++++++++++++++++++++++++++
 arch/arm/tools/mach-types            |    1 +
 4 files changed, 989 insertions(+)
 create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index b5b4c8c..ae90773 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -54,6 +54,9 @@ config SOC_EXYNOS4412
 	default y
 	depends on ARCH_EXYNOS4
 	select SAMSUNG_DMADEV
+	select S5P_PM if PM
+	select S5P_SLEEP if PM
+	select PM_GENERIC_DOMAINS
 	help
 	  Enable EXYNOS4412 SoC support
 
@@ -394,6 +397,26 @@ config MACH_SMDK4412
 	select MACH_SMDK4212
 	help
 	  Machine support for Samsung SMDK4412
+
+config MACH_HKDK4412
+	bool "HKDK4412"
+	select SOC_EXYNOS4412
+	select MACH_SMDK4212
+	select S3C_DEV_HSMMC
+	select S3C_DEV_HSMMC1
+	select S3C_DEV_USB_HSOTG
+	select S5P_DEV_CSIS0
+	select S5P_DEV_G2D
+	select S5P_DEV_JPEG
+	select S5P_DEV_USB_EHCI
+	select S5P_DEV_I2C_HDMIPHY
+	select S5P_DEV_TV
+	select S5P_GPIO_INT
+	select EXYNOS4_DEV_USB_OHCI
+	select SAMSUNG_DEV_ADC
+	help
+	  Machine support for Odroid-X based on Samsung EXYNOS4412
+
 endif
 
 comment "Flattened Device Tree based board for EXYNOS SoCs"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 9b58024..dccc381 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
+obj-$(CONFIG_MACH_HKDK4412)		+= mach-hkdk4412.o
 
 obj-$(CONFIG_MACH_EXYNOS4_DT)		+= mach-exynos4-dt.o
 obj-$(CONFIG_MACH_EXYNOS5_DT)		+= mach-exynos5-dt.o
diff --git a/arch/arm/mach-exynos/mach-hkdk4412.c b/arch/arm/mach-exynos/mach-hkdk4412.c
new file mode 100644
index 0000000..0bd1e6d
--- /dev/null
+++ b/arch/arm/mach-exynos/mach-hkdk4412.c
@@ -0,0 +1,964 @@
+/*
+ * linux/arch/arm/mach-exynos4/mach-hkdk4412.c
+ *
+ * Copyright (c) 2012 AgreeYa Mobility Co., Ltd.
+ *		http://www.agreeyamobility.net
+ *
+ * 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/gpio.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/io.h>
+#include <linux/mfd/max77686.h>
+#include <linux/mmc/host.h>
+#include <linux/platform_device.h>
+#include <linux/pwm_backlight.h>
+#include <linux/regulator/machine.h>
+#include <linux/serial_core.h>
+#include <linux/platform_data/s3c-hsotg.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+#include <asm/mach-types.h>
+
+#include <plat/backlight.h>
+#include <plat/clock.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+#include <plat/keypad.h>
+#include <plat/mfc.h>
+#include <plat/regs-serial.h>
+#include <plat/sdhci.h>
+#include <plat/ehci.h>
+
+#include <mach/ohci.h>
+#include <mach/map.h>
+
+#include "common.h"
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define HKDK4412_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define HKDK4412_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define HKDK4412_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG4 |	\
+				 S5PV210_UFCON_RXTRIG4)
+
+static struct s3c2410_uartcfg hkdk4412_uartcfgs[] __initdata = {
+	[0] = {
+		.hwport		= 0,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[1] = {
+		.hwport		= 1,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[2] = {
+		.hwport		= 2,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[3] = {
+		.hwport		= 3,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc2_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
+	.max_width	= 8,
+	.host_caps	= MMC_CAP_8_BIT_DATA,
+#endif
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc3_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck1_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck2_consumer[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL),	/* CPUFREQ */
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck3_consumer[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL),	/* CPUFREQ */
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] = {
+	REGULATOR_SUPPLY("vdd_g3d", "mali_drm"),	/* G3D */
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_alive", NULL),	/* ALIVE */
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo3_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo4_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo5_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo8_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo10_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo11_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo13_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo14_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo17_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo18_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo19_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo23_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo24_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo25_consumer[] = {
+	REGULATOR_SUPPLY("vddq_lcd", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo26_consumer[] = {
+};
+
+static struct regulator_init_data __initdata max77686_buck1_data = {
+	.constraints = {
+		.name		= "VDD_MIF_1.0V",
+		.min_uV		= 800000,
+		.max_uV		= 1050000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck1_consumer),
+	.consumer_supplies = max77686_buck1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck2_data = {
+	.constraints = {
+		.name		= "VDD_ARM_1.3V",
+		.min_uV		= 800000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck2_consumer),
+	.consumer_supplies = max77686_buck2_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck3_data = {
+	.constraints = {
+		.name		= "VDD_INT_1.0V",
+		.min_uV		= 800000,
+		.max_uV		= 1150000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck3_consumer),
+	.consumer_supplies = max77686_buck3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck4_data = {
+	.constraints = {
+		.name		= "VDD_G3D_1.0V",
+		.min_uV		= 850000,
+		.max_uV		= 1200000,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				  REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck4_consumer),
+	.consumer_supplies = max77686_buck4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck5_data = {
+	.constraints = {
+		.name		= "VDDQ_CKEM1M2_1.2V",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck6_data = {
+	.constraints = {
+		.name		= "VDD_INL_1.35V",
+		.min_uV		= 1350000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1350000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck7_data = {
+	.constraints = {
+		.name		= "VDD_INL_2.0V",
+		.min_uV		= 2000000,
+		.max_uV		= 2000000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2000000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck8_data = {
+	.constraints = {
+		.name		= "VDD_BUCK8_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck9_data = {
+	.constraints = {
+		.name		= "VDD_BUCK9_1.2V",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo1_data = {
+	.constraints = {
+		.name		= "VDD_ALIVE_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo1_consumer),
+	.consumer_supplies = max77686_ldo1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo2_data = {
+	.constraints = {
+		.name		= "VDDQ_M1M2_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo3_data = {
+	.constraints = {
+		.name		= "VDDQ_M0_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo3_consumer),
+	.consumer_supplies = max77686_ldo3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo4_data = {
+	.constraints = {
+		.name		= "VDDQ_MMC2_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo4_consumer),
+	.consumer_supplies = max77686_ldo4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo5_data = {
+	.constraints = {
+		.name		= "VDDQ_MMC13_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo5_consumer),
+	.consumer_supplies = max77686_ldo5_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo6_data = {
+	.constraints = {
+		.name		= "VDD_MPLL_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo7_data = {
+	.constraints = {
+		.name		= "VDD_VPLL_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo8_data = {
+	.constraints = {
+		.name		= "VDD10_HDMI_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo8_consumer),
+	.consumer_supplies = max77686_ldo8_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo9_data = {
+	.constraints = {
+		.name		= "VDD_VTCORE_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo10_data = {
+	.constraints = {
+		.name		= "VDDQ_MIPIHSI_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo10_consumer),
+	.consumer_supplies = max77686_ldo10_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo11_data = {
+	.constraints = {
+		.name		= "VDD18_ABB1_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo11_consumer),
+	.consumer_supplies	= max77686_ldo11_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo12_data = {
+	.constraints = {
+		.name		= "VDD33_UOTG_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo13_data = {
+	.constraints = {
+		.name		= "VDDQ_C2C_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo13_consumer),
+	.consumer_supplies = max77686_ldo13_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo14_data = {
+	.constraints = {
+		.name		= "VDD18_ABB2_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo14_consumer),
+	.consumer_supplies	= max77686_ldo14_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo15_data = {
+	.constraints = {
+		.name		= "VDD10_HSIC_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo16_data = {
+	.constraints = {
+		.name		= "VDD18_HSIC_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo17_data = {
+	.constraints = {
+		.name		= "VDDQ_CAM_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo17_consumer),
+	.consumer_supplies = max77686_ldo17_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo18_data = {
+	.constraints = {
+		.name		= "VDD_LDO18_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo18_consumer),
+	.consumer_supplies = max77686_ldo18_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo19_data = {
+	.constraints = {
+		.name		= "VDD_VTCAM_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 0,
+		.always_on	= 0,
+		.boot_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo19_consumer),
+	.consumer_supplies = max77686_ldo19_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo20_data = {
+	.constraints = {
+		.name		= "VDD_LDO20_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo21_data = {
+	.constraints = {
+		.name		= "VDD_SDCARD_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo22_data = {
+	.constraints = {
+		.name		= "VDD_LDO22_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo23_data = {
+	.constraints = {
+		.name		= "VDD_TOUCH_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo23_consumer),
+	.consumer_supplies = max77686_ldo23_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo24_data = {
+	.constraints = {
+		.name		= "VDD_TOUCHLED_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo24_consumer),
+	.consumer_supplies = max77686_ldo24_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo25_data = {
+	.constraints = {
+		.name		= "VDDQ_LCD_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo25_consumer),
+	.consumer_supplies = max77686_ldo25_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo26_data = {
+	.constraints = {
+		.name		= "VDD_MOTOR_3.0V",
+		.min_uV		= 3000000,
+		.max_uV		= 3000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem	= {
+			.uV	= 3000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo26_consumer),
+	.consumer_supplies = max77686_ldo26_consumer,
+};
+
+struct max77686_opmode_data max77686_opmode_data[MAX77686_REG_MAX] = {
+	[MAX77686_LDO11] = {MAX77686_LDO11, MAX77686_OPMODE_STANDBY},
+	[MAX77686_LDO14] = {MAX77686_LDO14, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK1] = {MAX77686_BUCK1, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK2] = {MAX77686_BUCK2, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK3] = {MAX77686_BUCK3, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK4] = {MAX77686_BUCK4, MAX77686_OPMODE_STANDBY},
+};
+
+static struct max77686_regulator_data max77686_regulators[] = {
+	{ MAX77686_LDO1,	&max77686_ldo1_data },
+	{ MAX77686_LDO2,	&max77686_ldo2_data },
+	{ MAX77686_LDO3,	&max77686_ldo3_data },
+	{ MAX77686_LDO4,	&max77686_ldo4_data },
+	{ MAX77686_LDO5,	&max77686_ldo5_data },
+	{ MAX77686_LDO6,	&max77686_ldo6_data },
+	{ MAX77686_LDO7,	&max77686_ldo7_data },
+	{ MAX77686_LDO8,	&max77686_ldo8_data },
+	{ MAX77686_LDO9,	&max77686_ldo9_data },
+	{ MAX77686_LDO10,	&max77686_ldo10_data },
+	{ MAX77686_LDO11,	&max77686_ldo11_data },
+	{ MAX77686_LDO12,	&max77686_ldo12_data },
+	{ MAX77686_LDO13,	&max77686_ldo13_data },
+	{ MAX77686_LDO14,	&max77686_ldo14_data },
+	{ MAX77686_LDO15,	&max77686_ldo15_data },
+	{ MAX77686_LDO16,	&max77686_ldo16_data },
+	{ MAX77686_LDO17,	&max77686_ldo17_data },
+	{ MAX77686_LDO18,	&max77686_ldo18_data },
+	{ MAX77686_LDO19,	&max77686_ldo19_data },
+	{ MAX77686_LDO20,	&max77686_ldo20_data },
+	{ MAX77686_LDO21,	&max77686_ldo21_data },
+	{ MAX77686_LDO22,	&max77686_ldo22_data },
+	{ MAX77686_LDO23,	&max77686_ldo23_data },
+	{ MAX77686_LDO24,	&max77686_ldo24_data },
+	{ MAX77686_LDO25,	&max77686_ldo25_data },
+	{ MAX77686_LDO26,	&max77686_ldo26_data },
+
+	{ MAX77686_BUCK1,	&max77686_buck1_data },
+	{ MAX77686_BUCK2,	&max77686_buck2_data },
+	{ MAX77686_BUCK3,	&max77686_buck3_data },
+	{ MAX77686_BUCK4,	&max77686_buck4_data },
+	{ MAX77686_BUCK5,	&max77686_buck5_data },
+	{ MAX77686_BUCK6,	&max77686_buck6_data },
+	{ MAX77686_BUCK7,	&max77686_buck7_data },
+	{ MAX77686_BUCK8,	&max77686_buck8_data },
+	{ MAX77686_BUCK9,	&max77686_buck9_data },
+};
+
+static struct max77686_platform_data hkdk4412_max77686_info = {
+	.num_regulators	= ARRAY_SIZE(max77686_regulators),
+	.regulators	= max77686_regulators,
+	.irq_gpio	= 0,
+	.wakeup		= 0,
+
+	.opmode_data	= max77686_opmode_data,
+
+	.buck234_gpio_dvs[0]	= EXYNOS4_GPX2(3),
+	.buck234_gpio_dvs[1]	= EXYNOS4_GPX2(4),
+	.buck234_gpio_dvs[2]	= EXYNOS4_GPX2(5),
+
+	.buck2_voltage[0] = 1300000,	/* 1.3V */
+	.buck2_voltage[1] = 1000000,	/* 1.0V */
+	.buck2_voltage[2] = 950000,	/* 0.95V */
+	.buck2_voltage[3] = 900000,	/* 0.9V */
+	.buck2_voltage[4] = 1000000,	/* 1.0V */
+	.buck2_voltage[5] = 1000000,	/* 1.0V */
+	.buck2_voltage[6] = 950000,	/* 0.95V */
+	.buck2_voltage[7] = 900000,	/* 0.9V */
+
+	.buck3_voltage[0] = 1037500,	/* 1.0375V */
+	.buck3_voltage[1] = 1000000,	/* 1.0V */
+	.buck3_voltage[2] = 950000,	/* 0.95V */
+	.buck3_voltage[3] = 900000,	/* 0.9V */
+	.buck3_voltage[4] = 1000000,	/* 1.0V */
+	.buck3_voltage[5] = 1000000,	/* 1.0V */
+	.buck3_voltage[6] = 950000,	/* 0.95V */
+	.buck3_voltage[7] = 900000,	/* 0.9V */
+
+	.buck4_voltage[0] = 1100000,	/* 1.1V */
+	.buck4_voltage[1] = 1000000,	/* 1.0V */
+	.buck4_voltage[2] = 950000,	/* 0.95V */
+	.buck4_voltage[3] = 900000,	/* 0.9V */
+	.buck4_voltage[4] = 1000000,	/* 1.0V */
+	.buck4_voltage[5] = 1000000,	/* 1.0V */
+	.buck4_voltage[6] = 950000,	/* 0.95V */
+	.buck4_voltage[7] = 900000,	/* 0.9V */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs0[] __initdata = {
+	{
+		I2C_BOARD_INFO("max77686", (0x12 >> 1)),
+		.platform_data	= &hkdk4412_max77686_info,
+	}
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs1[] __initdata = {
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs3[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs7[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct gpio_led hkdk4412_gpio_leds[] = {
+	{
+		.name		= "led1",	/* D5 on ODROID-X */
+		.default_trigger	= "oneshot",
+		.gpio		= EXYNOS4_GPC1(0),
+		.active_low	= 1,
+	},
+	{
+		.name		= "led2",	/* D6 on ODROID-X */
+		.default_trigger	= "heartbeat",
+		.gpio		= EXYNOS4_GPC1(2),
+		.active_low	= 1,
+	},
+};
+
+static struct gpio_led_platform_data hkdk4412_gpio_led_info = {
+	.leds		= hkdk4412_gpio_leds,
+	.num_leds	= ARRAY_SIZE(hkdk4412_gpio_leds),
+};
+
+static struct platform_device hkdk4412_leds_gpio = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &hkdk4412_gpio_led_info,
+	},
+};
+
+/* USB EHCI */
+static struct s5p_ehci_platdata hkdk4412_ehci_pdata;
+
+static void __init hkdk4412_ehci_init(void)
+{
+	struct s5p_ehci_platdata *pdata = &hkdk4412_ehci_pdata;
+
+	s5p_ehci_set_platdata(pdata);
+}
+
+/* USB OHCI */
+static struct exynos4_ohci_platdata hkdk4412_ohci_pdata;
+
+static void __init hkdk4412_ohci_init(void)
+{
+	struct exynos4_ohci_platdata *pdata = &hkdk4412_ohci_pdata;
+
+	exynos4_ohci_set_platdata(pdata);
+}
+
+/* USB OTG */
+static struct s3c_hsotg_plat hkdk4412_hsotg_pdata;
+
+static struct platform_device *hkdk4412_devices[] __initdata = {
+	&s3c_device_hsmmc2,
+	&s3c_device_hsmmc3,
+	&s3c_device_i2c0,
+	&s3c_device_i2c1,
+	&s3c_device_i2c3,
+	&s3c_device_i2c7,
+	&s3c_device_rtc,
+	&s3c_device_usb_hsotg,
+	&s3c_device_wdt,
+	&s5p_device_ehci,
+	&s5p_device_fimc0,
+	&s5p_device_fimc1,
+	&s5p_device_fimc2,
+	&s5p_device_fimc3,
+	&s5p_device_fimc_md,
+	&s5p_device_mfc,
+	&s5p_device_mfc_l,
+	&s5p_device_mfc_r,
+	&exynos4_device_ohci,
+	&hkdk4412_leds_gpio,
+};
+
+static void __init hkdk4412_map_io(void)
+{
+	clk_xusbxti.rate = 24000000;
+
+	exynos_init_io(NULL, 0);
+	s3c24xx_init_clocks(clk_xusbxti.rate);
+	s3c24xx_init_uarts(hkdk4412_uartcfgs, ARRAY_SIZE(hkdk4412_uartcfgs));
+}
+
+static void __init hkdk4412_reserve(void)
+{
+	s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
+static void __init hkdk4412_gpio_init(void)
+{
+	/* Peripheral power enable (P3V3) */
+	gpio_request_one(EXYNOS4_GPA1(1), GPIOF_OUT_INIT_HIGH, "p3v3_en");
+}
+
+static void __init hkdk4412_machine_init(void)
+{
+	hkdk4412_gpio_init();
+
+	s3c_i2c0_set_platdata(NULL);
+	i2c_register_board_info(0, hkdk4412_i2c_devs0,
+				ARRAY_SIZE(hkdk4412_i2c_devs0));
+
+	s3c_i2c1_set_platdata(NULL);
+	i2c_register_board_info(1, hkdk4412_i2c_devs1,
+				ARRAY_SIZE(hkdk4412_i2c_devs1));
+
+	s3c_i2c3_set_platdata(NULL);
+	i2c_register_board_info(3, hkdk4412_i2c_devs3,
+				ARRAY_SIZE(hkdk4412_i2c_devs3));
+
+	s3c_i2c7_set_platdata(NULL);
+	i2c_register_board_info(7, hkdk4412_i2c_devs7,
+				ARRAY_SIZE(hkdk4412_i2c_devs7));
+
+	s3c_sdhci2_set_platdata(&hkdk4412_hsmmc2_pdata);
+	s3c_sdhci3_set_platdata(&hkdk4412_hsmmc3_pdata);
+
+	hkdk4412_ehci_init();
+	hkdk4412_ohci_init();
+	s3c_hsotg_set_platdata(&hkdk4412_hsotg_pdata);
+
+	platform_add_devices(hkdk4412_devices, ARRAY_SIZE(hkdk4412_devices));
+}
+
+MACHINE_START(ODROIDX, "ODROID-X")
+	/* Maintainer: Dongjin Kim <dongjin.kim@agreeyamobiity.net> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= hkdk4412_map_io,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= hkdk4412_machine_init,
+	.init_late	= exynos_init_late,
+	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
+	.reserve	= &hkdk4412_reserve,
+MACHINE_END
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 2997e56..e80ed9f 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -1206,3 +1206,4 @@ baileys			MACH_BAILEYS		BAILEYS			4169
 familybox		MACH_FAMILYBOX		FAMILYBOX		4170
 ensemble_mx35		MACH_ENSEMBLE_MX35	ENSEMBLE_MX35		4171
 sc_sps_1		MACH_SC_SPS_1		SC_SPS_1		4172
+odroidx			MACH_ODROIDX		ODROIDX			4289
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 29+ messages in thread

* [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-07 18:49   ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-07 18:49 UTC (permalink / raw)
  To: linux-arm-kernel

The HKDK4412 is the CPU module developed by Hardkernel which is based on
Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine ID
(4289) is registered.

Changes in v2:
  -. Change regulator's display names

Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df
Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>
---
 arch/arm/mach-exynos/Kconfig         |   23 +
 arch/arm/mach-exynos/Makefile        |    1 +
 arch/arm/mach-exynos/mach-hkdk4412.c |  964 ++++++++++++++++++++++++++++++++++
 arch/arm/tools/mach-types            |    1 +
 4 files changed, 989 insertions(+)
 create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c

diff --git a/arch/arm/mach-exynos/Kconfig b/arch/arm/mach-exynos/Kconfig
index b5b4c8c..ae90773 100644
--- a/arch/arm/mach-exynos/Kconfig
+++ b/arch/arm/mach-exynos/Kconfig
@@ -54,6 +54,9 @@ config SOC_EXYNOS4412
 	default y
 	depends on ARCH_EXYNOS4
 	select SAMSUNG_DMADEV
+	select S5P_PM if PM
+	select S5P_SLEEP if PM
+	select PM_GENERIC_DOMAINS
 	help
 	  Enable EXYNOS4412 SoC support
 
@@ -394,6 +397,26 @@ config MACH_SMDK4412
 	select MACH_SMDK4212
 	help
 	  Machine support for Samsung SMDK4412
+
+config MACH_HKDK4412
+	bool "HKDK4412"
+	select SOC_EXYNOS4412
+	select MACH_SMDK4212
+	select S3C_DEV_HSMMC
+	select S3C_DEV_HSMMC1
+	select S3C_DEV_USB_HSOTG
+	select S5P_DEV_CSIS0
+	select S5P_DEV_G2D
+	select S5P_DEV_JPEG
+	select S5P_DEV_USB_EHCI
+	select S5P_DEV_I2C_HDMIPHY
+	select S5P_DEV_TV
+	select S5P_GPIO_INT
+	select EXYNOS4_DEV_USB_OHCI
+	select SAMSUNG_DEV_ADC
+	help
+	  Machine support for Odroid-X based on Samsung EXYNOS4412
+
 endif
 
 comment "Flattened Device Tree based board for EXYNOS SoCs"
diff --git a/arch/arm/mach-exynos/Makefile b/arch/arm/mach-exynos/Makefile
index 9b58024..dccc381 100644
--- a/arch/arm/mach-exynos/Makefile
+++ b/arch/arm/mach-exynos/Makefile
@@ -41,6 +41,7 @@ obj-$(CONFIG_MACH_ORIGEN)		+= mach-origen.o
 
 obj-$(CONFIG_MACH_SMDK4212)		+= mach-smdk4x12.o
 obj-$(CONFIG_MACH_SMDK4412)		+= mach-smdk4x12.o
+obj-$(CONFIG_MACH_HKDK4412)		+= mach-hkdk4412.o
 
 obj-$(CONFIG_MACH_EXYNOS4_DT)		+= mach-exynos4-dt.o
 obj-$(CONFIG_MACH_EXYNOS5_DT)		+= mach-exynos5-dt.o
diff --git a/arch/arm/mach-exynos/mach-hkdk4412.c b/arch/arm/mach-exynos/mach-hkdk4412.c
new file mode 100644
index 0000000..0bd1e6d
--- /dev/null
+++ b/arch/arm/mach-exynos/mach-hkdk4412.c
@@ -0,0 +1,964 @@
+/*
+ * linux/arch/arm/mach-exynos4/mach-hkdk4412.c
+ *
+ * Copyright (c) 2012 AgreeYa Mobility Co., Ltd.
+ *		http://www.agreeyamobility.net
+ *
+ * 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/gpio.h>
+#include <linux/i2c.h>
+#include <linux/input.h>
+#include <linux/io.h>
+#include <linux/mfd/max77686.h>
+#include <linux/mmc/host.h>
+#include <linux/platform_device.h>
+#include <linux/pwm_backlight.h>
+#include <linux/regulator/machine.h>
+#include <linux/serial_core.h>
+#include <linux/platform_data/s3c-hsotg.h>
+
+#include <asm/mach/arch.h>
+#include <asm/hardware/gic.h>
+#include <asm/mach-types.h>
+
+#include <plat/backlight.h>
+#include <plat/clock.h>
+#include <plat/cpu.h>
+#include <plat/devs.h>
+#include <plat/gpio-cfg.h>
+#include <plat/iic.h>
+#include <plat/keypad.h>
+#include <plat/mfc.h>
+#include <plat/regs-serial.h>
+#include <plat/sdhci.h>
+#include <plat/ehci.h>
+
+#include <mach/ohci.h>
+#include <mach/map.h>
+
+#include "common.h"
+
+/* Following are default values for UCON, ULCON and UFCON UART registers */
+#define HKDK4412_UCON_DEFAULT	(S3C2410_UCON_TXILEVEL |	\
+				 S3C2410_UCON_RXILEVEL |	\
+				 S3C2410_UCON_TXIRQMODE |	\
+				 S3C2410_UCON_RXIRQMODE |	\
+				 S3C2410_UCON_RXFIFO_TOI |	\
+				 S3C2443_UCON_RXERR_IRQEN)
+
+#define HKDK4412_ULCON_DEFAULT	S3C2410_LCON_CS8
+
+#define HKDK4412_UFCON_DEFAULT	(S3C2410_UFCON_FIFOMODE |	\
+				 S5PV210_UFCON_TXTRIG4 |	\
+				 S5PV210_UFCON_RXTRIG4)
+
+static struct s3c2410_uartcfg hkdk4412_uartcfgs[] __initdata = {
+	[0] = {
+		.hwport		= 0,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[1] = {
+		.hwport		= 1,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[2] = {
+		.hwport		= 2,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+	[3] = {
+		.hwport		= 3,
+		.flags		= 0,
+		.ucon		= HKDK4412_UCON_DEFAULT,
+		.ulcon		= HKDK4412_ULCON_DEFAULT,
+		.ufcon		= HKDK4412_UFCON_DEFAULT,
+	},
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc2_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+#ifdef CONFIG_EXYNOS4_SDHCI_CH2_8BIT
+	.max_width	= 8,
+	.host_caps	= MMC_CAP_8_BIT_DATA,
+#endif
+};
+
+static struct s3c_sdhci_platdata hkdk4412_hsmmc3_pdata __initdata = {
+	.cd_type	= S3C_SDHCI_CD_INTERNAL,
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck1_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck2_consumer[] = {
+	REGULATOR_SUPPLY("vdd_arm", NULL),	/* CPUFREQ */
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck3_consumer[] = {
+	REGULATOR_SUPPLY("vdd_int", NULL),	/* CPUFREQ */
+};
+
+static struct regulator_consumer_supply __initdata max77686_buck4_consumer[] = {
+	REGULATOR_SUPPLY("vdd_g3d", "mali_drm"),	/* G3D */
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo1_consumer[] = {
+	REGULATOR_SUPPLY("vdd_alive", NULL),	/* ALIVE */
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo3_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo4_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo5_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo8_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo10_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo11_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo13_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo14_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo17_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo18_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo19_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo23_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo24_consumer[] = {
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo25_consumer[] = {
+	REGULATOR_SUPPLY("vddq_lcd", NULL),
+};
+
+static struct regulator_consumer_supply __initdata max77686_ldo26_consumer[] = {
+};
+
+static struct regulator_init_data __initdata max77686_buck1_data = {
+	.constraints = {
+		.name		= "VDD_MIF_1.0V",
+		.min_uV		= 800000,
+		.max_uV		= 1050000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				REGULATOR_CHANGE_STATUS,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck1_consumer),
+	.consumer_supplies = max77686_buck1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck2_data = {
+	.constraints = {
+		.name		= "VDD_ARM_1.3V",
+		.min_uV		= 800000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck2_consumer),
+	.consumer_supplies = max77686_buck2_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck3_data = {
+	.constraints = {
+		.name		= "VDD_INT_1.0V",
+		.min_uV		= 800000,
+		.max_uV		= 1150000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE,
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck3_consumer),
+	.consumer_supplies = max77686_buck3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck4_data = {
+	.constraints = {
+		.name		= "VDD_G3D_1.0V",
+		.min_uV		= 850000,
+		.max_uV		= 1200000,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_VOLTAGE |
+				  REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_buck4_consumer),
+	.consumer_supplies = max77686_buck4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_buck5_data = {
+	.constraints = {
+		.name		= "VDDQ_CKEM1M2_1.2V",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck6_data = {
+	.constraints = {
+		.name		= "VDD_INL_1.35V",
+		.min_uV		= 1350000,
+		.max_uV		= 1350000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1350000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck7_data = {
+	.constraints = {
+		.name		= "VDD_INL_2.0V",
+		.min_uV		= 2000000,
+		.max_uV		= 2000000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2000000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck8_data = {
+	.constraints = {
+		.name		= "VDD_BUCK8_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_buck9_data = {
+	.constraints = {
+		.name		= "VDD_BUCK9_1.2V",
+		.min_uV		= 1200000,
+		.max_uV		= 1200000,
+		.always_on	= 1,
+		.apply_uV	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1200000,
+			.mode	= REGULATOR_MODE_NORMAL,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo1_data = {
+	.constraints = {
+		.name		= "VDD_ALIVE_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo1_consumer),
+	.consumer_supplies = max77686_ldo1_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo2_data = {
+	.constraints = {
+		.name		= "VDDQ_M1M2_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo3_data = {
+	.constraints = {
+		.name		= "VDDQ_M0_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo3_consumer),
+	.consumer_supplies = max77686_ldo3_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo4_data = {
+	.constraints = {
+		.name		= "VDDQ_MMC2_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo4_consumer),
+	.consumer_supplies = max77686_ldo4_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo5_data = {
+	.constraints = {
+		.name		= "VDDQ_MMC13_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo5_consumer),
+	.consumer_supplies = max77686_ldo5_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo6_data = {
+	.constraints = {
+		.name		= "VDD_MPLL_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo7_data = {
+	.constraints = {
+		.name		= "VDD_VPLL_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo8_data = {
+	.constraints = {
+		.name		= "VDD10_HDMI_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo8_consumer),
+	.consumer_supplies = max77686_ldo8_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo9_data = {
+	.constraints = {
+		.name		= "VDD_VTCORE_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo10_data = {
+	.constraints = {
+		.name		= "VDDQ_MIPIHSI_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo10_consumer),
+	.consumer_supplies = max77686_ldo10_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo11_data = {
+	.constraints = {
+		.name		= "VDD18_ABB1_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo11_consumer),
+	.consumer_supplies	= max77686_ldo11_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo12_data = {
+	.constraints = {
+		.name		= "VDD33_UOTG_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo13_data = {
+	.constraints = {
+		.name		= "VDDQ_C2C_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo13_consumer),
+	.consumer_supplies = max77686_ldo13_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo14_data = {
+	.constraints = {
+		.name		= "VDD18_ABB2_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies	= ARRAY_SIZE(max77686_ldo14_consumer),
+	.consumer_supplies	= max77686_ldo14_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo15_data = {
+	.constraints = {
+		.name		= "VDD10_HSIC_1.0V",
+		.min_uV		= 1000000,
+		.max_uV		= 1000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1000000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo16_data = {
+	.constraints = {
+		.name		= "VDD18_HSIC_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo17_data = {
+	.constraints = {
+		.name		= "VDDQ_CAM_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo17_consumer),
+	.consumer_supplies = max77686_ldo17_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo18_data = {
+	.constraints = {
+		.name		= "VDD_LDO18_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo18_consumer),
+	.consumer_supplies = max77686_ldo18_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo19_data = {
+	.constraints = {
+		.name		= "VDD_VTCAM_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 0,
+		.always_on	= 0,
+		.boot_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo19_consumer),
+	.consumer_supplies = max77686_ldo19_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo20_data = {
+	.constraints = {
+		.name		= "VDD_LDO20_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.always_on	= 1,
+		.boot_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 1800000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo21_data = {
+	.constraints = {
+		.name		= "VDD_SDCARD_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo22_data = {
+	.constraints = {
+		.name		= "VDD_LDO22_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 0,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 0,
+		},
+	},
+};
+
+static struct regulator_init_data __initdata max77686_ldo23_data = {
+	.constraints = {
+		.name		= "VDD_TOUCH_2.8V",
+		.min_uV		= 2800000,
+		.max_uV		= 2800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 2800000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo23_consumer),
+	.consumer_supplies = max77686_ldo23_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo24_data = {
+	.constraints = {
+		.name		= "VDD_TOUCHLED_3.3V",
+		.min_uV		= 3300000,
+		.max_uV		= 3300000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.uV	= 3300000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo24_consumer),
+	.consumer_supplies = max77686_ldo24_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo25_data = {
+	.constraints = {
+		.name		= "VDDQ_LCD_1.8V",
+		.min_uV		= 1800000,
+		.max_uV		= 1800000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem = {
+			.disabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo25_consumer),
+	.consumer_supplies = max77686_ldo25_consumer,
+};
+
+static struct regulator_init_data __initdata max77686_ldo26_data = {
+	.constraints = {
+		.name		= "VDD_MOTOR_3.0V",
+		.min_uV		= 3000000,
+		.max_uV		= 3000000,
+		.apply_uV	= 1,
+		.always_on	= 1,
+		.valid_ops_mask = REGULATOR_CHANGE_STATUS,
+		.state_mem	= {
+			.uV	= 3000000,
+			.enabled = 1,
+		},
+	},
+	.num_consumer_supplies = ARRAY_SIZE(max77686_ldo26_consumer),
+	.consumer_supplies = max77686_ldo26_consumer,
+};
+
+struct max77686_opmode_data max77686_opmode_data[MAX77686_REG_MAX] = {
+	[MAX77686_LDO11] = {MAX77686_LDO11, MAX77686_OPMODE_STANDBY},
+	[MAX77686_LDO14] = {MAX77686_LDO14, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK1] = {MAX77686_BUCK1, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK2] = {MAX77686_BUCK2, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK3] = {MAX77686_BUCK3, MAX77686_OPMODE_STANDBY},
+	[MAX77686_BUCK4] = {MAX77686_BUCK4, MAX77686_OPMODE_STANDBY},
+};
+
+static struct max77686_regulator_data max77686_regulators[] = {
+	{ MAX77686_LDO1,	&max77686_ldo1_data },
+	{ MAX77686_LDO2,	&max77686_ldo2_data },
+	{ MAX77686_LDO3,	&max77686_ldo3_data },
+	{ MAX77686_LDO4,	&max77686_ldo4_data },
+	{ MAX77686_LDO5,	&max77686_ldo5_data },
+	{ MAX77686_LDO6,	&max77686_ldo6_data },
+	{ MAX77686_LDO7,	&max77686_ldo7_data },
+	{ MAX77686_LDO8,	&max77686_ldo8_data },
+	{ MAX77686_LDO9,	&max77686_ldo9_data },
+	{ MAX77686_LDO10,	&max77686_ldo10_data },
+	{ MAX77686_LDO11,	&max77686_ldo11_data },
+	{ MAX77686_LDO12,	&max77686_ldo12_data },
+	{ MAX77686_LDO13,	&max77686_ldo13_data },
+	{ MAX77686_LDO14,	&max77686_ldo14_data },
+	{ MAX77686_LDO15,	&max77686_ldo15_data },
+	{ MAX77686_LDO16,	&max77686_ldo16_data },
+	{ MAX77686_LDO17,	&max77686_ldo17_data },
+	{ MAX77686_LDO18,	&max77686_ldo18_data },
+	{ MAX77686_LDO19,	&max77686_ldo19_data },
+	{ MAX77686_LDO20,	&max77686_ldo20_data },
+	{ MAX77686_LDO21,	&max77686_ldo21_data },
+	{ MAX77686_LDO22,	&max77686_ldo22_data },
+	{ MAX77686_LDO23,	&max77686_ldo23_data },
+	{ MAX77686_LDO24,	&max77686_ldo24_data },
+	{ MAX77686_LDO25,	&max77686_ldo25_data },
+	{ MAX77686_LDO26,	&max77686_ldo26_data },
+
+	{ MAX77686_BUCK1,	&max77686_buck1_data },
+	{ MAX77686_BUCK2,	&max77686_buck2_data },
+	{ MAX77686_BUCK3,	&max77686_buck3_data },
+	{ MAX77686_BUCK4,	&max77686_buck4_data },
+	{ MAX77686_BUCK5,	&max77686_buck5_data },
+	{ MAX77686_BUCK6,	&max77686_buck6_data },
+	{ MAX77686_BUCK7,	&max77686_buck7_data },
+	{ MAX77686_BUCK8,	&max77686_buck8_data },
+	{ MAX77686_BUCK9,	&max77686_buck9_data },
+};
+
+static struct max77686_platform_data hkdk4412_max77686_info = {
+	.num_regulators	= ARRAY_SIZE(max77686_regulators),
+	.regulators	= max77686_regulators,
+	.irq_gpio	= 0,
+	.wakeup		= 0,
+
+	.opmode_data	= max77686_opmode_data,
+
+	.buck234_gpio_dvs[0]	= EXYNOS4_GPX2(3),
+	.buck234_gpio_dvs[1]	= EXYNOS4_GPX2(4),
+	.buck234_gpio_dvs[2]	= EXYNOS4_GPX2(5),
+
+	.buck2_voltage[0] = 1300000,	/* 1.3V */
+	.buck2_voltage[1] = 1000000,	/* 1.0V */
+	.buck2_voltage[2] = 950000,	/* 0.95V */
+	.buck2_voltage[3] = 900000,	/* 0.9V */
+	.buck2_voltage[4] = 1000000,	/* 1.0V */
+	.buck2_voltage[5] = 1000000,	/* 1.0V */
+	.buck2_voltage[6] = 950000,	/* 0.95V */
+	.buck2_voltage[7] = 900000,	/* 0.9V */
+
+	.buck3_voltage[0] = 1037500,	/* 1.0375V */
+	.buck3_voltage[1] = 1000000,	/* 1.0V */
+	.buck3_voltage[2] = 950000,	/* 0.95V */
+	.buck3_voltage[3] = 900000,	/* 0.9V */
+	.buck3_voltage[4] = 1000000,	/* 1.0V */
+	.buck3_voltage[5] = 1000000,	/* 1.0V */
+	.buck3_voltage[6] = 950000,	/* 0.95V */
+	.buck3_voltage[7] = 900000,	/* 0.9V */
+
+	.buck4_voltage[0] = 1100000,	/* 1.1V */
+	.buck4_voltage[1] = 1000000,	/* 1.0V */
+	.buck4_voltage[2] = 950000,	/* 0.95V */
+	.buck4_voltage[3] = 900000,	/* 0.9V */
+	.buck4_voltage[4] = 1000000,	/* 1.0V */
+	.buck4_voltage[5] = 1000000,	/* 1.0V */
+	.buck4_voltage[6] = 950000,	/* 0.95V */
+	.buck4_voltage[7] = 900000,	/* 0.9V */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs0[] __initdata = {
+	{
+		I2C_BOARD_INFO("max77686", (0x12 >> 1)),
+		.platform_data	= &hkdk4412_max77686_info,
+	}
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs1[] __initdata = {
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs3[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct i2c_board_info hkdk4412_i2c_devs7[] __initdata = {
+	/* nothing here yet */
+};
+
+static struct gpio_led hkdk4412_gpio_leds[] = {
+	{
+		.name		= "led1",	/* D5 on ODROID-X */
+		.default_trigger	= "oneshot",
+		.gpio		= EXYNOS4_GPC1(0),
+		.active_low	= 1,
+	},
+	{
+		.name		= "led2",	/* D6 on ODROID-X */
+		.default_trigger	= "heartbeat",
+		.gpio		= EXYNOS4_GPC1(2),
+		.active_low	= 1,
+	},
+};
+
+static struct gpio_led_platform_data hkdk4412_gpio_led_info = {
+	.leds		= hkdk4412_gpio_leds,
+	.num_leds	= ARRAY_SIZE(hkdk4412_gpio_leds),
+};
+
+static struct platform_device hkdk4412_leds_gpio = {
+	.name	= "leds-gpio",
+	.id	= -1,
+	.dev	= {
+		.platform_data	= &hkdk4412_gpio_led_info,
+	},
+};
+
+/* USB EHCI */
+static struct s5p_ehci_platdata hkdk4412_ehci_pdata;
+
+static void __init hkdk4412_ehci_init(void)
+{
+	struct s5p_ehci_platdata *pdata = &hkdk4412_ehci_pdata;
+
+	s5p_ehci_set_platdata(pdata);
+}
+
+/* USB OHCI */
+static struct exynos4_ohci_platdata hkdk4412_ohci_pdata;
+
+static void __init hkdk4412_ohci_init(void)
+{
+	struct exynos4_ohci_platdata *pdata = &hkdk4412_ohci_pdata;
+
+	exynos4_ohci_set_platdata(pdata);
+}
+
+/* USB OTG */
+static struct s3c_hsotg_plat hkdk4412_hsotg_pdata;
+
+static struct platform_device *hkdk4412_devices[] __initdata = {
+	&s3c_device_hsmmc2,
+	&s3c_device_hsmmc3,
+	&s3c_device_i2c0,
+	&s3c_device_i2c1,
+	&s3c_device_i2c3,
+	&s3c_device_i2c7,
+	&s3c_device_rtc,
+	&s3c_device_usb_hsotg,
+	&s3c_device_wdt,
+	&s5p_device_ehci,
+	&s5p_device_fimc0,
+	&s5p_device_fimc1,
+	&s5p_device_fimc2,
+	&s5p_device_fimc3,
+	&s5p_device_fimc_md,
+	&s5p_device_mfc,
+	&s5p_device_mfc_l,
+	&s5p_device_mfc_r,
+	&exynos4_device_ohci,
+	&hkdk4412_leds_gpio,
+};
+
+static void __init hkdk4412_map_io(void)
+{
+	clk_xusbxti.rate = 24000000;
+
+	exynos_init_io(NULL, 0);
+	s3c24xx_init_clocks(clk_xusbxti.rate);
+	s3c24xx_init_uarts(hkdk4412_uartcfgs, ARRAY_SIZE(hkdk4412_uartcfgs));
+}
+
+static void __init hkdk4412_reserve(void)
+{
+	s5p_mfc_reserve_mem(0x43000000, 8 << 20, 0x51000000, 8 << 20);
+}
+
+static void __init hkdk4412_gpio_init(void)
+{
+	/* Peripheral power enable (P3V3) */
+	gpio_request_one(EXYNOS4_GPA1(1), GPIOF_OUT_INIT_HIGH, "p3v3_en");
+}
+
+static void __init hkdk4412_machine_init(void)
+{
+	hkdk4412_gpio_init();
+
+	s3c_i2c0_set_platdata(NULL);
+	i2c_register_board_info(0, hkdk4412_i2c_devs0,
+				ARRAY_SIZE(hkdk4412_i2c_devs0));
+
+	s3c_i2c1_set_platdata(NULL);
+	i2c_register_board_info(1, hkdk4412_i2c_devs1,
+				ARRAY_SIZE(hkdk4412_i2c_devs1));
+
+	s3c_i2c3_set_platdata(NULL);
+	i2c_register_board_info(3, hkdk4412_i2c_devs3,
+				ARRAY_SIZE(hkdk4412_i2c_devs3));
+
+	s3c_i2c7_set_platdata(NULL);
+	i2c_register_board_info(7, hkdk4412_i2c_devs7,
+				ARRAY_SIZE(hkdk4412_i2c_devs7));
+
+	s3c_sdhci2_set_platdata(&hkdk4412_hsmmc2_pdata);
+	s3c_sdhci3_set_platdata(&hkdk4412_hsmmc3_pdata);
+
+	hkdk4412_ehci_init();
+	hkdk4412_ohci_init();
+	s3c_hsotg_set_platdata(&hkdk4412_hsotg_pdata);
+
+	platform_add_devices(hkdk4412_devices, ARRAY_SIZE(hkdk4412_devices));
+}
+
+MACHINE_START(ODROIDX, "ODROID-X")
+	/* Maintainer: Dongjin Kim <dongjin.kim@agreeyamobiity.net> */
+	.atag_offset	= 0x100,
+	.init_irq	= exynos4_init_irq,
+	.map_io		= hkdk4412_map_io,
+	.handle_irq	= gic_handle_irq,
+	.init_machine	= hkdk4412_machine_init,
+	.init_late	= exynos_init_late,
+	.timer		= &exynos4_timer,
+	.restart	= exynos4_restart,
+	.reserve	= &hkdk4412_reserve,
+MACHINE_END
diff --git a/arch/arm/tools/mach-types b/arch/arm/tools/mach-types
index 2997e56..e80ed9f 100644
--- a/arch/arm/tools/mach-types
+++ b/arch/arm/tools/mach-types
@@ -1206,3 +1206,4 @@ baileys			MACH_BAILEYS		BAILEYS			4169
 familybox		MACH_FAMILYBOX		FAMILYBOX		4170
 ensemble_mx35		MACH_ENSEMBLE_MX35	ENSEMBLE_MX35		4171
 sc_sps_1		MACH_SC_SPS_1		SC_SPS_1		4172
+odroidx			MACH_ODROIDX		ODROIDX			4289
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 29+ messages in thread

* RE: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-07 18:49   ` Dongjin Kim
@ 2012-08-08  2:23     ` Kukjin Kim
  -1 siblings, 0 replies; 29+ messages in thread
From: Kukjin Kim @ 2012-08-08  2:23 UTC (permalink / raw)
  To: 'Dongjin Kim'
  Cc: 'Dongjin Kim', 'Russell King',
	'Tony Lindgren', 'Jon Medhurst',
	'Shawn Guo', 'Uwe Kleine-König',
	linux-arm-kernel, linux-samsung-soc, linux-kernel

Dongjin Kim wrote:
> 
Hi,

Basically, we don't add more board file for non-DT for EXYNOS SoCs...

> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine
> ID
> (4289) is registered.
> 
This should be done at the link: http://www.arm.linux.org.uk/developer/machines/ by Russell King.

But I'm not sure whether it is worth to you without this patch for board file in mainline.

> Changes in v2:
>   -. Change regulator's display names
> 
> Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df

No need gerrit Change-Id here.

> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>

If there is no reason, please use same e-mail address in the field of author and sign-off.

Note, if you want to use e-mail 'agreeyamobility.net', just add 'From: Dongjin Kim <dongjin.kim@agreeyamobility.net>', it's ok.

> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  964
> ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 989 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c
> 

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


^ permalink raw reply	[flat|nested] 29+ messages in thread

* [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-08  2:23     ` Kukjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Kukjin Kim @ 2012-08-08  2:23 UTC (permalink / raw)
  To: linux-arm-kernel

Dongjin Kim wrote:
> 
Hi,

Basically, we don't add more board file for non-DT for EXYNOS SoCs...

> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine
> ID
> (4289) is registered.
> 
This should be done at the link: http://www.arm.linux.org.uk/developer/machines/ by Russell King.

But I'm not sure whether it is worth to you without this patch for board file in mainline.

> Changes in v2:
>   -. Change regulator's display names
> 
> Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df

No need gerrit Change-Id here.

> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>

If there is no reason, please use same e-mail address in the field of author and sign-off.

Note, if you want to use e-mail 'agreeyamobility.net', just add 'From: Dongjin Kim <dongjin.kim@agreeyamobility.net>', it's ok.

> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  964
> ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 989 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c
> 

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
  2012-08-08  2:23     ` Kukjin Kim
  (?)
@ 2012-08-08  2:41       ` Dongjin Kim
  -1 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-08  2:41 UTC (permalink / raw)
  To: Kukjin Kim, 'Dongjin Kim'
  Cc: 'Russell King', 'Tony Lindgren',
	'Jon Medhurst', 'Shawn Guo',
	'Uwe Kleine-König',
	linux-arm-kernel, linux-samsung-soc, linux-kernel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="utf-8", Size: 2345 bytes --]

Hi,

Thank you for your advice.

And I didn't know non-DT board file will not be merged any more.
Rule is rule, I can manage the file in my git only.

I am very new to send git patches to open community, even I use git on my previous project.
I will pay attention to my next patches if I have more. :)

Thanks again.

Regards,
Dongjin.
________________________________________
보낸 사람: Kukjin Kim [kgene.kim@samsung.com]
보낸 날짜: 2012년 8월 8일 수요일 오전 11:23
받는 사람: 'Dongjin Kim'
참조: Dongjin Kim; 'Russell King'; 'Tony Lindgren'; 'Jon Medhurst'; 'Shawn Guo'; 'Uwe Kleine-König'; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
제목: RE: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Dongjin Kim wrote:
>
Hi,

Basically, we don't add more board file for non-DT for EXYNOS SoCs...

> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine
> ID
> (4289) is registered.
>
This should be done at the link: http://www.arm.linux.org.uk/developer/machines/ by Russell King.

But I'm not sure whether it is worth to you without this patch for board file in mainline.

> Changes in v2:
>   -. Change regulator's display names
>
> Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df

No need gerrit Change-Id here.

> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>

If there is no reason, please use same e-mail address in the field of author and sign-off.

Note, if you want to use e-mail 'agreeyamobility.net', just add 'From: Dongjin Kim <dongjin.kim@agreeyamobility.net>', it's ok.

> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  964
> ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 989 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c
>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.


ÿôèº{.nÇ+‰·Ÿ®‰­†+%ŠËÿ±éݶ\x17¥Šwÿº{.nÇ+‰·¥Š{±þG«éÿŠ{ayº\x1dʇڙë,j\a­¢f£¢·hšïêÿ‘êçz_è®\x03(­éšŽŠÝ¢j"ú\x1a¶^[m§ÿÿ¾\a«þG«éÿ¢¸?™¨è­Ú&£ø§~á¶iO•æ¬z·švØ^\x14\x04\x1a¶^[m§ÿÿÃ\fÿ¶ìÿ¢¸?–I¥

^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-08  2:41       ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-08  2:41 UTC (permalink / raw)
  To: Kukjin Kim, 'Dongjin Kim'
  Cc: 'Russell King', 'Tony Lindgren',
	'Jon Medhurst', 'Shawn Guo',
	'Uwe Kleine-König',
	linux-arm-kernel, linux-samsung-soc, linux-kernel

Hi,

Thank you for your advice.

And I didn't know non-DT board file will not be merged any more.
Rule is rule, I can manage the file in my git only.

I am very new to send git patches to open community, even I use git on my previous project.
I will pay attention to my next patches if I have more. :)

Thanks again.

Regards,
Dongjin.
________________________________________
보낸 사람: Kukjin Kim [kgene.kim@samsung.com]
보낸 날짜: 2012년 8월 8일 수요일 오전 11:23
받는 사람: 'Dongjin Kim'
참조: Dongjin Kim; 'Russell King'; 'Tony Lindgren'; 'Jon Medhurst'; 'Shawn Guo'; 'Uwe Kleine-König'; linux-arm-kernel@lists.infradead.org; linux-samsung-soc@vger.kernel.org; linux-kernel@vger.kernel.org
제목: RE: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Dongjin Kim wrote:
>
Hi,

Basically, we don't add more board file for non-DT for EXYNOS SoCs...

> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine
> ID
> (4289) is registered.
>
This should be done at the link: http://www.arm.linux.org.uk/developer/machines/ by Russell King.

But I'm not sure whether it is worth to you without this patch for board file in mainline.

> Changes in v2:
>   -. Change regulator's display names
>
> Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df

No need gerrit Change-Id here.

> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>

If there is no reason, please use same e-mail address in the field of author and sign-off.

Note, if you want to use e-mail 'agreeyamobility.net', just add 'From: Dongjin Kim <dongjin.kim@agreeyamobility.net>', it's ok.

> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  964
> ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 989 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c
>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.



^ permalink raw reply	[flat|nested] 29+ messages in thread

* 회신: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412
@ 2012-08-08  2:41       ` Dongjin Kim
  0 siblings, 0 replies; 29+ messages in thread
From: Dongjin Kim @ 2012-08-08  2:41 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

Thank you for your advice.

And I didn't know non-DT board file will not be merged any more.
Rule is rule, I can manage the file in my git only.

I am very new to send git patches to open community, even I use git on my previous project.
I will pay attention to my next patches if I have more. :)

Thanks again.

Regards,
Dongjin.
________________________________________
?? ??: Kukjin Kim [kgene.kim at samsung.com]
?? ??: 2012? 8? 8? ??? ?? 11:23
?? ??: 'Dongjin Kim'
??: Dongjin Kim; 'Russell King'; 'Tony Lindgren'; 'Jon Medhurst'; 'Shawn Guo'; 'Uwe Kleine-K?nig'; linux-arm-kernel at lists.infradead.org; linux-samsung-soc at vger.kernel.org; linux-kernel at vger.kernel.org
??: RE: [PATCH v2] ODROID-X: hkdk4412: Add new hardware based on Exynos4412

Dongjin Kim wrote:
>
Hi,

Basically, we don't add more board file for non-DT for EXYNOS SoCs...

> The HKDK4412 is the CPU module developed by Hardkernel which is based on
> Exynos 4412.  mach_hkdk4412.c is to run on ODROID-X hardware and Machine
> ID
> (4289) is registered.
>
This should be done at the link: http://www.arm.linux.org.uk/developer/machines/ by Russell King.

But I'm not sure whether it is worth to you without this patch for board file in mainline.

> Changes in v2:
>   -. Change regulator's display names
>
> Change-Id: Iea6825a17b2e13f96bc6d892dd5135cad899b5df

No need gerrit Change-Id here.

> Signed-off-by: Dongjin Kim <dongjin.kim@agreeyamobility.net>

If there is no reason, please use same e-mail address in the field of author and sign-off.

Note, if you want to use e-mail 'agreeyamobility.net', just add 'From: Dongjin Kim <dongjin.kim@agreeyamobility.net>', it's ok.

> ---
>  arch/arm/mach-exynos/Kconfig         |   23 +
>  arch/arm/mach-exynos/Makefile        |    1 +
>  arch/arm/mach-exynos/mach-hkdk4412.c |  964
> ++++++++++++++++++++++++++++++++++
>  arch/arm/tools/mach-types            |    1 +
>  4 files changed, 989 insertions(+)
>  create mode 100644 arch/arm/mach-exynos/mach-hkdk4412.c
>

Thanks.

Best regards,
Kgene.
--
Kukjin Kim <kgene.kim@samsung.com>, Senior Engineer,
SW Solution Development Team, Samsung Electronics Co., Ltd.

^ permalink raw reply	[flat|nested] 29+ messages in thread

end of thread, other threads:[~2012-08-08  2:41 UTC | newest]

Thread overview: 29+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-06 14:10 [PATCH] ODROID-X: hkdk4412: Add new hardware based on Exynos4412 Dongjin Kim
2012-08-06 14:10 ` Dongjin Kim
2012-08-06 14:10 ` Dongjin Kim
2012-08-06 14:57 ` Mark Brown
2012-08-06 14:57   ` Mark Brown
2012-08-06 17:37 ` Thomas Abraham
2012-08-06 17:37   ` Thomas Abraham
2012-08-06 18:16   ` 회신: " Dongjin Kim
2012-08-06 18:16     ` Dongjin Kim
2012-08-06 18:16     ` Dongjin Kim
2012-08-06 18:33     ` Olof Johansson
2012-08-06 18:33       ` Olof Johansson
2012-08-07  2:05       ` 회신: " Dongjin Kim
2012-08-07  2:05         ` Dongjin Kim
2012-08-07  2:05         ` Dongjin Kim
2012-08-07  2:28         ` Olof Johansson
2012-08-07  2:56           ` 회신: " Dongjin Kim
2012-08-07  2:56             ` Dongjin Kim
2012-08-07  2:56             ` Dongjin Kim
2012-08-07  4:14           ` Thomas Abraham
2012-08-07  4:38             ` Kyungmin Park
2012-08-07 18:49 ` [PATCH v2] " Dongjin Kim
2012-08-07 18:49   ` Dongjin Kim
2012-08-07 18:49   ` Dongjin Kim
2012-08-08  2:23   ` Kukjin Kim
2012-08-08  2:23     ` Kukjin Kim
2012-08-08  2:41     ` 회신: " Dongjin Kim
2012-08-08  2:41       ` Dongjin Kim
2012-08-08  2:41       ` Dongjin Kim

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.