xref: /kernel/linux/linux-6.6/drivers/cpufreq/Kconfig (revision 62306a36)
162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_cimenu "CPU Frequency scaling"
362306a36Sopenharmony_ci
462306a36Sopenharmony_ciconfig CPU_FREQ
562306a36Sopenharmony_ci	bool "CPU Frequency scaling"
662306a36Sopenharmony_ci	help
762306a36Sopenharmony_ci	  CPU Frequency scaling allows you to change the clock speed of 
862306a36Sopenharmony_ci	  CPUs on the fly. This is a nice method to save power, because 
962306a36Sopenharmony_ci	  the lower the CPU clock speed, the less power the CPU consumes.
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci	  Note that this driver doesn't automatically change the CPU
1262306a36Sopenharmony_ci	  clock speed, you need to either enable a dynamic cpufreq governor
1362306a36Sopenharmony_ci	  (see below) after boot, or use a userspace tool.
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci	  For details, take a look at
1662306a36Sopenharmony_ci	  <file:Documentation/admin-guide/pm/cpufreq.rst>.
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci	  If in doubt, say N.
1962306a36Sopenharmony_ci
2062306a36Sopenharmony_ciif CPU_FREQ
2162306a36Sopenharmony_ci
2262306a36Sopenharmony_ciconfig CPU_FREQ_GOV_ATTR_SET
2362306a36Sopenharmony_ci	bool
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ciconfig CPU_FREQ_GOV_COMMON
2662306a36Sopenharmony_ci	select CPU_FREQ_GOV_ATTR_SET
2762306a36Sopenharmony_ci	select IRQ_WORK
2862306a36Sopenharmony_ci	bool
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ciconfig CPU_FREQ_STAT
3162306a36Sopenharmony_ci	bool "CPU frequency transition statistics"
3262306a36Sopenharmony_ci	help
3362306a36Sopenharmony_ci	  Export CPU frequency statistics information through sysfs.
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci	  If in doubt, say N.
3662306a36Sopenharmony_ci
3762306a36Sopenharmony_cichoice
3862306a36Sopenharmony_ci	prompt "Default CPUFreq governor"
3962306a36Sopenharmony_ci	default CPU_FREQ_DEFAULT_GOV_USERSPACE if ARM_SA1110_CPUFREQ
4062306a36Sopenharmony_ci	default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if ARM64 || ARM
4162306a36Sopenharmony_ci	default CPU_FREQ_DEFAULT_GOV_SCHEDUTIL if (X86_INTEL_PSTATE || X86_AMD_PSTATE) && SMP
4262306a36Sopenharmony_ci	default CPU_FREQ_DEFAULT_GOV_PERFORMANCE
4362306a36Sopenharmony_ci	help
4462306a36Sopenharmony_ci	  This option sets which CPUFreq governor shall be loaded at
4562306a36Sopenharmony_ci	  startup. If in doubt, use the default setting.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ciconfig CPU_FREQ_DEFAULT_GOV_PERFORMANCE
4862306a36Sopenharmony_ci	bool "performance"
4962306a36Sopenharmony_ci	select CPU_FREQ_GOV_PERFORMANCE
5062306a36Sopenharmony_ci	help
5162306a36Sopenharmony_ci	  Use the CPUFreq governor 'performance' as default. This sets
5262306a36Sopenharmony_ci	  the frequency statically to the highest frequency supported by
5362306a36Sopenharmony_ci	  the CPU.
5462306a36Sopenharmony_ci
5562306a36Sopenharmony_ciconfig CPU_FREQ_DEFAULT_GOV_POWERSAVE
5662306a36Sopenharmony_ci	bool "powersave"
5762306a36Sopenharmony_ci	select CPU_FREQ_GOV_POWERSAVE
5862306a36Sopenharmony_ci	help
5962306a36Sopenharmony_ci	  Use the CPUFreq governor 'powersave' as default. This sets
6062306a36Sopenharmony_ci	  the frequency statically to the lowest frequency supported by
6162306a36Sopenharmony_ci	  the CPU.
6262306a36Sopenharmony_ci
6362306a36Sopenharmony_ciconfig CPU_FREQ_DEFAULT_GOV_USERSPACE
6462306a36Sopenharmony_ci	bool "userspace"
6562306a36Sopenharmony_ci	select CPU_FREQ_GOV_USERSPACE
6662306a36Sopenharmony_ci	help
6762306a36Sopenharmony_ci	  Use the CPUFreq governor 'userspace' as default. This allows
6862306a36Sopenharmony_ci	  you to set the CPU frequency manually or when a userspace 
6962306a36Sopenharmony_ci	  program shall be able to set the CPU dynamically without having
7062306a36Sopenharmony_ci	  to enable the userspace governor manually.
7162306a36Sopenharmony_ci
7262306a36Sopenharmony_ciconfig CPU_FREQ_DEFAULT_GOV_ONDEMAND
7362306a36Sopenharmony_ci	bool "ondemand"
7462306a36Sopenharmony_ci	depends on !(X86_INTEL_PSTATE && SMP)
7562306a36Sopenharmony_ci	select CPU_FREQ_GOV_ONDEMAND
7662306a36Sopenharmony_ci	select CPU_FREQ_GOV_PERFORMANCE
7762306a36Sopenharmony_ci	help
7862306a36Sopenharmony_ci	  Use the CPUFreq governor 'ondemand' as default. This allows
7962306a36Sopenharmony_ci	  you to get a full dynamic frequency capable system by simply
8062306a36Sopenharmony_ci	  loading your cpufreq low-level hardware driver.
8162306a36Sopenharmony_ci	  Be aware that not all cpufreq drivers support the ondemand
8262306a36Sopenharmony_ci	  governor. If unsure have a look at the help section of the
8362306a36Sopenharmony_ci	  driver. Fallback governor will be the performance governor.
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ciconfig CPU_FREQ_DEFAULT_GOV_CONSERVATIVE
8662306a36Sopenharmony_ci	bool "conservative"
8762306a36Sopenharmony_ci	depends on !(X86_INTEL_PSTATE && SMP)
8862306a36Sopenharmony_ci	select CPU_FREQ_GOV_CONSERVATIVE
8962306a36Sopenharmony_ci	select CPU_FREQ_GOV_PERFORMANCE
9062306a36Sopenharmony_ci	help
9162306a36Sopenharmony_ci	  Use the CPUFreq governor 'conservative' as default. This allows
9262306a36Sopenharmony_ci	  you to get a full dynamic frequency capable system by simply
9362306a36Sopenharmony_ci	  loading your cpufreq low-level hardware driver.
9462306a36Sopenharmony_ci	  Be aware that not all cpufreq drivers support the conservative
9562306a36Sopenharmony_ci	  governor. If unsure have a look at the help section of the
9662306a36Sopenharmony_ci	  driver. Fallback governor will be the performance governor.
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ciconfig CPU_FREQ_DEFAULT_GOV_SCHEDUTIL
9962306a36Sopenharmony_ci	bool "schedutil"
10062306a36Sopenharmony_ci	depends on SMP
10162306a36Sopenharmony_ci	select CPU_FREQ_GOV_SCHEDUTIL
10262306a36Sopenharmony_ci	select CPU_FREQ_GOV_PERFORMANCE
10362306a36Sopenharmony_ci	help
10462306a36Sopenharmony_ci	  Use the 'schedutil' CPUFreq governor by default. If unsure,
10562306a36Sopenharmony_ci	  have a look at the help section of that governor. The fallback
10662306a36Sopenharmony_ci	  governor will be 'performance'.
10762306a36Sopenharmony_ci
10862306a36Sopenharmony_ciendchoice
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ciconfig CPU_FREQ_GOV_PERFORMANCE
11162306a36Sopenharmony_ci	tristate "'performance' governor"
11262306a36Sopenharmony_ci	help
11362306a36Sopenharmony_ci	  This cpufreq governor sets the frequency statically to the
11462306a36Sopenharmony_ci	  highest available CPU frequency.
11562306a36Sopenharmony_ci
11662306a36Sopenharmony_ci	  To compile this driver as a module, choose M here: the
11762306a36Sopenharmony_ci	  module will be called cpufreq_performance.
11862306a36Sopenharmony_ci
11962306a36Sopenharmony_ci	  If in doubt, say Y.
12062306a36Sopenharmony_ci
12162306a36Sopenharmony_ciconfig CPU_FREQ_GOV_POWERSAVE
12262306a36Sopenharmony_ci	tristate "'powersave' governor"
12362306a36Sopenharmony_ci	help
12462306a36Sopenharmony_ci	  This cpufreq governor sets the frequency statically to the
12562306a36Sopenharmony_ci	  lowest available CPU frequency.
12662306a36Sopenharmony_ci
12762306a36Sopenharmony_ci	  To compile this driver as a module, choose M here: the
12862306a36Sopenharmony_ci	  module will be called cpufreq_powersave.
12962306a36Sopenharmony_ci
13062306a36Sopenharmony_ci	  If in doubt, say Y.
13162306a36Sopenharmony_ci
13262306a36Sopenharmony_ciconfig CPU_FREQ_GOV_USERSPACE
13362306a36Sopenharmony_ci	tristate "'userspace' governor for userspace frequency scaling"
13462306a36Sopenharmony_ci	help
13562306a36Sopenharmony_ci	  Enable this cpufreq governor when you either want to set the
13662306a36Sopenharmony_ci	  CPU frequency manually or when a userspace program shall
13762306a36Sopenharmony_ci	  be able to set the CPU dynamically, like on LART 
13862306a36Sopenharmony_ci	  <http://www.lartmaker.nl/>.
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ci	  To compile this driver as a module, choose M here: the
14162306a36Sopenharmony_ci	  module will be called cpufreq_userspace.
14262306a36Sopenharmony_ci
14362306a36Sopenharmony_ci	  If in doubt, say Y.
14462306a36Sopenharmony_ci
14562306a36Sopenharmony_ciconfig CPU_FREQ_GOV_ONDEMAND
14662306a36Sopenharmony_ci	tristate "'ondemand' cpufreq policy governor"
14762306a36Sopenharmony_ci	select CPU_FREQ_GOV_COMMON
14862306a36Sopenharmony_ci	help
14962306a36Sopenharmony_ci	  'ondemand' - This driver adds a dynamic cpufreq policy governor.
15062306a36Sopenharmony_ci	  The governor does a periodic polling and 
15162306a36Sopenharmony_ci	  changes frequency based on the CPU utilization.
15262306a36Sopenharmony_ci	  The support for this governor depends on CPU capability to
15362306a36Sopenharmony_ci	  do fast frequency switching (i.e, very low latency frequency
15462306a36Sopenharmony_ci	  transitions). 
15562306a36Sopenharmony_ci
15662306a36Sopenharmony_ci	  To compile this driver as a module, choose M here: the
15762306a36Sopenharmony_ci	  module will be called cpufreq_ondemand.
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci	  For details, take a look at
16062306a36Sopenharmony_ci	  <file:Documentation/admin-guide/pm/cpufreq.rst>.
16162306a36Sopenharmony_ci
16262306a36Sopenharmony_ci	  If in doubt, say N.
16362306a36Sopenharmony_ci
16462306a36Sopenharmony_ciconfig CPU_FREQ_GOV_CONSERVATIVE
16562306a36Sopenharmony_ci	tristate "'conservative' cpufreq governor"
16662306a36Sopenharmony_ci	depends on CPU_FREQ
16762306a36Sopenharmony_ci	select CPU_FREQ_GOV_COMMON
16862306a36Sopenharmony_ci	help
16962306a36Sopenharmony_ci	  'conservative' - this driver is rather similar to the 'ondemand'
17062306a36Sopenharmony_ci	  governor both in its source code and its purpose, the difference is
17162306a36Sopenharmony_ci	  its optimisation for better suitability in a battery powered
17262306a36Sopenharmony_ci	  environment.  The frequency is gracefully increased and decreased
17362306a36Sopenharmony_ci	  rather than jumping to 100% when speed is required.
17462306a36Sopenharmony_ci
17562306a36Sopenharmony_ci	  If you have a desktop machine then you should really be considering
17662306a36Sopenharmony_ci	  the 'ondemand' governor instead, however if you are using a laptop,
17762306a36Sopenharmony_ci	  PDA or even an AMD64 based computer (due to the unacceptable
17862306a36Sopenharmony_ci	  step-by-step latency issues between the minimum and maximum frequency
17962306a36Sopenharmony_ci	  transitions in the CPU) you will probably want to use this governor.
18062306a36Sopenharmony_ci
18162306a36Sopenharmony_ci	  To compile this driver as a module, choose M here: the
18262306a36Sopenharmony_ci	  module will be called cpufreq_conservative.
18362306a36Sopenharmony_ci
18462306a36Sopenharmony_ci	  For details, take a look at
18562306a36Sopenharmony_ci	  <file:Documentation/admin-guide/pm/cpufreq.rst>.
18662306a36Sopenharmony_ci
18762306a36Sopenharmony_ci	  If in doubt, say N.
18862306a36Sopenharmony_ci
18962306a36Sopenharmony_ciconfig CPU_FREQ_GOV_SCHEDUTIL
19062306a36Sopenharmony_ci	bool "'schedutil' cpufreq policy governor"
19162306a36Sopenharmony_ci	depends on CPU_FREQ && SMP
19262306a36Sopenharmony_ci	select CPU_FREQ_GOV_ATTR_SET
19362306a36Sopenharmony_ci	select IRQ_WORK
19462306a36Sopenharmony_ci	help
19562306a36Sopenharmony_ci	  This governor makes decisions based on the utilization data provided
19662306a36Sopenharmony_ci	  by the scheduler.  It sets the CPU frequency to be proportional to
19762306a36Sopenharmony_ci	  the utilization/capacity ratio coming from the scheduler.  If the
19862306a36Sopenharmony_ci	  utilization is frequency-invariant, the new frequency is also
19962306a36Sopenharmony_ci	  proportional to the maximum available frequency.  If that is not the
20062306a36Sopenharmony_ci	  case, it is proportional to the current frequency of the CPU.  The
20162306a36Sopenharmony_ci	  frequency tipping point is at utilization/capacity equal to 80% in
20262306a36Sopenharmony_ci	  both cases.
20362306a36Sopenharmony_ci
20462306a36Sopenharmony_ci	  If in doubt, say N.
20562306a36Sopenharmony_ci
20662306a36Sopenharmony_cicomment "CPU frequency scaling drivers"
20762306a36Sopenharmony_ci
20862306a36Sopenharmony_ciconfig CPUFREQ_DT
20962306a36Sopenharmony_ci	tristate "Generic DT based cpufreq driver"
21062306a36Sopenharmony_ci	depends on HAVE_CLK && OF
21162306a36Sopenharmony_ci	select CPUFREQ_DT_PLATDEV
21262306a36Sopenharmony_ci	select PM_OPP
21362306a36Sopenharmony_ci	help
21462306a36Sopenharmony_ci	  This adds a generic DT based cpufreq driver for frequency management.
21562306a36Sopenharmony_ci	  It supports both uniprocessor (UP) and symmetric multiprocessor (SMP)
21662306a36Sopenharmony_ci	  systems.
21762306a36Sopenharmony_ci
21862306a36Sopenharmony_ci	  If in doubt, say N.
21962306a36Sopenharmony_ci
22062306a36Sopenharmony_ciconfig CPUFREQ_DT_PLATDEV
22162306a36Sopenharmony_ci	tristate "Generic DT based cpufreq platdev driver"
22262306a36Sopenharmony_ci	depends on OF
22362306a36Sopenharmony_ci	help
22462306a36Sopenharmony_ci	  This adds a generic DT based cpufreq platdev driver for frequency
22562306a36Sopenharmony_ci	  management.  This creates a 'cpufreq-dt' platform device, on the
22662306a36Sopenharmony_ci	  supported platforms.
22762306a36Sopenharmony_ci
22862306a36Sopenharmony_ci	  If in doubt, say N.
22962306a36Sopenharmony_ci
23062306a36Sopenharmony_ciif X86
23162306a36Sopenharmony_cisource "drivers/cpufreq/Kconfig.x86"
23262306a36Sopenharmony_ciendif
23362306a36Sopenharmony_ci
23462306a36Sopenharmony_ciif ARM || ARM64
23562306a36Sopenharmony_cisource "drivers/cpufreq/Kconfig.arm"
23662306a36Sopenharmony_ciendif
23762306a36Sopenharmony_ci
23862306a36Sopenharmony_ciif PPC32 || PPC64
23962306a36Sopenharmony_cisource "drivers/cpufreq/Kconfig.powerpc"
24062306a36Sopenharmony_ciendif
24162306a36Sopenharmony_ci
24262306a36Sopenharmony_ciif IA64
24362306a36Sopenharmony_ciconfig IA64_ACPI_CPUFREQ
24462306a36Sopenharmony_ci	tristate "ACPI Processor P-States driver"
24562306a36Sopenharmony_ci	depends on ACPI_PROCESSOR
24662306a36Sopenharmony_ci	help
24762306a36Sopenharmony_ci	This driver adds a CPUFreq driver which utilizes the ACPI
24862306a36Sopenharmony_ci	Processor Performance States.
24962306a36Sopenharmony_ci
25062306a36Sopenharmony_ci	If in doubt, say N.
25162306a36Sopenharmony_ciendif
25262306a36Sopenharmony_ci
25362306a36Sopenharmony_ciif MIPS
25462306a36Sopenharmony_ciconfig BMIPS_CPUFREQ
25562306a36Sopenharmony_ci	tristate "BMIPS CPUfreq Driver"
25662306a36Sopenharmony_ci	help
25762306a36Sopenharmony_ci	  This option adds a CPUfreq driver for BMIPS processors with
25862306a36Sopenharmony_ci	  support for configurable CPU frequency.
25962306a36Sopenharmony_ci
26062306a36Sopenharmony_ci	  For now, BMIPS5 chips are supported (such as the Broadcom 7425).
26162306a36Sopenharmony_ci
26262306a36Sopenharmony_ci	  If in doubt, say N.
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ciconfig LOONGSON2_CPUFREQ
26562306a36Sopenharmony_ci	tristate "Loongson2 CPUFreq Driver"
26662306a36Sopenharmony_ci	depends on LEMOTE_MACH2F
26762306a36Sopenharmony_ci	help
26862306a36Sopenharmony_ci	  This option adds a CPUFreq driver for loongson processors which
26962306a36Sopenharmony_ci	  support software configurable cpu frequency.
27062306a36Sopenharmony_ci
27162306a36Sopenharmony_ci	  Loongson2F and its successors support this feature.
27262306a36Sopenharmony_ci
27362306a36Sopenharmony_ci	  If in doubt, say N.
27462306a36Sopenharmony_ciendif
27562306a36Sopenharmony_ci
27662306a36Sopenharmony_ciif SPARC64
27762306a36Sopenharmony_ciconfig SPARC_US3_CPUFREQ
27862306a36Sopenharmony_ci	tristate "UltraSPARC-III CPU Frequency driver"
27962306a36Sopenharmony_ci	help
28062306a36Sopenharmony_ci	  This adds the CPUFreq driver for UltraSPARC-III processors.
28162306a36Sopenharmony_ci
28262306a36Sopenharmony_ci	  If in doubt, say N.
28362306a36Sopenharmony_ci
28462306a36Sopenharmony_ciconfig SPARC_US2E_CPUFREQ
28562306a36Sopenharmony_ci	tristate "UltraSPARC-IIe CPU Frequency driver"
28662306a36Sopenharmony_ci	help
28762306a36Sopenharmony_ci	  This adds the CPUFreq driver for UltraSPARC-IIe processors.
28862306a36Sopenharmony_ci
28962306a36Sopenharmony_ci	  If in doubt, say N.
29062306a36Sopenharmony_ciendif
29162306a36Sopenharmony_ci
29262306a36Sopenharmony_ciif SUPERH
29362306a36Sopenharmony_ciconfig SH_CPU_FREQ
29462306a36Sopenharmony_ci	tristate "SuperH CPU Frequency driver"
29562306a36Sopenharmony_ci	help
29662306a36Sopenharmony_ci	  This adds the cpufreq driver for SuperH. Any CPU that supports
29762306a36Sopenharmony_ci	  clock rate rounding through the clock framework can use this
29862306a36Sopenharmony_ci	  driver. While it will make the kernel slightly larger, this is
29962306a36Sopenharmony_ci	  harmless for CPUs that don't support rate rounding. The driver
30062306a36Sopenharmony_ci	  will also generate a notice in the boot log before disabling
30162306a36Sopenharmony_ci	  itself if the CPU in question is not capable of rate rounding.
30262306a36Sopenharmony_ci
30362306a36Sopenharmony_ci	  If unsure, say N.
30462306a36Sopenharmony_ciendif
30562306a36Sopenharmony_ci
30662306a36Sopenharmony_ciconfig QORIQ_CPUFREQ
30762306a36Sopenharmony_ci	tristate "CPU frequency scaling driver for Freescale QorIQ SoCs"
30862306a36Sopenharmony_ci	depends on OF && COMMON_CLK
30962306a36Sopenharmony_ci	depends on PPC_E500MC || SOC_LS1021A || ARCH_LAYERSCAPE || COMPILE_TEST
31062306a36Sopenharmony_ci	select CLK_QORIQ
31162306a36Sopenharmony_ci	help
31262306a36Sopenharmony_ci	  This adds the CPUFreq driver support for Freescale QorIQ SoCs
31362306a36Sopenharmony_ci	  which are capable of changing the CPU's frequency dynamically.
31462306a36Sopenharmony_ci
31562306a36Sopenharmony_ciendif
31662306a36Sopenharmony_ciendmenu
317