MCP2518FD not working with JetPack 6.0 GA

Could you check if it could work with 500000 as bitrate?

$ ip link set can1 type can bitrate 500000 restart-ms 1000

Please also share the device tree source including mcp251xfd CAN configuration in spi node.

Hi KevinFFF

Changing the bitrate does not change anything, still sending from the mcp251xfd CAN is not possible.

Here is the dts:

clocks {
			clk40m: mcp2518fd_osc {
				#clock-cells = <0>;
				compatible = "fixed-clock";
				clock-frequency = <40000000>;
			};
		};

spi@3210000{ /* SPI1 in 40 pin conn */
			status = "okay";
			can@0 {
				compatible = "microchip,mcp2518fd";
				status = "okay";
				reg = <0x0>;
				spi-max-frequency = <20000000>;
				clocks = <&clk40m>;
				interrupts-extended = <&gpio TEGRA234_MAIN_GPIO(Z, 7) IRQ_TYPE_LEVEL_LOW>;
				vdd-supply = <&vdd_5v0_sys>;
				xceiver-supply = <&vdd_5v0_sys>;
				controller-data {
					nvidia,enable-hw-based-cs;
					nvidia,cs-setup-clk-count = <0x1e>;
					nvidia,cs-hold-clk-count = <0x1e>;
					nvidia,rx-clk-tap-delay = <0x1f>;
					nvidia,tx-clk-tap-delay = <0x0>;
				};
			};
		};

Do you also have MCP2515 module?

We have only this module to verify locally.
You can refer to MCP2515 Verification for the detailed steps from me.

Hi KevinFFF

No, we do not have an MCP2515 module.
Do you see any error in our device tree?
Can you tell us anything about the missing patches for the SPI driver?

Actually, the current SPI driver in JP6 has been verified internally.
The major difference between these 2 releases are about the driver in JP5 had an API to select best_parent_clk but it is removed in JP6 since it is not permitted from upstream.
It seems your issue may be caused from the clock parent using for SPI.

Hi sevm89

Could you please tell me how you ported the driver from K5.10 to K5.15?
I have tried compiling the driver from K5.10 on my Jetson running K5.15 and I’m having trouble.

Thank you.

1 Like

Hi stanley.adams

We uploaded the spi driver file in a previous post:
https://forums.developer.nvidia.com/uploads/short-url/v15FDCUVX3B7m1bNyWLuialp91u.txt

Thank you for the quick response.
I was able to compile your modified version of the driver and insert it into the kernel.
Unfortunately it didn’t solve the problem I have.

Hi Stanley,
Could you help to open another topic to discuss the detalils in your case?

Hi KevinFFF

How can we change the parent clock used for SPI and which parent clock should be used?
Thank you.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

I’m verifying this on my setup but I have only MCP2515 module locally.

Could you share the result of the following command on your board?

$ ip -s -d link show can0
$ ip -s -d link show can1