This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM62A7: PROCESSOR-SDK-AM62a7-k3-am62a7-sk.dts

Part Number: AM62A7


Tool/software:

Hello,

We are working with the AM62A7 processor and using Linux kernel version 5.10.168. Our project requires enabling MCAN0 on this platform. Could you please provide any relevant documentation, examples, or references to configure MCAN0 in the device tree and enable the necessary kernel modules?

We would appreciate guidance on the correct device tree modifications as well as kernel configuration options to ensure MCAN0 is operational.

Thank you for your support!

Laxman

  • Hi Laxman,

    The steps to use MCAN on Linux SDK has been documented here:
    https://software-dl.ti.com/processor-sdk-linux/esd/AM62AX/10_00_00/exports/docs/linux/How_to_Guides/Target/How_to_test_MCAN_on_AM62x.html

    Let me know if you face any issues while following the above guide.

    Regards,
    Aparna

  • Hi Aparna Patra,

    I am working on enabling the MCAN0 interface on the AM62A7 processor with support for the J1939 protocol. Below is the relevant configuration from my device tree and kernel setup.

    Device Tree Configuration:

    &main_mcan0 {
    status = "okay";
    pinctrl-names = "default";
    pinctrl-0 = <&main_mcan0_pins_default>;
    };

    main_mcan0_pins_default: main_mcan0_pins_default {
    pinctrl-single,pins = <
    AM62AX_IOPAD(0x01dc, PIN_INPUT, 0) /* MCAN0_RX */
    AM62AX_IOPAD(0x01d8, PIN_OUTPUT, 0) /* MCAN0_TX */
    >;
    };

    Kernel Configuration (Version 5.10.168):

    CONFIG_CAN=m
    CONFIG_CAN_FLEXCAN=m
    CONFIG_CAN_C_CAN=m
    CONFIG_CAN_C_CAN_PLATFORM=m
    CONFIG_CAN_M_CAN=m
    CONFIG_CAN_M_CAN_PLATFORM=m
    CONFIG_CAN_J1939=y

    Issue:

    After booting, I can see the following CAN-related logs:

    # dmesg | grep can
    [ 104.608347] can: controller area network core
    [ 114.146855] can: raw protocol
    [ 129.878879] can: SAE J1939

    However, I am unable to bring up the can0 interface:

    # ip link set can0 up type can bitrate 125000
    ip: either "dev" is duplicate, or "type" is garbage

    # ip link set can0 up
    ip: SIOCGIFFLAGS: No such device

    # ip link set can0 down
    ip: SIOCGIFFLAGS: No such device

    Could you please provide guidance on enabling MCAN0 properly, or point me to any relevant documentation for setting up MCAN0 with the J1939 protocol on the AM62A7? Any advice on fixing the issue with the can0 interface not being recognized would be greatly appreciated.

    Thank you!

  • Here’s how you can respond to Aparna's message:


    Hi Aparna,

    Thank you for the suggestion.

    However, for Linux kernel version 5.10.168, there is no need for a device tree overlay to enable MCAN0, as outlined in section 6.1.6 of the document “How to enable MCAN in Linux.” The table in that section shows that the overlay is only required for the 9.1 release, while for earlier versions, such as mine, it’s not necessary. I have already made the necessary changes in the device tree to enable MCAN0 without the overlay.

    Could you please confirm if there’s anything additional I might need to do for kernel version 5.10.168?

    Regards,
    Laxman

  • Hi Laxman,

    The documentation says, the particular version of SDK doesnot have a overlay file/ MCAN was not tested on the 8.6 SDK using AM62A. However, in order to use CAN, you can pick the AM62x CAN overlay file or from a newer version of SDK.

    Regards,
    Aparna

  • Hi Aparna,

    Thank you for the information. I was unable to find any CAN overlay .dtb file in my kernel kernel version 5.10.168. Could you please provide the specific .dts file that contains the necessary configurations for the AM62x CAN?

    Best regards,
    Laxman

  • Hi Laxman,

    Please find the dtso file with MCAN configuration below:

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0045.k3_2D00_am62x_2D00_sk_2D00_mcan.dtso

    Regards,
    Aparna