All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2] Microchip mcp2517fd can controller driver
@ 2017-11-24 18:35 kernel-TqfNSX0MhmxHKSADF0wUEw
       [not found] ` <20171124183509.12810-1-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
  2017-11-25 12:03 ` [PATCH 0/2] Microchip mcp2517fd can controller driver Oliver Hartkopp
  0 siblings, 2 replies; 23+ messages in thread
From: kernel-TqfNSX0MhmxHKSADF0wUEw @ 2017-11-24 18:35 UTC (permalink / raw)
  To: Wolfgang Grandegger, Marc Kleine-Budde, Rob Herring,
	Mark Rutland, linux-can-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA
  Cc: Martin Sperl

From: Martin Sperl <kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>

This patchset adds a driver for the mcp2517fd CanFD controller.

Most of the features of the controller are supported by this driver release.

The controller includes a few features that the current core Can(FD)
implementation does not support:
* Transmit Bandwidth Sharing bits
  - this waits for a configurable number of syncronization bits before
    atempting to transmit the next frame - for the moment controllable
    via a module parameter
* SID11 with CanFD frames
  - at this moment not supported by driver
* 3 transmit attempts in addition to ONE_SHOT
* transmitter delay compensation configurations
* micro second exact transmission and reception timestamps
  - used internally by driver
* variable number of tx-fifos
  - exposed via module parameter at this moment

The driver has been heavily optimized so that it can handle
a 100% utilized 1MHz Can-bus (with 11 bit can frames with DLC=0)
even on less powerfull SOCs like the raspberry pi 1 without
dropping frames due to driver/spi latencies (still dropps
are observed in the can/network stack).

To achive this the driver includes several code optimization
Two of which prefers continuous long spi transfers over multiple
small individual spi transfers of variable length.
This is an optimization that would favour spi dma transfers instead
of more expensive PIO in typical SPI controllers.
Both of them can get explicitly enabled by the use of a module parameter.
One of those is automatically used in the case of Can2.0 only bus
configurations.

Finer details of the implementation and rational is included with
the driver code it self for future reference.

The driver has also been tested for basic CanFD transfers with
BRS up to 5.7Mhz data bitrates - the available transceiver did
not allow for faster rates...

The driver itself exposes lots of internal data/statistics via
debugfs.

The driver implements a lock-less design for transmissions
making use instead of prepared spi messages submitted via spi_async
for transmission in the start_xmit_start code without requireing
an extra workqueue and the corresponding latencies.

Martin Sperl (2):
  dt-binding: can: mcp2517fd: document device tree bindings
  can: mcp2517fd: Add Microchip mcp2517fd CAN FD driver

 .../bindings/net/can/microchip,mcp2517fd.txt       |   47 +
 drivers/net/can/spi/Kconfig                        |    6 +
 drivers/net/can/spi/Makefile                       |    1 +
 drivers/net/can/spi/mcp2517fd.c                    | 3733 ++++++++++++++++++++
 4 files changed, 3787 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/can/microchip,mcp2517fd.txt
 create mode 100644 drivers/net/can/spi/mcp2517fd.c

--
2.11.0
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2017-12-22 15:50 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-24 18:35 [PATCH 0/2] Microchip mcp2517fd can controller driver kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found] ` <20171124183509.12810-1-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2017-11-24 18:35   ` [PATCH 1/2] dt-binding: can: mcp2517fd: document device tree bindings kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found]     ` <20171124183509.12810-2-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2017-11-26 22:28       ` Rob Herring
2017-11-29 11:55         ` kernel
     [not found]           ` <6EBDD798-8632-4F42-A138-369BCD36DF68-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2017-11-29 20:35             ` Patrick Menschel
2017-11-30  7:24               ` kernel
     [not found]                 ` <612BB6CD-5330-40B8-A854-FD065E0A3331-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2017-11-30 16:44                   ` Patrick Menschel
     [not found]                     ` <6aea8071-dc21-4ba7-2b2f-5af41b5755a5-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org>
2017-11-30 16:58                       ` kernel-TqfNSX0MhmxHKSADF0wUEw
2017-11-30 17:49                         ` Patrick Menschel
     [not found]                           ` <1ac487f7-17e3-c8a0-0f99-8138fe867373-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org>
2017-12-05 10:26                             ` Martin Sperl
     [not found]                               ` <d79ee9eb-8b36-0086-8d76-ec6bca224fe5@posteo.de>
     [not found]                                 ` <d79ee9eb-8b36-0086-8d76-ec6bca224fe5-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org>
2017-12-17 14:34                                   ` kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found]                                     ` <4E2DB518-A148-46CE-8267-73D292991BD2-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2017-12-22 15:50                                       ` Patrick Menschel
2017-11-24 18:35   ` [PATCH 2/2] can: mcp2517fd: Add Microchip mcp2517fd CAN FD driver kernel-TqfNSX0MhmxHKSADF0wUEw
     [not found]     ` <20171124183509.12810-3-kernel-TqfNSX0MhmxHKSADF0wUEw@public.gmane.org>
2017-11-30 13:04       ` Marc Kleine-Budde
     [not found]         ` <ff920dd7-4535-dcaa-27f9-57844ce66c7b-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2017-12-03 18:34           ` kernel-TqfNSX0MhmxHKSADF0wUEw
2017-11-25 12:03 ` [PATCH 0/2] Microchip mcp2517fd can controller driver Oliver Hartkopp
2017-11-25 14:47   ` kernel
2017-11-26 12:38     ` Oliver Hartkopp
2017-11-26 15:43       ` kernel
2017-11-26 16:18     ` Wolfgang Grandegger
2017-11-26 18:29       ` kernel
2017-11-26 19:05         ` Wolfgang Grandegger
2017-11-26 19:53           ` kernel

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.