xref: /openbmc/linux/drivers/cpufreq/Kconfig (revision af873fce)
1# SPDX-License-Identifier: GPL-2.0-only
2menu "CPU Frequency scaling"
3
4config CPU_FREQ
5	bool "CPU Frequency scaling"
6	select SRCU
7	help
8	  CPU Frequency scaling allows you to change the clock speed of
9	  CPUs on the fly. This is a nice method to save power, because
10	  the lower the CPU clock speed, the less power the CPU consumes.
11
12	  Note that this driver doesn't automatically change the CPU
13	  clock speed, you need to either enable a dynamic cpufreq governor
14	  (see below) after boot, or use a userspace tool.
15
16	  For details, take a look at <file:Documentation/cpu-freq>.
17
18	  If in doubt, say N.
19
20if CPU_FREQ
21
22config CPU_FREQ_GOV_ATTR_SET
23	bool
24
25config CPU_FREQ_GOV_COMMON
26	select CPU_FREQ_GOV_ATTR_SET
27	select IRQ_WORK
28	bool
29
30config CPU_FREQ_STAT
31	bool "CPU frequency transition statistics"
32	help
33	  Export CPU frequency statistics information through sysfs.
34
35	  If in doubt, say N.
36
37choice
38	prompt "Default CPUFreq governor"
39	default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1100_CPUFREQ || ARM_SA1110_CPUFREQ
40	default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
41	help
42	  This option sets which CPUFreq governor shall be loaded at
43	  startup. If in doubt, select 'performance'.
44
45config CPU_FREQ_DEFAULT_GOV_PERFORMANCE
46	bool "performance"
47	select CPU_FREQ_GOV_PERFORMANCE
48	help
49	  Use the CPUFreq governor 'performance' as default. This sets
50	  the frequency statically to the highest frequency supported by
51	  the CPU.
52
53config CPU_FREQ_DEFAULT_GOV_POWERSAVE
54	bool "powersave"
55	select CPU_FREQ_GOV_POWERSAVE
56	help
57	  Use the CPUFreq governor 'powersave' as default. This sets
58	  the frequency statically to the lowest frequency supported by
59	  the CPU.
60
61config CPU_FREQ_DEFAULT_GOV_USERSPACE
62	bool "userspace"
63	select CPU_FREQ_GOV_USERSPACE
64	help
65	  Use the CPUFreq governor 'userspace' as default. This allows
66	  you to set the CPU frequency manually or when a userspace
67	  program shall be able to set the CPU dynamically without having
68	  to enable the userspace governor manually.
69
70config CPU_FREQ_DEFAULT_GOV_ONDEMAND
71	bool "ondemand"
72	select CPU_FREQ_GOV_ONDEMAND
73	select CPU_FREQ_GOV_PERFORMANCE
74	help
75	  Use the CPUFreq governor 'ondemand' as default. This allows
76	  you to get a full dynamic frequency capable system by simply
77	  loading your cpufreq low-level hardware driver.
78	  Be aware that not all cpufreq drivers support the ondemand
79	  governor. If unsure have a look at the help section of the
80	  driver. Fallback governor will be the performance governor.
81
82config CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
83	bool "conservative"
84	select CPU_FREQ_GOV_CONSERVATIVE
85	select CPU_FREQ_GOV_PERFORMANCE
86	help
87	  Use the CPUFreq governor 'conservative' as default. This allows
88	  you to get a full dynamic frequency capable system by simply
89	  loading your cpufreq low-level hardware driver.
90	  Be aware that not all cpufreq drivers support the conservative
91	  governor. If unsure have a look at the help section of the
92	  driver. Fallback governor will be the performance governor.
93
94config CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
95	bool "schedutil"
96	depends on SMP
97	select CPU_FREQ_GOV_SCHEDUTIL
98	select CPU_FREQ_GOV_PERFORMANCE
99	help
100	  Use the 'schedutil' CPUFreq governor by default. If unsure,
101	  have a look at the help section of that governor. The fallback
102	  governor will be 'performance'.
103
104endchoice
105
106config CPU_FREQ_GOV_PERFORMANCE
107	tristate "'performance' governor"
108	help
109	  This cpufreq governor sets the frequency statically to the
110	  highest available CPU frequency.
111
112	  To compile this driver as a module, choose M here: the
113	  module will be called cpufreq_performance.
114
115	  If in doubt, say Y.
116
117config CPU_FREQ_GOV_POWERSAVE
118	tristate "'powersave' governor"
119	help
120	  This cpufreq governor sets the frequency statically to the
121	  lowest available CPU frequency.
122
123	  To compile this driver as a module, choose M here: the
124	  module will be called cpufreq_powersave.
125
126	  If in doubt, say Y.
127
128config CPU_FREQ_GOV_USERSPACE
129	tristate "'userspace' governor for userspace frequency scaling"
130	help
131	  Enable this cpufreq governor when you either want to set the
132	  CPU frequency manually or when a userspace program shall
133	  be able to set the CPU dynamically, like on LART
134	  <http://www.lartmaker.nl/>.
135
136	  To compile this driver as a module, choose M here: the
137	  module will be called cpufreq_userspace.
138
139	  For details, take a look at <file:Documentation/cpu-freq/>.
140
141	  If in doubt, say Y.
142
143config CPU_FREQ_GOV_ONDEMAND
144	tristate "'ondemand' cpufreq policy governor"
145	select CPU_FREQ_GOV_COMMON
146	help
147	  'ondemand' - This driver adds a dynamic cpufreq policy governor.
148	  The governor does a periodic polling and
149	  changes frequency based on the CPU utilization.
150	  The support for this governor depends on CPU capability to
151	  do fast frequency switching (i.e, very low latency frequency
152	  transitions).
153
154	  To compile this driver as a module, choose M here: the
155	  module will be called cpufreq_ondemand.
156
157	  For details, take a look at linux/Documentation/cpu-freq.
158
159	  If in doubt, say N.
160
161config CPU_FREQ_GOV_CONSERVATIVE
162	tristate "'conservative' cpufreq governor"
163	depends on CPU_FREQ
164	select CPU_FREQ_GOV_COMMON
165	help
166	  'conservative' - this driver is rather similar to the 'ondemand'
167	  governor both in its source code and its purpose, the difference is
168	  its optimisation for better suitability in a battery powered
169	  environment.  The frequency is gracefully increased and decreased
170	  rather than jumping to 100% when speed is required.
171
172	  If you have a desktop machine then you should really be considering
173	  the 'ondemand' governor instead, however if you are using a laptop,
174	  PDA or even an AMD64 based computer (due to the unacceptable
175	  step-by-step latency issues between the minimum and maximum frequency
176	  transitions in the CPU) you will probably want to use this governor.
177
178	  To compile this driver as a module, choose M here: the
179	  module will be called cpufreq_conservative.
180
181	  For details, take a look at linux/Documentation/cpu-freq.
182
183	  If in doubt, say N.
184
185config CPU_FREQ_GOV_SCHEDUTIL
186	bool "'schedutil' cpufreq policy governor"
187	depends on CPU_FREQ && SMP
188	select CPU_FREQ_GOV_ATTR_SET
189	select IRQ_WORK
190	help
191	  This governor makes decisions based on the utilization data provided
192	  by the scheduler.  It sets the CPU frequency to be proportional to
193	  the utilization/capacity ratio coming from the scheduler.  If the
194	  utilization is frequency-invariant, the new frequency is also
195	  proportional to the maximum available frequency.  If that is not the
196	  case, it is proportional to the current frequency of the CPU.  The
197	  frequency tipping point is at utilization/capacity equal to 80% in
198	  both cases.
199
200	  If in doubt, say N.
201
202comment "CPU frequency scaling drivers"
203
204config CPUFREQ_DT
205	tristate "Generic DT based cpufreq driver"
206	depends on HAVE_CLK && OF
207	select CPUFREQ_DT_PLATDEV
208	select PM_OPP
209	help
210	  This adds a generic DT based cpufreq driver for frequency management.
211	  It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
212	  systems.
213
214	  If in doubt, say N.
215
216config CPUFREQ_DT_PLATDEV
217	bool
218	help
219	  This adds a generic DT based cpufreq platdev driver for frequency
220	  management.  This creates a 'cpufreq-dt' platform device, on the
221	  supported platforms.
222
223	  If in doubt, say N.
224
225if X86
226source "drivers/cpufreq/Kconfig.x86"
227endif
228
229if ARM || ARM64
230source "drivers/cpufreq/Kconfig.arm"
231endif
232
233if PPC32 || PPC64
234source "drivers/cpufreq/Kconfig.powerpc"
235endif
236
237if IA64
238config IA64_ACPI_CPUFREQ
239	tristate "ACPI Processor P-States driver"
240	depends on ACPI_PROCESSOR
241	help
242	This driver adds a CPUFreq driver which utilizes the ACPI
243	Processor Performance States.
244
245	For details, take a look at <file:Documentation/cpu-freq/>.
246
247	If in doubt, say N.
248endif
249
250if MIPS
251config BMIPS_CPUFREQ
252	tristate "BMIPS CPUfreq Driver"
253	help
254	  This option adds a CPUfreq driver for BMIPS processors with
255	  support for configurable CPU frequency.
256
257	  For now, BMIPS5 chips are supported (such as the Broadcom 7425).
258
259	  If in doubt, say N.
260
261config LOONGSON2_CPUFREQ
262	tristate "Loongson2 CPUFreq Driver"
263	depends on LEMOTE_MACH2F
264	help
265	  This option adds a CPUFreq driver for loongson processors which
266	  support software configurable cpu frequency.
267
268	  Loongson2F and it's successors support this feature.
269
270	  For details, take a look at <file:Documentation/cpu-freq/>.
271
272	  If in doubt, say N.
273
274config LOONGSON1_CPUFREQ
275	tristate "Loongson1 CPUFreq Driver"
276	depends on LOONGSON1_LS1B
277	help
278	  This option adds a CPUFreq driver for loongson1 processors which
279	  support software configurable cpu frequency.
280
281	  For details, take a look at <file:Documentation/cpu-freq/>.
282
283	  If in doubt, say N.
284endif
285
286if SPARC64
287config SPARC_US3_CPUFREQ
288	tristate "UltraSPARC-III CPU Frequency driver"
289	help
290	  This adds the CPUFreq driver for UltraSPARC-III processors.
291
292	  For details, take a look at <file:Documentation/cpu-freq>.
293
294	  If in doubt, say N.
295
296config SPARC_US2E_CPUFREQ
297	tristate "UltraSPARC-IIe CPU Frequency driver"
298	help
299	  This adds the CPUFreq driver for UltraSPARC-IIe processors.
300
301	  For details, take a look at <file:Documentation/cpu-freq>.
302
303	  If in doubt, say N.
304endif
305
306if SUPERH
307config SH_CPU_FREQ
308	tristate "SuperH CPU Frequency driver"
309	help
310	  This adds the cpufreq driver for SuperH. Any CPU that supports
311	  clock rate rounding through the clock framework can use this
312	  driver. While it will make the kernel slightly larger, this is
313	  harmless for CPUs that don't support rate rounding. The driver
314	  will also generate a notice in the boot log before disabling
315	  itself if the CPU in question is not capable of rate rounding.
316
317	  For details, take a look at <file:Documentation/cpu-freq>.
318
319	  If unsure, say N.
320endif
321
322config QORIQ_CPUFREQ
323	tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
324	depends on OF && COMMON_CLK && (PPC_E500MC || ARM || ARM64)
325	select CLK_QORIQ
326	help
327	  This adds the CPUFreq driver support for Freescale QorIQ SoCs
328	  which are capable of changing the CPU's frequency dynamically.
329
330endif
331endmenu
332