On 10/26/20 5:51 PM, Patrick Menschel wrote: >> On 10/26/20 3:50 AM, Drew Fustini wrote: >>> I'm seeing this message which makes me think my issue is that I am not >>> setting the oscillator as a dtoverlay param. >>> >>> [ 6.873081] CAN device driver interface >>> [ 6.879904] DEBUG mcp251xfd mcp251xfd_probe(): ENTER >>> [ 6.880068] spi_master spi0: will run message pump with realtime priority >>> [ 6.921312] mcp251xfd spi0.0 (unnamed net_device) (uninitialized): >>> Failed to detect MCP251xFD (osc=0x00000000). ^^^^^^^^^^ Contents of OSC register. >>> [pi4] >>> dtoverlay=mcp251xfd-spi0-0 >> >> Are you using CS0 of spi0? >> What's the frequency of your OSC? > > mcp251xfd_osc_invalid(osc) is true according to the string. > > https://github.com/marckleinebudde/linux/blob/v5.4-rpi/mcp251xfd-20201022-54/drivers/net/can/spi/mcp251xfd/mcp251xfd-core.c#L552 ACK The OSC register would never contain 0x0. So when reading 0x0 (or 0xff) you have not read anything. This is what the "invalid" test does. This could have several reasons, e.g. mcp2518fd is not on SPI0 CS0, or the OSC is 20 MHz, but the DT specifies an OSC of 40 MHz. 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:
signature.asc
Description: OpenPGP digital signature