imx6 spi slave not receiving data

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

imx6 spi slave not receiving data

跳至解决方案
2,486 次查看
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?

标签 (2)
0 项奖励
1 解答
1,095 次查看
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!

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

在原帖中查看解决方案

4 回复数
1,096 次查看
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,095 次查看
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 项奖励
1,095 次查看
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 项奖励
1,095 次查看
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 项奖励