CANBus interface for i.MX8QM MEK board

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

CANBus interface for i.MX8QM MEK board

Jump to solution
5,810 Views
tpe
Contributor III

Hello,

My aim is to enable the CAN interface for the i.MX8QM MEK attached to the base board. I'm running Android 10 (imx-android-10.0.0_2.3.0). I can't find the CAN interface when I execute 'ifconfig -a'. I noticed that the base board supports CAN FD which I believe is not supported for Android. Is there a way to use the legacy CAN utilities? I've tried disabling CAN FD in the device tree as suggested here. However, I still haven't been able to view my CAN interfaces.

Thanks!

Tags (3)
0 Kudos
Reply
1 Solution
5,625 Views
tpe
Contributor III

I have solved this issue. The device tree blob includes imx8qm-mek-ov5640.dts which includes another device tree file called imx8qm-mek-rpmsg.dts that overrides the configurations for the FlexCAN and regulators' status to be disabled in imx8qm-mek.dts. I am relatively new to Android source code so it wasn't obvious for me to check the device tree files for camera display. Hopefully this helps anyone else who has this problem!

View solution in original post

7 Replies
5,044 Views
preetamch29
Contributor II

Hi,

Could you please add the link for disabling the CANFD in device tree again.

The link seems to be not working.

Regards,

Preetam

Tags (1)
0 Kudos
Reply
5,626 Views
tpe
Contributor III

I have solved this issue. The device tree blob includes imx8qm-mek-ov5640.dts which includes another device tree file called imx8qm-mek-rpmsg.dts that overrides the configurations for the FlexCAN and regulators' status to be disabled in imx8qm-mek.dts. I am relatively new to Android source code so it wasn't obvious for me to check the device tree files for camera display. Hopefully this helps anyone else who has this problem!

5,723 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

Do you use the M4? By default, SCFW assigns CAN resources to M4 app. 

So if you use M4 and you don't need CAN on M4 partition, then you need to comment this line 

BRD_ERR(rm_set_resource_movable(pt_boot, SC_R_CAN_0, SC_R_CAN_2, SC_TRUE));

from void board_system_config(sc_bool_t early, sc_rm_pt_t pt_boot), board.c of SCFW porting kit.

 

Hope it helps!

BR,

Ivan.

0 Kudos
Reply
4,979 Views
preetamch29
Contributor II

Hi Ivan,

I am also facing the same problem.

I have made the changes in board.c and generated scfw-tcm.bin and flash.bin. but I am unable to flash this ''flash.bin' to imx8qm. I am using "imx-android-11.0.0_1.0.0".

I am using following command to flash:

uuu -b emmc flash.bin flash.bin

How should I add this changed flash.bin or scfw.bin in my images?

my CAN interfaces gets diabled as shown below in bootup log:

Line 607: [ 4.439486] can01-stby: supplied by can01-en
Line 607: [ 4.439486] can01-stby: supplied by can01-en
Line 646: [ 5.437399] logwrapper: Cannot log to file /dev/fscklogs/log
Line 708: [ 7.413427] apexd: Scanning /system/apex for preinstalled data
Line 709: [ 7.425017] apexd: Scanning /system_ext/apex for preinstalled data
Line 711: [ 7.435821] apexd: Scanning /vendor/apex for preinstalled data
Line 713: [ 7.446248] apexd: Scanning /system/apex looking for APEX packages.
Line 756: [ 10.897623] apexd: Scanning /system/apex for preinstalled data
Line 757: [ 10.908377] apexd: Scanning /system_ext/apex for preinstalled data
Line 759: [ 10.919221] apexd: Scanning /product/apex for preinstalled data
Line 761: [ 10.929779] apexd: Scanning /vendor/apex for preinstalled data
Line 821: [ 19.285285] apexd: Can't open /system_ext/apex for reading : No such file or directory
Line 822: [ 19.293286] apexd: Can't open /product/apex for reading : No such file or directory
Line 823: [ 19.301101] apexd: Can't open /vendor/apex for reading : No such file or directory
Line 863: [ 35.905126] can01-en: disabling
Line 864: [ 35.908363] can01-stby: disabling

0 Kudos
Reply
5,706 Views
tpe
Contributor III

Hello Ivan,

 

Thank you for your input! Unfortunately, your suggestion did not solve my issue. I'm still unable to bring up the CAN interface after removing CAN from the M4 partition. Do I need to allocate those resources for my A53 or my A72 partition?

 

Best regards,

tpe

0 Kudos
Reply
5,669 Views
IvanRuiz
NXP Employee
NXP Employee

Hello,

 

If the SC_CAN_* was removed from M4 partition, by default, those resources should be moved to A partition.

Can you please provide a boot log and the used dtsi/dts?

 

BR,

Ivan.

0 Kudos
Reply
5,661 Views
tpe
Contributor III

Hello,

 

Attached is my bootlog. I'm using the default imx8qm-mek.dts and imx8qm.dtsi files with the exception of disabling CAN FD for the three CAN devices. I noticed that my device tree FlexCAN configurations hold true for everything except the status was disabled. This is strange because when I decompiled the dtb, the status message was set to okay. I've also ran 'zcat proc/config.gz | grep CAN' to verify that FlexCAN was enabled by the kernel.

 

Thanks!

0 Kudos
Reply