All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/4] can: Add new binding to limit bit rate used
@ 2017-07-24 23:05 ` Franklin S Cooper Jr
  0 siblings, 0 replies; 38+ messages in thread
From: Franklin S Cooper Jr @ 2017-07-24 23:05 UTC (permalink / raw)
  To: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA,
	linux-can-u79uwXL29TY76Z2rM5mHXA, wg-5Yr1BZd7O62+XT7JhA+gdA,
	mkl-bIcnvbaLZ9MEGnE8C9+IrQ, robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
	quentin.schulz-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8,
	dev.kurt-yI9piX4KPfawT/RRk36CISFp6vIno51x, andrew-g2DYL2Zd6BY,
	sergei.shtylyov-M4DtvfQ/ZS1MRgGoP+s0PdBPR1lH4CV8,
	socketcan-fJ+pQTUTwRTk1uMJSBkQmQ
  Cc: Franklin S Cooper Jr

Add a new generic binding that CAN drivers can use to specify the max
arbitration and data bit rate supported by a transceiver. This is
useful since in some instances the maximum speeds may be limited by
the transceiver used. However, transceivers may not provide a means
to determine this limitation at runtime. Therefore, create a new binding
that mimics "fixed-link" that allows a user to hardcode the max speeds
that can be used.

Also add support for this new binding in the MCAN driver.

Note this is an optional subnode so even if a driver adds support for
parsing fixed-transceiver the user does not have to define it in their
device tree.

Version 2 changes:
Rename function
Define proper variable default
Drop unit address
Move check to changelink function
Reword commit message
Reword documentation

Franklin S Cooper Jr (4):
  can: dev: Add support for limiting configured bitrate
  can: fixed-transceiver: Add documentation for CAN fixed transceiver
    bindings
  can: m_can: Update documentation to mention new fixed transceiver
    binding
  can: m_can: Add call to of_can_transceiver_fixed

 .../bindings/net/can/fixed-transceiver.txt         | 42 +++++++++++++++
 .../devicetree/bindings/net/can/m_can.txt          | 10 ++++
 drivers/net/can/dev.c                              | 59 ++++++++++++++++++++++
 drivers/net/can/m_can/m_can.c                      |  2 +
 include/linux/can/dev.h                            |  5 ++
 5 files changed, 118 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/net/can/fixed-transceiver.txt

-- 
2.10.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] 38+ messages in thread
* Re: [PATCH v2 2/4] can: fixed-transceiver: Add documentation for CAN fixed transceiver bindings
@ 2017-07-28 13:02 Kurt Van Dijck
  2017-07-28 18:33 ` Oliver Hartkopp
  0 siblings, 1 reply; 38+ messages in thread
From: Kurt Van Dijck @ 2017-07-28 13:02 UTC (permalink / raw)
  To: Oliver Hartkopp
  Cc: Franklin S Cooper Jr, Andrew Lunn, linux-kernel, devicetree,
	netdev, linux-can, wg, mkl, robh+dt, quentin.schulz,
	sergei.shtylyov

> 
> On 07/28/2017 06:57 AM, Kurt Van Dijck wrote:
> 
> >So while _a_ transceiver may be spec'd to 1MBit during arbitration,
> >CAN FD packets may IMHO exceed that speed during data phase.
> 
> When the bitrate is limited to 1Mbit/s you are ONLY allowed to use 1Mbit/s
> in the data section too (either with CAN or CAN FD).

My point is that the requirements posed to a transceiver
differ between arbitration & data phase for CAN FD.
So while a transceiver does not know about CAN FD, it may allow
higher bitrates for the data phase.

> 
> >That was the whole point of CAN FD: exceed the limits required for
> >correct arbitration on transceiver & wire.
> 
> No. CAN FD is about a different frame format with up to 64 bytes AND the
> possibility to increase the bitrate in the data section of the frame.
> 
> >So I do not agree on the single bandwidth limitation.
> 
> The transceiver provides a single maximum bandwidth. It's an ISO Layer 1
> device.
> 
> >The word 'max-arbitration-bitrate' makes the difference very clear.
> 
> I think you are mixing up ISO layer 1 and ISO layer 2.

In order to provide higher data throughput without putting extra limits
on transceiver & wire, the requirement for the round-trip delay to be
within 1 bittime has been eliminated, but only for the data phase when
arbitration is over.
So layer 2 (CAN FD) has been adapted to circumvent the layer 1
(transceiver + wire) limitations.

In fact, the round-trip delay requirement never actually did matter for
plain CAN during data bits either. CAN FD just makes use of that,
but is therefore incompatible on the wire.

I forgot the precise wording, but this is the principle that Bosch
explained on the CAN conference in Nurnberg several years ago, or at
least this is how I remembered it :-)

I haven't followed the developments of transceivers, but with the above
principle in mind, it's obvious that any transceiver allows higher
bitrates during the data segment because the TX-to-RX line delay must
not scale with the bitrate.
In reality, maybe not all transceivers will mention this in their
datasheet.

So whether you call it 'max-arbitration-bitrate' & 'max-data-bitrate'
or 'max-bitrate' & 'max-data-bitrate' does not really matter (I prefer
1st) but you will one day need 2 bitrates.

Kind regards,
Kurt

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

end of thread, other threads:[~2017-08-10  1:03 UTC | newest]

Thread overview: 38+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-24 23:05 [PATCH v2 0/4] can: Add new binding to limit bit rate used Franklin S Cooper Jr
2017-07-24 23:05 ` Franklin S Cooper Jr
2017-07-24 23:05 ` Franklin S Cooper Jr
2017-07-24 23:05 ` [PATCH v2 1/4] can: dev: Add support for limiting configured bitrate Franklin S Cooper Jr
2017-07-24 23:05   ` Franklin S Cooper Jr
2017-07-24 23:05 ` [PATCH v2 3/4] can: m_can: Update documentation to mention new fixed transceiver binding Franklin S Cooper Jr
2017-07-24 23:05   ` Franklin S Cooper Jr
2017-08-03 17:07   ` Rob Herring
2017-08-10  1:02     ` Franklin S Cooper Jr
2017-08-10  1:02       ` Franklin S Cooper Jr
     [not found] ` <20170724230521.1436-1-fcooper-l0cyMroinI0@public.gmane.org>
2017-07-24 23:05   ` [PATCH v2 2/4] can: fixed-transceiver: Add documentation for CAN fixed transceiver bindings Franklin S Cooper Jr
2017-07-24 23:05     ` Franklin S Cooper Jr
2017-07-24 23:05     ` Franklin S Cooper Jr
2017-07-25 16:32     ` Oliver Hartkopp
     [not found]       ` <29df7e04-01c6-a09b-491e-1354dab98cd0-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
2017-07-25 18:14         ` Franklin S Cooper Jr
2017-07-25 18:14           ` Franklin S Cooper Jr
2017-07-25 18:14           ` Franklin S Cooper Jr
2017-07-26 16:41     ` Andrew Lunn
2017-07-26 17:05       ` Oliver Hartkopp
     [not found]         ` <355b90b3-97ce-1057-6617-d5d709449c48-fJ+pQTUTwRTk1uMJSBkQmQ@public.gmane.org>
2017-07-26 18:29           ` Franklin S Cooper Jr
2017-07-26 18:29             ` Franklin S Cooper Jr
2017-07-26 18:29             ` Franklin S Cooper Jr
     [not found]             ` <a77fe395-33c7-9405-b51a-5d3372e5c58b-l0cyMroinI0@public.gmane.org>
2017-07-27 18:47               ` Oliver Hartkopp
2017-07-27 18:47                 ` Oliver Hartkopp
2017-07-27 21:10                 ` Franklin S Cooper Jr
2017-07-27 21:10                   ` Franklin S Cooper Jr
2017-07-28  4:57                   ` Kurt Van Dijck
2017-07-28  8:41                     ` Oliver Hartkopp
2017-07-24 23:05   ` [PATCH v2 4/4] can: m_can: Add call to of_can_transceiver_fixed Franklin S Cooper Jr
2017-07-24 23:05     ` Franklin S Cooper Jr
2017-07-24 23:05     ` Franklin S Cooper Jr
2017-07-28 13:02 [PATCH v2 2/4] can: fixed-transceiver: Add documentation for CAN fixed transceiver bindings Kurt Van Dijck
2017-07-28 18:33 ` Oliver Hartkopp
2017-07-28 18:53   ` Franklin S Cooper Jr
2017-07-28 18:53     ` Franklin S Cooper Jr
2017-07-28 19:41     ` Kurt Van Dijck
2017-07-31 17:03       ` Oliver Hartkopp
2017-08-01  7:12         ` Kurt Van Dijck

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.