MCP2518FD on Jetson Orin Nano: no CAN FD transmission with 4 modules on 2 SPI buses

Customer:

I’m trying to connect 4 MCP2518FD modules to 2 SPI buses on a Jetson Orin Nano. All 4 modules initialize correctly. However, I cannot test internal loopback. When I run:

sudo ip link set can1 type can bitrate 500000 dbitrate 1000000 loopback on fd on

cansend and candump do not send or receive any data.

My device tree configuration includes:

spi@3210000 {
  compatible = "nvidia,tegra210-spi\0nvidia,tegra114-spi";
  reg = ;
  interrupts = ;
  #address-cells = ;
  #size-cells = ;
  clocks = ;
  assigned-clocks = ;
  assigned-clock-parents = ;
  clock-names = "spi";
  iommus = ;
  resets = ;
  reset-names = "spi";
  dmas = ;
  dma-names = "rx\0tx";
  dma-coherent;
  status = "okay";
  can_clock: ;
  prod-settings {
    #prod-cells = ;
     ;
  };
  spi@0 {
    compatible = "microchip,mcp251xfd";
    reg = ;
    spi-max-frequency = ;
    pinctrl-names = "default";
    pinctrl-0 = ;
    interrupt-parent = ;
    interrupts = ;
    vdd-supply = ;
    xceiver-supply = ;
    clocks = ;
     ;
  };
  spi@1 {
    compatible = "microchip,mcp251xfd";
    reg = ;
    spi-max-frequency = ;
    pinctrl-names = "default";
    pinctrl-0 = ;
    interrupt-parent = ;
    interrupts = ;
    vdd-supply = ;
    xceiver-supply = ;
    clocks = ;
     ;
  };
};

Attachment omitted in migration: Picture1.png

Originally submitted via the contact form on soldered.com on 16 May 2025. Migrated to the forum for community visibility.

Soldered Support:

Your setup with the Jetson Orin Nano and MCP2518FD modules is outside of what can be directly tested, but here are several checks that may help:

Interrupt Pin Configuration: Double-check that the interrupt pins specified in your device tree (can0_int_pin, can1_int_pin) are correctly mapped and exported in your system. If these GPIOs are misconfigured or not set as inputs, the kernel driver may never register incoming frames.

SPI Communication Check: Since all modules initialize, SPI likely works, but to be certain, try using dmesg after bringing interfaces up to catch any SPI-related driver errors.

Loopback Mode Issue: The fact that cansend and candump show no activity even in loopback mode suggests a potential driver or interrupt issue, rather than a CAN bus problem. Internal loopback does not require physical wiring, so it should work if the driver is functioning.

CAN Tools Compatibility: Ensure you are using a version of iproute2 and can-utils that supports CAN FD and internal loopback correctly. Older versions may not behave reliably with MCP2518FD.

Device Tree Overlays: Although you have included a custom device tree, make sure no conflicting overlays are applied via /boot/extlinux/extlinux.conf or equivalent on Jetson. Conflicting settings can interfere silently.

Testing With Arduino (If Available): If you can test one of the modules using the Arduino library and a known-good CAN transceiver setup, it could help isolate whether the issue is hardware, wiring, or configuration on the Jetson side.