Add SPI slave support in linux kernel

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

Add SPI slave support in linux kernel

3,203 次查看
sanketparekh
Contributor II

Hi,

I am using linuxkernel version 4.1.15.

How do i add SPI slave mode support in linuxkernel version 4.1.15?

Please share your thoughts.

Regards,

Sanket Parekh

标签 (1)
2 回复数

2,388 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Sanket

one can try solutions provided on

[RFC,5/5] spi: imx: Add support for SPI Slave mode for imx53 and imx6 chips - Patchwork 
NXP / Freescale i.MX6 as an SPI slave 

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

2,388 次查看
sanketparekh
Contributor II

Thanks for your response. I was going through the code and understanding the things. Can you please help me with the following:

1.  As CONFIG_SPI_SLAVE is added in kernel from kernel version V4.13-rc1 (v4.13-rc1) and I am using the older kernel version V4.1.15 - do I need to add any patch in the kernel (to support the slave mode in the kernel). In case we do have to add patch - can you please share the patch.

2. Can you please help me with the device tree node sample, for making Linux side controller ( ecspi ) as the slave

3. Also, once the Linux side controller is the slave, how can an userspace application get an idea, when the data is being received and how to find the amount of data being received   - I mean master can send any random amount of data ( I believe MXC_INT_RR is received and mx51_ecspi_rx_available will be called in the driver  for every 32 bits data received - is my understanding correct )

0 项奖励