Why can't find can1 ?

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

Why can't find can1 ?

3,510 Views
t2865k5
Contributor I

Dear NXP,

I run ifconfig -a ,and check can0 / can1 . It only found can0 . Why can't find can1 ?

Do I need to modify the code ? Please tell me how to find can1 .

SW version:5.10.9-1.0.0

0 Kudos
15 Replies

3,369 Views
t2865k5
Contributor I

Dear NXP,

I update your imx8mp-evk-flexcan2.dtb to test . It can recognize can0 and can1. May you provide the original
device tree (imx8mp-evk-flexcan2.dts) to me?

 

t2865k5_0-1628056710171.png

 

0 Kudos

3,362 Views
Juan-Rodarte
NXP Employee
NXP Employee
0 Kudos

3,377 Views
t2865k5
Contributor I

Dear NXP,

I use imx8mplus EVK. I hope you can tell me how to modify the code to identify can0/can1 on this platform.

You can also refer to the part I modified.

0 Kudos

3,372 Views
Juan-Rodarte
NXP Employee
NXP Employee

Hi,

I attach the dtb file, you must add it when you flash.

Best Regards,
Diego.

0 Kudos

3,412 Views
t2865k5
Contributor I

Dear NXP,

I have been waiting for your answer for a long time. 

Please tell me the answer as soon as possible.

0 Kudos

3,378 Views
Juan-Rodarte
NXP Employee
NXP Employee

Hi,

Checking the release notes, by default flexcan2 is disabled, to enable it you must add the imx8mp-evk-flexcan2.dtb
I share the document with you for reference
https://www.nxp.com/docs/en/release-note/IMX_LINUX_RELEASE_NOTES.pdf

Best Regards,
Diego.

0 Kudos

3,407 Views
Juan-Rodarte
NXP Employee
NXP Employee

Hi,

An apology for the delay, am I doing the review, are you using our EVK or are you using some other board?

Best Regards,

Diego.

0 Kudos

3,428 Views
t2865k5
Contributor I

Dear NXP,

I modify the imx8mp-evk.dts but use ifconfig -a,
Still can't find can1.Please tell me how to modify it.
Please refer to my modification as follows:

 

&flexcan2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_flexcan2>;
xceiver-supply = <&reg_can2_stby>;
pinctrl-assert-gpios = <&pca6416 3 GPIO_ACTIVE_HIGH>;
status = "okay";/* can2 pin conflict with pdm: gpio low select pdm, gpio high select can2 */
};

pinctrl_flexcan2: flexcan2grp {
fsl,pins = <
MX8MP_IOMUXC_SAI5_MCLK__CAN2_RX 0x156
MX8MP_IOMUXC_SAI5_RXD3__CAN2_TX 0x156
>;
};

0 Kudos

3,449 Views
t2865k5
Contributor I

Dear NXP,

I am still unable to recognize can1 after modifying imx8mp-evk.dts.

imx8mp-evk.dts :
pinctrl_flexcan1: flexcan1grp {
fsl,pins = <
MX8MP_IOMUXC_SPDIF_RX__CAN1_RX 0x154
MX8MP_IOMUXC_SPDIF_TX__CAN1_TX 0x154
>;
};

pinctrl_flexcan2: flexcan2grp {
fsl,pins = <
MX8MP_IOMUXC_SAI5_MCLK__CAN2_RX 0x156 // 0x154 -> 0x156 ALT6
MX8MP_IOMUXC_SAI5_RXD3__CAN2_TX 0x156 // 0x154-> 0x156 ALT6
>;
};

0 Kudos

3,449 Views
t2865k5
Contributor I

Dear NXP,

pass:

ip link set can0 type can bitrate 125000 triple-sampling on 

fail:

ip link set can1 type can bitrate 125000 triple-sampling on

0 Kudos

3,478 Views
t2865k5
Contributor I

Dear NXP,

I check my imx8mp-evk.dts and your imx8mp-evk.dts. My dts have added can1 and can2 in dts. 

Please help me check the attached files (imx8mp-evk.dts and imx8mp.dtsi). 

Please let me know if there is any need to modify.

0 Kudos

3,457 Views
Juan-Rodarte
NXP Employee
NXP Employee

Hi

Did you use the ip link command that I wrote in the previous answer?

Best regards,
Diego

0 Kudos

3,498 Views
Juan-Rodarte
NXP Employee
NXP Employee

Hi,

Could you tell me which board are you working with?

Best Regards,
Diego

0 Kudos

3,495 Views
t2865k5
Contributor I

Dear NXP,

This board is imx8mplus .

0 Kudos

3,484 Views
Juan-Rodarte
NXP Employee
NXP Employee

Hello,

You need to add the can1 in the dts file, it shared the dts code that it already has.
https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mp-evk.d...
Then you must use this command in linux
ip link set can1 type can bitrate 125000 triple-sampling on

Best Regards,
Diego

0 Kudos