SPI with DMA implementation in LInux kernel for s32vxx

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

SPI with DMA implementation in LInux kernel for s32vxx

SPI with DMA implementation in LInux kernel for s32vxx

Hi,

I am currently working on SPI with DMA for S32V234.
I have tested SPI code it is working fine. I am tested for SPI1 and chip select 0 and mode 3 it is working fine.

Now i have to implement SPI with DMA code.

Please see the below links i have taken as a reference for s32v234, I made little bit changes in that link source code.
http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/235598.html
https://www.toradex.com/community/questions/1961/vf61-linux-spi-dma-support.html

1. Can you please suggest which link is suitable for s32v234?

2. How to write dtsi for "spi with dma"? I wrote the below lines, when compiled it's getting error?
     spi1: spi@400C0000 {
                                compatible = "fsl,s32v234-dspi";
                                reg = <0x0 0x400C0000 0x0 0x1000>;
                                interrupts = <0 62 4>;
                                clocks = <&clks S32V234_CLK_SYS6>;
                                clock-names = "dspi";
                                spi-num-chipselects = <4>;
                                bus-num = <1>;
                                spi-cpol;
                                spi-cpha;
                                /* TODO: Update the dma when edma ip is activated*/
                                use-dma;
                                dmas =  <&edma 12>,
                                        <&edma 13>;
                                dma-names = "rx","tx";

                                status = "disabled";
                };
ERROR (phandle_references): Reference to non-existent node or label "edma"

ERROR (phandle_references): Reference to non-existent node or label "edma"

ERROR: Input tree has errors, aborting (use -f to force output)
scripts/Makefile.lib:293: recipe for target 'arch/arm64/boot/dts/freescale/s32v234-evb.dtb' failed
make[2]: *** [arch/arm64/boot/dts/freescale/s32v234-evb.dtb] Error 2
scripts/Makefile.build:403: recipe for target 'arch/arm64/boot/dts/freescale' failed
make[1]: *** [arch/arm64/boot/dts/freescale] Error 2
arch/arm64/Makefile:89: recipe for target 'dtbs' failed
make: *** [dtbs] Error 2

3. Please give do you have any reference code SPI with DMA for S32V234.

I am waiting for your reply.

Thanks & Regards,
Ramanjineyulu.

%3CLINGO-SUB%20id%3D%22lingo-sub-655900%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ESPI%20with%20DMA%20implementation%20in%20LInux%20kernel%20for%20s32vxx%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-655900%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20am%20currently%20working%20on%20SPI%20with%20DMA%20for%20S32V234.%3CBR%20%2F%3EI%20have%20tested%20SPI%20code%20it%20is%20working%20fine.%20I%20am%20tested%20for%20SPI1%20and%20chip%20select%200%20and%20mode%203%20it%20is%20working%20fine.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3ENow%20i%20have%20to%20implement%20SPI%20with%20DMA%20code.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EPlease%20see%20the%20below%20links%20i%20have%20taken%20as%20a%20reference%20for%20s32v234%2C%20I%20made%20little%20bit%20changes%20in%20that%20link%20source%20code.%3CBR%20%2F%3E%3CA%20class%3D%22jive-link-external-small%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fexternal-link.jspa%3Furl%3Dhttp%253A%252F%252Flists.infradead.org%252Fpipermail%252Flinux-arm-kernel%252F2014-February%252F235598.html%22%20target%3D%22_blank%22%3Ehttp%3A%2F%2Flists.infradead.org%2Fpipermail%2Flinux-arm-kernel%2F2014-February%2F235598.html%3C%2FA%3E%3CBR%20%2F%3E%3CA%20class%3D%22jive-link-external-small%22%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Fexternal-link.jspa%3Furl%3Dhttps%253A%252F%252Fwww.toradex.com%252Fcommunity%252Fquestions%252F1961%252Fvf61-linux-spi-dma-support.html%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fwww.toradex.com%2Fcommunity%2Fquestions%2F1961%2Fvf61-linux-spi-dma-support.html%3C%2FA%3E%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E1.%20Can%20you%20please%20suggest%20which%20link%20is%20suitable%20for%20s32v234%3F%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E2.%20How%20to%20write%20dtsi%20for%20%22spi%20with%20dma%22%3F%20I%20wrote%20the%20below%20lines%2C%20when%20compiled%20it's%20getting%20error%3F%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20spi1%3A%20spi%40400C0000%20%7B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20compatible%20%3D%20%22fsl%2Cs32v234-dspi%22%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20reg%20%3D%20%26lt%3B0x0%200x400C0000%200x0%200x1000%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20interrupts%20%3D%20%26lt%3B0%2062%204%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clocks%20%3D%20%26lt%3B%26amp%3Bclks%20S32V234_CLK_SYS6%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20clock-names%20%3D%20%22dspi%22%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20spi-num-chipselects%20%3D%20%26lt%3B4%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20bus-num%20%3D%20%26lt%3B1%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20spi-cpol%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20spi-cpha%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%2F*%20TODO%3A%20Update%20the%20dma%20when%20edma%20ip%20is%20activated*%2F%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20use-dma%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20dmas%20%3D%26nbsp%3B%20%26lt%3B%26amp%3Bedma%2012%26gt%3B%2C%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%26lt%3B%26amp%3Bedma%2013%26gt%3B%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20dma-names%20%3D%20%22rx%22%2C%22tx%22%3B%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20status%20%3D%20%22disabled%22%3B%3CBR%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3B%3CBR%20%2F%3EERROR%20(phandle_references)%3A%20Reference%20to%20non-existent%20node%20or%20label%20%22edma%22%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EERROR%20(phandle_references)%3A%20Reference%20to%20non-existent%20node%20or%20label%20%22edma%22%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EERROR%3A%20Input%20tree%20has%20errors%2C%20aborting%20(use%20-f%20to%20force%20output)%3CBR%20%2F%3Escripts%2FMakefile.lib%3A293%3A%20recipe%20for%20target%20'arch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Fs32v234-evb.dtb'%20failed%3CBR%20%2F%3Emake%5B2%5D%3A%20***%20%5Barch%2Farm64%2Fboot%2Fdts%2Ffreescale%2Fs32v234-evb.dtb%5D%20Error%202%3CBR%20%2F%3Escripts%2FMakefile.build%3A403%3A%20recipe%20for%20target%20'arch%2Farm64%2Fboot%2Fdts%2Ffreescale'%20failed%3CBR%20%2F%3Emake%5B1%5D%3A%20***%20%5Barch%2Farm64%2Fboot%2Fdts%2Ffreescale%5D%20Error%202%3CBR%20%2F%3Earch%2Farm64%2FMakefile%3A89%3A%20recipe%20for%20target%20'dtbs'%20failed%3CBR%20%2F%3Emake%3A%20***%20%5Bdtbs%5D%20Error%202%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3E3.%20Please%20give%20do%20you%20have%20any%20reference%20code%20SPI%20with%20DMA%20for%20S32V234.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EI%20am%20waiting%20for%20your%20reply.%3C%2FP%3E%3CP%3E%3C%2FP%3E%3CP%3EThanks%20%26amp%3B%20Regards%2C%3CBR%20%2F%3ERamanjineyulu.%3C%2FP%3E%3C%2FLINGO-BODY%3E
No ratings
Version history
Last update:
‎10-20-2016 11:41 PM
Updated by: