Update:
if I use a previous kernel version everything works:
root@nanopineo:~# hostnamectl
Static hostname: nanopineo
Icon name: computer
Machine ID: 6f25fe73523b462c903f2c486e612f38
Boot ID: a687cc17d9d6443c9c091c01fbabece0
Operating System: Ubuntu 20.04 LTS
Kernel: Linux 5.4.45-sunxi
Architecture: arm
root@nanopineo:~# ip link set can0 type can bitrate 12500
root@nanopineo:~# ip link set can0 up
root@nanopineo:~# candump can0 &
[1] 1839
root@nanopineo:~# cansend can0 AAA#11223344
root@nanopineo:~# cat /proc/net/can/stats
3 transmitted frames (TXF)
0 received frames (RXF)
0 matched frames (RXMF)
0 % total match ratio (RXMR)
0 frames/s total tx rate (TXR)
0 frames/s total rx rate (RXR)
0 % current match ratio (CRXMR)
0 frames/s current tx rate (CTXR)
0 frames/s current rx rate (CRXR)
0 % max match ratio (MRXMR)
1 frames/s max tx rate (MTXR)
0 frames/s max rx rate (MRXR)
1 current receive list entries (CRCV)
1 maximum receive list entries (MRCV)
1 statistic resets (STR)