Random flexcan probe error on i.MX6ULL after flexcan clock increase
Enguerrand de Ribaucourt
enguerrand.de-ribaucourt at savoirfairelinux.com
Fri Jun 28 01:08:02 PDT 2024
Hello,
This patch which increased the flexcan clock on i.MX6UL to support higher
bitrates introduced a regression on i.MX6ULL. On my range of devices, on
software reboot (reboot command), the flexcan driver would randomly fail to
probe with the following error:
[ 1.215064] CAN device driver interface
[ 1.217467] flexcan 2090000.can: registering netdev failed
[ 1.217515] flexcan: probe of 2090000.can failed with error -110
After investigating, the function flexcan_chip_disable() in
register_flexcandev() fails to get the low power mode acknowledgement bit from
the flexcan module. Forcing a probe again, or even toggling the soft reset bit
afterwards does not help. Only another software reboot will unblock the module.
This error hapens on all my devices roughly 0.1% of reboots. It is the only
random error I have seen on my board so far while none existed when I was using
a 5.4 kernel.
The i.MX6ULL reference manual states that the maximum frequency for the flexcan
is 80MHz, which is the same for the i.MX6UL. This commit's message states that
it increased the frequency from 30MHz to 40MHz with the divider, however it's
using a 80MHz clock source. I'm wondering if the clock source is too fast?
Reverting this commit fixed the issue. I'd like to ask the maintainers if we
should revert it or if another solution can be found to both satisfy the higher
bitrate and not have the reboot issue.
More information about the linux-arm-kernel
mailing list