linux-omap.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Questions about enabling dps(dynamic power switching) and SLM
@ 2014-08-13 13:08 Deepa Raj
  2014-08-14 14:09 ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Deepa Raj @ 2014-08-13 13:08 UTC (permalink / raw)
  To: linux-omap@vger.kernel.org

Hi,

I am working on OMAP3 and OMaP4. I know we can do AVS by smartreflex. The Questions are as follows:

1) I have gone through TRM but could not find how can we enable/disable dps and slm. Can you please point out how can we do that? 

2) Does DPS and SLM only applies to MPU,IVA and core domains or it applies to all devices?

3) According to OMAP ppt, DPS (similar like run time power management and having wakeup latency in micro seconds). If we enable DPS, does hardware take care of switching on/off power domains means there is no need of powering on/off devices through software?

4) Will DPS only triggers to retention state only or off state also?

5) If we enable SLM (according to omap ppt, suspend to ram) but wakeup latencies in milliseconds, if we enable this feature, does the hardware be able to power off all the devices when system is idle or it only applies to VDD1 (MPU-IVA) or VDD2 (Core domain)?

Hope to see answers from experts.

Regards
d raj.


 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Questions about enabling dps(dynamic power switching) and SLM
  2014-08-13 13:08 Questions about enabling dps(dynamic power switching) and SLM Deepa Raj
@ 2014-08-14 14:09 ` Tony Lindgren
       [not found]   ` <BLU185-W41F1B3F381C31F1C3B8266ECD40@phx.gbl>
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2014-08-14 14:09 UTC (permalink / raw)
  To: Deepa Raj; +Cc: linux-omap@vger.kernel.org

* Deepa Raj <draj187@hotmail.com> [140813 06:16]:
> Hi,
> 
> I am working on OMAP3 and OMaP4. I know we can do AVS by smartreflex. The Questions are as follows:
> 
> 1) I have gone through TRM but could not find how can we enable/disable dps and slm. Can you please point out how can we do that? 

With the mainline tree we currently have omap3 working for DPS.
For omap4 and later, features are not working at least not yet.
To play with omap3 dps with mainline kernel, you need to consider
the following:

1. Start with a board that's known to work, like beagleboard xm

2. Start with omap2plus_defconfig, keep EHCI disabled, and OTG cable
   disconnected

3. Enable UART timeouts and off-idle on the device with something like

#!/bin/bash

uarts=$(find /sys/class/tty/ttyO*/device/power/ -type d)
for uart in $uarts; do
	echo 3000 > $uart/autosuspend_delay_ms
done

uarts=$(find /sys/class/tty/ttyO*/power/ -type d)
for uart in $uarts; do
	echo enabled > $uart/wakeup
	echo auto > $uart/control
done

echo 1 > /sys/kernel/debug/pm_debug/enable_off_mode

Also the screen needs to be blanked if you have one. Once
the system starts hitting deeper idle states, you can see
that set off values in /sys/kernel/debug/pm_debug/count.
 
> 2) Does DPS and SLM only applies to MPU,IVA and core domains or it applies to all devices?

We are now cutting off all voltages during idle if the twl4030
configuration is enabled with ti,twl4030-power-idle-osc-off
in the board specific .dts file.
 
> 3) According to OMAP ppt, DPS (similar like run time power management and having wakeup latency in micro seconds). If we enable DPS, does hardware take care of switching on/off power domains means there is no need of powering on/off devices through software?

Right, the devices will idle and save and restore their
state using runtime PM. Once all the blocking devices are
idle, the system will automatically start entering deeper
idle states.
 
> 4) Will DPS only triggers to retention state only or off state also?

Both work, depending on if /sys/kernel/debug/pm_debug/enable_off_mode
is enabled or not.
 
> 5) If we enable SLM (according to omap ppt, suspend to ram) but wakeup latencies in milliseconds, if we enable this feature, does the hardware be able to power off all the devices when system is idle or it only applies to VDD1 (MPU-IVA) or VDD2 (Core domain)?

What is automatically powered down depends on the twl4030 script
configuration, see for example omap3_idle_rconfig. For omap4,
and later the twl6040 control is only over I2C4 AFAIK.
 
> Hope to see answers from experts.

Hopefully that will get you started :)

Regards,

Tony
--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: Questions about enabling dps(dynamic power switching) and SLM
       [not found]   ` <BLU185-W41F1B3F381C31F1C3B8266ECD40@phx.gbl>
@ 2014-08-18 17:30     ` Deepa Raj
  2014-08-19 15:01       ` Tony Lindgren
  0 siblings, 1 reply; 5+ messages in thread
From: Deepa Raj @ 2014-08-18 17:30 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap@vger.kernel.org

Hi Tony,

I have few more questions on OMAP3:

1) As you know there are power scripts in drivers/mfd folder for PMIC chip (Triton2). Is this mandatory to use these scripts like there are P1,P2,P3 areas are there in PMIC.

2) My understanding was when regulator_enable and disable are called from device drivers, voltage regulators are powered on/off, is it correct, if yes, why do we need to use power scripts?

3) Suppose HiFreq clk source (Oscillator), since there are no suspend/resume hooks from PMIC. Do we mandatory to use these scripts during suspend to RAM or we can directly power off oscillators or is there any hardware mechanism also, when all voltage regulators are disabled, HiFreq oscillator will be cut off.

4) Do power scripts are mandatory for all OMAP platforms?

Regards,
d. raj

> Date: Thu, 14 Aug 2014 07:09:43 -0700
> From: tony@atomide.com
> To: draj187@hotmail.com
> CC: linux-omap@vger.kernel.org
> Subject: Re: Questions about enabling dps(dynamic power switching) and SLM
> 
> * Deepa Raj <draj187@hotmail.com> [140813 06:16]:
>> Hi,
>> 
>> I am working on OMAP3 and OMaP4. I know we can do AVS by smartreflex. The Questions are as follows:
>> 
>> 1) I have gone through TRM but could not find how can we enable/disable dps and slm. Can you please point out how can we do that? 
> 
> With the mainline tree we currently have omap3 working for DPS.
> For omap4 and later, features are not working at least not yet.
> To play with omap3 dps with mainline kernel, you need to consider
> the following:
> 
> 1. Start with a board that's known to work, like beagleboard xm
> 
> 2. Start with omap2plus_defconfig, keep EHCI disabled, and OTG cable
> disconnected
> 
> 3. Enable UART timeouts and off-idle on the device with something like
> 
> #!/bin/bash
> 
> uarts=$(find /sys/class/tty/ttyO*/device/power/ -type d)
> for uart in $uarts; do
> echo 3000> $uart/autosuspend_delay_ms
> done
> 
> uarts=$(find /sys/class/tty/ttyO*/power/ -type d)
> for uart in $uarts; do
> echo enabled> $uart/wakeup
> echo auto> $uart/control
> done
> 
> echo 1> /sys/kernel/debug/pm_debug/enable_off_mode
> 
> Also the screen needs to be blanked if you have one. Once
> the system starts hitting deeper idle states, you can see
> that set off values in /sys/kernel/debug/pm_debug/count.
> 
>> 2) Does DPS and SLM only applies to MPU,IVA and core domains or it applies to all devices?
> 
> We are now cutting off all voltages during idle if the twl4030
> configuration is enabled with ti,twl4030-power-idle-osc-off
> in the board specific .dts file.
> 
>> 3) According to OMAP ppt, DPS (similar like run time power management and having wakeup latency in micro seconds). If we enable DPS, does hardware take care of switching on/off power domains means there is no need of powering on/off devices through software?
> 
> Right, the devices will idle and save and restore their
> state using runtime PM. Once all the blocking devices are
> idle, the system will automatically start entering deeper
> idle states.
> 
>> 4) Will DPS only triggers to retention state only or off state also?
> 
> Both work, depending on if /sys/kernel/debug/pm_debug/enable_off_mode
> is enabled or not.
> 
>> 5) If we enable SLM (according to omap ppt, suspend to ram) but wakeup latencies in milliseconds, if we enable this feature, does the hardware be able to power off all the devices when system is idle or it only applies to VDD1 (MPU-IVA) or VDD2 (Core domain)?
> 
> What is automatically powered down depends on the twl4030 script
> configuration, see for example omap3_idle_rconfig. For omap4,
> and later the twl6040 control is only over I2C4 AFAIK.
> 
>> Hope to see answers from experts.
> 
> Hopefully that will get you started :)
> 
> Regards,
> 
> Tony
> --
> To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
 		 	   		  --
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Questions about enabling dps(dynamic power switching) and SLM
  2014-08-18 17:30     ` Deepa Raj
@ 2014-08-19 15:01       ` Tony Lindgren
       [not found]         ` <BLU185-W41D02CD4B210AFAA8F36ECECC50@phx.gbl>
  0 siblings, 1 reply; 5+ messages in thread
From: Tony Lindgren @ 2014-08-19 15:01 UTC (permalink / raw)
  To: Deepa Raj; +Cc: linux-omap@vger.kernel.org

Hi,

* Deepa Raj <draj187@hotmail.com> [140818 10:32]:
> Hi Tony,
> 
> I have few more questions on OMAP3:
> 
> 1) As you know there are power scripts in drivers/mfd folder for PMIC chip (Triton2). Is this mandatory to use these scripts like there are P1,P2,P3 areas are there in PMIC.

Not mandatory, but you need to configure the scripts if you want
the PMIC to trigger changes during deeper idle states based on
sys_clkreq and sys_off_mode pins.
 
> 2) My understanding was when regulator_enable and disable are called from device drivers, voltage regulators are powered on/off, is it correct, if yes, why do we need to use power scripts?

We still need to configure scripts as when the system hits retention
or off mode during idle, the regulator framework can't do anything.

For most part we want to configure PMIC to shut down vpll1, vdd1
and vdd2 during off-idle while keeping everything else controlled
by the regulator framework. Optionally also the oscillator can be
cut off and regen.

FYI, there's a bug in omap3_idle_rconfig that I'll provide a patch
for today. Most of it should use TWL4030_RESCONFIG_UNDEF instead
of DEV_GRP_NULL.
 
> 3) Suppose HiFreq clk source (Oscillator), since there are no suspend/resume hooks from PMIC. Do we mandatory to use these scripts during suspend to RAM or we can directly power off oscillators or is there any hardware mechanism also, when all voltage regulators are disabled, HiFreq oscillator will be cut off.

That must be done withe the scripts as nothing else can run
without the oscillator :)
 
> 4) Do power scripts are mandatory for all OMAP platforms?

Not mandatory, but needed for many battery operated devices to
save power.

Regards,

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Questions about enabling dps(dynamic power switching) and SLM
       [not found]         ` <BLU185-W41D02CD4B210AFAA8F36ECECC50@phx.gbl>
@ 2014-09-18 17:06           ` Tony Lindgren
  0 siblings, 0 replies; 5+ messages in thread
From: Tony Lindgren @ 2014-09-18 17:06 UTC (permalink / raw)
  To: Deepa Raj; +Cc: linux-omap@vger.kernel.org

Hi,

* Deepa Raj <draj187@hotmail.com> [140904 08:59]:
>
> 1) Which register in omap3 (as you said dps works in OMAP3) that will
>  be configured to enable dps and slm?

Hardware enters deeper idle states automatically when configured
properly, see commits 3b8c4ebb7630, 9eca2837dd69 and c46f601cc2a0.
Also see the recent changes to drivers/mfd/twl4030-power.c.

> 2) I was working on OMAP3, I disabled TIDSP bridge driver mpu side as
> we do not need IVA2. IVA2 powerdomain was always on during boot and
> if the system is idle, it keeps on always on where I was expecting it
> will move to low power state (checked the transitions from pm_dbg/count).
> During suspend to RAM also , IVA2 was always on (hundred %s  sure no
> body is using it as mputidspbridge driver is always disabled). Why is
> it always on or do it needs some configuration. Since it was not going
> low power state, so I manually powered it off.Is there register
> configuration that i am missing so it will enter into low power state
> automatically, otherwise why it is always on even it is not being used?

IVA2 needs to be idled always, see commit 2d403f7b1981.

Regards,

Tony

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-09-18 17:06 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-13 13:08 Questions about enabling dps(dynamic power switching) and SLM Deepa Raj
2014-08-14 14:09 ` Tony Lindgren
     [not found]   ` <BLU185-W41F1B3F381C31F1C3B8266ECD40@phx.gbl>
2014-08-18 17:30     ` Deepa Raj
2014-08-19 15:01       ` Tony Lindgren
     [not found]         ` <BLU185-W41D02CD4B210AFAA8F36ECECC50@phx.gbl>
2014-09-18 17:06           ` Tony Lindgren

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).