[dm][dvfs] support Dynamic Voltage and Frequency Scaling (DVFS)

1. Support DVFS and finsh cmd, there are 6 governors:
   - conservative
   - freedom
   - performance
   - powersave
   - schedutil
2. Support DVFS for SCMI.
3. Port the Cooling device for DVFS.
4. Port the PM with DVFS.

Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
GuEe-GUI
2026-06-23 08:02:09 +08:00
committed by Rbb666
parent 1870d83956
commit e280f213bf
33 changed files with 5094 additions and 11 deletions
+38
View File
@@ -0,0 +1,38 @@
from building import *
group = []
objs = []
if not GetDepend(['RT_USING_DVFS']):
Return('group')
cwd = GetCurrentDir()
list = os.listdir(cwd)
CPPPATH = [cwd + '/../include']
src = ['dvfs.c', 'dvfs_cpu.c', 'dvfs_governor.c', 'dvfs_idle.c', 'dvfs_opp.c']
if GetDepend(['RT_USING_CONSOLE', 'RT_USING_MSH']):
src += ['dvfs_cmd.c']
if GetDepend(['RT_USING_DVFS_EVENT']):
src += ['dvfs_event.c']
if GetDepend(['RT_USING_PM']):
src += ['dvfs_pm.c']
if GetDepend(['RT_USING_OFW']):
src += ['dvfs-ofw.c']
if GetDepend(['RT_DVFS_SCMI_CPUFREQ']):
src += ['dvfs-scmi-cpufreq.c']
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
for d in list:
path = os.path.join(cwd, d)
if os.path.isfile(os.path.join(path, 'SConscript')):
objs = objs + SConscript(os.path.join(d, 'SConscript'))
objs = objs + group
Return('group')