Merge branch 'master' into next
[linux-2.6-block.git] / Documentation / cpu-freq / user-guide.txt
CommitLineData
1da177e4
LT
1 CPU frequency and voltage scaling code in the Linux(TM) kernel
2
3
4 L i n u x C P U F r e q
5
6 U S E R G U I D E
7
8
9 Dominik Brodowski <linux@brodo.de>
10
11
12
13 Clock scaling allows you to change the clock speed of the CPUs on the
14 fly. This is a nice method to save battery power, because the lower
15 the clock speed, the less power the CPU consumes.
16
17
18Contents:
19---------
201. Supported Architectures and Processors
211.1 ARM
221.2 x86
231.3 sparc64
241.4 ppc
251.5 SuperH
121fe86b 261.6 Blackfin
1da177e4
LT
27
282. "Policy" / "Governor"?
292.1 Policy
302.2 Governor
31
323. How to change the CPU cpufreq policy and/or speed
333.1 Preferred interface: sysfs
343.2 Deprecated interfaces
35
36
37
381. Supported Architectures and Processors
39=========================================
40
411.1 ARM
42-------
43
44The following ARM processors are supported by cpufreq:
45
46ARM Integrator
47ARM-SA1100
48ARM-SA1110
9e2697ff 49Intel PXA
1da177e4
LT
50
51
521.2 x86
53-------
54
55The following processors for the x86 architecture are supported by cpufreq:
56
57AMD Elan - SC400, SC410
58AMD mobile K6-2+
59AMD mobile K6-3+
60AMD mobile Duron
61AMD mobile Athlon
62AMD Opteron
63AMD Athlon 64
64Cyrix Media GXm
65Intel mobile PIII and Intel mobile PIII-M on certain chipsets
66Intel Pentium 4, Intel Xeon
67Intel Pentium M (Centrino)
68National Semiconductors Geode GX
69Transmeta Crusoe
70Transmeta Efficeon
71VIA Cyrix 3 / C3
72various processors on some ACPI 2.0-compatible systems [*]
73
74[*] Only if "ACPI Processor Performance States" are available
75to the ACPI<->BIOS interface.
76
77
781.3 sparc64
79-----------
80
81The following processors for the sparc64 architecture are supported by
82cpufreq:
83
84UltraSPARC-III
85
86
871.4 ppc
88-------
89
90Several "PowerBook" and "iBook2" notebooks are supported.
91
92
931.5 SuperH
94----------
95
96The following SuperH processors are supported by cpufreq:
97
98SH-3
99SH-4
100
121fe86b
RG
1011.6 Blackfin
102------------
103
104The following Blackfin processors are supported by cpufreq:
105
106BF522, BF523, BF524, BF525, BF526, BF527, Rev 0.1 or higher
107BF531, BF532, BF533, Rev 0.3 or higher
108BF534, BF536, BF537, Rev 0.2 or higher
109BF561, Rev 0.3 or higher
110BF542, BF544, BF547, BF548, BF549, Rev 0.1 or higher
111
1da177e4
LT
112
1132. "Policy" / "Governor" ?
114==========================
115
116Some CPU frequency scaling-capable processor switch between various
117frequencies and operating voltages "on the fly" without any kernel or
118user involvement. This guarantees very fast switching to a frequency
119which is high enough to serve the user's needs, but low enough to save
120power.
121
122
1232.1 Policy
124----------
125
126On these systems, all you can do is select the lower and upper
127frequency limit as well as whether you want more aggressive
128power-saving or more instantly available processing power.
129
130
1312.2 Governor
132------------
133
134On all other cpufreq implementations, these boundaries still need to
135be set. Then, a "governor" must be selected. Such a "governor" decides
136what speed the processor shall run within the boundaries. One such
137"governor" is the "userspace" governor. This one allows the user - or
138a yet-to-implement userspace program - to decide what specific speed
139the processor shall run at.
140
141
1423. How to change the CPU cpufreq policy and/or speed
143====================================================
144
1453.1 Preferred Interface: sysfs
146------------------------------
147
148The preferred interface is located in the sysfs filesystem. If you
149mounted it at /sys, the cpufreq interface is located in a subdirectory
150"cpufreq" within the cpu-device directory
151(e.g. /sys/devices/system/cpu/cpu0/cpufreq/ for the first CPU).
152
153cpuinfo_min_freq : this file shows the minimum operating
154 frequency the processor can run at(in kHz)
155cpuinfo_max_freq : this file shows the maximum operating
156 frequency the processor can run at(in kHz)
157scaling_driver : this file shows what cpufreq driver is
158 used to set the frequency on this CPU
159
160scaling_available_governors : this file shows the CPUfreq governors
161 available in this kernel. You can see the
162 currently activated governor in
163
164scaling_governor, and by "echoing" the name of another
165 governor you can change it. Please note
166 that some governors won't load - they only
167 work on some specific architectures or
168 processors.
605400a8
DW
169
170cpuinfo_cur_freq : Current speed of the CPU, in KHz.
171
172scaling_available_frequencies : List of available frequencies, in KHz.
173
9c9a43ed 174scaling_min_freq and
1da177e4
LT
175scaling_max_freq show the current "policy limits" (in
176 kHz). By echoing new values into these
177 files, you can change these limits.
9c9a43ed
MD
178 NOTE: when setting a policy you need to
179 first set scaling_max_freq, then
180 scaling_min_freq.
1da177e4 181
605400a8
DW
182affected_cpus : List of CPUs that require software coordination
183 of frequency.
184
185related_cpus : List of CPUs that need some sort of frequency
186 coordination, whether software or hardware.
187
188scaling_driver : Hardware driver for cpufreq.
189
190scaling_cur_freq : Current frequency of the CPU, in KHz.
1da177e4
LT
191
192If you have selected the "userspace" governor which allows you to
193set the CPU operating frequency to a specific value, you can read out
194the current frequency in
195
196scaling_setspeed. By "echoing" a new frequency into this
197 you can change the speed of the CPU,
198 but only within the limits of
199 scaling_min_freq and scaling_max_freq.
200
201
2023.2 Deprecated Interfaces
203-------------------------
204
205Depending on your kernel configuration, you might find the following
206cpufreq-related files:
207/proc/cpufreq
208/proc/sys/cpu/*/speed
209/proc/sys/cpu/*/speed-min
210/proc/sys/cpu/*/speed-max
211
212These are files for deprecated interfaces to cpufreq, which offer far
213less functionality. Because of this, these interfaces aren't described
214here.
215