linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: tony@atomide.com (Tony Lindgren)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/1] ARM: OMAP2+: Fix omap3 off idle power consumption creeping up
Date: Tue, 21 Apr 2015 09:10:19 -0700	[thread overview]
Message-ID: <1429632619-23474-1-git-send-email-tony@atomide.com> (raw)

If we use a combination of VMODE and I2C4 for retention modes,
eventually the off idle power consumption will creep up by about
23mW, even during off mode with I2C4 always staying enabled.

Looks like the only way to fix the extra power consumption is to
disable I2C4 usage by setting SEL_VMODE for both off idle and
retention idle. Let's also update the comments accordingly.

Fixes: 3b8c4ebb7630 ("ARM: OMAP3: Fix idle mode signaling for sys_clkreq and sys_off_mode")
Cc: Kevin Hilman <khilman@kernel.org>
Cc: Nishanth Menon <nm@ti.com>
Cc: Tero Kristo <t-kristo@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
---
 arch/arm/mach-omap2/vc.c | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/arch/arm/mach-omap2/vc.c b/arch/arm/mach-omap2/vc.c
index be9ef83..f8a2539 100644
--- a/arch/arm/mach-omap2/vc.c
+++ b/arch/arm/mach-omap2/vc.c
@@ -284,6 +284,9 @@ void omap3_vc_set_pmic_signaling(int core_next_state)
 					OMAP3430_PRM_POLCTRL_CLKREQ_POL)
 #define PRM_POLCTRL_TWL_VAL	OMAP3430_PRM_POLCTRL_CLKREQ_POL
 
+#define OMAP3_VOLTCTRL_CFG	(OMAP3430_PRM_VOLTCTRL_SEL_VMODE | \
+					OMAP3430_PRM_VOLTCTRL_SEL_OFF)
+
 /*
  * Configure signal polarity for sys_clkreq and sys_off_mode pins
  * as the default values are wrong and can cause the system to hang
@@ -309,18 +312,19 @@ static void __init omap3_vc_init_pmic_signaling(struct voltagedomain *voltdm)
 	}
 
 	/*
-	 * By default let's use I2C4 signaling for retention idle
-	 * and sys_off_mode pin signaling for off idle. This way we
-	 * have sys_clk_req pin go down for retention and both
-	 * sys_clk_req and sys_off_mode pins will go down for off
-	 * idle. And we can also scale voltages to zero for off-idle.
-	 * Note that no actual voltage scaling during off-idle will
-	 * happen unless the board specific twl4030 PMIC scripts are
-	 * loaded.
+	 * By default let's use pin based (VMODE) signaling for retention
+	 * idle and off idle. Trying to use both VMODE and I2C4 will cause
+	 * the I2C4 to eventually stay always on consuming extra 23mW even in
+	 * off idle. With VMODE based configuration, we have sys_clk_req pin
+	 * go down for retention and both sys_clk_req and sys_off_mode pins
+	 * will go down for off idle. And we can also scale voltages to zero
+	 * for off-idle, while I2C4 configuration can only scale down to 0.6V.
+	 * Note that no actual voltage scaling during off-idle will happen
+	 * unless the board specific twl4030 PMIC scripts are loaded.
 	 */
 	val = voltdm->read(OMAP3_PRM_VOLTCTRL_OFFSET);
-	if (!(val & OMAP3430_PRM_VOLTCTRL_SEL_OFF)) {
-		val |= OMAP3430_PRM_VOLTCTRL_SEL_OFF;
+	if (!(val & OMAP3_VOLTCTRL_CFG)) {
+		val |= OMAP3_VOLTCTRL_CFG;
 		pr_debug("PM: setting voltctrl sys_off_mode signaling to 0x%x\n",
 			 val);
 		voltdm->write(val, OMAP3_PRM_VOLTCTRL_OFFSET);
-- 
2.1.4

             reply	other threads:[~2015-04-21 16:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-21 16:10 Tony Lindgren [this message]
2015-04-21 21:47 ` [PATCH 1/1] ARM: OMAP2+: Fix omap3 off idle power consumption creeping up Tony Lindgren
2015-04-21 22:12   ` Nishanth Menon
2015-04-22  1:00     ` Tony Lindgren
2015-04-22  2:09       ` Nishanth Menon
2015-04-22 14:35         ` 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=1429632619-23474-1-git-send-email-tony@atomide.com \
    --to=tony@atomide.com \
    --cc=linux-arm-kernel@lists.infradead.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).