ECSPI slave mode support for iMX6

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

ECSPI slave mode support for iMX6

4,158 次查看
kuldeepnigam
Contributor I

Hi,

I am working on phyBOARD-Segin i.MX 6UL Alpha Kit and Linux 4.8.0 running on it. We want to enable ECSPI slave mode for one of the usecase. Can anyone let me know how to configure it and how to test it from user space.

Regards,

Kuldeep

标签 (3)
3 回复数

2,383 次查看
kuldeepnigam
Contributor I

Hi,

I have ported the support for SPI slave from kernel 4.15 to kernel 4.8 and I can see the sysfs entries for SPI slave.
Testing the SPI communication using Spidev application in Slave side. Also able to communicate to phyBOARD-Segin i.MX 6UL Alpha Kit.  
But the data sent from Master and data received at slave is not same.
I am using the following setting at master :
SPI clock : 500 KHz (also tested with different Baudrate)
SPI Mode : 1 (CPOL = 0, CPOH = 0)
Frame size : 8 bits

DMA disabled at slave side.

Can anyone provide some input to debug further.

Thanks,

Kuldeep

0 项奖励
回复

2,383 次查看
fabio_estevam
NXP Employee
NXP Employee

spi-imx driver supports SPI Slave since commit: 71abd29057cb1 ("spi: imx: Add support for SPI Slave mode"), which is part of 4.15-rc kernel.

Regards,

Fabio Estevam

2,383 次查看
Yuri
NXP Employee
NXP Employee

Hello,

 

   NXP BSP does not support neither ECSPI slave mode nor kernel 4.8.

Nevertheless, customers can configure SPI slave mode support in Linux (SPIDEV).
By default it is not supported; the following sequence may be performed for SPIDEV :

$ bitbake linux-imx -c menuconfig

# select DEVICE DRIVERS -> SPI Support -> User mode SPI device driver support

$ bitbake linux-imx
$ bitbake core-image-minimal  

  The recent command is used to deploy compiled files to file system.

Also, the following may be helpful :

https://community.nxp.com/message/921897 

Have a great day,
Yuri

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

0 项奖励
回复