imx6 spi read/write dma support

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

imx6 spi read/write dma support

9,783 Views
xiongweihuang
Contributor III

Hello all
From http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/drivers/spi/spi_imx.c?h=imx_3.0.35_...

seems spi-imx.c don't have the DMA support while spi transfer ?

Does anybody know if  Freescale will plan to support this ?

Or , that's it ??

Labels (2)
0 Kudos
11 Replies

1,937 Views
arnoutdiels
Contributor III

For anyone who still finds his way to this question, in 2014 DMA support was added in spi-imx.c for imx6

0 Kudos

1,937 Views
xiongweihuang
Contributor III

So , sdma firmware from git tree should have espi support already ,right ?

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/firmware/imx/sdma/sdma-imx6q-to1.bi...

0 Kudos

1,937 Views
zunli
Contributor I

Sorry, I did not test the firmware you mentioned, I just refer the sdma design of spi_lpb.c in the sdk.

But unfortunately, the file is not designed under linux originally, so you could not use it directly.

0 Kudos

1,937 Views
xiongweihuang
Contributor III

And I try to compare

imx6_platform_sdk_v1.1.0.tar\iMX6_Platform_SDK\sdk\drivers\sdma\src\sdma_script_code_mx6dq.h

with

http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/tree/firmware/imx/sdma/sdma-imx6q-to1.bi...

seems like firmware binary is different ??

0 Kudos

1,937 Views
SergioSolis
NXP Employee
NXP Employee

Hello Xiong,

As of today, there are no plans to add DMA support, there are no plans to add functionality to these drivers.

Please let me know if you have any other question.

0 Kudos

1,937 Views
howardhsu
Contributor I

Hello all,

I am working to improve boot time on the target with iMX6SL+SPI NOR flash.

In out rest, loading 4.501MB images takes about 2.297 secs.

According 30MHz SPI read clock, the actual transfer time is 1.2 secs.

It shows the overhead in spi_xfer takes about 1 seconds (u-boot/drivers/spi/imx_ecspi.c).

I want to reduce this overhead by applying DMA.    

Q1: Is there any reference code for ecspi dma ?

I am trying to use SDMA SDMA_SHP_2_MCU in u-boot now.

First I am trying RX DMA --> but it stucks with BUSY status after starting dma transferring ...

Q2: How to proper set the chan_desc watermark level and and ECSPIx_DMAREG ( RXTDEN, RX_DMA_DMA_LENGTH, RXDEN, RX_THRESHOLD) to perform a ecspi rx dma operation ?

Thank you.

0 Kudos

1,937 Views
fork
Contributor I

The iMX6 Platform SDK has a SPI DMA example which works.

0 Kudos

1,937 Views
zunli
Contributor I

Hi fork,

Currently I am also debugging SPI with DMA access and could not find the example in I.MX6 platform SDK you mentioned. Could you please share the link? Thank you very much!

0 Kudos

1,937 Views
fork
Contributor I

You can download the platform SDK here:

i.MX6 Platform SDK 1.1 Release

Then look at sdk/drivers/sdma/test/spi_lpb.c

0 Kudos

1,937 Views
zunli
Contributor I

Hi fork,


Thanks very much for your kind help. I have already found that file.

Best regards!

0 Kudos

1,937 Views
laufei
Contributor III

Hi, fork

Can you send the link where is the SPI DMA example or the right link of iMX6 Platfrom SDK?

Thank you for your support!

0 Kudos