Power Management on OMAP3 boards

From IGEP - ISEE Wiki

Jump to: navigation, search

Overview

The OMAP3 hardware architecture contains a wealth of power management features. This article will take a brief look at the state of power management.

The kernel used in the article below is built from the linux-2.6.37.y branch from ISEE repositories.

Enable debug options

Power management options  --->
  -*- Power Management support
  [*]   Power Management Debug Support
  [*]     Extra PM attributes in sysfs for low-level debugging/testing

Mount the debug filesystem:

mount -t debugfs nodev /sys/kernel/debug/

Basic system to suspend

To request the system to suspend just do:

# echo mem > /sys/power/state
[  231.599060] PM: Syncing filesystems ... done.
[  231.620971] Freezing user space processes ... (elapsed 0.02 seconds) done.
[  231.648345] Freezing remaining freezable tasks ... (elapsed 0.02 seconds) done.
[  231.679840] Suspending console(s) (use no_console_suspend to debug)

Sending a character on the console port the system wake up:

[  231.695251] PM: suspend of devices complete after 8.424 msecs
[  231.695587] PM: late suspend of devices complete after 0.274 msecs
[  268.239837] Powerdomain (core_pwrdm) didn't enter target state 1
[  268.239868] Powerdomain (usbhost_pwrdm) didn't enter target state 1
[  268.239868] Could not enter target state in pm_suspend
[  268.240112] PM: early resume of devices complete after 0.122 msecs
[  268.322998] PM: resume of devices complete after 82.860 msecs
[  268.367065] Restarting tasks ... done.

You can also set a time interval to wake up the system:

# echo 5 > /sys/kernel/debug/pm_debug/wakeup_timer_seconds
# echo mem > /sys/power/state