162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only 262306a36Sopenharmony_cimenuconfig PM_DEVFREQ 362306a36Sopenharmony_ci bool "Generic Dynamic Voltage and Frequency Scaling (DVFS) support" 462306a36Sopenharmony_ci select PM_OPP 562306a36Sopenharmony_ci help 662306a36Sopenharmony_ci A device may have a list of frequencies and voltages available. 762306a36Sopenharmony_ci devfreq, a generic DVFS framework can be registered for a device 862306a36Sopenharmony_ci in order to let the governor provided to devfreq choose an 962306a36Sopenharmony_ci operating frequency based on the device driver's policy. 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci Each device may have its own governor and policy. Devfreq can 1262306a36Sopenharmony_ci reevaluate the device state periodically and/or based on the 1362306a36Sopenharmony_ci notification to "nb", a notifier block, of devfreq. 1462306a36Sopenharmony_ci 1562306a36Sopenharmony_ci Like some CPUs with CPUfreq, a device may have multiple clocks. 1662306a36Sopenharmony_ci However, because the clock frequencies of a single device are 1762306a36Sopenharmony_ci determined by the single device's state, an instance of devfreq 1862306a36Sopenharmony_ci is attached to a single device and returns a "representative" 1962306a36Sopenharmony_ci clock frequency of the device, which is also attached 2062306a36Sopenharmony_ci to a device by 1-to-1. The device registering devfreq takes the 2162306a36Sopenharmony_ci responsibility to "interpret" the representative frequency and 2262306a36Sopenharmony_ci to set its every clock accordingly with the "target" callback 2362306a36Sopenharmony_ci given to devfreq. 2462306a36Sopenharmony_ci 2562306a36Sopenharmony_ci When OPP is used with the devfreq device, it is recommended to 2662306a36Sopenharmony_ci register devfreq's nb to the OPP's notifier head. If OPP is 2762306a36Sopenharmony_ci used with the devfreq device, you may use OPP helper 2862306a36Sopenharmony_ci functions defined in devfreq.h. 2962306a36Sopenharmony_ci 3062306a36Sopenharmony_ciif PM_DEVFREQ 3162306a36Sopenharmony_ci 3262306a36Sopenharmony_cicomment "DEVFREQ Governors" 3362306a36Sopenharmony_ci 3462306a36Sopenharmony_ciconfig DEVFREQ_GOV_SIMPLE_ONDEMAND 3562306a36Sopenharmony_ci tristate "Simple Ondemand" 3662306a36Sopenharmony_ci help 3762306a36Sopenharmony_ci Chooses frequency based on the recent load on the device. Works 3862306a36Sopenharmony_ci similar as ONDEMAND governor of CPUFREQ does. A device with 3962306a36Sopenharmony_ci Simple-Ondemand should be able to provide busy/total counter 4062306a36Sopenharmony_ci values that imply the usage rate. A device may provide tuned 4162306a36Sopenharmony_ci values to the governor with data field at devfreq_add_device(). 4262306a36Sopenharmony_ci 4362306a36Sopenharmony_ciconfig DEVFREQ_GOV_PERFORMANCE 4462306a36Sopenharmony_ci tristate "Performance" 4562306a36Sopenharmony_ci help 4662306a36Sopenharmony_ci Sets the frequency at the maximum available frequency. 4762306a36Sopenharmony_ci This governor always returns UINT_MAX as frequency so that 4862306a36Sopenharmony_ci the DEVFREQ framework returns the highest frequency available 4962306a36Sopenharmony_ci at any time. 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ciconfig DEVFREQ_GOV_POWERSAVE 5262306a36Sopenharmony_ci tristate "Powersave" 5362306a36Sopenharmony_ci help 5462306a36Sopenharmony_ci Sets the frequency at the minimum available frequency. 5562306a36Sopenharmony_ci This governor always returns 0 as frequency so that 5662306a36Sopenharmony_ci the DEVFREQ framework returns the lowest frequency available 5762306a36Sopenharmony_ci at any time. 5862306a36Sopenharmony_ci 5962306a36Sopenharmony_ciconfig DEVFREQ_GOV_USERSPACE 6062306a36Sopenharmony_ci tristate "Userspace" 6162306a36Sopenharmony_ci help 6262306a36Sopenharmony_ci Sets the frequency at the user specified one. 6362306a36Sopenharmony_ci This governor returns the user configured frequency if there 6462306a36Sopenharmony_ci has been an input to /sys/devices/.../userspace/set_freq. 6562306a36Sopenharmony_ci Otherwise, the governor does not change the frequency 6662306a36Sopenharmony_ci given at the initialization. 6762306a36Sopenharmony_ci 6862306a36Sopenharmony_ciconfig DEVFREQ_GOV_PASSIVE 6962306a36Sopenharmony_ci tristate "Passive" 7062306a36Sopenharmony_ci help 7162306a36Sopenharmony_ci Sets the frequency based on the frequency of its parent devfreq 7262306a36Sopenharmony_ci device. This governor does not change the frequency by itself 7362306a36Sopenharmony_ci through sysfs entries. The passive governor recommends that 7462306a36Sopenharmony_ci devfreq device uses the OPP table to get the frequency/voltage. 7562306a36Sopenharmony_ci 7662306a36Sopenharmony_cicomment "DEVFREQ Drivers" 7762306a36Sopenharmony_ci 7862306a36Sopenharmony_ciconfig ARM_EXYNOS_BUS_DEVFREQ 7962306a36Sopenharmony_ci tristate "ARM Exynos Generic Memory Bus DEVFREQ Driver" 8062306a36Sopenharmony_ci depends on ARCH_EXYNOS || COMPILE_TEST 8162306a36Sopenharmony_ci select DEVFREQ_GOV_SIMPLE_ONDEMAND 8262306a36Sopenharmony_ci select DEVFREQ_GOV_PASSIVE 8362306a36Sopenharmony_ci select DEVFREQ_EVENT_EXYNOS_PPMU 8462306a36Sopenharmony_ci select PM_DEVFREQ_EVENT 8562306a36Sopenharmony_ci help 8662306a36Sopenharmony_ci This adds the common DEVFREQ driver for Exynos Memory bus. Exynos 8762306a36Sopenharmony_ci Memory bus has one more group of memory bus (e.g, MIF and INT block). 8862306a36Sopenharmony_ci Each memory bus group could contain many memoby bus block. It reads 8962306a36Sopenharmony_ci PPMU counters of memory controllers by using DEVFREQ-event device 9062306a36Sopenharmony_ci and adjusts the operating frequencies and voltages with OPP support. 9162306a36Sopenharmony_ci This does not yet operate with optimal voltages. 9262306a36Sopenharmony_ci 9362306a36Sopenharmony_ciconfig ARM_IMX_BUS_DEVFREQ 9462306a36Sopenharmony_ci tristate "i.MX Generic Bus DEVFREQ Driver" 9562306a36Sopenharmony_ci depends on ARCH_MXC || COMPILE_TEST 9662306a36Sopenharmony_ci select DEVFREQ_GOV_USERSPACE 9762306a36Sopenharmony_ci help 9862306a36Sopenharmony_ci This adds the generic DEVFREQ driver for i.MX interconnects. It 9962306a36Sopenharmony_ci allows adjusting NIC/NOC frequency. 10062306a36Sopenharmony_ci 10162306a36Sopenharmony_ciconfig ARM_IMX8M_DDRC_DEVFREQ 10262306a36Sopenharmony_ci tristate "i.MX8M DDRC DEVFREQ Driver" 10362306a36Sopenharmony_ci depends on (ARCH_MXC && HAVE_ARM_SMCCC) || \ 10462306a36Sopenharmony_ci (COMPILE_TEST && HAVE_ARM_SMCCC) 10562306a36Sopenharmony_ci select DEVFREQ_GOV_USERSPACE 10662306a36Sopenharmony_ci help 10762306a36Sopenharmony_ci This adds the DEVFREQ driver for the i.MX8M DDR Controller. It allows 10862306a36Sopenharmony_ci adjusting DRAM frequency. 10962306a36Sopenharmony_ci 11062306a36Sopenharmony_ciconfig ARM_TEGRA_DEVFREQ 11162306a36Sopenharmony_ci tristate "NVIDIA Tegra30/114/124/210 DEVFREQ Driver" 11262306a36Sopenharmony_ci depends on ARCH_TEGRA_3x_SOC || ARCH_TEGRA_114_SOC || \ 11362306a36Sopenharmony_ci ARCH_TEGRA_132_SOC || ARCH_TEGRA_124_SOC || \ 11462306a36Sopenharmony_ci ARCH_TEGRA_210_SOC || \ 11562306a36Sopenharmony_ci COMPILE_TEST 11662306a36Sopenharmony_ci depends on COMMON_CLK 11762306a36Sopenharmony_ci help 11862306a36Sopenharmony_ci This adds the DEVFREQ driver for the Tegra family of SoCs. 11962306a36Sopenharmony_ci It reads ACTMON counters of memory controllers and adjusts the 12062306a36Sopenharmony_ci operating frequencies and voltages with OPP support. 12162306a36Sopenharmony_ci 12262306a36Sopenharmony_ciconfig ARM_MEDIATEK_CCI_DEVFREQ 12362306a36Sopenharmony_ci tristate "MEDIATEK CCI DEVFREQ Driver" 12462306a36Sopenharmony_ci depends on ARM_MEDIATEK_CPUFREQ || COMPILE_TEST 12562306a36Sopenharmony_ci select DEVFREQ_GOV_PASSIVE 12662306a36Sopenharmony_ci help 12762306a36Sopenharmony_ci This adds a devfreq driver for MediaTek Cache Coherent Interconnect 12862306a36Sopenharmony_ci which is shared the same regulators with the cpu cluster. It can track 12962306a36Sopenharmony_ci buck voltages and update a proper CCI frequency. Use the notification 13062306a36Sopenharmony_ci to get the regulator status. 13162306a36Sopenharmony_ci 13262306a36Sopenharmony_ciconfig ARM_RK3399_DMC_DEVFREQ 13362306a36Sopenharmony_ci tristate "ARM RK3399 DMC DEVFREQ Driver" 13462306a36Sopenharmony_ci depends on (ARCH_ROCKCHIP && HAVE_ARM_SMCCC) || \ 13562306a36Sopenharmony_ci (COMPILE_TEST && HAVE_ARM_SMCCC) 13662306a36Sopenharmony_ci select DEVFREQ_EVENT_ROCKCHIP_DFI 13762306a36Sopenharmony_ci select DEVFREQ_GOV_SIMPLE_ONDEMAND 13862306a36Sopenharmony_ci select PM_DEVFREQ_EVENT 13962306a36Sopenharmony_ci help 14062306a36Sopenharmony_ci This adds the DEVFREQ driver for the RK3399 DMC(Dynamic Memory Controller). 14162306a36Sopenharmony_ci It sets the frequency for the memory controller and reads the usage counts 14262306a36Sopenharmony_ci from hardware. 14362306a36Sopenharmony_ci 14462306a36Sopenharmony_ciconfig ARM_SUN8I_A33_MBUS_DEVFREQ 14562306a36Sopenharmony_ci tristate "sun8i/sun50i MBUS DEVFREQ Driver" 14662306a36Sopenharmony_ci depends on ARCH_SUNXI || COMPILE_TEST 14762306a36Sopenharmony_ci depends on COMMON_CLK 14862306a36Sopenharmony_ci select DEVFREQ_GOV_SIMPLE_ONDEMAND 14962306a36Sopenharmony_ci help 15062306a36Sopenharmony_ci This adds the DEVFREQ driver for the MBUS controller in some 15162306a36Sopenharmony_ci Allwinner sun8i (A33 through H3) and sun50i (A64 and H5) SoCs. 15262306a36Sopenharmony_ci 15362306a36Sopenharmony_cisource "drivers/devfreq/event/Kconfig" 15462306a36Sopenharmony_ci 15562306a36Sopenharmony_ciendif # PM_DEVFREQ 156