How to change IMX6ULL frequency from 528Mhz to 792Mhz

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

How to change IMX6ULL frequency from 528Mhz to 792Mhz

1,901 Views
marcinnowicki
Contributor I

Hi,

I am running custom linux build with Buildroot(kernel version 4.14.154) on my custom designed board. Everything works(all peripheralls and user-sapce app) except I cannot change processor frequency to 792 Mhz after linux boots up.

I followed instructions on :

How can I change CPU frequency on i.MX6Q ?

How to change the CPU frequency from 800Mhz to 1GHz ? 

Change CPU frequency 

My CPU phandle in device tree :

&cpu0 {
    compatible = "arm,cortex-a7";
    device_type = "cpu";
    reg = <0>;
    clock-frequency = <792000000>;
    clock-latency = <61036>; /* two CLK32 periods */
    operating-points = <
        /* kHz    uV */
        792000    1175000
        528000    1175000
        396000    1025000
        198000    950000
    >;
    fsl,soc-operating-points = <
        /* KHz    uV */
        792000    1175000
        528000    1175000
        396000    1175000
        198000    1175000
    >;
    arm-supply = <&reg_arm>;
    soc-supply = <&reg_soc>;
    dc-supply = <&reg_gpio_dvfs>;
};

In rcS script I have:
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 792000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

Unfortunately cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq returns 528000 so I guess CPU still runs on this clock.

Interestingly cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq returns 792000.

It is exactly MCIMX6Y2CVM08AB processor model capable of running on this frequency.

Does anyone know how to change IMX6ULL CPU frequency ? .

Labels (1)
Tags (1)
0 Kudos
4 Replies

1,705 Views
marcinnowicki
Contributor I

Hi, I managed to change BSP to supported one in Buildroot as you pointed me.

Changes to menuconfig are:

BR2_LINUX_KERNEL_CUSTOM_GIT=y
BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://github.com/Freescale/linux-fslc.git"
BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="4.14-2.0.x-imx"

Now # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq returns 792000 and most things appear to work with BSP Kernel version 4.14.159 built with Buldroot.

Thanks for your help !.

Best regards,

Marcin Nowicki

0 Kudos

1,705 Views
diegoadrian
NXP Employee
NXP Employee

Hello

Unfortunately, you are using an unsupported BSP. We cannot help you properly. What I suggest is to use an example of our Linux API to change the CPU frequency. However, the implementation is on your own. If you are willing to have professional assistance. I suggest you contact our professional service support portal.

Professional Support for Processors and Microcontrollers | NXP 

Best regards,

Diego.

1,705 Views
marcinnowicki
Contributor I

I guess BSP is implemented directly into Linux Kernel which is open-source.

Could you tell me which Kernel version similar to 4.14 is poperly supported by NXP so It doesn't have any issues with the newest IMX6ULL processor models ? By the way 4.14 is working pretty well apart from changing clock rate.

Could you also tell me more about the Linux API ?

0 Kudos

1,705 Views
diegoadrian
NXP Employee
NXP Employee

Hello,

The most similar version that we have is Linux 4.14.98. You could use our BSP as a reference.

Best regards,

Diego.

0 Kudos