OK, there are a couple of issues to reply to:|
I would search the forum for "/sys/devices/system/cpu/cpu0/cpufreq", "/sys/devices/platform/sunxi-i2c.0/i2c-0/0-0034/temp1_input" or even "bpi-monitor.tgz" to get a clue how to readout the actual CPU frequency as well as the PMU's and SoC's temperature.
Reading out the temperature doesn't work this way in the mainline kernel. But there is a way of reading out one of the two temperature sensors in mainline (the one embedded in the touchscreen controller in the SOC), at least starting from kernel 4.0:
Btw.: This is also the temperature that the cpufreq driver (introduced in kernel 4.0) uses for thermal throttling. Copy the Code
- cat /sys/devices/virtual/thermal/thermal_zone0/temp
For the second temperature sensor (in the PMU) there is a patch by Correntin Labbe, available on his site:
http://sunxi.montjoie.ovh/ (scroll to the bottom)
Adjusting CPU frequency works in steps of 48MHz and will always be rounded down...
Be aware, that is only true for kernels older than 4.0. With the cpufreq driver, you are limited to a set of operating points defined in the device tree (as of version 4.0, these operating points are 960, 912, 864, 720, 528, 312 and 144MHz). So, while for example 600MHz would work on older kernels, with kernel 4.0 cpufreq will fall back to 528MHz if you try to set 600MHz.
Is your 3.19.x image patched in any way? Because the mainline 3.19 kernel doesn't support cpufreq. This was added in kernel 4.0. Copy the Code
- at my system:
- current policy: frequency should be within 480 MHz and 960 MHz.
If you want to set the cpu frequency yourself and read out the temperature, you should go with kernel 4.0.