IM8QM socketCAN access on yocto linux?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IM8QM socketCAN access on yocto linux?

2,339 Views
georglutz
Contributor I

Hi all,

I try to access the socket can interfaces with a BSP >= L4.14.98_2.0.0.

I have an IMX8QM MEK board. When I boot the included SD card I can see socket CAN interfaces as well as the enabled device tree nodes:

root@imx8qmmek:~# ifconfig -s -a
Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
can0         16 0         0      0      0 0             0      0      0      0 O
can1         16 0         0      0      0 0             0      0      0      0 O
can2         16 0         0      0      0 0             0      0      0      0 O
eth0       1500 0        99      0      0 0           105      0      0      0 BMdRU
lo        65536 0        90      0      0 0            90      0      0      0 LRU
root@imx8qmmek:~# cat /sys/firmware/devicetree/base/can\@5a8d0000/compatible
fsl,imx8qm-flexcanfsl,imx6q-flexcan
root@imx8qmmek:~# cat /sys/firmware/devicetree/base/can\@5a8d0000/status
okay
root@imx8qmmek:~# cat /sys/firmware/devicetree/base/can\@5a8e0000/status
okay
root@imx8qmmek:~# cat /sys/firmware/devicetree/base/can\@5a8f0000/status
okay

But the BSP version is rather old:

root@imx8qmmek:~# cat /etc/version
20181016062726

E.g. with the image fsl-image-validation-imx-imx8qmmek.sdcard from BSP version L4.14.98_2.0.0 (https://www.nxp.com/webapp/Download?colCode=L4.14.98_2.0.0_MX8QM&appType=license) there is no socket CAN interface:

root@imx8qmmek:~# ifconfig -s -a
Iface   MTU Met   RX-OK RX-ERR RX-DRP RX-OVR    TX-OK TX-ERR TX-DRP TX-OVR Flg
eth0       1500 0       254      0      0 0           239      0      0      0 BMdRU
lo        65536 0       170      0      0 0           170      0      0      0 LRU

In fact the flexcan interfaces are disabled in the device tree:

$ cat /sys/firmware/devicetree/base/can\@5a8d0000/compatible
fsl,imx8qm-flexcanfsl,imx6q-flexcan
cat /sys/firmware/devicetree/base/can\@5a8d0000/status
disabled
$ cat /sys/firmware/devicetree/base/can\@5a8e0000/status
disabled
$ cat /sys/firmware/devicetree/base/can\@5a8f0000/status
disabled

So how can I bring CAN back to the A cores?

Regards
  Georg

Tags (1)
0 Kudos
5 Replies

2,033 Views
igorpadykov
NXP Employee
NXP Employee

Hi Georg

all flexcans are enabled in fsl-imx8qm-mek.dtsi but disabled in fsl-imx8qm-mek-m4.dts

fsl-imx8qm-mek.dtsi\freescale\dts\boot\arm64\arch - linux-imx - i.MX Linux kernel 

Tests can be performed using unit tests:

doc\can\test - imx-test - i.MX Driver Test Application Software 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

2,033 Views
georglutz
Contributor I

Hi Igor,

thanks for the answer. It seems that fsl-imx8qm-mek-m4.dts got renamed to fsl-imx8qm-mek-rpmsg.dts and in fact flexcan is disabled there.

What I don't understand is that CAN works with the old test image, but not the new one. How can I enable it again? Is this intentionally?

Regards

  Georg

0 Kudos

2,033 Views
igorpadykov
NXP Employee
NXP Employee

Hi Georg

one can to reenable some in fsl-imx8qm-mek-m4.dts and generate new image.

Best regards
igor

0 Kudos

2,033 Views
georglutz
Contributor I

Hi Igor,

I tried, see the other thread , but without success ...

Regards

  Georg

0 Kudos

2,033 Views
georglutz
Contributor I

The same effect (no CAN devices / CAN devices disabled in devicetree) can be seen with the test image imx-image-full-imx8qmmek.sdcard from the latest BSP 4.19.35_1.1.0.

0 Kudos