cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to change the CPU frequency on a STM32MP157C-DK2

KSchu.4
Associate

Hi all,

I'm currently trying to change the CPU frequency of my STM32MP157C-DK2. - Without success...

Here is what I've done.

Change 'stm32mp15xa.dtsi' for Kernel and TF-A

diff --git a/arch/arm/boot/dts/stm32mp15xa.dtsi b/arch/arm/boot/dts/stm32mp15xa.dtsi
index 5ed7e594f..3389a6094 100644
--- a/arch/arm/boot/dts/stm32mp15xa.dtsi
+++ b/arch/arm/boot/dts/stm32mp15xa.dtsi
@@ -8,6 +8,11 @@
                opp-650000000 {
                        opp-hz = /bits/ 64 <650000000>;
                        opp-microvolt = <1200000>;
-                       opp-supported-hw = <0x1>;
+                       opp-supported-hw = <0x2>;
                };
+               opp-400000000 {
+                       opp-hz = /bits/ 64 <400000000>;
+                       opp-microvolt = <1200000>;
+                       opp-supported-hw = <0x2>;
+               }2
 };

Then I deployed the *.dtb and the TF-A binary as described in here.

After that I can see, that the new frequency is known, but I also get a first error:

root@stm32mp1-disco:/sys/devices/system/cpu/cpufreq/policy0# cat cpuinfo_cur_freq 
[ 1647.252207] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 650000000 (-34)
650000
root@stm32mp1-disco:/sys/devices/system/cpu/cpufreq/policy0# cat cpuinfo_min_freq 
200000

Anyway, I successfully loaded the cpufreq_userspace module and selected the according governor. But still I'm not able to change the frequency:

root@stm32mp1-disco:/sys/devices/system/cpu/cpufreq/policy0# cat scaling_governor 
userspace
root@stm32mp1-disco:/sys/devices/system/cpu/cpufreq/policy0# echo 200000 > scaling_setspeed 
root@stm32mp1-disco:/sys/devices/system/cpu/cpufreq/policy0# cat cpuinfo_cur_freq 
[ 1772.470125] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 650000000 (-34)
650000

Can anybody tell me which step I am missing? Is my change on the device tree wrong?

Thanks a lot

Klaas

0 REPLIES 0