iMX8qxp not finding CAN devices

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

iMX8qxp not finding CAN devices

1,720 Views
joakim_hesselgr
Contributor I

Hello,

We are currently working with the iMX8qxp-mek for preparation before production of our own units. We have trouble getting the CAN up and running. Have tried with our own yocto build along with the provided SD-card, LF_v5.4.y-1.0.0_images_MX8QXPMEK and L4.14.98_2.3.0_images_MX8QXPMEK.

From L4.14.98_2.3.0_images_MX8QXPMEK we used the following files:
Image-fsl-imx8qxp-mek.dtb

Image-imx8_all.bin

fsl-image-validation-imx-imx8qxpc0mek.tar.bz2

From LF_v5.4.y-1.0.0_images_MX8QXPMEK we used:

Image-imx8qxpmek.bin

imx8qxp-mek.dtb

imx-image-full-imx8qxpmek.tar.bz2

None of these setups manages to find a can device. In our build we are using kernel version 4.14.98 which we tried both 2.3.0 and 2.0.0_ga. CAN should be enabled and working but it does not manage to find the device. When checking the status of the CAN device through "cat /sys/firmware/devicetree/base/can\@5a8d0000/status"
it says okay.

I have attached our bootlog as bootlog_imx8.txt along with the bootlog for the L4.14.98_2.3.0_images_MX8QXPMEK as bootlog_imx8_NXP.txt.

Best regards,
Joakim Hesselgren

Tags (2)
4 Replies

1,507 Views
beshr_al_nahas
Contributor I

Hi,

I have figured the problem:

Default device tree configurations for FlexCAN enable the devices internal power supply only if a certain GPIO pin is asserted.
This pin is asserted when you connect the NXP peripheral baseboard MCIMX8-8X-BB (which we do not have).
MCIMX8-8X-BB Product Information|NXP 

The issue is that the manual does not clearly point this out.

We assume that when booting the MEK board, the CAN device shall show up.

Of course, it is unusable without the CAN transceiver in the baseboard, but this is obvious.

The ambiguous issue is that the internal CAN device is enabled on an external GPIO signal.

Anyway, to get the CAN device to show up without the board, add the following to fsl-imx8qxp-mek.dts:

&reg_can_stby {
  /delete-property/ vin-supply;
  /delete-property/ gpio;
};


&flexcan1 {
  status = "okay";
};


&flexcan2 {
  status = "okay";
};‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍
Running ifconfig -a shall show:

 can0      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
           NOARP  MTU:16  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:10
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
           Interrupt:51
 
 can1      Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
           NOARP  MTU:16  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
           collisions:0 txqueuelen:10
           RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
           Interrupt:52
 ....‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Best,

Beshr

0 Kudos

1,507 Views
igorpadykov
NXP Employee
NXP Employee

Hi Joakim

flecan may be used by m4, one can try steps described in

System Controller Firmware 101 - Resource management service 

pastedImage_2.jpg

SCFW Porting Kit

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

1,507 Views
joakim_hesselgr
Contributor I

Hello,

 

By doing this fix it did not help since as can be seen in the bootlog we already had access to the CAN on the A35. I tried it out and I have attached these bootlogs. Bootlog_CAN_Added is where I just use the default with alt_config enabled which shows it does not own CAN while in the Bootlog_CAN_Removed I have done the fix shown in your link which shows that CAN now is owned but it still does not show the device after I modprobe flexcan.

 

Best regards,

Joakim

1,507 Views
igorpadykov
NXP Employee
NXP Employee

also may be helpful:

How does one set FlexCAN in 2.0B mode? 

Best regards
igor

0 Kudos