|
@@ -702,3 +702,113 @@ static struct platform_device goni_i2c_gpio_pmic = {
|
|
|
},
|
|
|
};
|
|
|
|
|
|
+static struct i2c_board_info i2c_gpio_pmic_devs[] __initdata = {
|
|
|
+#if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE)
|
|
|
+ {
|
|
|
+ /* 0xCC when SRAD = 0 */
|
|
|
+ I2C_BOARD_INFO("max8998", 0xCC >> 1),
|
|
|
+ .platform_data = &goni_max8998_pdata,
|
|
|
+ },
|
|
|
+#endif
|
|
|
+};
|
|
|
+
|
|
|
+/* GPIO I2C AP 1.8V */
|
|
|
+#define AP_I2C_GPIO_BUS_5 5
|
|
|
+static struct i2c_gpio_platform_data goni_i2c_gpio5_data = {
|
|
|
+ .sda_pin = S5PV210_MP05(3), /* XM0ADDR_11 */
|
|
|
+ .scl_pin = S5PV210_MP05(2), /* XM0ADDR_10 */
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device goni_i2c_gpio5 = {
|
|
|
+ .name = "i2c-gpio",
|
|
|
+ .id = AP_I2C_GPIO_BUS_5,
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &goni_i2c_gpio5_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct i2c_board_info i2c_gpio5_devs[] __initdata = {
|
|
|
+ {
|
|
|
+ /* CS/ADDR = low 0x34 (FYI: high = 0x36) */
|
|
|
+ I2C_BOARD_INFO("wm8994", 0x1a),
|
|
|
+ .platform_data = &wm8994_platform_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+/* PMIC Power button */
|
|
|
+static struct gpio_keys_button goni_gpio_keys_table[] = {
|
|
|
+ {
|
|
|
+ .code = KEY_POWER,
|
|
|
+ .gpio = S5PV210_GPH2(6),
|
|
|
+ .desc = "gpio-keys: KEY_POWER",
|
|
|
+ .type = EV_KEY,
|
|
|
+ .active_low = 1,
|
|
|
+ .wakeup = 1,
|
|
|
+ .debounce_interval = 1,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static struct gpio_keys_platform_data goni_gpio_keys_data = {
|
|
|
+ .buttons = goni_gpio_keys_table,
|
|
|
+ .nbuttons = ARRAY_SIZE(goni_gpio_keys_table),
|
|
|
+};
|
|
|
+
|
|
|
+static struct platform_device goni_device_gpiokeys = {
|
|
|
+ .name = "gpio-keys",
|
|
|
+ .dev = {
|
|
|
+ .platform_data = &goni_gpio_keys_data,
|
|
|
+ },
|
|
|
+};
|
|
|
+
|
|
|
+static void __init goni_pmic_init(void)
|
|
|
+{
|
|
|
+ /* AP_PMIC_IRQ: EINT7 */
|
|
|
+ s3c_gpio_cfgpin(S5PV210_GPH0(7), S3C_GPIO_SFN(0xf));
|
|
|
+ s3c_gpio_setpull(S5PV210_GPH0(7), S3C_GPIO_PULL_UP);
|
|
|
+
|
|
|
+ /* nPower: EINT22 */
|
|
|
+ s3c_gpio_cfgpin(S5PV210_GPH2(6), S3C_GPIO_SFN(0xf));
|
|
|
+ s3c_gpio_setpull(S5PV210_GPH2(6), S3C_GPIO_PULL_UP);
|
|
|
+}
|
|
|
+
|
|
|
+/* MoviNAND */
|
|
|
+static struct s3c_sdhci_platdata goni_hsmmc0_data __initdata = {
|
|
|
+ .max_width = 4,
|
|
|
+ .cd_type = S3C_SDHCI_CD_PERMANENT,
|
|
|
+};
|
|
|
+
|
|
|
+/* Wireless LAN */
|
|
|
+static struct s3c_sdhci_platdata goni_hsmmc1_data __initdata = {
|
|
|
+ .max_width = 4,
|
|
|
+ .cd_type = S3C_SDHCI_CD_EXTERNAL,
|
|
|
+ /* ext_cd_{init,cleanup} callbacks will be added later */
|
|
|
+};
|
|
|
+
|
|
|
+/* External Flash */
|
|
|
+#define GONI_EXT_FLASH_EN S5PV210_MP05(4)
|
|
|
+#define GONI_EXT_FLASH_CD S5PV210_GPH3(4)
|
|
|
+static struct s3c_sdhci_platdata goni_hsmmc2_data __initdata = {
|
|
|
+ .max_width = 4,
|
|
|
+ .cd_type = S3C_SDHCI_CD_GPIO,
|
|
|
+ .ext_cd_gpio = GONI_EXT_FLASH_CD,
|
|
|
+ .ext_cd_gpio_invert = 1,
|
|
|
+};
|
|
|
+
|
|
|
+static struct regulator_consumer_supply mmc2_supplies[] = {
|
|
|
+ REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"),
|
|
|
+};
|
|
|
+
|
|
|
+static struct regulator_init_data mmc2_fixed_voltage_init_data = {
|
|
|
+ .constraints = {
|
|
|
+ .name = "V_TF_2.8V",
|
|
|
+ .valid_ops_mask = REGULATOR_CHANGE_STATUS,
|
|
|
+ },
|
|
|
+ .num_consumer_supplies = ARRAY_SIZE(mmc2_supplies),
|
|
|
+ .consumer_supplies = mmc2_supplies,
|
|
|
+};
|
|
|
+
|
|
|
+static struct fixed_voltage_config mmc2_fixed_voltage_config = {
|
|
|
+ .supply_name = "EXT_FLASH_EN",
|
|
|
+ .microvolts = 2800000,
|
|
|
+ .gpio = GONI_EXT_FLASH_EN,
|
|
|
+ .enable_high = true,
|