Hi Adam, Sorry for the late response. Due to Freescale errata ERR003775 "eCSPI: Burst completion by Chip Select (SS) signal in Slave mode is not functional" burst size must be set exactly to the size of the transfer. This leads us to send data only through the 4bytes per word (bpw) mode. If you want to send data with mode of 1 or 2bpw, it has high risk. Because: 1. The order of each word needs to be swapped before sending and after receiving. 2. When dealing with the last unaligned byte, data may be lost. At the same time, after sending more than 512 bytes continuously, we observed that the slave sent a word of 0 data. Therefore, the current eCSPI slave data transmission and reception in one burst is limited to 512 bytes. The DMA mode leads to 4bpw limitation, while the data swap and the limitation of up to 512 bytes of data in one frame make DMA mode inefficient. Based on the above limitations, we do not support the eCSPI slave DMA mode. Best Regards, Clark Wang > -----Original Message----- > From: Peng Fan > Sent: Wednesday, June 30, 2021 17:35 > To: Adam Ford ; linux-spi spi@vger.kernel.org>; dl-linux-imx ; Clark Wang > > Cc: Charles Stevens > Subject: RE: ECSPI Slave on i.M8M Mini with DMA > > > Subject: ECSPI Slave on i.M8M Mini with DMA > > Clark may help on this. > > Regards, > Peng. > > > > > To the NXP team, > > > > I noticed the spi-imx driver has a function called spi_imx_can_dma() > > which returns false if the SPI is configured as a slave, so the dma > > cannot be used in slave mode. > > > > Section 10.1.2.7 "DMA" of the The 8MM Ref manual, Rev 3, shows there > > are a few conditions that can trigger the DMA. Of them, two are > > RXFIFO data request and RXFIFO full. The block diagram in that > > section shows it can retrieve data with DMA > > > > However, in section 10.1.4 "Applications" of the same document, it > > shows the optional DMA configurations are only in the SPI master > > configuration and not the SPI slave configuration. > > > > The ECSPIx_DMAREG documentation (section 10.1.5.6) states "The ECSPI > > sends out DMA requests when the appropriate FIFO conditions are > matched." > > Unfortunately it doesn't explicitly state whether that's only for > > master or available in either master or slave mode. > > > > Can someone tell me if DMA is available when SPI is configured as a slave? > > > > thank you, > > > > adam