Power management

From ArmadeusWiki
Revision as of 17:29, 20 February 2013 by FabienM (Talk | contribs) (To know if driver is launched)

Jump to: navigation, search

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/APF28/APF51

Linux configuration

Note Note: now done by default in latest apf 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

For the apf27, 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

  • if you put the APF28 in suspend mode, you can use the power button to wake up the board.

To know if driver is launched

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

Ethernet

for the APF27 the 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

Warning Warning: The mode 'mem' is not implemented in the kernel 2.6.35 for the APF28. please use the 'standby' mode


Only few interrupts can wake up the i.MX51 from this mode. please check the mx51 reference manual for further information.

Wake up the board from sleep mode

  • For the APF28 you can use the power button, any active interrupt or the RTC.
  • For the APF27 you will have to use an external interrupt.
  • For the APF51 the RTc or an external interrupt can wake up the board.

Debugging suspend/resume

  • pass no_console_suspend as boot parameter:
BIOS> setenv extrabootargs no_console_suspend
BIOS> boot

Known problems

  • APF27 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