imx93 how to get the frequency value of CPU

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx93 how to get the frequency value of CPU

396 Views
ranYang
Contributor III

Hi:

    My system is “Linux bopixel 6.1.22 #154 SMP PREEMPT Mon Aug 25 16:07:47 CST 2025 aarch64 GNU/Linux”,there is a requirement to read the frequency value of the actual CPU quota. Is it possible to obtain it through the API interface using Linux C language?

Labels (1)
0 Kudos
Reply
3 Replies

381 Views
pengyong_zhang
NXP Employee
NXP Employee

Hi @ranYang 

you can use the below command check the CPU frequency:

at /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

B.R

0 Kudos
Reply

190 Views
ranYang
Contributor III

 

No node information for this device has been createdm, Can it be obtained through CCM register?

0 Kudos
Reply

138 Views
meketok
Contributor I

@ranYang You ask if @pengyong_zhang is useful? @pengyong_zhang  doesn't even know if its own BSP supports DVFS or not. 

What's most disappointing is that @pengyong_zhang  hasn't even tried the commands given.

@ranYang The iMX93 BSP only supports mode switching and does not support DVFS, so there is no /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor node.

You can use the cat /sys/kernel/debug/clk/clk_summary to check the arm clock. 

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2159665%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Eimx93%20how%20to%20get%20the%20frequency%20value%20of%20CPU%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2159665%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%3A%3C%2FP%3E%3CP%3E%26nbsp%3B%20%26nbsp%3B%26nbsp%3BMy%20system%20is%20%E2%80%9CLinux%20bopixel%206.1.22%20%23154%20SMP%20PREEMPT%20Mon%20Aug%2025%2016%3A07%3A47%20CST%202025%20aarch64%20GNU%2FLinux%E2%80%9D%EF%BC%8Cthere%20is%20a%20requirement%20to%20read%20the%20frequency%20value%20of%20the%20actual%20CPU%20quota.%20Is%20it%20possible%20to%20obtain%20it%20through%20the%20API%20interface%20using%20Linux%20C%20language%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2159665%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CLINGO-LABEL%3ELinux%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2200791%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20imx93%20how%20to%20get%20the%20frequency%20value%20of%20CPU%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2200791%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F250700%22%20target%3D%22_blank%22%3E%40ranYang%3C%2FA%3E%26nbsp%3BYou%20ask%20if%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F202673%22%20target%3D%22_blank%22%3E%40pengyong_zhang%3C%2FA%3E%26nbsp%3Bis%20useful%3F%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F202673%22%20target%3D%22_blank%22%3E%40pengyong_zhang%3C%2FA%3E%26nbsp%3B%20doesn't%20even%20know%20if%20its%20own%20BSP%20supports%20DVFS%20or%20not.%26nbsp%3B%3C%2FP%3E%3CP%3EWhat's%20most%20disappointing%20is%20that%20%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F202673%22%20target%3D%22_blank%22%3E%40pengyong_zhang%3C%2FA%3E%26nbsp%3B%20hasn't%20even%20tried%20the%20commands%20given.%3C%2FP%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F250700%22%20target%3D%22_blank%22%3E%40ranYang%3C%2FA%3E%26nbsp%3BThe%20iMX93%20BSP%20only%20supports%20mode%20switching%20and%20does%20not%20support%20DVFS%2C%20so%20there%20is%20no%20%2Fsys%2Fdevices%2Fsystem%2Fcpu%2Fcpu0%2Fcpufreq%2Fscaling_governor%20node.%3C%2FP%3E%3CP%3EYou%20can%20use%20the%26nbsp%3Bcat%20%2Fsys%2Fkernel%2Fdebug%2Fclk%2Fclk_summary%20to%20check%20the%20arm%20clock.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2197887%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20imx93%20how%20to%20get%20the%20frequency%20value%20of%20CPU%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2197887%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CBR%20%2F%3E%3CP%3ENo%20node%20information%20for%20this%20device%20has%20been%20createdm%2C%20Can%20it%20be%20obtained%20through%20CCM%20register%EF%BC%9F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2159716%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%20translate%3D%22no%22%3ERe%3A%20imx93%20how%20to%20get%20the%20frequency%20value%20of%20CPU%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2159716%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F250700%22%20target%3D%22_blank%22%3E%40ranYang%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3Eyou%20can%20use%20the%20below%20command%20check%20the%20CPU%20frequency%3A%3C%2FP%3E%0A%3CP%3E%3CSTRONG%3E%3CEM%3Eat%20%2Fsys%2Fdevices%2Fsystem%2Fcpu%2Fcpu0%2Fcpufreq%2Fscaling_governor%3C%2FEM%3E%3C%2FSTRONG%3E%3C%2FP%3E%0A%3CP%3EB.R%3C%2FP%3E%3C%2FLINGO-BODY%3E