Linux-Can Archive mirror
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Thomas.Kopp@microchip.com
Cc: petter@ka-long.de, linux-can@vger.kernel.org
Subject: Re: RE: mcp251xfd on NXP LX2160A
Date: Sat, 25 Nov 2023 18:14:47 +0100	[thread overview]
Message-ID: <20231125-sample-slather-aea8764f0566-mkl@pengutronix.de> (raw)
In-Reply-To: <BL3PR11MB64847C895A0918D99E6A9EACFBB9A@BL3PR11MB6484.namprd11.prod.outlook.com>

[-- Attachment #1: Type: text/plain, Size: 1873 bytes --]

On 23.11.2023 07:08:24, Thomas.Kopp@microchip.com wrote:
> > [ 4493.557075] mcp251xfd spi1.2 can2: MCP2518FD rev0.0 (-RX_INT -PLL -
> > MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD o:40.00MHz
> > c:40.00MHz m:8.00MHz rs:8.00MHz es:0.00MHz rf:8.00MHz ef:0.00MHz)
> > successfully initialized.

> I can't remember encountering these format errors before. Do you have
> access to a logic analyzer and can you spi during capture insmod +
> interface up?
> 
> Do you have anything else on the same SPI? Where's the 8 MHz coming
> from? Did you limit this in your DT?

The "m:8.00MHz" is the maximum SPI speed the driver gets from the SPI
framework.

> You could try with -CRC_REG -CRC_RX -CRC_TX to see if you're able to
> communicate with the device (this is not suited for anything in
> production though)

Depending what you have in your DT, for a "microchip,mcp251xfd" it would
be this patch:

--- a/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
+++ b/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c
@@ -46,8 +46,8 @@ static const struct mcp251xfd_devtype_data mcp251xfd_devtype_data_mcp251863 = {
 
 /* Autodetect model, start with CRC enabled. */
 static const struct mcp251xfd_devtype_data mcp251xfd_devtype_data_mcp251xfd = {
-        .quirks = MCP251XFD_QUIRK_CRC_REG | MCP251XFD_QUIRK_CRC_RX |
-                MCP251XFD_QUIRK_CRC_TX | MCP251XFD_QUIRK_ECC,
+        .quirks = /* MCP251XFD_QUIRK_CRC_REG | MCP251XFD_QUIRK_CRC_RX | */
+                /* MCP251XFD_QUIRK_CRC_TX | */ MCP251XFD_QUIRK_ECC,
         .model = MCP251XFD_MODEL_MCP251XFD,

regards,
Marc

-- 
Pengutronix e.K.                 | Marc Kleine-Budde          |
Embedded Linux                   | https://www.pengutronix.de |
Vertretung Nürnberg              | Phone: +49-5121-206917-129 |
Amtsgericht Hildesheim, HRA 2686 | Fax:   +49-5121-206917-9   |

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

      reply	other threads:[~2023-11-25 17:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-20 16:11 mcp251xfd on NXP LX2160A petter
2023-11-23  7:08 ` Thomas.Kopp
2023-11-25 17:14   ` Marc Kleine-Budde [this message]

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=20231125-sample-slather-aea8764f0566-mkl@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=Thomas.Kopp@microchip.com \
    --cc=linux-can@vger.kernel.org \
    --cc=petter@ka-long.de \
    /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 read-only IMAP folder(s) and NNTP newsgroup(s).