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