2024-08-12 11:02 PM
Does anyone know how to view and modify the current CPU frequency of STM32MP157D? I also cannot use the following command:
root@stm32mp1:/sys# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : STM32 (Device Tree Support)
Revision : 0000
Serial : 003C00403132510831323338
root@stm32mp1:/sys# cd /
root@stm32mp1:/# cat /proc/cpuinfo
processor : 0
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
processor : 1
model name : ARMv7 Processor rev 5 (v7l)
BogoMIPS : 48.00
Features : half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt vfpd32 lpae evtstrm
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5
Hardware : STM32 (Device Tree Support)
Revision : 0000
Serial : 003C00403132510831323338
There is only BogoMIPS: 48 above, I want to know what to do with the current clock frequency of the CPU?
2024-08-15 01:50 PM
Hello @zengyixiang ,
You can check the minimum, maximum and current CPU frequency in this folder :
Board $> cd /sys/devices/system/cpu/cpufreq/policy0/
You can check following parameters :
In the same folder, you have the scaling_governor that will manage the frequency changes. You can look online the documentation, but I think you can change it from schedutil to performance for example.
Kind regards,
Erwan.
2024-08-16 02:22 AM
Hello, I have seen it, but it seems that my CPU frequency is limited to 800MHz, with both the maximum and minimum being 800MHz. I would like to lower the frequency. How can I modify the minimum CPU frequency.
# pwd
/sys/devices/system/cpu/cpufreq/policy0
# cat cpuinfo_max_freq
800000
# cat cpuinfo_min_freq
800000
# cat cpuinfo_cur_freq
800000
#
2024-08-16 02:42 AM
Hello @zengyixiang ,
Is it a personal PCB design ?
The different CPU frequency configuration are described in OP-TEE and Linux device trees, in OPP tables nodes (operating points). On the last SW revision (OpenSTLinux 5.1) it is in stm32mp151.dtsi .
You can see the following :
cpu0_opp_table: cpu0-opp-table {
compatible = "operating-points-v2";
opp-shared;
opp-400000000 {
opp-hz = /bits/ 64 <400000000>;
opp-microvolt = <1200000>;
opp-supported-hw = <0x2>;
opp-suspend;
};
opp-650000000 {
opp-hz = /bits/ 64 <650000000>;
opp-microvolt = <1200000>;
opp-supported-hw = <0x1>;
st,opp-default;
};
opp-800000000 {
opp-hz = /bits/ 64 <800000000>;
opp-microvolt = <1350000>;
opp-supported-hw = <0x2>;
st,opp-default;
};
};
It seems strange that your minimum is 800 MHz as for your revision, the 2 default mode we provide is 650 / 800. Can you please check that you have these definitions too ?
You should also be able to see these nodes in Linux kernel device trees. Please check it too.
Kind regards,
Erwan.
2024-08-18 06:36 PM
是的,我自己设计了 PCB,我的电源管理使用“EA3059QDR”芯片而不是“STPMIC1APQR”。我将VDDCORE固定在1.35V:
vddcore: regulator-vddcore {
compatible = "regulator-fixed";
regulator-name = "vddcore";
regulator-min-microvolt = <1350000>;
regulator-max-microvolt = <1350000>;
regulator-always-on;
regulator-boot-on;
};
&cpu0_opp_table {
opp-800000000 {
opp-hz = /bits/ 64 <800000000>;
opp-microvolt = <1350000>;
opp-supported-hw = <0x2>;
};
opp-400000000 {
opp-hz = /bits/ 64 <400000000>;
opp-microvolt = <1200000>;
opp-supported-hw = <0x2>;
opp-suspend;
};
};