DTS entry for slave SPI device on imx28-evk SSP2.

cancel
Showing results for 
Search instead for 
Did you mean: 

DTS entry for slave SPI device on imx28-evk SSP2.

1,824 Views
RandyGraham
Contributor IV

Hello,

I am running mainline 3.7.rc-1 kernel on my imx28-evk board and need some help to configure a SPI slave device on SPI bus SSP2.

I have a microchip msf24j40 802.15.4 device wired as follows to my imx28-evk board (no flash).

SPI bus : SSP2

Interrupt: GPIO3_0

CS      : SSP2_SS0

(chip select)

The driver for this device has modalis = mrf24j40

I assume I need to update my imx28-evk.dts device tree file but am confused as to how .

Also, if I update my dts file, do I need to add anything to my board file ?

I thought I could just modify the existing flash entry in the dts file but am not sure how to do so:


ssp2: ssp@80014000 {

     #address-cells = <1>;

     #size-cells = <0>;

     compatible = "fsl,imx28-spi";

     pinctrl-names = "default";

     pinctrl-0 = <&spi2_pins_a>;

     status = "okay";

     flash: m25p80@0 {

          #address-cells = <1>;

          #size-cells = <1>;

          compatible = "sst,sst25vf016b";

          spi-max-frequency = <40000000>;

          reg = <0>;

          };

};

Can someone help me with this ?

Thanks for any hints :smileywink:

-Randy


Labels (2)
0 Kudos
6 Replies

304 Views
garycoulbourne
Contributor I

Was there ever a solution to this problem found?  I'm running into the same issues...

0 Kudos

304 Views
RandyGraham
Contributor IV

I never fully resolved it, but will have to get back to it soon.

0 Kudos

304 Views
MarekVasut
Senior Contributor I

Upgrade your kernel first, 3.7.5 has some SPI fixes. The 3.7-rc is really old and has bugs. The DT entry looks ok, make sure you have CONFIG_MTD_M25P80=y in your .config .

0 Kudos

304 Views
RandyGraham
Contributor IV

Will do, thanks.

0 Kudos

304 Views
fabio_estevam
NXP Employee
NXP Employee

Also, since your SPI device has an interrupt line, you can look at arch/arm/boot/dts/imx51-babbage.dts for an example.

mx51-babbage board has a mc13892 pmic connected via spi and also with a gpio connected to the interrupt line.

0 Kudos

304 Views
RandyGraham
Contributor IV

Fantastic, thanks Fabio.

0 Kudos