Hi, I have a modules(mcp2515) that work good on respi3. I plug the module directly into the 40PIN of NX, NX using L4T newest source code. and then did the following work.
1.change the dts, remake and flash the dtb to NX
Blockquote
{
can_clock: can_clock {
compatible = “fixed-clock”;
#clock-cells = <0>;
clock-frequency = <20000000>;
clock-accuracy = <100>;
};
spi@3210000{ /* SPI1 in 40 pin conn */
spi@0 {
status = “okay”;
compatible = “microchip,mcp2515”;
reg = <0x0>;
spi-max-frequency = <10000000>;
nvidia,enable-hw-based-cs;
clocks = <&can_clock>;
interrupt-parent = <&tegra_main_gpio>;
interrupts = <TEGRA194_MAIN_GPIO(Z, 6) 0x1>;
};
spi@1 {
status = “okay”;
compatible = “microchip,mcp2515”;
reg = <0x1>;
spi-max-frequency = <10000000>;
nvidia,enable-hw-based-cs;
clocks = <&can_clock>;
interrupt-parent = <&tegra_main_gpio>;
interrupts = <TEGRA194_MAIN_GPIO(Z, 7) 0x1>;
};
};
2.sudo /opt/nvidia/jetson-io/jetson-io.py, enable the spi1.
3.dmesg show
Blockquote
dmesg log about spi and mcp2515:
[ 1.055675] of_fixed_clk: probe of can_clock failed with error -17
mcp251x spi0.0 can0: MCP2515 successfully initialized.
mcp251x spi0.1 can1: MCP2515 successfully initialized.
can: controller area network core (rev 20120528 abi 9)
can: raw protocol (rev 20120528)
4.start the can network device
sudo modprobe can-raw can-gw can-dev mttcan mcp251x
nvidia@xavier:~$ sudo ip link set can0 type can bitrate 1000000
nvidia@xavier:~$ sudo ip link set up can0
nvidia@xavier:~$ RTNETLINK answers: No such device
nvidia@xavier:~$ sudo ip link set can1 type can bitrate 1000000
nvidia@xavier:~$ sudo ip link set up can1
nvidia@xavier:~$ RTNETLINK answers: No such device
what’ s problem? Need you help