diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2010-09-29 09:05:19 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2010-10-20 18:54:56 -0400 |
commit | e9dde6f1d96e782616f423bae8b46a85748d7ef0 (patch) | |
tree | f1607ba9335c30e487e28759121c9ed2547aa77d /arch/arm/mach-s5pv210/mach-goni.c | |
parent | d5889d5d1405b8f0e3f7a552ea899fad08d2d85a (diff) |
ARM: S5PV210: Add Support for MMC regulators on GONI board
Add required platform definitions for MMC power regulators on Samsung
Goni board. GPIO pin GONI_EXT_FLASH_EN has been transferred from machine
startup code to fixed voltage regulator.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/mach-s5pv210/mach-goni.c')
-rw-r--r-- | arch/arm/mach-s5pv210/mach-goni.c | 40 |
1 files changed, 37 insertions, 3 deletions
diff --git a/arch/arm/mach-s5pv210/mach-goni.c b/arch/arm/mach-s5pv210/mach-goni.c index e68791855d22..30ad59f6970f 100644 --- a/arch/arm/mach-s5pv210/mach-goni.c +++ b/arch/arm/mach-s5pv210/mach-goni.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <linux/i2c.h> | 16 | #include <linux/i2c.h> |
17 | #include <linux/i2c-gpio.h> | 17 | #include <linux/i2c-gpio.h> |
18 | #include <linux/mfd/max8998.h> | 18 | #include <linux/mfd/max8998.h> |
19 | #include <linux/regulator/fixed.h> | ||
19 | #include <linux/gpio_keys.h> | 20 | #include <linux/gpio_keys.h> |
20 | #include <linux/input.h> | 21 | #include <linux/input.h> |
21 | #include <linux/gpio.h> | 22 | #include <linux/gpio.h> |
@@ -137,6 +138,10 @@ static struct samsung_keypad_platdata keypad_data __initdata = { | |||
137 | /* MAX8998 regulators */ | 138 | /* MAX8998 regulators */ |
138 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) | 139 | #if defined(CONFIG_REGULATOR_MAX8998) || defined(CONFIG_REGULATOR_MAX8998_MODULE) |
139 | 140 | ||
141 | static struct regulator_consumer_supply goni_ldo5_consumers[] = { | ||
142 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.0"), | ||
143 | }; | ||
144 | |||
140 | static struct regulator_init_data goni_ldo2_data = { | 145 | static struct regulator_init_data goni_ldo2_data = { |
141 | .constraints = { | 146 | .constraints = { |
142 | .name = "VALIVE_1.1V", | 147 | .name = "VALIVE_1.1V", |
@@ -176,6 +181,8 @@ static struct regulator_init_data goni_ldo5_data = { | |||
176 | .max_uV = 2800000, | 181 | .max_uV = 2800000, |
177 | .apply_uV = 1, | 182 | .apply_uV = 1, |
178 | }, | 183 | }, |
184 | .num_consumer_supplies = ARRAY_SIZE(goni_ldo5_consumers), | ||
185 | .consumer_supplies = goni_ldo5_consumers, | ||
179 | }; | 186 | }; |
180 | 187 | ||
181 | static struct regulator_init_data goni_ldo6_data = { | 188 | static struct regulator_init_data goni_ldo6_data = { |
@@ -467,11 +474,37 @@ static struct s3c_sdhci_platdata goni_hsmmc2_data __initdata = { | |||
467 | .ext_cd_gpio_invert = 1, | 474 | .ext_cd_gpio_invert = 1, |
468 | }; | 475 | }; |
469 | 476 | ||
477 | static struct regulator_consumer_supply mmc2_supplies[] = { | ||
478 | REGULATOR_SUPPLY("vmmc", "s3c-sdhci.2"), | ||
479 | }; | ||
480 | |||
481 | static struct regulator_init_data mmc2_fixed_voltage_init_data = { | ||
482 | .constraints = { | ||
483 | .name = "V_TF_2.8V", | ||
484 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
485 | }, | ||
486 | .num_consumer_supplies = ARRAY_SIZE(mmc2_supplies), | ||
487 | .consumer_supplies = mmc2_supplies, | ||
488 | }; | ||
489 | |||
490 | static struct fixed_voltage_config mmc2_fixed_voltage_config = { | ||
491 | .supply_name = "EXT_FLASH_EN", | ||
492 | .microvolts = 2800000, | ||
493 | .gpio = GONI_EXT_FLASH_EN, | ||
494 | .enable_high = true, | ||
495 | .init_data = &mmc2_fixed_voltage_init_data, | ||
496 | }; | ||
497 | |||
498 | static struct platform_device mmc2_fixed_voltage = { | ||
499 | .name = "reg-fixed-voltage", | ||
500 | .id = 2, | ||
501 | .dev = { | ||
502 | .platform_data = &mmc2_fixed_voltage_config, | ||
503 | }, | ||
504 | }; | ||
505 | |||
470 | static void goni_setup_sdhci(void) | 506 | static void goni_setup_sdhci(void) |
471 | { | 507 | { |
472 | gpio_request(GONI_EXT_FLASH_EN, "FLASH_EN"); | ||
473 | gpio_direction_output(GONI_EXT_FLASH_EN, 1); | ||
474 | |||
475 | s3c_sdhci0_set_platdata(&goni_hsmmc0_data); | 508 | s3c_sdhci0_set_platdata(&goni_hsmmc0_data); |
476 | s3c_sdhci1_set_platdata(&goni_hsmmc1_data); | 509 | s3c_sdhci1_set_platdata(&goni_hsmmc1_data); |
477 | s3c_sdhci2_set_platdata(&goni_hsmmc2_data); | 510 | s3c_sdhci2_set_platdata(&goni_hsmmc2_data); |
@@ -481,6 +514,7 @@ static struct platform_device *goni_devices[] __initdata = { | |||
481 | &s3c_device_fb, | 514 | &s3c_device_fb, |
482 | &s5p_device_onenand, | 515 | &s5p_device_onenand, |
483 | &goni_i2c_gpio_pmic, | 516 | &goni_i2c_gpio_pmic, |
517 | &mmc2_fixed_voltage, | ||
484 | &goni_device_gpiokeys, | 518 | &goni_device_gpiokeys, |
485 | &s5p_device_fimc0, | 519 | &s5p_device_fimc0, |
486 | &s5p_device_fimc1, | 520 | &s5p_device_fimc1, |