This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Frequency remains same after changing scaling_governor

Hello TI,


We are using DM8148 based custom board. We have enabled CPU Power Mgt.-> CPU Frequency scaling and Power Management support. We are changing the different governor available using below command:

  1. We are using this command to change the scaling mode to powersave.
    • echo powersave > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
  2. After the above command when we check the current frequency it is 600000.
    • cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
  3. After that we are changing back the governor to performance
    • echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

When in the performance mode we want to change back the CPU frequency back to 1000000. We tried changing the frequency using below command, but it remains same i.e. 600000

  • echo -n "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed

Please suggest if I am doing anything wrong. Is there any thing I am missing?

Thanks,

Krunal

  • Krunal,

    To be able to change the CPU frequency from user space, you should use the "userspace" governor, which is set by default:

    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    userspace
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    600000
    root@dm814x-evm:~# echo -n "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scal
    ing_setspeed
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    1000000

    To change the frequency from 600MHz to 1GHz you should change the OPP from OPP100/1.1V to OPP160/1.35V

    See the below wiki for more info:

    http://processors.wiki.ti.com/index.php/TI81XX_PSP_PM_DVFS_User_Guide#Transitioning_to_a_different_Power_state.28OPPs.29



    Regards,
    Pavel

  • Krunal,

    I was able to change the frequency from 600MHz to 1GHz with performance governor also:

    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    userspace
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    600000
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_go
    vernors
    conservative ondemand powersave userspace performance
    root@dm814x-evm:~# echo -n "performance" > /sys/devices/system/cpu/cpu0/cpufreq/
    scaling_governor
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    performance
    root@dm814x-evm:~# echo -n "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scal
    ing_setspeed
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    1000000

    BR
    Pavel
  • # echo -n "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    powersave
    # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    600000
    # echo -n "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    # cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    performance
    # echo -n "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
    # cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    1000000
  • Hi Pavel,

    Thanks for you quick replies. We are still facing issues with the above commands.

    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    1000000
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    performance
    root@dm814x-evm:~# echo -n "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/sc
    aling_governor
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    600000
    root@dm814x-evm:~# echo -n "performance" > /sys/devices/system/cpu/cpu0/cpufreq/
    scaling_governor
    platform mpu.0: omap_target: unable to set voltage to 1350000 uV (for 1000 MHz)
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq
    600000
    root@dm814x-evm:~# echo -n "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scal
    ing_setspeed
    platform mpu.0: omap_target: unable to set voltage to 1350000 uV (for 1000 MHz)

    We are still not able to change the cpu frequency back to 1000000.

    Please suggest if we are doing anything wrong.

    Thanks,
    Krunal
  • Krunal,

    Could you please try with the latest linux kernel available at the below link:

    http://arago-project.org/git/projects/?p=linux-omap3.git;a=shortlog;h=refs/heads/ti81xx-master

    This is what I have on the DM814x TI EVM:

    dm814x-evm login: root
    root@dm814x-evm:~# echo -n "1000000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
    root@dm814x-evm:~# echo -n "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    1000000
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    performance
    root@dm814x-evm:~# echo -n "powersave" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    powersave
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    600000
    root@dm814x-evm:~# echo -n "performance" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
    performance
    root@dm814x-evm:~# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
    1000000

    If you have the same with the latest code base, then this should be issue with the HW design of your DM814x custom board, and HW revision of your power supply and power/voltage design should be done.

    BR
    Pavel