@wollik: Sorry for the delay. Shikegis changes pointed me in the right direction. I wanted to express that.
CAN is indeed working with the current stable Armbian version on BananaPi M1:
root@bananapi:~/dtb# cat /etc/armbian-release
# PLEASE DO NOT EDIT THIS FILE
BOARD=bananapi
BOARD_NAME="Banana Pi"
BOARDFAMILY=sun7i
BUILD_REPOSITORY_URL=https://github.com/armbian/build
BUILD_REPOSITORY_COMMIT=eb9dad92
DISTRIBUTION_CODENAME=buster
DISTRIBUTION_STATUS=supported
VERSION=20.05.2
LINUXFAMILY=sunxi
BRANCH=current
ARCH=arm
IMAGE_TYPE=stable
BOARD_TYPE=conf
INITRD_ARCH=arm
KERNEL_IMAGE_TYPE=Image
I have just changed the pins in the dtb overlay file, which looks like that now:
root@bananapi:~/dtb# cat sun7i-a20-can.dts
/dts-v1/;
/ {
compatible = "allwinner,sun7i-a20";
fragment@0 {
target = < 0xffffffff >;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = < 0xffffffff >;
status = "okay";
};
};
__fixups__ {
can0 = "/fragment@0:target:0";
can_ph_pins = "/fragment@0/__overlay__:pinctrl-0:0";
};
};
I have added this overlay as user overlay with armbian-add-overlay sun7i-a20-can.dts and rebooted.
As my hardware requires a 500 kBit setting, I use this as setup:
modprobe can_raw
ip link set can0 type can bitrate 500000 triple-sampling on
ifconfig can0 up
Btw. dynamic loading of the overlay at runtime works as well.