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.

How to set cpu freq in the SDK 7.0?

hello all,
  How to set cpu freq in the SDK 7.0?
  If I have setup cpu freq in the u-boot, when kernel startup, can cpu freq be changed?
  in the SDK 6.0, I see that cpu freq is u-boot's setup, but in the SDK 7.0, I see that cpu freq is 1GHz, not u-boot's setup.
 
  cpufreq config:
  [*] CPU Frequency scaling  
  <*>   CPU frequency translation statistics (NEW)
  Default CPUFreq governor (performance)
  ARM CPU frequency scaling drivers  --->  
       [*] TI OMAP2+ (NEW)


  Thanks!

  • I will ask somebody from the factory team to take a look at this.

  • thanks biser.

    if I want setup cpufreq in kernel, how to do? thanks

  • dear biser,

    do you ask this problem? thanks

  • Take a look in the /sys/devices/system/cpu/cpu0/cpufreq directory. You can see various values you can change:

    root@am335x-evm:/sys/devices/system/cpu/cpu0/cpufreq# ls -l
    -r--r--r--    1 root     root          4096 Mar 25 09:04 affected_cpus
    -r--------    1 root     root          4096 Mar 25 09:04 cpuinfo_cur_freq
    -r--r--r--    1 root     root          4096 Mar 25 09:04 cpuinfo_max_freq
    -r--r--r--    1 root     root          4096 Mar 25 09:04 cpuinfo_min_freq
    -r--r--r--    1 root     root          4096 Mar 25 09:04 cpuinfo_transition_latn
    cy
    -r--r--r--    1 root     root          4096 Mar 25 09:04 related_cpus
    -r--r--r--    1 root     root          4096 Mar 25 09:04 scaling_available_freqe
    ncies
    -r--r--r--    1 root     root          4096 Mar 25 09:04 scaling_available_goven
    ors
    -r--r--r--    1 root     root          4096 Mar 25 09:04 scaling_cur_freq
    -r--r--r--    1 root     root          4096 Mar 25 09:04 scaling_driver
    -rw-r--r--    1 root     root          4096 Mar 25 09:04 scaling_governor
    -rw-r--r--    1 root     root          4096 Mar 25 09:04 scaling_max_freq
    -rw-r--r--    1 root     root          4096 Mar 25 09:04 scaling_min_freq
    -rw-r--r--    1 root     root          4096 Mar 25 09:21 scaling_setspeed
    drwxr-xr-x    2 root     root             0 Mar 25 09:04 stats
    root@am335x-evm:/sys/devices/system/cpu/cpu0/cpufreq#

    To see the available cpu speeds, cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequences. To set a cpu speed, say 500000, echo 500000 >/sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed.

    Steve K.

  • dear Steve,
        on the kernel v3.2, I set cpufreq is 720M at u-boot, when boot, cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequences, it is 720
        but on the kernel v3.12.10, I set cpufreq is 720M at u-boot, when boot, cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequences, it is 1G, is it right?