I’m trying to use the CAN bus on a Colibri iMX6DL connected to an Aster Carrier Board.
I’ve modified the device tree according to the [CAN (Linux)][1] article.
Checking the Colibri iMX6DL datasheet, it says that the pins for CAN0 are 55 (TX) and 63 (RX), and these pins are connected to the Aster pins X17.8 and X18.1 respectively.
I’ve edited the device tree making the below modifications:
The problem is: we hooked up a logic analyzer on the TX/RX pins in the Aster pin header, but there is no output.
I’d like to know if there is anything else to be changed to make this work.
Another question is about CAN1. This CAN bus is available on SODIMM pins 188/178 on the Colibri iMX6DL, but only the pin 188 is exposed in the Aster Carrer Board (X20.35). So it’s not possible use CAN1 on the Aster?
Are there any indication in dmesg output, e.g. that pinmuxing failed?
See below the dmesg output after running ip link set can0 up type can bitrate 500000 and ifconfig can0 up :
root@colibri-imx6:~# dmesg | grep can
[ 0.140777] i2c i2c-1: can't use DMA
[ 0.141457] i2c i2c-2: can't use DMA
[ 1.256063] vcan: Virtual CAN interface driver
[ 1.294377] 2090000.flexcan supply xceiver not found, using dummy regulator
[ 1.303977] flexcan 2090000.flexcan: device registered (reg_base=a09f0000, irq=33)
[ 1.315197] 2094000.flexcan supply xceiver not found, using dummy regulator
[ 1.324841] flexcan 2094000.flexcan: device registered (reg_base=a09f8000, irq=34)
[ 2.157468] snvs-secvio 20cc000.caam-snvs: can't get snvs clock
[ 2.315839] can: controller area network core (rev 20120528 abi 9)
[ 2.330320] can: raw protocol (rev 20120528)
[ 2.336524] can: broadcast manager protocol (rev 20120528 t)
[ 2.344161] can: netlink gateway (rev 20130117) max_hops=1
[ 2313.152306] flexcan 2090000.flexcan can0: writing ctrl=0x03292005
[ 2313.158763] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
I assume you did not attach a CAN transceiver. What happens if you pull the flexcan RX to 1 respectively 0 and try again to send?
Nothing happens in the TX output on the logic analyzer.
Did you try all can network interfaces reported by e.g. ‘ip -br link show’?
root@colibri-imx6:~# ip -br link show
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
can0 DOWN <NO-CARRIER,NOARP,UP,ECHO>
can1 DOWN <NOARP,ECHO>
eth0 DOWN 00:14:2d:4a:4e:60 <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP>
usb0 DOWN 00:14:2d:ff:ff:ff <NO-CARRIER,BROADCAST,MULTICAST,UP>
root@colibri-imx6:~# zcat /proc/config.gz | grep CONFIG_CAN_MCP251X
# CONFIG_CAN_MCP251X is not set
ip -br link show:
root@colibri-imx6:~# ip -br link show
lo UNKNOWN 00:00:00:00:00:00 <LOOPBACK,UP,LOWER_UP>
can0 DOWN <NO-CARRIER,NOARP,UP,ECHO>
can1 DOWN <NOARP,ECHO>
eth0 DOWN 00:14:2d:49:cd:33 <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP>
usb0 DOWN 00:14:2d:ff:ff:ff <NO-CARRIER,BROADCAST,MULTICAST,UP>
For Colibri_iMX6, you need also to change the pinmuxing, since in Colibri Standard these pins are used as GPIOs. I changed to the following PinMuxing and it was working. @leo.tx, Maybe we should update the documentation too.