Texas Instruments AM335 Series Design Manual page 18

Hide thumbs Also See for AM335 Series:
Table of Contents

Advertisement

Linux Power Optimization Features
As a last test, a CPU benchmark like Dhrystone should scale linearly and can be used as a yardstick
by referencing results from known good OPPs.
# First check the cpufreq interface in sysfs
root@am335x-evm:~#
300000
<your opp>
# Set governor to userspace
root@am335x-evm:~#
# Set target OPP to your OPP
root@am335x-evm:~#
# Check BogoMIPS
root@am335x-evm:~#
processor
: 0
model name
: ARMv7 Processor rev2 (v7l)
BogoMIPS
: 717.22
...
3.2
Userspace Power Management
The TI Linux Processor SDK kernel comes configured with several features that can be accessed in
userspace to control the power and performance characteristics of the system. First, the scaling governors
and the Dynamic Voltage and Frequency Scaling (DVFS) system. Second, the CPUIdle driver that targets
C-states based on the current governor. Third, this section discusses how to power or clock gate unused
peripherals while the system is running.
3.2.1
Dynamic Voltage and Frequency Scaling
Dynamic Voltage and Frequency Scaling (DVFS) allows for the clocking up and down of MPU frequency
in response to changing loads on the MPU. Frequency and voltage combinations are known as Operating
Performance Points (OPPs) that are defined in the device tree. Transition policies are defined using
scaling "governors," which select an OPP based on CPU load and usage patterns. There are several pre-
defined governors that can be selected during kernel configuration:
ondemand: This governor samples the load of the cpu and scales it up aggressively in order to
provide the proper amount of processing power.
conservative: This governor is similar to ondemand but uses a less aggressive method of increasing
the the OPP of the MPU.
performance: This governor statically sets the OPP of the MPU to the highest possible frequency.
powersave: This governor statically sets the OPP of the MPU to the lowest possible frequency.
userspace: This governor allows the user to set the desired OPP using any value found within
scaling_available_frequencies by echoing it into scaling_setspeed.
Available governors vary by configuration, and can be checked using sysfs:
$
cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
conservative userspace powersave ondemand performance
The current governor can be viewed by using:
$
cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
To select a different governor:
$
echo
userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
To view the current OPP:
$
cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
300000
To view available OPPs:
$
cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
300000 600000 720000 800000 1000000
18
AM335x Low Power Design Guide
cat
/sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
600000 720000 800000 1000000
echo
userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo
<your opp> > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
cat
/proc/cpuinfo
# 717.22 BogoMIPS indicates CPU at 720 MHz
Copyright © 2017, Texas Instruments Incorporated
SPRAC74A – February 2017 – Revised March 2017
Submit Documentation Feedback
www.ti.com

Advertisement

Table of Contents
loading

Table of Contents