This document describes i.MX Android power issues debug and power consumption optimization.
What Power Manager introduced by Android
• Early Suspend
It is allow drivers like LCD, keypad backlight, touch-screen, gsensor, to be notified when user-space writes to /sys/power/request_state to indicate that the user visible sleep state should change. These drivers will act as like Linux stand suspend() to let these devices entry in suspend for better battery life.
•Late Resume
Late resume is matching with early suspend. It will resume the devices suspended during early suspend after the Stand Linux resume finished
•Wake Locks
Wake locks are used by applications, services, kernel drivers to request CPU resources. A locked wakelock, depending on its type, prevents the system from entering suspend or other low-power states. It as a core member in android power management architecture from framework to kernel
What introduced by i.MX to enhance the power framework
BusFreq
Support High bus, Low power audio bus and Low bus totally 3 system bus working points.
Switching between these 3 bus mode according clock flags automatically.
DDR running frequency will change according bus mode changing (highest 528/400MHz and lowest at 24MHz for MX6DQ/DL).
CPUFreq
The CPU frequency scaling device driver allows the clock speed of the CPUs to be changed on the fly. Once the CPU frequency is changed, the GP voltage will be changed to the voltage value.
Enhance the default interactive governor for better performance on SDHC/GPU etc.
System Power Profile Service and App (just for MX6DQ/DL)
Support 3 profiles currently: Normal mode, Power Saving Mode and Performance Mode to get much better balance between performance and power consumption.
Profiles can be customized according customers’ HW /MD design, including: CPU running max freq, trigger temperature, CPU running minimal freq, running cpu
LDO bypass mode
i.MX6X has built-in LDO module, but also allows you to use external LDO suppliers. SW will provide the configuration using external LDO or internal LDO.
Suspend Mode
User Idle Mode
Audio/Video Playback Mode
Idle Audio/Video Playback high power consumption
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
cat /sys/devices/platform/imx_busfreq.0/enable
cat /sys/kernel/debug/clock/osc_clk/pll2_528_bus_main_clk/periph_clk/mmdc_ch0_axi_clk/rate
cat /sys/kernel/debug/clock/osc_clk/pll2_528_bus_main_clk/pll2_pfd_400M/periph_clk/mmdc_ch0_axi_clk/rate
powerdebug –d -c
SUSPEND MODE high power consumption
Some tips help to locate the problems
System could not entry in suspend mode
echo 15 > /sys/module/wakelock/parameters/debug_mask
echo 15 > /sys/module/userwakelock/parameters/debug_mask
System hang when resume or suspend
make menuconfig enable the PM debug sys
[*] Power Management support
[*] Power Management Debug Support
[*] Verbose Power Management debugging
This makes the system print more useful info before entry in suspend
Kernel resume back from suspend but Android not
This is usually because of the wrong key layout file
getevent
system/usr/keylayout/****.kl
Hi fuzhenlin/Jodi Paul
Is there any document/details on System Power Profile Service and App (just for MX6DQ/DL) included in the android 4.0.4 BSP?
I would like to know what each Power mode does in the default FSL code.
Thanks and regards,
PK
Hi PK,
You can find more info about the system power profile from the Android User Guider which is released together with R13.4.1.
Best Regards,
Fuzhen
Thanks, Fuzhen for quick reply.
In the Android Advance User guide doc, freq_table is referenced (Max working point in freq_table). Where can I find this freq table for imx6dq?
Thanks and regards,
Paramod.
Hi Paramod,
You can find this info from /sys/device/system/cpu/cpu0/cpufreq/scaling_max_freq
BRs,
Fuzhen