Hi there! I’m having issues creating a dtoverlay for the mcp2515 can controller.
I’ve written my dts, but cannot get it to go through cpp.
Can someone either make me a dtoverlay for mcp2515, or help me get mine to compile?
Attatched below is my dts file!
Much appreciated!!!
mcp2515-can0-overlay.zip (821 Bytes)
Need help creating dtoverlay for mcp2515
Hi there,
I am facing the same challenge. I would like to hook on a MCP2515 module to the rock 5b.
Fortunately, I found a dts file here (https://github.com/radxa/overlays/blob/main/arch/arm64/boot/dts/rockchip/overlays/rk3588-spi1-m1-cs1-mcp2515-8mhz.dts).
I downloaded this file and tried to compile it directly with dtc:
rock@rock-5b:~$ dtc rk3588-spi1-m1-cs1-mcp2515-8mhz.dts
Error: rk3588-spi1-m1-cs1-mcp2515-8mhz.dts:4.1-9 syntax error
FATAL ERROR: Unable to parse input tree
rock@rock-5b:~$ dtc -O dtb -o foo.dtbo rk3588-spi1-m1-cs1-mcp2515-8mhz.dts
Error: rk3588-spi1-m1-cs1-mcp2515-8mhz.dts:4.1-9 syntax error
FATAL ERROR: Unable to parse input tree
In the readme of the git repositiory https://github.com/radxa/overlays there was a link to a patch that is needed to compile the overlays, but the link does not exist.
Is anybody out there who can help with getting the MCP2515 up and running on a rock 5b?
I am using Debian 11 Bullseye.
Thank you in advance!
Klaus
rk3588-spi1-m1-cs1-mcp2515-8mhz.zip (922 Bytes)
unzip and test, it may not work, because I compile all overlays for 5.10.110+ kernel
for patches, might be here, https://github.com/radxa-repo/bsp/tree/main/linux/rockchip/
Hi ricoazzurro,
thank you for your support. I managed to put your dto into directory /boot/dtbs/5.10.66-27-rockchip-gea60d388902d/rockchip/overlay/rk3588-spi1-m1-cs1-mcp2515-8mhz.dtbo and to add it to the config.txt file (dtoverlay=rk3588-spi1-m1-cs1-mcp2515-8mhz). As stated in the first line in config.txt, I executed
sudo update_extlinux.sh
and rebooted.
However, dmesg does not contain any messages regarding mcp2515 or spi
rock@rock-5b:~$ dmesg |grep mcp2515
rock@rock-5b:~$ dmesg |grep spi
[ 3.337504] rockchip-spi feb20000.spi: no high_speed pinctrl state
[ 3.338824] rk806 spi2.0: chip id: RK806,ver:0x2, 0x1
[ 3.339065] rk806 spi2.0: ON: 0x40 OFF:0x0
[ 3.355149] rk806 spi2.0: no sleep-setting state
[ 3.355153] rk806 spi2.0: no reset-setting pinctrl state
[ 3.355156] rk806 spi2.0: no dvs-setting pinctrl state
[ 3.358213] spi-nor spi5.0: mx25u12835f (16384 Kbytes) read_data x4
[ 3.531865] input: rk805 pwrkey as /devices/platform/feb20000.spi/spi_master/spi2/spi2.0/rk805-pwrkey.8.auto/input/input0
What is wrong now?
Hello all,
I switched to Armbian, used the DTS file from the first post, compiled it using the instructions here and activated it using the armbian-add-overlay script -->success. I am now able to send and receive can messages using the can utils and using the dotnet iot framework and this example.
Regards, Klaus