AGX Orin Industrial Module (JetPack 6.2.1) – MCP2518FD Not Working

Hi.

We are working with a custom carrier board for the Jetson Orin module. I am testing CAN communication by physically connecting the internal CAN channels with the on-board MCP2518FD SPI-to-CAN controllers. I am experiencing the following issue:

  • Transmission from the internal CAN to the on-board MCP2518FD is successful.

  • Transmission from the on-board MCP2518FD to the internal CAN fails.

  • When attempting to send from the on-board MCP2518FD’s interface, I receive a
    write: no buffer space available error.

I have confirmed that the kernel successfully recognizes the mcp251xfd module via the dmesg and ip link show commands.

For the MCP251XFD configuration, I have modified the tegra234-p3737-0000.dtsi file located in the following path: Linux_for_Tegra/source/hardware/nvidia/t23x/nv-public/nv-platform

The contents of the modified .dtsi file are as follows:

tegra234-p3737-0000.dtsi.txt (4.0 KB)

=============================spi@3210000 part==================================

mcp251xfd_osc: mcp251xfd_osc {
compatible = “fixed-clock”;
#clock-cells = <0>;
clock-frequency = <40000000>; /* 40MHz */
clock-accuracy = <50>;
};

	spi@3210000{ /* SPI1 in 40 pin conn */
		status = "okay";
		
		can@0 {
			compatible = "microchip,mcp251xfd";
			reg = <0>;
			clocks = <&mcp251xfd_osc>;
			spi-max-frequency = <5000000>;
			interrupts-extended = <&gpio_aon TEGRA234_AON_GPIO(AA,7) IRQ_TYPE_LEVEL_LOW>;
			status = "okay";
		};
		
		can@1 {
			compatible = "microchip,mcp251xfd";
			reg = <1>;
			clocks = <&mcp251xfd_osc>;
			spi-max-frequency = <5000000>;
			interrupts-extended = <&gpio_aon TEGRA234_AON_GPIO(BB,0) IRQ_TYPE_LEVEL_LOW>;
			status = "okay";
		};
	};

To check if it was a hardware problem, when I tested by installing an Orin Module used in another project, I confirmed that transmit/receive between the internal CAN and the MCP2518FD CAN works normally.

*This module is the Jetpack 5.1.2 version and was used in a project that configured the same circuit using an MCP2518FD chip on the same SPI1 channel.

Could you please help me determine the root cause of this issue? I am trying to understand if this is a problem with my Device Tree or Pinmux configuration, or if it might be a regression bug introduced with the updated mcp251xfd module in the newer L4T R36.x (Jetpack 6.x) release.

Thank you in advance for your time and assistance.

*** Please note that this reply is generated by LLM automatically ***

Based on the provided context, I will attempt to help you troubleshoot the issue with CAN communication on your custom carrier board for the Jetson Orin module.

Firstly, it’s great that you’ve confirmed that the kernel successfully recognizes the MCP2518FD module via the dmesg and lsmod commands. This suggests that the module is properly detected and loaded.

However, the issue lies in the transmission from the onboard MCP2518FD to the internal CAN. You’ve modified the tegra234-p3737-0000.dtsi file to configure the MCP251XFD, which is a good start.

To help you further, I’d like to compare your configuration with some other relevant information from the context.

  1. Device Tree configuration: In another thread, someone had an issue with configuring SPI1 pinmux on the Jetson AGX Orin. The solution involved modifying the tegra234-p3737-0000.dtsi file to add the necessary pinmux configuration. Although your issue is different, it’s possible that there’s a similar pinmux configuration issue that needs to be addressed.
  2. Pinmux configuration: Speaking of pinmux, there’s another thread that discusses configuring SPI1 pinmux on the Jetson AGX Orin. The solution involves modifying the pinmux configuration in the tegra234-p3737-0000.dtsi file. You may want to double-check your pinmux configuration to ensure it’s correct.
  3. MCP2518FD configuration: In your modified tegra234-p3737-0000.dtsi file, you’ve set the clock-frequency to 40MHz and clock-accuracy to 50. These values seem reasonable, but you may want to verify them against the datasheet or other documentation for the MCP2518FD chip.
  4. Regression bug: You’ve mentioned that you’re using the Jetpack 6.x release, which is a newer version than the one used in your previous project. It’s possible that there’s a regression bug introduced in the newer release that’s causing the issue. You may want to try using an older version of the Jetpack to see if the issue persists.

To further troubleshoot the issue, I recommend:

  1. Verify pinmux configuration: Double-check your pinmux configuration in the tegra234-p3737-0000.dtsi file to ensure it’s correct.
  2. Check MCP2518FD configuration: Verify the clock-frequency and clock-accuracy values in your modified tegra234-p3737-0000.dtsi file against the datasheet or other documentation for the MCP2518FD chip.
  3. Try an older Jetpack version: If possible, try using an older version of the Jetpack to see if the issue persists.
  4. Provide more details: If none of the above steps help, please provide more details about your setup, including the exact hardware configuration, software versions, and any other relevant information.

I hope this helps you troubleshoot the issue with CAN communication on your custom carrier board for the Jetson Orin module.

*** Please give the thumbs up if you get answers you like. Or provide feedback to help us improve the answer. ***

Hi walter36,

Have you verified the SPI loopback test before porting for MCP2518FD module?

Could you apply the patch in the following thread to check if it could help for the current issue?
Jetson orin nano SPI Speed not changing - #9 by KevinFFF

If not, please also share the dmesg and full device tree captured from your device for further check.