Can bus in Android automotive on IMX8QM-MEK board

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

Can bus in Android automotive on IMX8QM-MEK board

983 Views
al3ks1s
Contributor I

Hello,

I am trying to bring up the controller area network in android automotive 11.0.0_2.5.0. and i cannot find the can0 interface despite having it enabled in the kernel (as shown below).

 

# zcat /proc/config.gz |grep CAN                                                                                                                                                                      
# CONFIG_NET_EMATCH_CANID is not set
CONFIG_CAN=m
CONFIG_CAN_RAW=m
CONFIG_CAN_BCM=m
CONFIG_CAN_GW=m
# CONFIG_CAN_J1939 is not set
# CONFIG_CAN_ISOTP is not set
# CAN Device Drivers
# CONFIG_CAN_VCAN is not set
# CONFIG_CAN_VXCAN is not set
# CONFIG_CAN_SLCAN is not set
CONFIG_CAN_DEV=m
CONFIG_CAN_CALC_BITTIMING=y
CONFIG_CAN_FLEXCAN=m
# CONFIG_CAN_GRCAN is not set
# CONFIG_CAN_KVASER_PCIEFD is not set
# CONFIG_CAN_XILINXCAN is not set
# CONFIG_CAN_C_CAN is not set
# CONFIG_CAN_CC770 is not set
# CONFIG_CAN_IFI_CANFD is not set
# CONFIG_CAN_M_CAN is not set
# CONFIG_CAN_PEAK_PCIEFD is not set
# CONFIG_CAN_SJA1000 is not set
# CONFIG_CAN_SOFTING is not set

 

 

Furthermore i tinkered with the device tree file imx8qm-mek-rpmsg.dts to enable the buses in the firmware :

 

&reg_can01_en {
        status = "okay";
};

&reg_can2_en {
        status = "okay";
};

&reg_can01_stby {
        status = "okay";
};

&reg_can2_stby {
        status = "okay";
};

&cm41_intmux {
        status = "disabled";
};

&can0_lpcg {
        status = "okay";
};

&can1_lpcg {
        status = "okay";
};

&can2_lpcg {
        status = "okay";
};

&flexcan1 {
        status = "okay";
};

&flexcan2 {
        status = "okay";
};

&flexcan3 {
        status = "okay";
};

 

And those have the okay status when looking at it in the device.

 

./regulator-can01-stby
okay

./regulator-can2-stby
okay

./regulator-can2-gen
okay

./bus@5a000000/can@5a8e0000
okay

./bus@5a000000/can@5a8f0000
okay

./bus@5a000000/can@5a8d0000
okay

./regulator-can01-gen
okay

 

In the end, i cannot find the can0 device neither in /dev nor the ifconfig command. And the bootlog never show any can related events.

 

Please, let me know if there is any way to properly bring it up in automotive, and the ways to test it.

Regards,

al3ks1s

0 Kudos
1 Reply

736 Views
sooraj_ms
Contributor I

Hi al3ks1s,

  Were you able to find any resolution for this issue. I am also trying to bringup CAN interface in Android automotive.

0 Kudos