Add SPI slave support in linux kernel

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

Add SPI slave support in linux kernel

3,137 Views
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

Labels (1)
2 Replies

2,322 Views
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,322 Views
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 Kudos