2024-09-09 09:18 AM
Hi,
I have a custom board based on a STM32MP153 and I'm trying to reduce CPU (MPU) max frequency... Now it's running at 650Mhz, which is the default configuration. looking at the Wiki : https://wiki.st.com/stm32mpu/wiki/How_to_change_the_CPU_frequency#CPU_frequency_configuration_2
in the configuration side, it seems to me that changing PLL1 clock is enough (thanks to TF-A algorithm).
But nothing is changing... Running the command
cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq
I still see 650Mhz and u-boot prints always 650Mhz:
U-Boot 2021.10-stm32mp-r1-dirty (Oct 04 2021 - 15:09:26 +0000)
CPU: STM32MP153CAC Rev.Z
Model: STMicroelectronics custom STM32CubeMX board - openstlinux-5.15-yocto-kirkstone-mp1-v22.06.15
Board: stm32mp1 in trusted mode (st,stm32mp157c-es-dcc-proto-b-mx)
DRAM: 1 GiB
Clocks:
- MPU : 650 MHz
- MCU : 165 MHz
- AXI : 201.333 MHz
- PER : 0 MHz
- DDR : 302 MHz
The other peripherals (e.g. AXI or DDR) seems to change under PLLs modifications (TF-A config).
NOTE: i'm trying to reach 350Mhz, my application doesn't require a lot of computational power and I'd like to reduce also temperatures...
Thanks a lot!
Solved! Go to Solution.
2024-09-24 01:06 AM - edited 2024-09-25 05:24 AM
I think I found a workaround:
I add this entry in all custom .dts files (device tree exported from CubeMX for my custom board):
//try opp table custom
&cpu0_opp_table {
opp-650000000 {
opp-hz = /bits/ 64 <350000000>; //test 350 Mhz
opp-microvolt = <1200000>;
opp-supported-hw = <0x1>;
};
};
Of course, it is ugly but, it seems to work, more or less. I don't see any difference in TF-A and U-Boot debug prints (MCU freq still 650Mhz), but in the kernel, I tested that performance is decreased (less CPU occupation % at runtime and 5s slower boot), and the command
cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq
shows 350000, which is correct.
2024-09-24 01:06 AM - edited 2024-09-25 05:24 AM
I think I found a workaround:
I add this entry in all custom .dts files (device tree exported from CubeMX for my custom board):
//try opp table custom
&cpu0_opp_table {
opp-650000000 {
opp-hz = /bits/ 64 <350000000>; //test 350 Mhz
opp-microvolt = <1200000>;
opp-supported-hw = <0x1>;
};
};
Of course, it is ugly but, it seems to work, more or less. I don't see any difference in TF-A and U-Boot debug prints (MCU freq still 650Mhz), but in the kernel, I tested that performance is decreased (less CPU occupation % at runtime and 5s slower boot), and the command
cat /sys/devices/system/cpu/cpufreq/policy0/cpuinfo_cur_freq
shows 350000, which is correct.