ecspi dma mode not working in i.mx8mm evk

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

ecspi dma mode not working in i.mx8mm evk

ソリューションへジャンプ
2,116件の閲覧回数
sreedhar_appala
Contributor IV

Hi,

I am posting the query again, similar query has been posted long back by myself. please find below the previous post details.

https://community.nxp.com/t5/i-MX-Processors/iMX8MM-ECSPI-DMA-Issue/td-p/1166322

we are now making a custom board with i.mx8mm but the linux kernel will be 4.14

so i would like to request is there any test code to perform the ecspi dma mode test on i.mx8mm evk

and 

also please let me know the exact linux kernel version in which ecspi dma mode is perfectly working.

I will try to port it to 4,14 version.

due to the current pandemic situation, i am unable to visit the hw lab for debugging.

please provide your suggestions

Thank you, Sreedhar

ラベル(3)
0 件の賞賛
返信
1 解決策
2,105件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

New versions all can support DMA mode

https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/spi/spi-imx.c?h=imx_5.4.70_2.3.0

 

Main function in spi-imx.c is spi_imx_dma_transfer

 

I didn't find spi dma test

 

BR

Zhiming

 

元の投稿で解決策を見る

0 件の賞賛
返信
5 返答(返信)
2,106件の閲覧回数
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi

New versions all can support DMA mode

https://source.codeaurora.org/external/imx/linux-imx/tree/drivers/spi/spi-imx.c?h=imx_5.4.70_2.3.0

 

Main function in spi-imx.c is spi_imx_dma_transfer

 

I didn't find spi dma test

 

BR

Zhiming

 

0 件の賞賛
返信
1,810件の閲覧回数
BiyongSUN
NXP Employee
NXP Employee

 

iMX8MM ECSPI DMA Issue - NXP Community

I am working with i.MX8MM EVK and 4.19.35.1.1.0 Yocto distribution.

We have interfaced a slave to ECSPI2 pins exposed on J1003 of i.MX8MM EVK.

ECSPI2 is configured as Master, CPOL = CPHA = 0, Bits Per Word  = 8

 

The link says slave mode. 

 

It is silicon errata ERR009535, that is why the ecspi driver slave is PIO mode. 

NXP Semiconductors IMX8MM_0N87W
Mask Set Errata Rev. 1, 09/2021
Mask Set Errata for Mask 0N87W

IMX8MM_0N87W.pdf

 

Untitled.png

 

linux-imx/drivers/spi/spi-imx.c”, function “spi_imx_can_dma()”.

 


static bool spi_imx_can_dma(struct spi_master *master, struct spi_device *spi,
struct spi_transfer *transfer)
{
struct spi_imx_data *spi_imx = spi_master_get_devdata(master);

if (!use_dma || master->fallback)
return false;

if (!master->dma_rx)
return false;

if (spi_imx->slave_mode)
return false;

if (transfer->len < spi_imx->devtype_data->fifo_size)
return false;

spi_imx->dynamic_burst = 0;

return true;
}

 

 

 

 

 

0 件の賞賛
返信
1,830件の閲覧回数
Guangyu
Contributor I

Hi, 

May I ask a question, is this new version valid for ECSPI in master mode to support DMA mode? Can DMA mode be supported while ECSPI works in slave mode? thanks @Zhiming_Liu 

 

B.R.

Guangyu

0 件の賞賛
返信
1,794件の閲覧回数
BiyongSUN
NXP Employee
NXP Employee

Guangyu,

Because of the silicon bug the ecspi could not use dma under slave mode. 

You are very professional. 

0 件の賞賛
返信
2,085件の閲覧回数
sreedhar_appala
Contributor IV

Thank you Zhiming !!

0 件の賞賛
返信