Re: mcp251xfd on RPi 5.4 downstream

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Oct 28, 2020 at 8:58 AM Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx> wrote:
>
> On 10/28/20 4:47 AM, Drew Fustini wrote:
> >> I assumed the Waveshare instructions work but that is error on my part
> >> for not actually reproducing.  That is what I will do first.
> >> Ultimately, I want the freshly upstreamed driver working but I should
> >> check if their driver tarball works.
> >
> > The Waveshare installer uses the 4.19 kernel with the mcp25xxfd
> > driver.  However, it also fails, sio I think I need to dig deeper:
> >
> > pi@raspberrypi:~ $ dmesg | grep -Ei spi\|can
> > [    4.263765] CAN device driver interface
> > [    4.286258] mcp25xxfd_can: loading out-of-tree module taints kernel.
> > [    5.477511] mcp25xxfd spi1.0: Cannot initialize MCP2517. Wrong
> > wiring? (oscilator register reads as 00000000)
>
> It reads the osc as 0x0, too. This is the same error as you've seen with my driver.
>
> 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 |


Alright, it looks like I had faulty hardware!  I got a Waveshare CAN
FD hat and both the old waveshare-provided driver and the new
mcp251xfd driver work.

Well, at least for can0 with mcp251xfd-spi0-0:

[   14.530587] CAN device driver interface
[   14.548941] mcp251xfd spi0.0: DEBUG mcp251xfd mcp251xfd_probe():
devm_clk_get()
[   14.548977] mcp251xfd spi0.0: DEBUG mcp251xfd mcp251xfd_probe(): feq=40000000
[   14.549045] spi_master spi0: will run message pump with realtime priority
[   14.562946] mcp251xfd spi0.0 can0: MCP2517FD rev0.0 (-RX_INT
+MAB_NO_WARN +CRC_REG +CRC_RX +CRC_TX +ECC -HD c:40.00MHz m:20.00MHz
r:17.00MHz e:0.00MHz) successfully initialized.

However, I am still trying to figure out can1.  I tried
mcp251xfd-spi0-1 and mcp251xfd-spi1-0 but neither was able to
initialize the device.  I am using:

commit 9e02abd4fe591b2d7f369cdaaaf8f1269b7c8693 (HEAD ->
v5.4-rpi/mcp251xfd-20201022-54, marc/v5.4-rpi/mcp251xfd-20201022-54)
Author: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>
Date:   Fri Nov 15 00:54:07 2019 +0100

    mcp251xfd-spi0-0, mcp251xfd-spi0-1, mcp251xfd-spi1-0: add overlays

    Signed-off-by: Marc Kleine-Budde <mkl@xxxxxxxxxxxxxx>

I'll try tweaking it a bit and see if I get any further.

Thanks,
Drew



[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux