IMX7 Dual - support for lower frequencies (392MHz, 533 MHz)

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

IMX7 Dual - support for lower frequencies (392MHz, 533 MHz)

2,408 Views
gopinathsriniva
Contributor III

Hello,

We are looking for the support to operate IMX7D processor to operate in lower frequencies in the range of 392MHz to 533MHz. This is to increase the operating temperature of our IMX7D powered device. I have added below changes to the imx7d.dts file and I able to operate at 648 MHz.

cpu0: cpu@0 {
               operating-points = <
               /* KHz uV */
                  996000 1075000
                  792000 975000
                  648000 975000
                  533000 975000
                  396000 975000
  >;

Even when we set 369MHz, it is supporting only 648MHz. Your suggestions are greatly appreciated. 

Thanks,

Gopinath S

Labels (3)
0 Kudos
8 Replies

1,176 Views
bdemarchi
Contributor I

I'm having the exact same problem, was there a solution to this problem?

0 Kudos

1,842 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Gopinath S,

You can refer to Chapter 23 CPU Frequency Scaling (CPUFREQ) Driver in the i.MX_Linux_Reference_Manual document. Hope this can do help for you.

Have a nice day

Rita

0 Kudos

1,843 Views
gopinathsriniva
Contributor III

Hi Rita,

Thank you for your reply. As per the document, I have updated my DTS file (arch/arm/boot/dts/imx7d.dtsi for i.MX 7Dual) with 996000,792000,648000,533000,396000  frequency values. Then I set the CPU frequency governor to  userspace. After these steps, when I tried to set the frequency to  396000KHz, it is not changed to it rather it is changed to second nearest higher frequency in the array which is 648000KHz

So below are my questions.

1. Why IMX7D is not working in 396000KHz frequency as well as the next highest value 533000Hz frequency even though I have supported these two in my DTS file? Or else Do I need to add further support/changes in driver/DTS? These details are not given in the Linux reference manual.    

2. Is it a hardware limitation of IMX7 ? or may be something like Clock control Module?

Your suggestions are greatly appreciated.

Best Regards,

Gopinath

0 Kudos

1,843 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Gopinath,

When your board boot up you can To view what values the CPU frequency can be changed to in KHz (The values in the first column are the frequency values) use this command:
cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

To see which cpu frequency can you use, you can send the result to me.

Take the 79200 as an example, if the 79200 is in the support CPU frequency list, you can use the follow command to set the CPU frequency:

echo 792000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

Have a nice day

Rita

0 Kudos

1,843 Views
gopinathsriniva
Contributor III

Hi Rita,

yes. I am able to see what values the CPU frequency can be changed to. Below is the o/p. 

$ cat /sys/devices/system/cpu/cpu0/cpufreq/stats/time_in_state

396000 1887
792000 149
996000 564

I used below command to set CPU frequency. (CPU governance is in userspace mode)

# echo 396000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

This set successfully. But when I checked cpu_cur_fre info it is  showing  648000

 cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq

The same status when using #cpufreq-info command.

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: 77.0 us.
hardware limits: 296 MHz - 996 MHz
available frequency steps: 296 MHz, 324 MHz, 396 MHz, 792 MHz, 996 MHz
available cpufreq governors: interactive, conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 296 MHz and 996 MHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 648 MHz (asserted by call to hardware).
cpufreq stats: 296 MHz:86.42%, 324 MHz:0.57%, 396 MHz:9.63%, 792 MHz:3.16%, 996 MHz:0.21% (240)
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: 77.0 us.
hardware limits: 296 MHz - 996 MHz
available frequency steps: 296 MHz, 324 MHz, 396 MHz, 792 MHz, 996 MHz
available cpufreq governors: interactive, conservative, userspace, powersave, ondemand, performance
current policy: frequency should be within 296 MHz and 996 MHz.
The governor "userspace" may decide which speed to use
within this range.
current CPU frequency is 648 MHz (asserted by call to hardware).
cpufreq stats: 296 MHz:86.42%, 324 MHz:0.57%, 396 MHz:9.63%, 792 MHz:3.16%, 996 MHz:0.21% (240)

I am expecting current CPU frequency as 396 MHz. But it is not happening. 

Many Thanks,

Gopinath

0 Kudos

1,843 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Gopinath,

You can try to close the DVFS first, and then do your above action.

Have a nice day

Rita

0 Kudos

1,843 Views
gopinathsriniva
Contributor III

Hi Rita,

You mean to disable DVFS? Any steps to do so? 

Regards,

Gopinath S

0 Kudos

1,843 Views
Rita_Wang
NXP TechSupport
NXP TechSupport

Hi Gopinath,

Could you tell me which version BSP are you using? I have check the imx7d.dtsi for i.MX 7Dual have not see your below set.  How do you get the following code? I will do further confirming for you.

cpu0: cpu@0 {
               operating-points = <
               /* KHz uV */
                  996000 1075000
                  792000 975000
                  648000 975000
                  533000 975000
                  396000 975000
  >;

Have a nice day

Rita

0 Kudos