Orin SPI2 in jekpack 6.2 can not work

Continuing the discussion from Orin SPI2 in jekpack 6.0, can not work:
Hi, I am also experiencing the same problem as this article while debugging.
We are also using spi2 to can via mcp2518fd, and after modifying the dma we can turn on can, but nothing is sent or received.
Pinmux and dts are configured.
dt.log (315.0 KB)
There is a loopback test done on spi2 and it is fine.
We also try the same configuration on spi1 to can and can send and receive normally.
Please help to see what is the problem that causes spi2 to send and receive abnormally.

Hi kepts,

Are you using the devkit or custom board for AGX Orin?
What’s the Jetpack version in use?

Do you mean SPI loopback test working on spi2 but it could not work with MCP2518fd module?
If so, do you get a scope to check if there’s any SPI data from MOSI when you connect it with MCP2518FD module?

Is there any error showing in dmesg when you hit the issue?

Hi,
It is a custom board for AGX Orin. Using Jetpack 6.2.

Yes, spi2 converted to can device is not able to send/receive data.
But spi1 converted to can device is normal.

MOSI does not measure the waveform

Checked dmesg, no output related to it.

Please share the block diagram of your connection for SPI2 with MCP2518FD module.

Have you applied the following patch for SPI driver?
Jetson orin nano SPI Speed not changing - #9 by KevinFFF

Please also share the full dmesg for further check.

You can also check if the clock settings for spi1 and spi2 are similar.

$ sudo su
# cd /sys/kernel/debug/bpmp/debug/clk
# grep "" spi*/rate

Hi,
Please check.

I didn’t patch this part before, but now that I did, it doesn’t seem to have much effect.

dmesg.txt (70.9 KB)


You can see from the clk that spi2 is indeed not quite the same。
How should it be adjusted?

Could you also run the following command to check if they used the similar parent clock and max_rate?

$ sudo su
# cd /sys/kernel/debug/bpmp/debug/clk
# grep "" spi*/parent
# grep "" spi*/max_rate

Please try running the following commands to check if it could help for your case.

# echo pllp_out0 > spi2/parent
# echo 81600000 > spi2/rate

HI,

The parent clock and max_rate return the same result, so writing to it is also invalid.



Obviously spi2 is different from the others, but it’s not clear what’s different now.

SPI2 is connected on SPE so that it might have different configuration as others.

Have you tried to get a scope to check SPI data from SPI2 when you connect with MCP2518FD?
I remember that the level is different from others since there’s no level shift to transform from 1.8V to 3.3V as others.