CAN FD using MCP251xFD


I don’t see any development on the web for MCP251xFD support for the Beagle-Bone.
I do see development for the Raspberry PI (

That link looks promising, in that I believe it can be ported over to the Beagle-bone rather easily.
There are just a few issues I am unsure of.

First, I believe I can just build and install the mcp251x driver module on the Beagle-bone without any issues.
Second, I think, with a little bit of modification, I can tailor the dts to work with the Beagle-Bone.
Third, I am a bit confused by the interrupt pins. I am not sure which pins to use, or why they are even needed, or how the driver communicates with them.
Fourth, I am not sure how the driver defaults to using can0. The Beagle-Bone reserves can0 and can1 for the internal can controller. I don’t know If I would have to remove the can driver and just use the mcp251xfd driver, or is there a way I can use both internal and external CAN, somehow use spi_can at can2?

This stack up works just fine.

Python UDS App → Socket CAN → CAN Module → Kernel → dtb → CAN Controller → Pins → Volt-Converter → Destination

This is what I am trying to attempt.

Python UDS App → Socket CAN → SPI CAN Module → Kernel → dtb → SPI Controller → Pins → FD CAN Controller → Destination

The Python CAN Interface would be SocketCAN, but for the Channel, I don’t think I can use SPI.

I think that is the reason I need to use the mcp251xfd driver.

Channel=SPI ← I don’t think this will work.
Channel=can2 ← Ideal

Thank you,

Well, it’s not going to work as easily as I had imagined.
The problem is that the driver only works with Kernel 5.10 and above.
You would think that it’s the same SPI communications, but it goes further than just the driver.
During compilation, errors appeared and after some investigation, I found that there were missing file(s). I think the files belong to can_dev.
I don’t know how the powers that be implement drivers into the kernel.
Do they just implement them in the current kernel version, or do they find out how far back in the stream the drivers will work. I have to believe that the driver can only work in the specific kernel version for some deep reason that I am unaware of.
My question now is: Can I just update the Beagle-bone to kernel 6.1?
I guess I don’t quite get why the Beagle-bone can’t just update to the latest kernel.
So much time, so little to do. No, Wait. Reverse that.

$uname --all

Is there a reason you have to use the Microchip SPI CAN chip?

The previous generation of Microchip SPI CAN chips are notorious for being terribly unreliable. On a Beaglebone, you are WAY better off using the built-in CAN modules with external transceivers (a la the Beaglebone Comms Cape).

The onboard can controller on the beaglebone does not support CAN FD flexible data rate.thanks