Invalid cpufreq-info in Linux 4.9.11 kernel verison

cancel
Showing results for 
Search instead for 
Did you mean: 

Invalid cpufreq-info in Linux 4.9.11 kernel verison

Jump to solution
1,026 Views
gopinathsriniva
Contributor III

Hello Everyone,

I am evaluating IMX7 sabreSD board in Linux 4.1.15 and Linux 4.9.11 kernel version. When I checked cpufreq-info command in 4.9.11 kernel, it is showing below information. 

root@imx6ul7d:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: imx7d-cpufreq
CPUs which run at the same hardware frequency: 0 1
CPUs which need to have their frequency coordinated by software: 0 1
maximum transition latency: 101 us.
hardware limits: 792 MHz - 1.20 GHz
available frequency steps: 792 MHz, 996 MHz, 1.20 GHz
available cpufreq governors: interactive, conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 792 MHz and 1.20 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 792 MHz (asserted by call to hardware).
cpufreq stats: 792 MHz:71.84%, 996 MHz:11.36%, 1.20 GHz:16.81% (22)
analyzing CPU 1:
driver: imx7d-cpufreq
CPUs which run at the same hardware frequency: 0 1
CPUs which need to have their frequency coordinated by software: 0 1
maximum transition latency: 101 us.
hardware limits: 792 MHz - 1.20 GHz
available frequency steps: 792 MHz, 996 MHz, 1.20 GHz
available cpufreq governors: interactive, conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 792 MHz and 1.20 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 792 MHz (asserted by call to hardware).
cpufreq stats: 792 MHz:71.84%, 996 MHz:11.36%, 1.20 GHz:16.81% (22)

Where as in the same device shows different value in 4.1.15 kernel version. 

root@imx7dsabresd:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: imx7d-cpufreq
CPUs which run at the same hardware frequency: 0 1
CPUs which need to have their frequency coordinated by software: 0 1
maximum transition latency: 61.0 us.
hardware limits: 792 MHz - 996 MHz
available frequency steps: 792 MHz, 996 MHz
available cpufreq governors: interactive, conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 792 MHz and 996 MHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 792 MHz (asserted by call to hardware).
cpufreq stats: 792 MHz:64.26%, 996 MHz:35.74% (18)
analyzing CPU 1:
driver: imx7d-cpufreq
CPUs which run at the same hardware frequency: 0 1
CPUs which need to have their frequency coordinated by software: 0 1
maximum transition latency: 61.0 us.
hardware limits: 792 MHz - 996 MHz
available frequency steps: 792 MHz, 996 MHz
available cpufreq governors: interactive, conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 792 MHz and 996 MHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 792 MHz (asserted by call to hardware).
cpufreq stats: 792 MHz:64.26%, 996 MHz:35.74% (18)

I guess, 4.9.11 kernel is showing invalid CPU frequency rates since as per the part number the processor supports only up to 996MHZ . May I know how to fix this issue in kernel version 4.9.11? May be I need to use different DTS file? or defconfig file?

Thanks,

Gopinath S 

Tags (1)
0 Kudos
1 Solution
513 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Gopinath

 

for 1GHz part operating point "1200000    1225000"
can be removed.

 

Best regards
igor

View solution in original post

0 Kudos
8 Replies
513 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Gopinath

L4.9.11 added support for 1.2GHz parts (one can check chip marking):

linux/arch/arm/boot/dts/imx7d.dtsi

linux-imx.git - i.MX Linux Kernel 

    cpus {
        cpu0: cpu@0 {
            operating-points = <
                /* KHz    uV */
                1200000    1225000
                996000    1075000
                792000    975000
            >;

i.MX7D Datasheet

http://cache.nxp.com/files/32bit/doc/data_sheet/IMX7DCEC.pdf

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos
513 Views
gopinathsriniva
Contributor III

Hi Igor, 

Thanks for the reply. So for the chip processors which doesn't not support 1.2Hhz, Do I need to modify the imx7d.dtsi file? Because we have decided to go with lesser frequency processor.  

0 Kudos
513 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Gopinath

what is chip full part number, in general linux should determine it

automatically.

Best regards
igor

0 Kudos
513 Views
gopinathsriniva
Contributor III

Hi Igor,

Yes. that  would be ideal.  We are using MCIMX7D7DVM10SC for our custom board. The SabreSD board we are having also uses the same part number but it seems Linux 4.9.11 kernel is not detecting it automatically. It is showing the CPU supports upto 1.2GHz. 

0 Kudos
514 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Gopinath

 

for 1GHz part operating point "1200000    1225000"
can be removed.

 

Best regards
igor

View solution in original post

0 Kudos
513 Views
skrap
Contributor IV

This issue unexpectedly affected deployed production units for us.  Would have really appreciated this being called out in a BSP errata, or fixed ASAP.  Not good to overclock boards.

0 Kudos
513 Views
igorpadykov
NXP TechSupport
NXP TechSupport

seems uboot should correctly find speed grade of used processor with

#define CONFIG_IMX_THERMAL in uboot/include/configs/mx7dsabresd.h

linux/arch/arm/cpu/armv7/mx7/soc.c
get_cpu_speed_grade_hz(void)

soc.c\mx7\armv7\cpu\arm\arch - uboot-imx - i.MX U-Boot 

then boot linux with correct core frequency.

[U-Boot,v5,05/13] imx: mx7 dm thermal driver support - Patchwork 

in linux there is example of removing unused cpufreq operating point in

linux/arch/arm/mach-imx/mach-imx6q.c

imx6q_opp_check_speed_grading(),dev_pm_opp_disable(cpu_dev, 1200000000))

mach-imx6q.c\mach-imx\arm\arch - linux-imx - i.MX Linux kernel 

0 Kudos
513 Views
gopinathsriniva
Contributor III

Ok Thank You. 

0 Kudos