[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR04MB4543B1708FA151EED0CB722A89550@VI1PR04MB4543.eurprd04.prod.outlook.com>
Date: Mon, 1 Apr 2019 07:35:13 +0000
From: Robin Gong <yibin.gong@....com>
To: Igor Plyatov <plyatov@...il.com>,
Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-spi@...r.kernel.org" <linux-spi@...r.kernel.org>,
dl-linux-imx <linux-imx@....com>,
Fabio Estevam <festevam@...il.com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Sascha Hauer <s.hauer@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
Mark Brown <broonie@...nel.org>,
"dmaengine@...r.kernel.org" <dmaengine@...r.kernel.org>,
Vinod Koul <vkoul@...nel.org>,
Dan Williams <dan.j.williams@...el.com>,
Andy Duan <fugang.duan@....com>, Han Xu <han.xu@....com>,
Clark Wang <xiaoning.wang@....com>
Subject: RE: Issues with i.MX SPI DMA transfers
> -----Original Message-----
> From: Igor Plyatov <plyatov@...il.com>
> Sent: 2019年3月28日 19:06
> To: Robin Gong <yibin.gong@....com>; Uwe Kleine-König
> <u.kleine-koenig@...gutronix.de>
> Cc: linux-kernel@...r.kernel.org; linux-arm-kernel@...ts.infradead.org;
> linux-spi@...r.kernel.org; dl-linux-imx <linux-imx@....com>; Fabio Estevam
> <festevam@...il.com>; Pengutronix Kernel Team <kernel@...gutronix.de>;
> Sascha Hauer <s.hauer@...gutronix.de>; Shawn Guo
> <shawnguo@...nel.org>; Mark Brown <broonie@...nel.org>;
> dmaengine@...r.kernel.org; Vinod Koul <vkoul@...nel.org>; Dan Williams
> <dan.j.williams@...el.com>; Andy Duan <fugang.duan@....com>; Han Xu
> <han.xu@....com>; Clark Wang <xiaoning.wang@....com>
> Subject: Re: Issues with i.MX SPI DMA transfers
>
> Dear Robin,
>
> I have applied patches
> 0001-dma-engine-imx-sdma-add-mcu_2_ecspi-script.patch,
> 0002-spi-spi-imx-fix-ERR009165.patch and made testing.
>
> Results are following:
>
> root@cr7:~# spidev_test -D /dev/spidev0.0 -s 12000000 -b 8 -S 512 -I
> 10000000000 -l
> spi mode: 0x20
> bits per word: 8
> max speed: 12000000 Hz (12000 KHz)
> [ 133.987798] spi_imx 2008000.spi: I/O Error in DMA TX [ 133.992810]
> spidev spi0.0: SPI transfer failed: -110 [ 133.997860] spi_master spi0: failed
> to transfer one message from queue can't send spi message: Connection timed
> out Aborted (core dumped)
>
> root@cr7:~# spidev_test -D /dev/spidev1.0 -s 12000000 -b 8 -S 512 -I
> 10000000000 -l
> spi mode: 0x20
> bits per word: 8
> max speed: 12000000 Hz (12000 KHz)
> [ 483.530815] spi_imx 200c000.spi: I/O Error in DMA TX [ 483.535825]
> spidev spi1.0: SPI transfer failed: -110 [ 483.540873] spi_master spi1: failed
> to transfer one message from queue can't send spi message: Connection timed
> out Aborted (core dumped)
>
> root@cr7:~# spidev_test -D /dev/spidev4.0 -s 12000000 -b 8 -S 512 -I
> 10000000000 -l
> spi mode: 0x20
> bits per word: 8
> max speed: 12000000 Hz (12000 KHz)
> [ 94.228774] spi_imx 2018000.spi: I/O Error in DMA TX [ 94.233788]
> spidev spi4.0: SPI transfer failed: -110 [ 94.238837] spi_master spi4: failed
> to transfer one message from queue can't send spi message: Connection timed
> out Aborted (core dumped)
>
> Best wishes.
>
> --
>
> Igor Plyatov
>
>
> > Hi Igor,
Sorry...below another sdma patch(ad0d92d7ba6a) need to be reverted, because
spi driver may dynamically change burst length.
> > Please have a try with the attached patch, assume you have already
> > used the sdma firmware From
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.
> >
> kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Ffirmware%2Flinux-firm
> w
> >
> are.git%2Ftree%2Fimx%2Fsdma%2Fsdma-imx6q.bin&data=02%7C01%7C
> yibin.
> >
> gong%40nxp.com%7Cc0da8a1121f5498ae6b808d6b36d5e70%7C686ea1d3bc2
> b4c6fa9
> >
> 2cd99c5c301635%7C0%7C1%7C636893679644630034&sdata=jgZV1tj3M
> hFXj3XN
> > N7MBQzqwpEPEoZcq6P5eBqEBUlw%3D&reserved=0
> >> -----Original Message-----
> >> From: Igor Plyatov <plyatov@...il.com>
> >> Sent: 2019年3月28日 15:04
> >> To: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>
> >> Cc: linux-kernel@...r.kernel.org;
> >> linux-arm-kernel@...ts.infradead.org;
> >> linux-spi@...r.kernel.org; dl-linux-imx <linux-imx@....com>; Fabio
> >> Estevam <festevam@...il.com>; Pengutronix Kernel Team
> >> <kernel@...gutronix.de>; Sascha Hauer <s.hauer@...gutronix.de>;
> Shawn
> >> Guo <shawnguo@...nel.org>; Mark Brown <broonie@...nel.org>;
> >> dmaengine@...r.kernel.org; Vinod Koul <vkoul@...nel.org>; Dan
> >> Williams <dan.j.williams@...el.com>; Andy Duan <fugang.duan@....com>;
> >> Han Xu <han.xu@....com>; Robin Gong <yibin.gong@....com>; Clark
> Wang
> >> <xiaoning.wang@....com>
> >> Subject: Re: Issues with i.MX SPI DMA transfers
> >>
> >> Dear Uwe,
> >>
> >>
> >>> Hello Igor,
> >>>
> >>> On Wed, Mar 27, 2019 at 08:40:00PM +0300, Igor Plyatov wrote:
> >>>> please, help to resolve two issues with SPI DMA transfers at i.MX6Q
> >>>> platform.
> >>>>
> >>>> First issue is
> >>>> [ 4465.008003] spi_master spi0: I/O Error in DMA RX
> >>>>
> >>>> Second issue is duplication for one of received bytes.
> >>>>
> >>>> Probably, these issues related to each one.
> >>> This is probably the same problem I hit some time ago. Check
> >>> ERR009165 in the errata. You either need to disable DMA or need a
> >>> fixed sdma-Script.
> >> disabling of DMA is not an option, because high throughput required
> >> for SPI bus to communicate with DSPs.
> >>
> >> I'm aware of ERR009165, but as I write some minutes earlier to list,
> >> spi0 (alias for ecspi1) and spi1 (alias for ecspi2) work flawless,
> >> while
> >> spi4 (alias for ecspi5) fails very fast.
> >>
> >> Does same SDMA script used for all SPI interfaces or scripts are different?
> >>
> >> Best wishes.
> >>
> >> --
> >>
> >> Igor Plyatov
Powered by blists - more mailing lists