Solving the problem with boards for Sunxi H3 and MCP2515
Posted: Mon Mar 01, 2021 8:28 am
Starting from kernel version 5.5 to 5.11.2, when connecting the CAN module MCP2515 and when entering commands in the terminal
ip link set can0 up type can bitrate 500000
ifconfig can0 up
terminal freezes
The reason for this is the call to this subroutine
ret = mcp251x_hw_wake (spi);
in this driver code snippet
return to call
ret = mcp251x_hw_reset (spi);
fixes this problem Linux 5.5 - 5.11.2 for sunxi H3 (example Nano Pi NEO,modul MCP2515 8mhz)
The assembled image with linux kernel 5.11.2 for NanoPI NEO with support for the MCP2515 CAN module is located here, as well as the driver file itself and the modified device tree, and settings for Buildroot and Linux there))
https://github.com/AlekseyMamontov/Linu ... l-Alsa-CAN
ip link set can0 up type can bitrate 500000
ifconfig can0 up
terminal freezes
The reason for this is the call to this subroutine
ret = mcp251x_hw_wake (spi);
in this driver code snippet
INIT_WORK(&priv->tx_work, mcp251x_tx_work_handler);
INIT_WORK(&priv->restart_work, mcp251x_restart_work_handler);
ret = mcp251x_hw_wake(spi);
if (ret)
goto out_free_wq;
ret = mcp251x_setup(net, spi);
return to call
ret = mcp251x_hw_reset (spi);
fixes this problem Linux 5.5 - 5.11.2 for sunxi H3 (example Nano Pi NEO,modul MCP2515 8mhz)
The assembled image with linux kernel 5.11.2 for NanoPI NEO with support for the MCP2515 CAN module is located here, as well as the driver file itself and the modified device tree, and settings for Buildroot and Linux there))
https://github.com/AlekseyMamontov/Linu ... l-Alsa-CAN