diff options
| author | Tony Lindgren <tony@atomide.com> | 2014-05-13 21:34:09 -0400 |
|---|---|---|
| committer | Lee Jones <lee.jones@linaro.org> | 2014-05-28 03:06:18 -0400 |
| commit | 43fef47f94a1ae46fb2720dada32fa3b5547bee2 (patch) | |
| tree | f01e73e8aed5a4fb21a6a46314a6a105fb614627 | |
| parent | 482e7db160df713a2d1d4c7ee9fffad92008283f (diff) | |
mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle
Some oscillators can be turned off during off-idle saving few
a little bit power at the cost of the oscillator start up
latency.
If you board can do this, you can now enable it by using the
ti,twl4030-power-idle-osc-off compatible flag.
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
| -rw-r--r-- | Documentation/devicetree/bindings/mfd/twl4030-power.txt | 6 | ||||
| -rw-r--r-- | drivers/mfd/twl4030-power.c | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt index bbd66039202a..b9ee7b98d3e2 100644 --- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt +++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt | |||
| @@ -9,6 +9,7 @@ Required properties: | |||
| 9 | "ti,twl4030-power" | 9 | "ti,twl4030-power" |
| 10 | "ti,twl4030-power-reset" | 10 | "ti,twl4030-power-reset" |
| 11 | "ti,twl4030-power-idle" | 11 | "ti,twl4030-power-idle" |
| 12 | "ti,twl4030-power-idle-osc-off" | ||
| 12 | 13 | ||
| 13 | The use of ti,twl4030-power-reset is recommended at least on | 14 | The use of ti,twl4030-power-reset is recommended at least on |
| 14 | 3530 that needs a special configuration for warm reset to work. | 15 | 3530 that needs a special configuration for warm reset to work. |
| @@ -16,6 +17,11 @@ The use of ti,twl4030-power-reset is recommended at least on | |||
| 16 | When using ti,twl4030-power-idle, the TI recommended configuration | 17 | When using ti,twl4030-power-idle, the TI recommended configuration |
| 17 | for idle modes is loaded to the tlw4030 PMIC. | 18 | for idle modes is loaded to the tlw4030 PMIC. |
| 18 | 19 | ||
| 20 | When using ti,twl4030-power-idle-osc-off, the TI recommended | ||
| 21 | configuration is used with the external oscillator being shut | ||
| 22 | down during off-idle. Note that this does not work on all boards | ||
| 23 | depending on how the external oscillator is wired. | ||
| 24 | |||
| 19 | Optional properties: | 25 | Optional properties: |
| 20 | - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or | 26 | - ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or |
| 21 | SLEEP-to-OFF transition when the system poweroffs. | 27 | SLEEP-to-OFF transition when the system poweroffs. |
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c index 4846c7b48ebb..3bc969a5916b 100644 --- a/drivers/mfd/twl4030-power.c +++ b/drivers/mfd/twl4030-power.c | |||
| @@ -761,6 +761,19 @@ static struct twl4030_power_data omap3_idle = { | |||
| 761 | .resource_config = omap3_idle_rconfig, | 761 | .resource_config = omap3_idle_rconfig, |
| 762 | }; | 762 | }; |
| 763 | 763 | ||
| 764 | /* Disable 32 KiHz oscillator during idle */ | ||
| 765 | static struct twl4030_resconfig osc_off_rconfig[] = { | ||
| 766 | TWL_REMAP_OFF(RES_CLKEN, DEV_GRP_P1 | DEV_GRP_P3, 3, 2), | ||
| 767 | { /* Terminator */ }, | ||
| 768 | }; | ||
| 769 | |||
| 770 | static struct twl4030_power_data osc_off_idle = { | ||
| 771 | .scripts = omap3_idle_scripts, | ||
| 772 | .num = ARRAY_SIZE(omap3_idle_scripts), | ||
| 773 | .resource_config = omap3_idle_rconfig, | ||
| 774 | .board_config = osc_off_rconfig, | ||
| 775 | }; | ||
| 776 | |||
| 764 | static struct of_device_id twl4030_power_of_match[] = { | 777 | static struct of_device_id twl4030_power_of_match[] = { |
| 765 | { | 778 | { |
| 766 | .compatible = "ti,twl4030-power-reset", | 779 | .compatible = "ti,twl4030-power-reset", |
| @@ -770,6 +783,10 @@ static struct of_device_id twl4030_power_of_match[] = { | |||
| 770 | .compatible = "ti,twl4030-power-idle", | 783 | .compatible = "ti,twl4030-power-idle", |
| 771 | .data = &omap3_idle, | 784 | .data = &omap3_idle, |
| 772 | }, | 785 | }, |
| 786 | { | ||
| 787 | .compatible = "ti,twl4030-power-idle-osc-off", | ||
| 788 | .data = &osc_off_idle, | ||
| 789 | }, | ||
| 773 | { }, | 790 | { }, |
| 774 | }; | 791 | }; |
| 775 | MODULE_DEVICE_TABLE(of, twl4030_power_of_match); | 792 | MODULE_DEVICE_TABLE(of, twl4030_power_of_match); |
