This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: Using fixed CPU frequency in AM62A7 processor

Other Parts Discussed in Thread: AM62A7

SDK: 09.01.00 

EVM: AM62A SK

Hi, 

I want to use AM62A7's CPU at max frequency. Our processor can support the 1250MHz frequency. So, I did below changes in the device tree to use the 1250MHz CPU frequency.

diff --git a/arch/arm64/boot/dts/ti/k3-am62a7.dtsi b/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
index 881c86e1df37..1652a2679ed3 100644
--- a/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-am62a7.dtsi
@@ -107,33 +107,23 @@ a53_opp_table: opp-table {
                syscon = <&wkup_conf>;

                opp-200000000 {
-                       opp-hz = /bits/ 64 <200000000>;
-                       opp-supported-hw = <0x01 0x0007>;
-                       clock-latency-ns = <6000000>;
+                       status = "disabled";
                };

                opp-400000000 {
-                       opp-hz = /bits/ 64 <400000000>;
-                       opp-supported-hw = <0x01 0x0007>;
-                       clock-latency-ns = <6000000>;
+                       status = "disabled";
                };

                opp-600000000 {
-                       opp-hz = /bits/ 64 <600000000>;
-                       opp-supported-hw = <0x01 0x0007>;
-                       clock-latency-ns = <6000000>;
+                       status = "disabled";
                };

                opp-800000000 {
-                       opp-hz = /bits/ 64 <800000000>;
-                       opp-supported-hw = <0x01 0x0007>;
-                       clock-latency-ns = <6000000>;
+                       status = "disabled";
                };

                opp-1000000000 {
-                       opp-hz = /bits/ 64 <1000000000>;
-                       opp-supported-hw = <0x01 0x0006>;
-                       clock-latency-ns = <6000000>;
+                       status = "disabled";
                };

                opp-1250000000 {

After doing this change, I am verifying the frequency using the "k3conf dump clock". But in k3conf command CPU core frequency is shown 1200MHz which is not correct.

So, are the device tree changes are correct? Or do I need to do any other changes to use fixed maximum frequency of the CPU?

Also, Please suggest if there is any other way to check the CPU frequency.

We are using the RT Linux.

Regards,

Jay

  • Hi Jay,

    I don't think RT Linux has access to CPUFreq to check the A53 core frequency, K3Conf is the best options to track the clocking.

    I'll try to reproduce this on my side, so please allow some time for an update.

    Have you checked if this occurs on a new RT Linux SDK version?

    Thanks,

    Anshu

  • Correct RT just runs at one static point. So set the clock speed with k3conf, or in the device tree you need to set is not the dynamic operating points. Probably quickest is to just search for 1200000000 in the dtsi files (I don't have access to SDK repos.). I think your modification above just tells the dynamic cpufreq is not allowed to use clock speeds 200,400,600,800,1000MHz.

      Pekka

  • Hi Anshu,

    I don't think RT Linux has access to CPUFreq to check the A53 core frequency, K3Conf is the best options to track the clocking.

    Yes, I have used k3conf. After doing the change of frequency in DTS file and enabling the kernel configuration CONFIG_CPU_FREQ, CONFIG_CPUFREQ_DT, CONFIG_CPUFREQ_DT_PLATDEV, I am able to change the CPU frequency from 1200MHz to 1250MHz. I have confirm same using the k3conf command. 

    Now, my question is that should I scale frequency from the Device tree or should i let the device run at 1200MHz(which is fix frequency for RT Linux)? I want to make sure that there won't be any problem in future if i use 1250MHz frequency. Please provide your suggestion in this regard.

    Regards,

    Jay

  • The RT Linux does not rely on any specific clock speed, so 1.25GHz is fine. RT performs the most "real-time" at a fixed clock speed, clock speed dynamic transitions will introduce non-determinism. Whether the fixed speed is 1.2GHz or 1.25GHz or 1.4GHz does not matter. Note to follow datasheet voltage requirements for the clock speed you are using. Temporarily pretty much all clock speeds will work at 0.75V and 0.85V but the higher speeds require higher CPU voltage as documented in each SoC datasheet.

      Pekka

  • Hi Pekka,

    This answered my question. Thank you for your reply. 

    Regards,

    Jay