All of lore.kernel.org
 help / color / mirror / Atom feed
From: Drew Fustini <drew@beagleboard.org>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Patrick Menschel <menschel.p@posteo.de>,
	Oliver Hartkopp <socketcan@hartkopp.net>,
	linux-can@vger.kernel.org, Josh S <josh@macchina.cc>
Subject: Re: mcp251xfd: loopback test on waveshare canfd hat
Date: Mon, 2 Nov 2020 15:35:33 +0100	[thread overview]
Message-ID: <CAPgEAj4HuSAgRoMC9Ldtk2tf=-3Ek9E_cYFQRG7+P-+rh2Q1SQ@mail.gmail.com> (raw)
In-Reply-To: <fbe2bf42-706e-d27f-5bfd-f63b3c9b9ef2@pengutronix.de>

On Mon, Nov 2, 2020 at 3:22 PM Marc Kleine-Budde <mkl@pengutronix.de> wrote:
>
> On 11/2/20 3:20 PM, Drew Fustini wrote:
> > I am able to have can0 (spi0.0) and can1 (spi1.0) initialize ok on the
> > waveshare canfd hat (solder jumper mode A) with the mcp251xfd driver
> > from Marc's rpi 5.4 branch.  However, I am not able to do a loopback
> > test successfully.
> >
> > No errors from setup:
> > sudo ip link set can0 type can bitrate 250000 listen-only on
> > sudo ip link set can1 type can bitrate 250000 listen-only on
>                                                 ^^^^^^^^^^^^^^
>
> It really does listen-only on the bus, i.e. not send anything :)
>
> Marc

Thanks for pointing that out!  /me might need new glasses :)

The can0->can1 test is now working with mcp251xfd:

pi@raspberrypi:~$ sudo ip link set can0 type can bitrate 250000
pi@raspberrypi:~$ sudo ip link set can1 type can bitrate 250000
pi@raspberrypi:~$ sudo ifconfig can0 up
pi@raspberrypi:~$ sudo ifconfig can1 up
pi@raspberrypi:~$ dmesg |tail
[   75.751015] mcp251xfd spi0.0 can0: bit-timing not yet defined
[   75.811003] mcp251xfd spi1.0 can1: bit-timing not yet defined
[   96.934271] mcp251xfd spi0.0 can0: FIFO setup: TEF: 8*12 bytes = 96
bytes, TX: 8*16 bytes = 128 bytes
[   96.934292] mcp251xfd spi0.0 can0: FIFO setup: RX-0: 32*20 bytes = 640 bytes
[   96.934308] mcp251xfd spi0.0 can0: FIFO setup: free: 1184 bytes
[   96.942154] IPv6: ADDRCONF(NETDEV_CHANGE): can0: link becomes ready
[   97.020451] mcp251xfd spi1.0 can1: FIFO setup: TEF: 8*12 bytes = 96
bytes, TX: 8*16 bytes = 128 bytes
[   97.020464] mcp251xfd spi1.0 can1: FIFO setup: RX-0: 32*20 bytes = 640 bytes
[   97.020474] mcp251xfd spi1.0 can1: FIFO setup: free: 1184 bytes
[   97.990436] IPv6: ADDRCONF(NETDEV_CHANGE): can1: link becomes ready

pi@raspberrypi:~$ candump can1 &
[1] 1037
pi@raspberrypi:~$ cansend can0 01a#11223344AABBCCDD
  can1  01A   [8]  11 22 33 44 AA BB CC DD

thanks,
drew

  reply	other threads:[~2020-11-02 14:35 UTC|newest]

Thread overview: 54+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-22  3:10 mcp251xfd on RPi 5.4 downstream Drew Fustini
2020-10-22  6:00 ` Drew Fustini
2020-10-22  6:33   ` Marc Kleine-Budde
2020-10-22 18:42     ` Drew Fustini
2020-10-25  4:30       ` Drew Fustini
2020-10-25  8:49         ` Oliver Hartkopp
2020-10-25 10:58           ` Marc Kleine-Budde
2020-10-25 17:43             ` Patrick Menschel
2020-10-25 18:14               ` Marc Kleine-Budde
2020-10-25 18:42                 ` Patrick Menschel
2020-10-26  1:59                   ` Drew Fustini
2020-10-26  2:50                     ` Drew Fustini
2020-10-26  5:16                       ` Patrick Menschel
2020-10-26  7:45                         ` Marc Kleine-Budde
2020-10-26  9:40                       ` Marc Kleine-Budde
2020-10-26 16:51                         ` Patrick Menschel
2020-10-26 17:00                           ` Marc Kleine-Budde
2020-10-27  2:22                             ` Drew Fustini
2020-10-27  6:35                               ` Drew Fustini
2020-10-27  7:06                                 ` Marc Kleine-Budde
2020-10-27 18:18                                   ` Patrick Menschel
2020-10-27 18:22                                     ` Marc Kleine-Budde
2020-10-28  1:57                                       ` Drew Fustini
2020-10-28  3:47                                         ` Drew Fustini
2020-10-28  7:57                                           ` Marc Kleine-Budde
2020-10-31 12:27                                             ` Drew Fustini
2020-10-31 15:14                                               ` Patrick Menschel
2020-10-31 15:35                                                 ` Patrick Menschel
2020-10-31 21:57                                                   ` Drew Fustini
2020-11-01 22:49                                                     ` Drew Fustini
2020-11-02  7:25                                                       ` Marc Kleine-Budde
2020-11-02  8:18                                                     ` Marc Kleine-Budde
     [not found]                                                       ` <CAPgEAj7LcX3cb+syhtR1i3Uo1XkYYFQ_wDPV8GniaA-YwPk2Hg@mail.gmail.com>
2020-11-02 11:00                                                         ` Marc Kleine-Budde
     [not found]                                                           ` <CAPgEAj7BTJyiBg4QkKuekYH0zyrA-10dby3Lgb5qj2uiD4ZOYQ@mail.gmail.com>
2020-11-02 14:22                                                             ` mcp251xfd: loopback test on waveshare canfd hat Marc Kleine-Budde
2020-11-02 14:35                                                               ` Drew Fustini [this message]
2020-11-02 14:38                                                                 ` Marc Kleine-Budde
2020-11-02 17:34                                                           ` mcp251xfd on RPi 5.4 downstream Patrick Menschel
2020-11-02 18:47                                                             ` Patrick Menschel
2020-11-02 18:57                                                               ` Thomas.Kopp
2020-11-02 19:32                                                                 ` Patrick Menschel
2020-11-04 18:48                                                                   ` Patrick Menschel
2020-11-05  7:15                                                                     ` Marc Kleine-Budde
2020-11-05 18:11                                                                       ` Patrick Menschel
2020-11-06  9:00                                                                         ` Marc Kleine-Budde
2020-11-06 11:31                                                                           ` Patrick Menschel
2020-11-06 11:36                                                                             ` Marc Kleine-Budde
2020-11-06 11:46                                                                               ` Patrick Menschel
2020-11-05  8:08                                                                 ` Marc Kleine-Budde
2020-11-05  8:07                                                               ` Marc Kleine-Budde
2020-11-02  7:55                                                 ` Marc Kleine-Budde
2020-11-02  7:26                                               ` Marc Kleine-Budde
2020-10-26  7:43                     ` Marc Kleine-Budde
2020-11-20 12:32 ` Marc Kleine-Budde
     [not found]   ` <CAEf4M_B68X2T0rkaq0tqahBFPc+Gbvac7-+G0j5jd-g4j+j01g@mail.gmail.com>
2020-11-20 13:16     ` 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='CAPgEAj4HuSAgRoMC9Ldtk2tf=-3Ek9E_cYFQRG7+P-+rh2Q1SQ@mail.gmail.com' \
    --to=drew@beagleboard.org \
    --cc=josh@macchina.cc \
    --cc=linux-can@vger.kernel.org \
    --cc=menschel.p@posteo.de \
    --cc=mkl@pengutronix.de \
    --cc=socketcan@hartkopp.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.