From: linux@bigler.io
To: Stefan Moring <stefan.moring@technolution.nl>
Cc: Francesco Dolcini <francesco@dolcini.it>,
Linux regressions mailing list <regressions@lists.linux.dev>,
Mark Brown <broonie@kernel.org>,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org
Subject: Re: spi: imx: Increase imx51 ecspi burst length fails on imx6dl and imx8mm
Date: Mon, 20 Nov 2023 17:45:29 +0100 [thread overview]
Message-ID: <314e596f4f7b7e7f8742c47dfeeb7d93@mail.infomaniak.com> (raw)
In-Reply-To: <CAB3BuKDb6uucujD7ac-w4pa1GVNLSQUA4OGE7i074mQSU==WaA@mail.gmail.com>
Hi Stefan
I added my printing
@@ -655,12 +658,25 @@ static int mx51_ecspi_prepare_transfer(struct spi_imx_data *spi_imx,
/* Clear BL field and set the right value */
ctrl &= ~MX51_ECSPI_CTRL_BL_MASK;
+ dev_info(spi_imx->dev, "%s: count=%d, bits_per_word=%d\n",
+ __FUNCTION__, spi_imx->count, spi_imx->bits_per_word);
+
if (spi_imx->target_mode && is_imx53_ecspi(spi_imx))
ctrl |= (spi_imx->target_burst * 8 - 1)
<< MX51_ECSPI_CTRL_BL_OFFSET;
and run the test with the burst enabled
/var/volatile/tmp# spidev_test --device /dev/spidev1.0 --speed 20000000 --bpw 8 -i 127bytes-spi-test-data.bin -o 127bytes-spi-test-result.bin
[ 802.729824] spi_imx 30830000.spi: mx51_ecspi_prepare_transfer: count=127, bits_per_word=8
-> transmitted 504 Bytes on the line
then I run it with burst disabled
spidev_test --device /dev/spidev1.0 --speed 20000000 --bpw 8 -i 127bytes-spi-test-data.bin -o 127bytes-spi-test-result.bin
[ 316.683807] spi_imx 30830000.spi: mx51_ecspi_prepare_transfer: count=0, bits_per_word=8
-> transmitted 127 Bytes on the line
The count is different
- for burst-enabled 127
- for burst-disable 0
concerning the sdma-firmware I checked on
https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/tree/imx/sdma
but the latest I found was 4.5
Regards
Stefan
Am 2023-11-20T16:30:15.000+01:00 hat Stefan Moring <stefan.moring@technolution.nl> geschrieben:
> Hi Stefan,
>
> I have been trying to reproduce your error on my iMX8M, scoping the SPI
> lines, but everything works as expected. I don't have the exact same board,
> but I don't think that should be a problem. One difference I noticed is
> that my imx-sdma firmware is version 4.6.
>
> Can you verify the values used for the transfer, spi_imx->count and
> spi_imx->bits_per_word inside the mx51_ecpsi_prepare_transfer() method?
> Those are the only two things that changed in the commits. Maybe compare
> them to the working version?
>
> Kind regards,
>
> Stefan Moring
>
> Op ma 20 nov 2023 om 11:18 schreef Francesco Dolcini <francesco@dolcini.it>:
>
>
> > On Mon, Nov 20, 2023 at 10:33:38AM +0100, linux@bigler.io wrote:
> >
> > > I run the test and it worked fine. The transmitted data matches with
> > > the recived data, no diff.
> > ok, thanks for confirming. At least we are on the same page.
> >
> >
> > > BUT!!! on the MDIO it is completly different !!!
> > > When I request to send 4kB Data I measure on the line 16384Byte.
> > >
> > > The data is again 3Dummy Bytes followed by the databyte.
> > > So the error symetic on send and recive
> >
> > ok, that's annoying. I wonder if the loopback test could be improved to
> > spot such kind of issues, maybe we could verify if the execution time
> > is reasonable given the SPI clock frequency and the payload size ...
> >
> > Francesco
> >
>
>
>
next prev parent reply other threads:[~2023-11-20 16:46 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-18 14:25 spi: imx: Increase imx51 ecspi burst length fails on imx6dl and imx8mm linux
2023-11-18 15:13 ` Linux regression tracking (Thorsten Leemhuis)
2023-11-18 15:15 ` Thorsten Leemhuis
[not found] ` <CAB3BuKA+qOY+UhWR-9Ov3qsz3wQr8q8n38MrEMf3FMCthr04yA@mail.gmail.com>
2023-11-18 17:59 ` linux
[not found] ` <CAB3BuKARgJhaVNFsP1FQ+2yLe18QU9H17fHKjc-Sf3izE+MZ1Q@mail.gmail.com>
2023-11-20 8:27 ` linux
2023-11-20 8:47 ` Francesco Dolcini
2023-11-20 9:33 ` linux
2023-11-20 10:17 ` Francesco Dolcini
[not found] ` <CAB3BuKDb6uucujD7ac-w4pa1GVNLSQUA4OGE7i074mQSU==WaA@mail.gmail.com>
2023-11-20 16:45 ` linux [this message]
2023-11-20 17:48 ` Francesco Dolcini
2023-11-21 9:06 ` Thorsten Leemhuis
2023-11-21 9:16 ` Francesco Dolcini
2023-11-21 10:10 ` Francesco Dolcini
2023-11-21 10:34 ` linux
2023-11-22 13:26 ` linux
2023-11-25 22:44 ` Benjamin Bigler
2023-11-26 13:19 ` Benjamin Bigler
2023-11-27 9:09 ` linux
2023-12-05 13:36 ` Linux regression tracking (Thorsten Leemhuis)
2023-12-07 19:43 ` Benjamin Bigler
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=314e596f4f7b7e7f8742c47dfeeb7d93@mail.infomaniak.com \
--to=linux@bigler.io \
--cc=broonie@kernel.org \
--cc=francesco@dolcini.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=regressions@lists.linux.dev \
--cc=stefan.moring@technolution.nl \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).