Difference between revisions of "Power management"

From ArmadeusWiki
Jump to: navigation, search
Line 1: Line 1:
==APF9328 alone==
+
{{Under_Construction}}
 +
 
 +
==APF9328==
 +
===APF9328 alone===
 
Power consumption measurements have been done on an APF9328 board.  
 
Power consumption measurements have been done on an APF9328 board.  
 
The results are available in the [[APF9328]] datasheet.
 
The results are available in the [[APF9328]] datasheet.
 
<br>
 
<br>
  
==APF9328 connected to a DevLight board==
+
===APF9328 connected to a DevLight board===
 
{| border="1" cellpadding="5" cellspacing="0" summary="How to reduce chips power consumption"
 
{| border="1" cellpadding="5" cellspacing="0" summary="How to reduce chips power consumption"
 
|- style="background:#efefef;"
 
|- style="background:#efefef;"
Line 20: Line 23:
 
|----------------
 
|----------------
 
|}
 
|}
 +
 +
==APF27==
 +
 +
===Linux configuration===
 +
'''NOW DONE BY DEFAULT IN LATEST APF27 KERNEL CONFIGS'''
 +
<pre class="config">
 +
Power management options  --->
 +
    [*] Power Management support
 +
    [*]  Power Management Debug Support
 +
    [*]    Verbose Power Management debugging
 +
    [*] Suspend to RAM and standby
 +
    [ ]  Test suspend/resume and wakealarm during bootup
 +
    < > Advanced Power Management Emulation
 +
</pre>
 +
 +
power management handling is done in ''arch/arm/mach-mx2/pm_imx27.c''
 +
 +
* if you put the APF27 in suspend mode, it could be interesting to be able to wake it with the "User button":
 +
<pre class="host">
 +
$ make linux-menuconfig
 +
</pre>
 +
 +
<pre class="config">
 +
 +
</pre>
 +
 +
===To know if driver is launched===
 +
<pre>
 +
# dmesg | grep Power
 +
Power Management for Freescale i.MX2x
 +
</pre>
 +
 +
==Ethernet==
 +
''fec_old'' driver currently do not implement CONFIG_PM stuff...
 +
 +
===Power-up===
 +
* ifconfig eth0 up
 +
 +
===Power-down===
 +
* ifconfig eth0 down  -->> ~ -400 mW
 +
 +
==Other devices==
 +
Should comply to suspend/resume device drive mechanism.
 +
 +
===List available suspend modes===
 +
# cat /sys/power/state
 +
standby mem
 +
 +
===Enter standby mode (i.MX in Doze mode)===
 +
# echo standby > /sys/power/state
 +
PM: Syncing filesystems ... done.
 +
PM: Preparing system for standby sleep
 +
Freezing user space processes ... (elapsed 0.00 seconds) done.
 +
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
 +
PM: Entering standby sleep
 +
Suspending console(s) (use no_console_suspend to debug)
 +
imx-uart imx-uart.0: preparing suspend
 +
imx-uart imx-uart.2: preparing suspend
 +
mxc_nand mxc_nand.0: preparing suspend
 +
...
 +
 +
===Enter suspend to memory mode (i.MX in Sleep mode)===
 +
# echo mem > /sys/power/state
 +
 +
'''!! only an external interrupt can now wake up the i.MX27 !!'''
 +
 +
===Debugging suspend/resume===
 +
* pass '''no_console_suspend''' as boot parameter:
 +
BIOS> setenv console console=ttySMX0,115200 no_console_suspend
 +
BIOS> boot
 +
 +
== Known problems ==
 +
 +
* USB: usb cause system warning :
 +
 +
# echo standby > /sys/power/state
 +
PM: Syncing filesystems ... done.
 +
Freezing user space processes ... (elapsed 0.01 seconds) done.
 +
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
 +
___ apf27_pm_suspend
 +
___ apf27_pm_resume
 +
------------[ cut here ]------------
 +
WARNING: at kernel/hrtimer.c:625 hres_timers_resume+0x3c/0x60()
 +
hres_timers_resume() called with IRQs enabled!Modules linked in: gpio
 +
[<c002c0d8>] (dump_stack+0x0/0x14) from [<c003c148>] (warn_slowpath+0x70/0x8c)
 +
[<c003c0d8>] (warn_slowpath+0x0/0x8c) from [<c0055dfc>] (hres_timers_resume+0x3c/0x60)
 +
 +
==Links==
 +
* [[APF27 Linux dynamic frequency scaling | Another good way of decreasing mA is to use frequency scaling]]
 +
* [http://www.linuxjournal.com/article/6699 Power Management in Linux-Based Systems (Linux Journal)]
 +
* [http://wiki.davincidsp.com/index.php?title=Startup_shutdown_and_power_management BlackFin way of doing]
 +
 +
[[Category:Power Management]]

Revision as of 10:03, 22 February 2012

Page under construction... Construction.png Informations on this page are not guaranteed !!

APF9328

APF9328 alone

Power consumption measurements have been done on an APF9328 board. The results are available in the APF9328 datasheet.

APF9328 connected to a DevLight board

Functionnality power needed @ 5V how to reduce it
FPGA xxxmA don't configure it
Ethernet ifconfig eth0 down
i.MXL (proc + SDRAM + Flash)
LCD

APF27

Linux configuration

NOW DONE BY DEFAULT IN LATEST APF27 KERNEL CONFIGS

 Power management options  --->
     [*] Power Management support
     [*]   Power Management Debug Support
     [*]     Verbose Power Management debugging
     [*] Suspend to RAM and standby
     [ ]   Test suspend/resume and wakealarm during bootup
     < > Advanced Power Management Emulation

power management handling is done in arch/arm/mach-mx2/pm_imx27.c

  • if you put the APF27 in suspend mode, it could be interesting to be able to wake it with the "User button":
$ make linux-menuconfig

To know if driver is launched

# dmesg | grep Power
Power Management for Freescale i.MX2x

Ethernet

fec_old driver currently do not implement CONFIG_PM stuff...

Power-up

  • ifconfig eth0 up

Power-down

  • ifconfig eth0 down -->> ~ -400 mW

Other devices

Should comply to suspend/resume device drive mechanism.

List available suspend modes

# cat /sys/power/state
standby mem

Enter standby mode (i.MX in Doze mode)

# echo standby > /sys/power/state
PM: Syncing filesystems ... done.
PM: Preparing system for standby sleep
Freezing user space processes ... (elapsed 0.00 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
PM: Entering standby sleep
Suspending console(s) (use no_console_suspend to debug)
imx-uart imx-uart.0: preparing suspend
imx-uart imx-uart.2: preparing suspend
mxc_nand mxc_nand.0: preparing suspend
...

Enter suspend to memory mode (i.MX in Sleep mode)

# echo mem > /sys/power/state

!! only an external interrupt can now wake up the i.MX27 !!

Debugging suspend/resume

  • pass no_console_suspend as boot parameter:
BIOS> setenv console console=ttySMX0,115200 no_console_suspend
BIOS> boot

Known problems

  • USB: usb cause system warning :
# echo standby > /sys/power/state
PM: Syncing filesystems ... done.
Freezing user space processes ... (elapsed 0.01 seconds) done.
Freezing remaining freezable tasks ... (elapsed 0.00 seconds) done.
___ apf27_pm_suspend
___ apf27_pm_resume
------------[ cut here ]------------
WARNING: at kernel/hrtimer.c:625 hres_timers_resume+0x3c/0x60()
hres_timers_resume() called with IRQs enabled!Modules linked in: gpio
[<c002c0d8>] (dump_stack+0x0/0x14) from [<c003c148>] (warn_slowpath+0x70/0x8c)
[<c003c0d8>] (warn_slowpath+0x0/0x8c) from [<c0055dfc>] (hres_timers_resume+0x3c/0x60)

Links