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