From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Tom Evans <tom_usenet@optusnet.com.au>
Cc: linux-can@vger.kernel.org,
"Stefan Althöfer" <Stefan.Althoefer@janztec.com>,
Thomas.Kopp@microchip.com, kernel@pengutronix.de
Subject: Re: [PATCH 0/5] can: mcp251xfd: workaround double-RX erratum
Date: Wed, 25 Jan 2023 08:42:26 +0100 [thread overview]
Message-ID: <20230125074226.k2pw7prjerab2l6t@pengutronix.de> (raw)
In-Reply-To: <a269b5b8-a88d-d2da-5bcf-59f2aac40f87@optusnet.com.au>
[-- Attachment #1: Type: text/plain, Size: 2827 bytes --]
On 25.01.2023 16:41:50, Tom Evans wrote:
> On 12/1/23 09:30, Marc Kleine-Budde wrote:
> > On 11.01.2023 23:20:37, Marc Kleine-Budde wrote:
> > > this is a proof of concept implementation to work around the
> > > "double-RX" erratum found by Stefan Althöfer.
> > >
> > > With the help of Thomas we found out that the chip has a time window
> > > after receiving a CAN frame where the RX FIFO STA register content is
> > > not read correctly.
>
> This is being called an "erratum". I take that to mean an admitted bug
> published by the chip manufacturer. Has there been any response from
> Microchip on this yet? If they could properly describe what's wrong, it
> might lead to more robust work arounds.
I'm working with Thomas from Microchip on this actively on this. We're
waiting from simulation results from the hardware team...
> I've noticed people know about the "maximum SPI clock rate", and are getting
> close to it in testing. The chip might have more (and more frequent)
> problems near that limit.
In Stefan's test setup one SPI bus uses 16.67 MHz and the other 10 MHz.
Stefan, Thomas, which chip shows the problem?
I have reproduced the problem at 15 MHz on a different SoC (i.MX6).
> The MCP2517FD has more errata items than the MCP2518FD. Anyone using the
> earlier chip might be seeing more problems than people using the MCP2518FD
> are.
Yes, Thomas found problems with the loopback mode of the MCP2517FD, but
we haven't looked deeper into that.
> The MCP2517FD (published Errata item #1) is sensitive to delays between SPI
> Write and delays between writes and Chip Select Deassertion. Some SPI
> drivers and setups don't use the SPI controller's native chip-select, but
> use GPIO pins for flexibility. On Linux that can result in long delays until
> the GPIO Chip Select is deasserted, and long delays between bytes. There are
> DMA-based SPI controllers without these problems, but there may not be full
> driver support for them. YMMV.
>
> Anyone seeing a difference in errors between two different SPI controllers
> might be seeing the results of different timing (chip select and byte to
> byte) between them.
Both Linux based tests system (rpi4, imx6) are using GPIO chip selects.
On the other hand Thomas has reproduced the broken RX FIFO STA register
read bug on a µC based setup (with a mcp2518fd). As far as we understand
it, the problem occurs in a critical timing window between the reception
of a CAN frame and the reading of the RX FIFO STA register.
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Embedded Linux | https://www.pengutronix.de |
Vertretung West/Dortmund | Phone: +49-231-2826-924 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2023-01-25 7:42 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-11 22:20 [PATCH 0/5] can: mcp251xfd: workaround double-RX erratum Marc Kleine-Budde
2023-01-11 22:20 ` [PATCH 1/5] can: mcp251xfd: setup cycle counter before mcp251xfd_ring_init() Marc Kleine-Budde
2023-01-11 22:20 ` [PATCH 2/5] can: mcp251xfd: introduce mcp251xfd_skb_set_timestamp_from_tbc() and make use of it Marc Kleine-Budde
2023-01-11 22:20 ` [PATCH 3/5] can: mcp251xfd: mcp251xfd_handle_rxif_ring_uinc(): factor out in separate function Marc Kleine-Budde
2023-01-11 22:20 ` [PATCH 4/5] can: mcp251xfd: rx: mcp251xfd_handle_rxif_ring() Marc Kleine-Budde
2023-01-11 22:20 ` [PATCH 5/5] can: mcp251xfd: implement workaround for double-RX erratum Marc Kleine-Budde
2023-01-11 22:30 ` [PATCH 0/5] can: mcp251xfd: workaround " Marc Kleine-Budde
2023-01-12 7:54 ` Marc Kleine-Budde
2023-01-13 12:39 ` AW: " Stefan Althöfer
2023-01-13 13:08 ` Marc Kleine-Budde
2023-01-16 7:19 ` Thomas.Kopp
2023-01-25 5:41 ` Tom Evans
2023-01-25 6:59 ` Thomas.Kopp
2023-01-25 7:42 ` Marc Kleine-Budde [this message]
2023-01-25 9:21 ` AW: " Stefan Althöfer
2023-01-16 8:43 ` Stefan Althöfer
2023-01-18 23:11 ` Marc Kleine-Budde
2023-01-16 19:49 ` Stefan Althöfer
2023-01-16 22:15 ` Marc Kleine-Budde
2023-01-19 7:47 ` AW: " Stefan Althöfer
2023-01-19 12:02 ` Marc Kleine-Budde
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=20230125074226.k2pw7prjerab2l6t@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=Stefan.Althoefer@janztec.com \
--cc=Thomas.Kopp@microchip.com \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=tom_usenet@optusnet.com.au \
/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