I rebuilt the Bianbu kernel v1.0.13 to enable CONFIG_MTD_CMDLINE_PARTS=y because I want to flash u-boot without using fastboot. Additionally, I added more drivers and networking modules. However, I am encountering numerous error messages in dmesg:
[ 71.271014] i2c-spacemit-k1x d401d800.i2c: msg completion timeout
[ 71.278033] i2c-spacemit-k1x d401d800.i2c: bus reset, send clk: 0
[ 71.284390] i2c-spacemit-k1x d401d800.i2c: i2c transfer retry 1, ret -110 mode 0 err 0x0
Did I do something wrong, and how can I fix it?
FYI: The mtdparts and flashing u-boot via flashcp work well.
This i2c bus is the one that’s connected to the power management IC on the board.
Did you happen to change your cpufreq governor? I’ve seen this issue when using a cpufreq governor other than performance. It seems like the constant changes to power delivery triggered by dynamic frequency scaling overwhelm either the i2c bus or the power management ic.
Update: The I2C warning messages disappeared after I set the governor to “performance,” but I feel like this isn’t the correct solution. Why make a frequency-scalable CPU only to have it fixed at maximum frequency all the time?
there was some discussion about the remoteproc firmware doing strange things also related to cpu governor - just search #riscv on 2024-10-21 — irc logs at libera.irclog.whitequark.org for remoteproc to find the relevant discussions (spread across multiple days) - might be worth reading maybe?
The “conservative” governor does adjustments to the cpu speed much less often than the “ondemand” governor, so it’s far less likely to trigger this issue. But I tried it for a while, and I still did see the same I2C warning messages pop up occasionally.