SPI MISO non-functional

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI MISO non-functional

681 Views
mmonto58
Contributor II

I’ve seen on multiple busses is that the MISO just outright doesn’t work in linux. We are using kernel 3.15 (boundary branch).

 

The behavior is (on and IMX6 quad plus):

In UBoot:

SPI 4 appears to be fully functional. I am able to read/write and see all the data expected.

In linux, it seems to be writing, I see the data on a logic analyzer, however the MISO is just flat.

The CLK, SSO, and MOSI all seem to function properly.

This is using the same bit patterns as what is sent In U-Boot.

 

For ECSPI4 the device tree entries are as follow:

Pin-ctrl group:

MX6QDL_PAD_EIM_D22__ECSPI4_MISO   0x100b1

MX6QDL_PAD_EIM_D28__ECSPI4_MOSI   0x100b1

MX6QDL_PAD_EIM_D21__ECSPI4_SCLK    0x100b1

 

&ecspi4 {

fsl,spi-num-chipselects = <1>;

cs-gpios = (&gpio3 20 GPIO_ACTIVE_LOW>;

pinctrl-names = “default”;

pinctrl-0 = &pinctrl_ecspi4>;

status = “okay”;

spidev0@00 {

compatible = “spidev”;

spi-max-freuqnecy = <20000000>;

reg = <0>;

};

};

 

The above code I had to type out real quick (developed in VM on windows machine so I couldn’t copy/paste)

 

Weve also seen this issue on ECSPI2 where with a logic analyzer, we see the data being written out on the bus, but no reply

0 Kudos
1 Reply

379 Views
jimmychan
NXP TechSupport
NXP TechSupport

Do you set the GPIO pin for the cs-gpios?

Attached is a BSP porting guide. You can take the section 5.2.2 " Selecting SPI NOR on the Linux Image" for reference.

0 Kudos