AnsweredAssumed Answered

Add spi agent onto ls1043 dspi bus

Question asked by Serge Payre on Feb 26, 2018
Latest reply on Feb 28, 2018 by Serge Payre

Hi,

 

I want to add mcp2515 spi/can agent onto Ls1043 dspi bus. To do this :

- I modified RCW configuration word to activate the fonctionnality

- I added the following line in my devicetree file :

 

&dspi0 {
      status = "okay";
      bus-num = <0>;

      can0: can@1 {
         compatible = "microchip,mcp2515";
         reg = <1>;
         spi-max-frequency = <5000000>;

      };

};

 

- I included "fsl-ls1043a.dtsi" file in my devicetree file

 

When I start, i obtain the following messages (with dmesg) :

 

[ 1.121190] fsl-quadspi 1550000.quadspi: n25q128a11 (16384 Kbytes)
[ 1.128048] fsl-dspi 2100000.dspi: registered master spi0
[ 1.128133] spi spi0.1: setup mode 0, 8 bits/w, 5000000 Hz max --> 0
[ 1.128178] fsl-dspi 2100000.dspi: registered child spi0.1
[ 11.915630] Here I am: /home/bip/QorIQ-SDK-V2.0-20160527-yocto/build_bipls1043/tmp/work-shared/bipls1043/kernel-source/drivers/net/can/spi/mcp251x.c:1035
[ 11.929414] Here I am: /home/bip/QorIQ-SDK-V2.0-20160527-yocto/build_bipls1043/tmp/work-shared/bipls1043/kernel-source/drivers/net/can/spi/mcp251x.c:1043 data=-2
[ 11.943973] mcp251x: probe of spi0.1 failed with error -2

 

As you can see, I add some trace in mcp251x.c. I see that "mcp251x_platform_data" in "mcp251x_can_probe" function returned null pointer.

 

Why ?

 

What did I forget to do ?

 

Best regards

Outcomes