linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Tero Kristo <t-kristo@ti.com>
Cc: linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org,
	Kevin Hilman <khilman@linaro.org>, Nishanth Menon <nm@ti.com>,
	Paul Walmsley <paul@pwsan.com>
Subject: Re: [PATCH 02/11] ARM: OMAP3: Fix idle mode signaling for sys_clkreq and sys_off_mode
Date: Sat, 12 Apr 2014 08:02:05 -0700	[thread overview]
Message-ID: <20140412150205.GB32292@atomide.com> (raw)
In-Reply-To: <5348FFFA.5040207@ti.com>

* Tero Kristo <t-kristo@ti.com> [140412 02:01]:
> On 04/11/2014 02:47 AM, Tony Lindgren wrote:>
> > @@ -282,6 +283,7 @@ void omap_sram_idle(void)
> >
> >   	/* CORE */
> >   	if (core_next_state < PWRDM_POWER_ON) {
> > +		omap3_vc_set_pmic_signaling(core_next_state);
> >   		if (core_next_state == PWRDM_POWER_OFF) {
> >   			omap3_core_save_context();
> >   			omap3_cm_save_context();
> 
> I think this implementation is sub-optimal, as it only scales
> voltages if core is entering idle state. MPU only idle is possible,
> however you do not scale voltages in this case.

Hmm that's same as PWRDM_POWER_RET? That's working too.
Or do you have something else in mind that I'm not aware
of?
 
> > @@ -220,6 +220,78 @@ static inline u32 omap_usec_to_32k(u32 usec)
> >   	return DIV_ROUND_UP_ULL(32768ULL * (u64)usec, 1000000ULL);
> >   }
> >
> > +void omap3_vc_set_pmic_signaling(int core_next_state)
> > +{
> > +	u32 voltctrl;
> > +
> > +	voltctrl = omap2_prm_read_mod_reg(OMAP3430_GR_MOD,
> > +					  OMAP3_PRM_VOLTCTRL_OFFSET);
> 
> Just a note here, I am currently working on trying to get rid of all
> the direct prm_read/write calls outside PRCM drivers, this and rest
> should use voltdm->read/write.

OK, sounds like you already have a patch for that in your
3.14-rc4-cm-prm-driver-wip branch?

Let's do the fixes first, then it's going to be a lot easier for
us to test the rest of the PRMC changes.
 
> > +	/*
> > +	 * 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 will happen unless the
> > +	 * board specific twl4030 PMIC scripts are loaded.
> > +	 */
> > +	val = omap2_prm_read_mod_reg(OMAP3430_GR_MOD,
> > +				     OMAP3_PRM_VOLTCTRL_OFFSET);
> 
> Why not use the I2C4 signalling for off-mode? This way the voltages
> can be scaled to 0.6V even without any board specific scripts.

Using I2C4 works too, we're just missing a place to set
and clear OMAP3430_PRM_VOLTCTRL_SEL_OFF bit currently. Sounds
like eventually we should allow changing it dynamically somewhere.

But for now, SEL_OFF should be enabled as it allows debugging PM
by looking at the sys_clkreq and sys_off_mode pins no matter if
there are board specific scripts or not. The sys_off_mode won't
toggle if things are configured to use I2C4, which is confusing.

Regards,

Tony

  reply	other threads:[~2014-04-12 15:02 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-10 23:47 [PATCH 00/11] Fixes for omap PM for making omap3 DT only Tony Lindgren
2014-04-10 23:47 ` [PATCH 01/11] ARM: OMAP3: PM: remove access to PRM_VOLTCTRL register Tony Lindgren
2014-04-10 23:47 ` [PATCH 02/11] ARM: OMAP3: Fix idle mode signaling for sys_clkreq and sys_off_mode Tony Lindgren
2014-04-12  8:57   ` Tero Kristo
2014-04-12 15:02     ` Tony Lindgren [this message]
2014-04-23  7:51       ` Tero Kristo
2014-04-23 20:49         ` Tony Lindgren
2014-05-07 16:34           ` Tony Lindgren
2014-04-14 22:51   ` Grazvydas Ignotas
2014-04-15 22:56     ` Tony Lindgren
2014-04-16 13:58       ` Grazvydas Ignotas
2014-04-18 17:48         ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 03/11] ARM: OMAP3: Disable broken omap3_set_off_timings function Tony Lindgren
2014-04-10 23:47 ` [PATCH 04/11] ARM: OMAP3: Fix voltage control for deeper idle states Tony Lindgren
2014-04-11 15:14   ` Tony Lindgren
2014-05-07 16:38     ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 05/11] ARM: dts: Configure omap3 twl4030 I2C4 pins by default Tony Lindgren
2014-04-10 23:47 ` [PATCH 06/11] ARM: OMAP2+: Fix voltage scaling init for device tree Tony Lindgren
2014-05-19 17:50   ` Joachim Eastwood
2014-05-19 18:01     ` Tony Lindgren
2014-05-19 18:32       ` Nishanth Menon
2014-05-19 18:48         ` Joachim Eastwood
2014-05-19 18:52           ` Nishanth Menon
2014-05-19 20:23         ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 07/11] ARM: dts: Enable N900 keybaord sleep leds by default Tony Lindgren
2014-04-11  0:23   ` Tony Lindgren
2014-04-11 23:31   ` Aaro Koskinen
2014-04-23 21:07     ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 08/11] ARM: dts: Fix omap serial wake-up when booted with device tree Tony Lindgren
2014-04-10 23:47 ` [PATCH 09/11] ARM: OMAP2+: Enable CPUidle in omap2plus_defconfig Tony Lindgren
2014-04-10 23:47 ` [PATCH 10/11] mfd: twl-core: Fix idle mode signaling for omaps when booted with device tree Tony Lindgren
2014-04-17  8:00   ` Lee Jones
2014-04-17 15:37     ` Tony Lindgren
2014-04-23 14:46       ` [GIT PULL] arm: omap: Immutable branch between MFD and ARM OMAP due for the v3.16 merge-window Lee Jones
2014-04-23 20:41         ` Tony Lindgren
2014-04-10 23:47 ` [PATCH 11/11] pinctrl: single: Clear pin interrupts enabled by bootloader Tony Lindgren
2014-04-22 11:54   ` Linus Walleij
2014-04-22 16:10     ` Tony Lindgren
2014-04-23 13:57       ` Linus Walleij
2014-04-11 20:47 ` [PATCH 00/11] Fixes for omap PM for making omap3 DT only Sebastian Reichel
2014-04-11 21:04   ` 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=20140412150205.GB32292@atomide.com \
    --to=tony@atomide.com \
    --cc=khilman@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=nm@ti.com \
    --cc=paul@pwsan.com \
    --cc=t-kristo@ti.com \
    /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).