From: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
To: lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org
Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
Peter De Schrijver
<pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>,
Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Subject: [PATCH 6/6] mfd: twl4030-power: Add a configuration to turn off oscillator during off-idle
Date: Tue, 27 May 2014 11:09:00 -0700 [thread overview]
Message-ID: <1401214140-9828-7-git-send-email-tony@atomide.com> (raw)
In-Reply-To: <1401214140-9828-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
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.
Cc: Peter De Schrijver <pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cc: Samuel Ortiz <sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
Acked-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
Signed-off-by: Tony Lindgren <tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
---
Documentation/devicetree/bindings/mfd/twl4030-power.txt | 6 ++++++
drivers/mfd/twl4030-power.c | 17 +++++++++++++++++
2 files changed, 23 insertions(+)
diff --git a/Documentation/devicetree/bindings/mfd/twl4030-power.txt b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
index bbd6603..b9ee7b9 100644
--- a/Documentation/devicetree/bindings/mfd/twl4030-power.txt
+++ b/Documentation/devicetree/bindings/mfd/twl4030-power.txt
@@ -9,6 +9,7 @@ Required properties:
"ti,twl4030-power"
"ti,twl4030-power-reset"
"ti,twl4030-power-idle"
+ "ti,twl4030-power-idle-osc-off"
The use of ti,twl4030-power-reset is recommended at least on
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
When using ti,twl4030-power-idle, the TI recommended configuration
for idle modes is loaded to the tlw4030 PMIC.
+When using ti,twl4030-power-idle-osc-off, the TI recommended
+configuration is used with the external oscillator being shut
+down during off-idle. Note that this does not work on all boards
+depending on how the external oscillator is wired.
+
Optional properties:
- ti,use_poweroff: With this flag, the chip will initiates an ACTIVE-to-OFF or
SLEEP-to-OFF transition when the system poweroffs.
diff --git a/drivers/mfd/twl4030-power.c b/drivers/mfd/twl4030-power.c
index 4846c7b..3bc969a 100644
--- a/drivers/mfd/twl4030-power.c
+++ b/drivers/mfd/twl4030-power.c
@@ -761,6 +761,19 @@ static struct twl4030_power_data omap3_idle = {
.resource_config = omap3_idle_rconfig,
};
+/* Disable 32 KiHz oscillator during idle */
+static struct twl4030_resconfig osc_off_rconfig[] = {
+ TWL_REMAP_OFF(RES_CLKEN, DEV_GRP_P1 | DEV_GRP_P3, 3, 2),
+ { /* Terminator */ },
+};
+
+static struct twl4030_power_data osc_off_idle = {
+ .scripts = omap3_idle_scripts,
+ .num = ARRAY_SIZE(omap3_idle_scripts),
+ .resource_config = omap3_idle_rconfig,
+ .board_config = osc_off_rconfig,
+};
+
static struct of_device_id twl4030_power_of_match[] = {
{
.compatible = "ti,twl4030-power-reset",
@@ -770,6 +783,10 @@ static struct of_device_id twl4030_power_of_match[] = {
.compatible = "ti,twl4030-power-idle",
.data = &omap3_idle,
},
+ {
+ .compatible = "ti,twl4030-power-idle-osc-off",
+ .data = &osc_off_idle,
+ },
{ },
};
MODULE_DEVICE_TABLE(of, twl4030_power_of_match);
--
1.8.1.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2014-05-27 18:09 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-27 18:08 [PATCH v3 0/6] mfd: twl4030-power: Enable off-idle configuration when booted with device tree Tony Lindgren
2014-05-27 18:08 ` [PATCH 1/6] mfd: twl4030-power: Fix hang on reboot if sleep configuration was loaded earlier Tony Lindgren
2014-05-27 18:08 ` [PATCH 2/6] mfd: twl4030-power: Fix some defines for SW_EVENTS Tony Lindgren
2014-05-27 18:08 ` [PATCH 3/6] mfd: twl4030-power: Add generic reset configuration Tony Lindgren
2014-06-04 13:02 ` Matthias Brugger
2014-05-27 18:08 ` [PATCH 4/6] mfd: twl4030-power: Add recommended idle configuration Tony Lindgren
2014-05-27 18:08 ` [PATCH 5/6] mfd: twl4030-power: Add support for board specific configuration Tony Lindgren
[not found] ` <1401214140-9828-1-git-send-email-tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org>
2014-05-27 18:09 ` Tony Lindgren [this message]
2014-05-28 7:13 ` [GIT PULL] mfd: Immutable branch between MFD and OMAP, due for v3.16 Lee Jones
2014-05-28 18:06 ` Tony Lindgren
2014-06-02 16:38 ` Tony Lindgren
2014-06-03 8:06 ` Lee Jones
2014-06-12 5:43 ` Tony Lindgren
2014-06-12 7:47 ` Lee Jones
2014-06-12 8:00 ` Tony Lindgren
2014-06-12 8:33 ` Lee Jones
2014-06-16 10:17 ` Lee Jones
2014-06-16 10:36 ` Tony Lindgren
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1401214140-9828-7-git-send-email-tony@atomide.com \
--to=tony-4v6ys6ai5vpbdgjk7y7tuq@public.gmane.org \
--cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
--cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
--cc=linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=pdeschrijver-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org \
--cc=sameo-VuQAYsv1563Yd54FQh9/CA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).