Skip to content

Commit b2e1f13

Browse files
GuEe-GUIRbb666
authored andcommitted
[bsp][rockchip] support DVFS for Rockchip
The I2C will timeout in fan53555, fixed it. Signed-off-by: GuEe-GUI <2991707448@qq.com>
1 parent 741d82c commit b2e1f13

20 files changed

Lines changed: 3469 additions & 147 deletions

File tree

bsp/rockchip/dm/Kconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
SOC_DM_ADC_DIR = $(SOC_DM_DIR)/adc
22
SOC_DM_CAN_DIR = $(SOC_DM_DIR)/can
33
SOC_DM_CLK_DIR = $(SOC_DM_DIR)/clk
4+
SOC_DM_DVFS_EVENT_DIR = $(SOC_DM_DIR)/dvfs/event
5+
SOC_DM_DVFS_CPUFREQ_DIR = $(SOC_DM_DIR)/dvfs/cpufreq
6+
SOC_DM_DVFS_DEVFREQ_DIR = $(SOC_DM_DIR)/dvfs/devfreq
47
SOC_DM_HWCRYPTO_DIR = $(SOC_DM_DIR)/hwcrypto
58
SOC_DM_HWSPINLOCK_DIR = $(SOC_DM_DIR)/hwspinlock
69
SOC_DM_CLOCK_TIME_DIR = $(SOC_DM_DIR)/hwtimer

bsp/rockchip/dm/dvfs/SConscript

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from building import *
2+
3+
group = []
4+
5+
if not GetDepend(['RT_USING_DVFS']):
6+
Return('group')
7+
8+
cwd = GetCurrentDir()
9+
list = os.listdir(cwd)
10+
CPPPATH = [cwd + '/../include']
11+
12+
src = []
13+
14+
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
15+
16+
for d in list:
17+
path = os.path.join(cwd, d)
18+
if os.path.isfile(os.path.join(path, 'SConscript')):
19+
group = group + SConscript(os.path.join(d, 'SConscript'))
20+
21+
Return('group')
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
config RT_DVFS_ROCKCHIP_CPUFREQ
2+
bool "Rockchip CPUfreq driver"
3+
depends on RT_USING_DVFS
4+
depends on RT_USING_OFW
5+
default y
6+
help
7+
Rockchip CPUfreq with OPP table parsing and optional nvmem
8+
bin/leakage voltage selection. Uses SCMI clock and DT cpu-supply
9+
regulator (e.g. FAN53555). Thermal throttling uses
10+
thermal-cool-dvfs on the cpufreq device.
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
from building import *
2+
3+
group = []
4+
src = []
5+
cwd = GetCurrentDir()
6+
CPPPATH = [cwd + '/../../include']
7+
8+
if GetDepend(['RT_DVFS_ROCKCHIP_CPUFREQ']):
9+
src += ['dvfs-rockchip-cpufreq.c']
10+
11+
group = DefineGroup('DeviceDrivers', src, depend = [''], CPPPATH = CPPPATH)
12+
13+
Return('group')

0 commit comments

Comments
 (0)