Project

General

Profile

MitySOM-335x Frequency Scaling

By default (and during u-Boot operation), the MitySOM-3359 family of SOMs initialize the CPU speed to 720 MHz. To set the CPU speed of commercial temperature modules to a speed lower than the maximum 720MHz please follow the directions below.

For testing that shows the impact of changing the CPU frequency of a module on current draw go here: http://support.criticallink.com/redmine/projects/armc8-platforms/wiki/MityARM-335x_Power_Supply_Requirements

Setting CPU speed through Linux with "Userspace" governor

Currently by default the Linux kernel is built to have the scaling governor configured for "performance". This means that you cannot change the frequency by echoing commands to the scaling registers. If the kernel is setup with the governor set in "userspace" mode than issues commands will work.

To check the current frequency or verify a change

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

Checking Current Governor Mode

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

Check Available Governor Modes

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

Check Available Frequencies

You can list all the available frequencies by typing:

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

335X-GX modules:
Currently available frequencies are 275MHz, 500MHz, 600MHz and 720MHz.
335X-HX modules:
Currently available frequencies are 300MHz, 600MHz, 720MHz and 800Mhz.
335X-IX modules:
Currently available frequencies are 300MHz, 600MHz, 720MHz, 800Mhz and 1Ghz.

To Change the Frequency

You need to make sure governor is set to userspace otherwise the governor will change the speed back.

echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo 275000 >  /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed 

Remember that the frequencies in these commands are in kHz, not MHz or Hz...

Setting CPU speed through userspace application (cpufrequtils)

If the governor mode is not set to "userspace" in the kernel it is possible to install a package that will allow for the modification of the CPU frequency through it.

Install "cpufrequtils"

With a valid internet connection (may need /etc/resolv.conf set with a "nameserver 10.0.0.1" line to setup your local dns server) issue the follow command:

opkg install cpufrequtils

Determine available frequencies

cpufreq-info

Set the desired speed (in MHz)

cpufreq-set -f 275

Verify that the frequency is was set

cpufreq-info -w

At this point you can return to the userspace echo commands to change the frequency.

This information is based on the linux cpufreq subsystem, the capabilities mentioned above assume that you have enabled a cpufreq governor that supports modification of the cpu speed during runtime.

Go to top
Add picture from clipboard (Maximum size: 1 GB)