i.MX51 EVK Linux Reference Manual
Freescale Semiconductor
6-1
Chapter 6
CPU Frequency Scaling (CPUFREQ) Driver
The CPU frequency scaling device driver allows the clock speed of the CPU to be changed on the fly. Once
the CPU frequency is changed, the voltage VDDGP is changed to the voltage value defined in
cpu_wp_auto[] .
This method can reduce power consumption (thus saving battery power), because the
CPU uses less power as the clock speed is reduced.
6.1
Software Operation
The CPUFREQ device driver is designed to change the CPU frequency and voltage on the fly. If the
frequency is not defined in
cpu_wp_auto[]
, the CPUFREQ driver changes the CPU frequency to the
nearest frequency in the array. The frequencies are manipulated using the clock framework API, while the
voltage is set using the regulators API. The CPU frequencies in the array are based on the boot CPU
frequency which can be changed by using the clock command in U-Boot.
Refer to the API document for more information on the functions implemented in the driver (in the
doxygen folder of the documentation package).
To view what values the CPU frequency can be changed to in KHz (The values in the first column are the
frequency values) use this command:
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state
To change the CPU frequency to a value that is given by using the command above (for example, to 160
MHz) use this command:
echo 160000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
The frequency
160000
is in KHz, which is
160
MHz.
The maximum frequency can be checked using this command:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
Use the following command to view the current CPU frequency in KHz:
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
6.2
Source Code Structure
shows the source files and headers available in the following directory:
Summary of Contents for i.MX51 EVK
Page 1: ...Part Number 924 76374 Rev 10 11 01 11 2010 i MX51 EVK Linux Reference Manual...
Page 14: ...i MX51 EVK Linux Reference Manual xiv Freescale Semiconductor...
Page 18: ...i MX51 EVK Linux Reference Manual xviii Freescale Semiconductor...
Page 24: ...i MX51 EVK Linux Reference Manual xxiv Freescale Semiconductor...
Page 38: ...Machine Specific Layer MSL i MX51 EVK Linux Reference Manual 2 8 Freescale Semiconductor...
Page 52: ...MC13892 Digitizer Driver i MX51 EVK Linux Reference Manual 5 4 Freescale Semiconductor...
Page 64: ...TV Encoder TVE Driver i MX51 EVK Linux Reference Manual 10 4 Freescale Semiconductor...
Page 82: ...Video for Linux Two V4L2 Driver i MX51 EVK Linux Reference Manual 12 8 Freescale Semiconductor...
Page 86: ...i MX5 Dual Display i MX51 EVK Linux Reference Manual 13 4 Freescale Semiconductor...
Page 100: ...X Windows Acceleration i MX51 EVK Linux Reference Manual 16 6 Freescale Semiconductor...
Page 118: ...Low Level Keypad Driver i MX51 EVK Linux Reference Manual 20 6 Freescale Semiconductor...
Page 134: ...Security Drivers i MX51 EVK Linux Reference Manual 22 10 Freescale Semiconductor...
Page 148: ...Inter IC I2C Driver i MX51 EVK Linux Reference Manual 24 4 Freescale Semiconductor...
Page 178: ...ARC USB Driver i MX51 EVK Linux Reference Manual 29 10 Freescale Semiconductor...
Page 194: ...OProfile i MX51 EVK Linux Reference Manual 33 6 Freescale Semiconductor...