Hello, I am trying to enable the CAN bus on the Rock 5B, but I am new to embedded Linux and device-trees so I’m having a bit of trouble.
The documentation[1] shows that CAN1 is exposed on the 40 pin header on two sets of pins via two different modes m0
, and m1
.
Inspecting the device tree shows that can1
(i.e. /can@fea60000
) has status disabled and defaults to using the m0
pins, so I tried adding a device tree overlay[2] to enable it and use the m1
pins.
After rebooting, the changes do seem to have taken effect (as reported by /proc/device-tree/
), but lsmod
does not show any CAN related modules, nor does ip link
show any CAN interfaces, nor is there any sort of /dev/can
.
What more needs to be done to enable CAN, or am I even on the right track?
Thanks.
[1] https://wiki.radxa.com/Rock5/hardware/5b/gpio
[2]
/dts-v1/;
/plugin/;
&can1 {
pinctrl-0 = <&can1m1_pins>;
status = "okay";
};