Espressobin / mvebu cpufreq still unstable

Scaling CPU frequency on my Espressobin v5 (1.0GHz) still has random, frequent reboots with Pali's Armada 37xx: cpufreq patch series (backported from kernel 5.13 to the 5.10 LTS kernel used in OpenWRT). I'm posting to:

  1. Hear from anyone else still seeing cpufreq instability on mvebu boards.
  2. Share my best workaround.
  3. Work towards a solution which allows scaling and get it upstreamed.

The workaround is to disable cpufreq:

    echo "performance" > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor

So this happens as early as possible to allow the system to boot reliably, instead of setting the governor through sysfs I added a kernel param (new in 5.9) to boot.scr in /dev/mmcblk0p1 (the vfat boot partion). This requires writing a new CRC header to the file with mkimage (included in uboot-utils on Arch or u-boot-utils on Debian).

  1. cp boot.scr boot.txt
  2. Edit boot.txt
    1. remove binary checksum header (everything before "#Espressobin" in the first line).
    2. add cpufreq.default_governor=performance
  3. mkimage -A arm64 -O linux -T script -C none -n "My Boot" -d boot.txt boot.scr

(is there a better way to change kernel params?)

CC: @hftsai256 @hmof @erdoukki from ESPRESSOBin V5 Non-eMMC Frozen on 21.02 Stable Release - #7 by hmof, others?

What is the setting of the governor if you make no changes?

ondemand

Hello @edrex,

It would be great to know if it happens only while using OpenWrt or it happens with other GNU/Linux distributions. Unfortunately, there could be some patches in OpenWrt, which are not documented, and no one wants to touch them and do something with them.

Pali is the only one, who tries to fix and take care of Armada 37XX, but it could be unfortunate as he is not involved anyhow with OpenWrt and won't contribute and cooperate with OpenWrt anymore as there are some issues like his posts were hidden, his upstream work was here reverted, etc.

So, if you want to work towards a solution, I suggest reaching Pali by using his email address. He will provide you with more details and what you could test.