Re: [Balloon] Backup Battery, RTC and Deep sleep....

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Wookey
Date:  
To: balloon
Subject: Re: [Balloon] Backup Battery, RTC and Deep sleep....
On 2008-04-30 20:09 +0100, David Bisset wrote:
>
> Therefore to maintain the RTC registers we need the PXA to enter "Sleep" or
> "Deep Sleep" modes (to reduce the current consumption to a few micro amps
> provided by the backup battery), however this must be done by *software*
> (not by just pulling the power) and there is a strict sequence to follow.
>
> {We will also need to make sure that all the other bits of the L3 board also
> shut down suitably. However this should happen because nearly everything
> else is powered from VCC_IO which is turned off when the system goes into
> sleep/deep-sleep, but I'm sure there will be things we need to look at.}
>
> So I need to know how to put the PXA into deep sleep. Is this implemented in
> the kernel power modes?


We have basic pm support - standby and sleep (S1 and S3) (see
Documenation/power/states.txt in the kernel sources).

There is also some device support, but it probably not complete - e.g.
the audio driver resume and suspend functions are null, and should
probably be doing something like turning the audio amp on/off.

> Is there a proc interface (too easy....:-)).


there is a /sys interface in /sys/power/state

echo /sys/power/state enmumerates the available states (we appear to
only have 'mem' or 'sleep to memory - S3' appearing here)

echo "mem" > /sys/power/state puts the balloon into sleep.

That's as far as I've got just now as I don't know how to get it out
again. I guess there is a 'reset, but not too hard' wire to wiggle somewhere?

> Finally can we do voltage scaling?


In principle yes - but there doesn't seem to be any obvious support
for it in the pxa code (there is in strongarm).

> I will configure the next rev of L3 to work both with the backup battery and
> without (may need a link change) but I can't test any of this till we can
> sleep the processor from software.
>
> Thoughts, comments welcome.


I've built a kernel with power management debug and timer stats
enabled and will see what works tomorrow, along with checking Nick's
new udev-friendly minipug code on hardware that actually has a minipug
attached.

Which of the 10-odd PXA docs has best overview of PM state management?

Wookey
--
Principal hats: Balloonz - Toby Churchill - Aleph One - Debian
http://wookware.org/