VF5xx: DSPI and eDMA usage

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

VF5xx: DSPI and eDMA usage

608 Views
christianstenze
Contributor I

Hello,

as stated in this link it is not recommended or possible to use the freescale dspi core with eDMA.

https://community.freescale.com/thread/323538#407491

My expieriences with the vybrid vf50 processor are very close to the described behaviour. I tried to use dspi with the default spi-fsl-dspi driver. Further I declared an mmc-spi-slot in our devicetree.

&dspi1 {

     status = "okay";

     mmc-slot@0 {

         compatible = "mmc-spi-slot";

         reg = <0>;

         voltage-ranges = <3300 3300>;

         spi-max-frequency = <50000000>;

         fsl,spi-cs-sck-delay = <100>;

         fsl,spi-sck-cs-delay = <50>;

     };

};

This definetly doesn't work.

The full mmc log gives me something like this in the sdcard init phase:

CMD0 -> sometimes ok, but also timeouts -> 40h (transmitted cmd-code to slave in hexa)

CMD8 -> sometimes ok, but also timeouts -> 48h (cmd code hexa)

All further commands have a systematic error, as could observed in a logic analyzer:

Eg. CMD58 -> never ok, transmitted api command should be: 40h+3Ah (58d) = 7Ah, oberserved transmitted cmd is: FA, the most significant bit is 1 not.

All further commands behave in the same way.

My first and working solution was to adapt the mmc_spi driver not using dma. So now it is working in pure PIO mode.

I changed this line  (approx. 1400)

if (spi->master->dev.parent->dma_mask) {

in something like this

if (0) {

So the mmc_spi driver do not use dma transfers anymore.

Since these ops are very processor intensive task a dma capable spi driver would be helpful.

Further on I discovered a patchset starting here:

http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/235597.html

At time it is not applied in the mainline kernel. So I looked for a reason and found the freescale forum entry mentioned above.

As wiki says the dspi core of the vybrid processors is from the coldfire series.

Can you confirm these statements, is the usage of dspi and dma within current vybrid processor reasonable?

Kind regards

Christian Stenzel

Labels (1)
0 Kudos
1 Reply

440 Views
art
NXP Employee
NXP Employee

No, using DSPI with eDMA is _not_ reasonable on the current Vybrid processors due to the reasons, described in the community thread you're referring to.


Have a great day,
Artur

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

0 Kudos