i.MX6 SoloX flexcan not working from Linux when M4 in use

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

i.MX6 SoloX flexcan not working from Linux when M4 in use

641 Views
user1391
Contributor I

Hello everyone,

we have the following problem:

When we boot linux without loading a m4 binary in u-boot, both flexcan's are working fine from linux with socketcan.

However, as soon as we load a binary for the m4, the flexcan's do not show up when calling 'ip link'.

It seems as the call to flexcan_chip_enable in flexcan.c is failing, more specifically the clearing of bit MCR_MDIS

and the subsequent polling of MCR_LPM_ACK seems to not produce the expected result.

It seems to be not the software on the m4, as replacing the binary with a all-zero binary still gives the same problem.

The relevent parts in our device-tree might be the following:

#include "imx6sx-customboard.dtsi"

/ {
 model = "customboard";
};

//
// SNIP
//

&flexcan1 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_flexcan1>;
    xceiver-supply = <&reg_can0_stb>;
    status = "okay";
};

&flexcan2 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_flexcan2>;
    xceiver-supply = <&reg_can2_stb>;
    status = "okay";
};

&clks {
 fsl,shared-clks-number = <0x23>;
 fsl,shared-clks-index = <IMX6SX_CLK_PLL2_BUS IMX6SX_CLK_PLL2_PFD0
   IMX6SX_CLK_PLL2_PFD2 IMX6SX_CLK_PLL3_USB_OTG
   IMX6SX_CLK_PLL3_PFD1 IMX6SX_CLK_PLL3_PFD2
   IMX6SX_CLK_PLL3_PFD3 IMX6SX_CLK_PLL4_AUDIO
   IMX6SX_CLK_PLL5_VIDEO
   IMX6SX_CLK_OCRAM IMX6SX_CLK_CAN1_SERIAL
   IMX6SX_CLK_CAN1_IPG IMX6SX_CLK_CAN2_SERIAL
   IMX6SX_CLK_CAN2_IPG IMX6SX_CLK_CANFD
   IMX6SX_CLK_ECSPI1 IMX6SX_CLK_ECSPI2
   IMX6SX_CLK_ECSPI3 IMX6SX_CLK_ECSPI4
   IMX6SX_CLK_ECSPI5 IMX6SX_CLK_QSPI1
   IMX6SX_CLK_QSPI2 IMX6SX_CLK_SSI1
   IMX6SX_CLK_SSI2 IMX6SX_CLK_SSI3
   IMX6SX_CLK_UART_SERIAL IMX6SX_CLK_UART_IPG
   IMX6SX_CLK_PERIPH_CLK2_SEL IMX6SX_CLK_DUMMY
   IMX6SX_CLK_I2C1 IMX6SX_CLK_I2C2
   IMX6SX_CLK_I2C3 IMX6SX_CLK_I2C4
   IMX6SX_CLK_EPIT1 IMX6SX_CLK_EPIT2>;
 fsl,shared-mem-addr = <0x91F000>;
 fsl,shared-mem-size = <0x1000>;
};

Do you have a suggestion on what is going wrong here?

Thank you very much,

Maik

Labels (1)
0 Kudos
1 Reply

526 Views
igorpadykov
NXP Employee
NXP Employee

Hi Maik

one can look at

Loading Code on Cortex-M4 from Linux for the i.MX 6SoloX and i.MX 7Dual/7Solo Application Processors

How to Run the MQX™ RTOS on Various RAM Memories for i.MX 6SoloX - Application Note

Try to test it on NXP i.MX6SX Sabre SD reference board with official nxp linux from

source.codeaurora.org/external/imx/linux-imx  repository

linux-imx - i.MX Linux kernel 

FreeRTOS_MX6SX_1.0.1_WIN

Please also check linux documantation on i.MX Software and Development Tools | NXP 

in particular Chapter "Remote Processor Messaging", sect."Running i.MX RPMsg Test Programs"

Linux Manual included in linux documentation package.

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

0 Kudos