eve
eve copied to clipboard
Enable frequency control support for RPi4 (from 600MHz to 1.8GHz)
Seems without CONFIG_ARM_RASPBERRYPI_CPUFREQ we use 600MHz in all cases on RPi4.
Before:
# time sh -c 'echo "scale=3000; a(1)*4" | bc -l'
real 0m 49.85s
user 0m 45.59s
sys 0m 4.07s
# vcgencmd measure_clock arm
frequency(48)=600117184
vcgencmd command shows about the same results around 600MHz
After:
# time sh -c 'echo "scale=3000; a(1)*4" | bc -l'
real 0m 19.98s
user 0m 18.09s
sys 0m 1.68s
# vcgencmd measure_clock arm
frequency(48)=1500398464
frequency changing from 600MHz up to 1.6GHz under load.
Also this PR enables 1.8GHz turbo-mode clock according to https://www.raspberrypi.com/documentation/computers/config_txt.html#arm_boost-raspberry-pi-4-only So, with both commits applied (on new installation of EVE-OS as we do not support changes in config.txt during update):
# time sh -c 'echo "scale=3000; a(1)*4" | bc -l'
real 0m 16.41s
user 0m 14.98s
sys 0m 1.40s
# cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq
1800000
Signed-off-by: Petr Fedchenkov [email protected]