How to Read the CPU Core Clock Frequency from dts file

cancel
Showing results for 
Search instead for 
Did you mean: 

How to Read the CPU Core Clock Frequency from dts file

596 Views
sreedhar_appala
Contributor IV

Hi,

I am working with IMX8M Mini EVK Yocto Linux 4.14.98.2.0.0 version.

We can read the cpu current frequency from sys interface.

For example: I want to read the CPU0

cd /sys/devices/system/cpu/cpu0/cpufreq/

cat cpuinfo_cur_freq

gives the current cpu frequency, is there any other way to find the cpu frequency apart from this.

from dts file can we read the value theoretically

Thank you, Sreedhar.

2 Replies

418 Views
gusarambula
NXP TechSupport
NXP TechSupport

Hello Sreedhar,

As Karan Gajjar mentioned, you may read the actual CPU frequency from the cpufreq driver. You can find more details on how it works in the i.MX Linux Reference Manual available as part of the BSP documentation.

As for the device tree frequency definitions, you are correct in that those would be theoretical and if could be that the frequencies listed are not achievable so you would need test them.

Regards,

418 Views
karangajjar
Senior Contributor II

Hi Sreedhar A 

For finding CPU frequency you can used cpufreq-info command it displays the current CPU frequency.In dts file there is CPU frequency operating points are available and due to the frequency scaling the current CPU frequency may vary within MIN and MAX operating points.

Let us know in case of any concern

 

Regards,

Karan Gajjar