[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <VI1PR04MB4543DEA3C0CED159C472E85F89570@VI1PR04MB4543.eurprd04.prod.outlook.com>
Date: Wed, 3 Apr 2019 07:38:24 +0000
From: Robin Gong <yibin.gong@....com>
To: Igor Plyatov <plyatov@...il.com>
CC: Uwe Kleine-König
<u.kleine-koenig@...gutronix.de>,
"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年4月2日 20:15
> To: Robin Gong <yibin.gong@....com>
> Cc: Uwe Kleine-König <u.kleine-koenig@...gutronix.de>;
> 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,
>
> >> now I have reverted patch ad0d92d7ba6a.
> >> Patches 0001-dma-engine-imx-sdma-add-mcu_2_ecspi-script.patch and
> >> 0002-spi-spi-imx-fix-ERR009165.patch are applied.
> >>
> >>
> >> Kernel log show messages
> >>
> >> [ 29.202639] imx-sdma 20ec000.sdma: loaded firmware 3.3 [
> >> 29.238595] spi_imx 2008000.spi: probed [ 29.242802] spi_imx
> >> 200c000.spi: probed [ 29.245217] spi_imx 2018000.spi: probed
> >>
> >> SPI DMA transfers still not work.
> >>
> >> If I test 32 byte transfers, then they work fine. But 64 byte
> >> transfers fails always and I see error messages
> >>
> >> root@cr7:~# spidev_test -D /dev/spidev4.1 -s 1200000 -b 8 -S 64 -I 1
> >> -l spi mode: 0x20 bits per word: 8 max speed: 1200000 Hz (1200 KHz) [
> >> 423.686736] spi_master spi4: I/O Error in DMA RX [ 423.691392]
> >> spidev spi4.1: SPI transfer failed: -110 [ 423.696382] spi_master
> >> spi4: failed to transfer one message from queue can't send spi
> >> message: Connection timed out Aborted (core dumped)
> >>
> >> I suppose, transfers shorter then 64 bytes made with help of PIO.
> >>
> >> Robin, is there any chance for you to find some time and look at this
> >> issue again?
> > I have quick test with spidev_test loopback, but didn't meet your
> > error, Is your code the almost latest code in linux-next as mine?
> >
> > root@...6qpdlsolox:~# cat /proc/interrupts | grep sdma
> > 48: 37 GPC 2 Level sdma
> > -lt@...6qpdlsolox:~# ./spidev_test -D /dev/spidev0.0 -s 1200000 -b 8
> > -S 64 -I 1 -l spi mode: 0x20 bits per word: 8 max speed: 1200000 Hz
> > (1200 KHz) root@...6qpdlsolox:~# cat /proc/interrupts | grep sdma
> > 48: 43 GPC 2 Level sdma
> > ./spidev_test -D /dev/spidev0.0 -s 1200000 -b 8 -S 512 -I 1 -l spi
> > mode: 0x20 bits per word: 8 max speed: 1200000 Hz (1200 KHz)
> > total: tx 0.5KB, rx 0.5KB
>
>
> My previous test results based on kernel from "main" branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git.
>
> Now I have tested kernel from "main" branch of
> git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git.
>
> Its latest commit is 05d08e2995cbe6efdb993482ee0d38a77040861a.
>
> Additionally, I have reverted patch ad0d92d7ba6a and apply yours patches
> 0001-dma-engine-imx-sdma-add-mcu_2_ecspi-script.patch and
> 0002-spi-spi-imx-fix-ERR009165.patch.
>
> Difference between 05d08e2995cbe6efdb993482ee0d38a77040861a and
> current state of drivers attached as spi-and-sdma-drivers.diff.
>
> SPI driver still not work. It has same result as from my previous email.
>
> Looks as you use either different GIT branch of kernel or you have forget to say
> me about some patch.
The same base as your side commit '05d08e2995cbe6efdb993482ee0d38a77040861a ' and
same diff, but did you revert another sdma patch about "clk_ratio" which broke sdma basic
function on non-i.mx8m chips?
commit 25aaa75df1e659901d77085bcdd25eaabf265688
Author: Angus Ainslie (Purism) <angus@...ea.ca>
Date: Mon Jan 28 09:03:21 2019 -0700
dmaengine: imx-sdma: add clock ratio 1:1 check
On i.mx8 mscale B0 chip, AHB/SDMA clock ratio 2:1 can't be supportted,
since SDMA clock ratio has to be increased to 250Mhz, AHB can't reach
to 500Mhz, so use 1:1 instead.
>
> Best wishes.
>
> --
>
> Igor Plyatov
Powered by blists - more mailing lists