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.

TDA4VM: Main CAN cannot find device under Linux

Part Number: TDA4VM

Hi team,

main_can0 is being used and the device tree configuration is as follows:

In k3-j721e-main.dtsi,

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
main_mcan0: can@2701000 {
compatible = "bosch,m_can";
reg = <0x00 0x02701000 0x00 0x200>,
<0x00 0x02708000 0x00 0x8000>;
reg-names = "m_can", "message_ram";
power-domains = <&k3_pds 156 TI_SCI_PD_EXCLUSIVE>;
clocks = <&k3_clks 156 0>, <&k3_clks 156 1>;
clock-names = "hclk", "cclk";
interrupts = <GIC_SPI 124 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 125 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "int0", "int1";
bosch,mram-cfg = <0x0 128 64 64 64 64 32 32>;
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

In k3-j721e-sk.dts,

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
main_mcan0_pins_default: main-mcan0-pins-default {
pinctrl-single,pins = <
J721E_IOPAD(0x208, PIN_INPUT, 0) /* (W5) MCAN0_RX */
J721E_IOPAD(0x20c, PIN_OUTPUT, 0) /* (W6) MCAN0_TX */
>;
};
main_mcan0_gpio_pins_default: main-mcan0-gpio-pins-default {
pinctrl-single,pins = <
J721E_IOPAD(0x108, PIN_INPUT, 7) /* (AD27) PRG0_PRU1_GPO2.GPIO0_65 */
>;
};
transceiver2: can-phy1 {
compatible = "ti,tcan1042";
#phy-cells = <0>;
max-bitrate = <5000000>;
pinctrl-names = "default";
pinctrl-0 = <&main_mcan0_gpio_pins_default>;
standby-gpios = <&main_gpio0 65 GPIO_ACTIVE_HIGH>;
};
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

However, after the system starts up, by checking the command dmesg | grep can

[   32.432940] m_can_platform 40528000.can: m_can device registered (irq=19, version=32), 

It's found only MCU_CAN0 registration was to be successful, none of the other main_can registration was successful. 

Could you help look into this case? Thanks.

Best Regards,

Cherry

  • Cherry,

    Can you share the complete boot logs? Do you see the main domain CAN failing or it never gets probed? Can you check if the node is disabled in any of the dts files?

    Regards,

    Keerthy

  • Hi Keerthy,

    This is the complete BOOT LOG. Customer didn’t see any CAN information related to the main domain reported an error. These nodes are also not disabled in the DTS file, and the DTS configuration is the same as the DTS configuration in the original question.

    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    U-Boot 2021.01 (May 31 2023 - 23:00:10 +0800)
    SoC: J721E SR1.1 GP
    Model: Texas Instruments K3 J721E SoC
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed 1
    Board: J721EX-PM1-SOM rev E2
    DRAM: 4 GiB
    Flash: 0 Bytes
    MMC: sdhci@4f80000: 0, sdhci@4fb0000: 1
    env_driver_lookup..success..loc=5...Loading Environment from11 MMC... OK
    In: serial@2800000
    Out: serial@2800000
    Err: serial@2800000
    am65_cpsw_nuss ethernet@46000000: K3 CPSW: nuss_ver: 0x6BA00101 cpsw_ver: 0x6BA80100 ale_ver: 0x00293904 Ports:1 mdio_freq:1000000
    EEPROM not available at 0x50, trying to read at 0x51
    Reading on-board EEPROM at 0x51 failed 1
    cdns,sierra serdes@5000000: PHY not found 0x7364 vs 0x0
    Sierra init failed:-22
    Net: eth0: ethernet@46000000port@1
    Hit any key to stop autoboot: 0
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Regards,

    Annie

  • Annie

    Are the other CAN instances enabled in the device tree?

    Regards

    Karan

  • Hi Karan,

    Are the other CAN instances enabled in the device tree?

    In main_can0, only this instance is enabled.

    While MCU_CAN0 is registered successfully, and the method of the instances in the device tree is the same.

    Thanks and regards,

    Cherry

  • Cherry

    Can you please share you compiled DTB? The k3-j721e-main.dts will have the main_mcan* instances but these are enabled/disabled based on the *.dts.

    I don't see any probe function being called for any MCAN device apart from mcu_mcan0, this points to the other nodes being disabled from dts.

    Regards

    Karan

  • Hi Karan,

    Thank you again and this issue has been resolved by the customer so we could close this thread.

    Thanks and regards,

    Cherry