Hi!
I'm trying to understand how the frequency scaling works under linux for the KOBO processors, eg: freescale imx507/508.
I've figured out that there are two drivers, a CPUFREQ driver and a DVFS driver.
The cpufreq driver interface is located at /sys/devices/system/cpu/cpu0/cpufreq
And I was able to list the available frequencies by catting the stats/time_in_state file.
Code:
/sys/devices/system/cpu/cpu0/cpufreq # cat stats/time_in_state
166666 5481223
500000 1594
1000000 3035
There are three read-writable files in the cpufreq directory; scaling_max_freq, scaling_min_freq, and scaling_setspeed.
I can change the processor speed to any of the three listed, 166.666MHz, 500MHz, and 1GHz ; eg: echo 500000 > scaling_setspeed ; but I found I can't change the minimum and maximum frequencies allowed.
Code:
#echo 100000 > scaling_min_freq
#cat scaling_min_freq
166666
Is this a hardware limitation, or does any one know why changing those values are locked out?
Even the lowest predefined frequency of 166.666MHz kills the KOBO battery in a matter of hours.
So, either I need to get the Kobo to slow down, or I need to put it into suspend to ram state with an ability to wake up after a second or so. I know that the /dev/ntx_io driver can talk to the coprocessors (TI MSP430 microcontrollers), one of which does the frontlight, and the other which is a realtime clock capable of waking the ARM processor from suspend; but I'm not sure if that will continue to allow the touch screen to run or not --but supposedly (according to freescale) the ARM chip is capable of running at either a few kHz or 24MHz which is very, very low power while still running peripherals at full speed.
So, I'm wondering if it can be achieved through the DVFS interface:
If I enable DVFS, which is supposed to be able to slow the system down more -- that immediately disables the already tested CPUFREQ switching.
eg:
Code:
# cd /sys/devices/platform/mxc_dvfs_core.0/
# echo 1 > enable
# cat enable
DVFS is enabled
But, the documentation I'm reading; mx50_linux.book, shows no examples of how to change the frequency once DVFS is enabled, but references another document MCIMX50 multimedia Applications Processor Reference Manual (MCIMX50RM).
But when I search for the applications reference manual on freescale, I get only a consumer reference manual which does not appear to have any relevant information mentioned in the table of contents.
Does anyone know how to get DVFS operational ?