imx6 spi slave not receiving data

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

imx6 spi slave not receiving data

Jump to solution
2,440 Views
hongfengwang
Contributor I

I am running mainline kernel 4.2.6 on hummingboard-gate (imx6solo).

Now I have one raspberryPI as SPI master and the hummingboard as slave.

I connected SS/SCLK/MISO/MOSI, the waveform looks correct, however I never see data ready bit set in imx6's spi status register, or irq triggered.

all four pins are setup in IOMUXC as in pinmux tool.

ECSPI2 registers:

ECSPI_CONREG=0x00700001

ECSPI_CONFIGREG=0x000f0000

ECSPI_INTREG=0x00000008

CCM's ecspi2 clk is enabled, irq requested is 64

spi master is configured as CS active low, mode 0.

do I need to setup anything else?

Labels (2)
0 Kudos
1 Solution
1,049 Views
igorpadykov
NXP Employee
NXP Employee

Hi Hongfeng

one can try patch

http://lkml.iu.edu/hypermail/linux/kernel/1509.3/01176.html

or port older kernel patch

https://community.freescale.com/docs/DOC-97380

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

View solution in original post

4 Replies
1,050 Views
igorpadykov
NXP Employee
NXP Employee

Hi Hongfeng

one can try patch

http://lkml.iu.edu/hypermail/linux/kernel/1509.3/01176.html

or port older kernel patch

https://community.freescale.com/docs/DOC-97380

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

1,049 Views
moowonlee
Contributor II

hi igorpadykov

Is it possible to apply this patch to linux-3.10 for adding Spi slave mode ?

Linux-Kernel Archive: [PATCH v2 8/8] spi: imx: Add support for SPI Slave mode for imx53 and imx6 chi...

I applied below path to  linux-3.10 but, My imx6sx is not working as spi slave mode becaues spi rx isr doesn't get RX data.

i.MX6 ESPI slave mode support patch based on rel_imx_3.0.35_4.1.0

if you have any tip, please know to me.

0 Kudos
1,049 Views
hongfengwang
Contributor I

I applied the patches in

Linux-Kernel Archive: [PATCH v2 8/8] spi: imx: Add support for SPI Slave mode for imx53 and imx6 chi...

Now the hummingboard is able to receive data from SPI.

thanks for the help!

0 Kudos
1,049 Views
mingfang
Contributor I

hi hongfeng,

          i use the same patch,but can't receive any data when imx6 as slave.would you like to tell me your register configs?

0 Kudos