From 94686e581af08a7cfc172169ad23bfc7d1150495 Mon Sep 17 00:00:00 2001 From: Hope Wang Date: Tue, 29 Apr 2025 21:08:25 +0800 Subject: [PATCH] mb/google/skywalker: Add DVFS support in romstage Add the initialization in romstage. BUG=b:410763782 BRANCH=none TEST=Check the CPU frequencies are changing and not fixed values by using the following commands in kernel: 1) set policy*/scaling_governor as "ondemand" "echo ondemand > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor" "echo ondemand > /sys/devices/system/cpu/cpufreq/policy6/scaling_governor" 2) Check the CPU frequencies by repeating the command "grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_cur_freq" The result is like /sys/devices/system/cpu/cpufreq/policy0/scaling_cur_freq:650000 /sys/devices/system/cpu/cpufreq/policy6/scaling_cur_freq:2350000 Signed-off-by: Hope Wang Change-Id: Ie64ebd1b78096c38c4398572cbed3e2e9ac6b8b6 Reviewed-on: https://review.coreboot.org/c/coreboot/+/87917 Reviewed-by: Yu-Ping Wu Tested-by: build bot (Jenkins) Reviewed-by: Yidi Lin --- src/mainboard/google/skywalker/romstage.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mainboard/google/skywalker/romstage.c b/src/mainboard/google/skywalker/romstage.c index 3b6de958d1..f8643061bf 100644 --- a/src/mainboard/google/skywalker/romstage.c +++ b/src/mainboard/google/skywalker/romstage.c @@ -2,6 +2,7 @@ #include #include +#include #include #include #include @@ -26,5 +27,6 @@ void platform_romstage_main(void) mt6359p_init(); raise_little_cpu_freq(); rtc_boot(); + dvfs_init(); mtk_dram_init(); }