How to configure interrupts in DTS for mcp2515 on Xavier NX

Hi!

I’m trying to connect mcp2515 on Xavier NX in order to implement another canbus interface.
I used the results of the most relevant thread How to enable MCP2515 on Xavier-NX
So I retrieved DTS from kernel_tegra194-p3668-all-p3509-0000.dtb, made modifications in the tree with the following lines (after preprocessing)

 can_clock: can_clock {
  compatible = "fixed-clock";
  #clock-cells = <0>;
  clock-frequency = <20000000>;
  clock-accuracy = <100>;
 };


 spi@3230000 {
  spi@0 {
   status = "okay";
   compatible = "microchip,mcp2515";
   reg = <0x0>;
   spi-max-frequency = <10000000>;
   nvidia,enable-hw-based-cs;
   clocks = <&can_clock>;
   interrupt-parent = "/gpio@2200000";
   interrupts = < ((24 * 8) + 4) 0x1 >;
  };
 };

I got the line “interrupts = < ((24 * 8) + 4) 0x1 >;” from “interrupts = <TEGRA194_MAIN_GPIO(Y, 4) 0x1>;” after preprocessing (cpp -E -undef -x assembler-with-cpp kern.dts kern.dts.preprocessed)
Then I call

dtc -f  -@ -I dts -O dtb -o custom.dtb kern.dts.preprocessed

and I got an error:

dtc: livetree.c:437: propval_cell: Assertion `prop->val.len == sizeof(cell_t)’ failed.

If I remove line “interrupts = < ((24 * 8) + 4) 0x1 >;” from the section, then compilation finish successfully.
Could you please help me to configure interrupts for mcp2515 properly?

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

Sorry for the late response, have you managed to get issue resolved? Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.