diff options
| -rw-r--r-- | arch/arm/mach-omap2/twl-common.c | 43 | ||||
| -rw-r--r-- | arch/arm/mach-omap2/twl-common.h | 2 |
2 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/mach-omap2/twl-common.c b/arch/arm/mach-omap2/twl-common.c index ee6596b45214..119d5a910f3a 100644 --- a/arch/arm/mach-omap2/twl-common.c +++ b/arch/arm/mach-omap2/twl-common.c | |||
| @@ -266,6 +266,7 @@ static struct regulator_init_data omap4_vdac_idata = { | |||
| 266 | .valid_ops_mask = REGULATOR_CHANGE_MODE | 266 | .valid_ops_mask = REGULATOR_CHANGE_MODE |
| 267 | | REGULATOR_CHANGE_STATUS, | 267 | | REGULATOR_CHANGE_STATUS, |
| 268 | }, | 268 | }, |
| 269 | .supply_regulator = "V2V1", | ||
| 269 | }; | 270 | }; |
| 270 | 271 | ||
| 271 | static struct regulator_init_data omap4_vaux2_idata = { | 272 | static struct regulator_init_data omap4_vaux2_idata = { |
| @@ -356,6 +357,7 @@ static struct regulator_init_data omap4_vcxio_idata = { | |||
| 356 | }, | 357 | }, |
| 357 | .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply), | 358 | .num_consumer_supplies = ARRAY_SIZE(omap4_vcxio_supply), |
| 358 | .consumer_supplies = omap4_vcxio_supply, | 359 | .consumer_supplies = omap4_vcxio_supply, |
| 360 | .supply_regulator = "V2V1", | ||
| 359 | }; | 361 | }; |
| 360 | 362 | ||
| 361 | static struct regulator_init_data omap4_vusb_idata = { | 363 | static struct regulator_init_data omap4_vusb_idata = { |
| @@ -439,6 +441,41 @@ static struct twl_regulator_driver_data omap4_vdd3_drvdata = { | |||
| 439 | .set_voltage = twl_set_voltage, | 441 | .set_voltage = twl_set_voltage, |
| 440 | }; | 442 | }; |
| 441 | 443 | ||
| 444 | static struct regulator_consumer_supply omap4_v1v8_supply[] = { | ||
| 445 | REGULATOR_SUPPLY("vio", "1-004b"), | ||
| 446 | }; | ||
| 447 | |||
| 448 | static struct regulator_init_data omap4_v1v8_idata = { | ||
| 449 | .constraints = { | ||
| 450 | .min_uV = 1800000, | ||
| 451 | .max_uV = 1800000, | ||
| 452 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 453 | | REGULATOR_MODE_STANDBY, | ||
| 454 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
| 455 | | REGULATOR_CHANGE_STATUS, | ||
| 456 | .always_on = true, | ||
| 457 | }, | ||
| 458 | .num_consumer_supplies = ARRAY_SIZE(omap4_v1v8_supply), | ||
| 459 | .consumer_supplies = omap4_v1v8_supply, | ||
| 460 | }; | ||
| 461 | |||
| 462 | static struct regulator_consumer_supply omap4_v2v1_supply[] = { | ||
| 463 | REGULATOR_SUPPLY("v2v1", "1-004b"), | ||
| 464 | }; | ||
| 465 | |||
| 466 | static struct regulator_init_data omap4_v2v1_idata = { | ||
| 467 | .constraints = { | ||
| 468 | .min_uV = 2100000, | ||
| 469 | .max_uV = 2100000, | ||
| 470 | .valid_modes_mask = REGULATOR_MODE_NORMAL | ||
| 471 | | REGULATOR_MODE_STANDBY, | ||
| 472 | .valid_ops_mask = REGULATOR_CHANGE_MODE | ||
| 473 | | REGULATOR_CHANGE_STATUS, | ||
| 474 | }, | ||
| 475 | .num_consumer_supplies = ARRAY_SIZE(omap4_v2v1_supply), | ||
| 476 | .consumer_supplies = omap4_v2v1_supply, | ||
| 477 | }; | ||
| 478 | |||
| 442 | void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | 479 | void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, |
| 443 | u32 pdata_flags, u32 regulators_flags) | 480 | u32 pdata_flags, u32 regulators_flags) |
| 444 | { | 481 | { |
| @@ -497,5 +534,11 @@ void __init omap4_pmic_get_config(struct twl4030_platform_data *pmic_data, | |||
| 497 | if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG && | 534 | if (regulators_flags & TWL_COMMON_REGULATOR_CLK32KG && |
| 498 | !pmic_data->clk32kg) | 535 | !pmic_data->clk32kg) |
| 499 | pmic_data->clk32kg = &omap4_clk32kg_idata; | 536 | pmic_data->clk32kg = &omap4_clk32kg_idata; |
| 537 | |||
| 538 | if (regulators_flags & TWL_COMMON_REGULATOR_V1V8 && !pmic_data->v1v8) | ||
| 539 | pmic_data->v1v8 = &omap4_v1v8_idata; | ||
| 540 | |||
| 541 | if (regulators_flags & TWL_COMMON_REGULATOR_V2V1 && !pmic_data->v2v1) | ||
| 542 | pmic_data->v2v1 = &omap4_v2v1_idata; | ||
| 500 | } | 543 | } |
| 501 | #endif /* CONFIG_ARCH_OMAP4 */ | 544 | #endif /* CONFIG_ARCH_OMAP4 */ |
diff --git a/arch/arm/mach-omap2/twl-common.h b/arch/arm/mach-omap2/twl-common.h index 09627483a57f..8fe71cfd002c 100644 --- a/arch/arm/mach-omap2/twl-common.h +++ b/arch/arm/mach-omap2/twl-common.h | |||
| @@ -22,6 +22,8 @@ | |||
| 22 | #define TWL_COMMON_REGULATOR_VCXIO (1 << 8) | 22 | #define TWL_COMMON_REGULATOR_VCXIO (1 << 8) |
| 23 | #define TWL_COMMON_REGULATOR_VUSB (1 << 9) | 23 | #define TWL_COMMON_REGULATOR_VUSB (1 << 9) |
| 24 | #define TWL_COMMON_REGULATOR_CLK32KG (1 << 10) | 24 | #define TWL_COMMON_REGULATOR_CLK32KG (1 << 10) |
| 25 | #define TWL_COMMON_REGULATOR_V1V8 (1 << 11) | ||
| 26 | #define TWL_COMMON_REGULATOR_V2V1 (1 << 12) | ||
| 25 | 27 | ||
| 26 | /* TWL4030 LDO regulators */ | 28 | /* TWL4030 LDO regulators */ |
| 27 | #define TWL_COMMON_REGULATOR_VPLL1 (1 << 4) | 29 | #define TWL_COMMON_REGULATOR_VPLL1 (1 << 4) |
