* Re: CAN-FD Transceiver Limitations [not found] ` <20170629154139.GC13221@lunn.ch> @ 2017-06-29 16:36 ` Franklin S Cooper Jr 2017-06-29 17:19 ` Andrew Lunn 2017-06-29 22:36 ` Kurt Van Dijck 0 siblings, 2 replies; 6+ messages in thread From: Franklin S Cooper Jr @ 2017-06-29 16:36 UTC (permalink / raw) To: Andrew Lunn; +Cc: linux-can, netdev, wg, mkl, devicetree +device tree mailing list Hi Andrew On 06/29/2017 10:41 AM, Andrew Lunn wrote: >> Transceivers for CAN are not apart of any model. Traditional CAN didn't >> have a problem because all transceivers from my understanding supported >> the maximum speed of 1 Mbps defined by the spec. However, with the >> introduction of CAN Flexible Datarate mode it seems that for >> transceivers that supported CAN-FD the maximum supported speeds vary. > > So transceivers are dumb devices, nothing to configure, so no need to > have a driver for them. > >> Now that I think of it >> you also can't determine if the transceiver supports CAN-FD in the first >> place. IP that supports CAN-FD is backwards compatible with standard >> CAN. Therefore, its feasible that you may even use a transceiver that >> doesn't support CAN-FD. So I would think something like the below would >> be needed. >> >> mcan@0 { >> ... >> fixed-transceiver { >> max-canfd-speed = <2000> >> }; >> ... >> }; > > Are there likely to be other transceiver properties? Adding a subnode > may not make sense if this is going to be the only property. > > Also, 2KHz is not very fast :-) > > Taking a quick look in Documentation/devicetree/bindings/net/can, it > seems a bit of a wild west. No standardization, no central binding > which CAN drivers are expected to support, etc. This sounds like a > generic problem, not an mcan problem. So document this property > centrally, implement the parsing of it centrally, etc, to encourage > other CAN drivers to use it, rather than re-invent the wheel. As of now its the only property that I think is needed. In general from past experience and threads it seems that people are fairly adamant about having DT mimic hardware as closely as possible. So since from a hardware perspective the transceiver is an external device that is connected to the CAN IP it would make sense for a subnode to be used to model it. But either way works for me. If the device tree folks do not care for subnode to be created then I can just add a property. Also I agree that attempting to make this optional property/subnode generic to all of CAN would be preferable. Another not sure if its feasible yet without standardization being first forced across all CAN drivers. > > Andrew > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: CAN-FD Transceiver Limitations 2017-06-29 16:36 ` CAN-FD Transceiver Limitations Franklin S Cooper Jr @ 2017-06-29 17:19 ` Andrew Lunn 2017-06-29 22:36 ` Kurt Van Dijck 1 sibling, 0 replies; 6+ messages in thread From: Andrew Lunn @ 2017-06-29 17:19 UTC (permalink / raw) To: Franklin S Cooper Jr; +Cc: linux-can, netdev, wg, mkl, devicetree > Also I agree that attempting to make this optional property/subnode > generic to all of CAN would be preferable. Another not sure if its > feasible yet without standardization being first forced across all CAN > drivers. It should be. All you need to do is add an of_get_can_maxspeed(struct device_node *np) for drivers to call. If it finds the property, return its value, otherwise return the standardised 1Mbps. And you probably want to do the verify in can_changelink(), by adding the max speed into the can_priv structure somewhere. Andrew ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: CAN-FD Transceiver Limitations 2017-06-29 16:36 ` CAN-FD Transceiver Limitations Franklin S Cooper Jr 2017-06-29 17:19 ` Andrew Lunn @ 2017-06-29 22:36 ` Kurt Van Dijck [not found] ` <20170629223551.GA6568-W3bwb+3xS1LIj2mJfgo99rBP9FGTfoIhIWnq8iejnXE@public.gmane.org> 1 sibling, 1 reply; 6+ messages in thread From: Kurt Van Dijck @ 2017-06-29 22:36 UTC (permalink / raw) To: Franklin S Cooper Jr; +Cc: Andrew Lunn, linux-can, netdev, wg, mkl, devicetree > >> > >> mcan@0 { > >> ... > >> fixed-transceiver { > >> max-canfd-speed = <2000> > >> }; > >> ... > >> }; Since when would a transceiver support different speeds for CAN & CANFD? No transceivers were available, but they are now. I see no datalink problem applying 2MBit for regular CAN with apropriate physical layer, and CAN does not predefine the physical layer (advise != define). IMHO, fixed-transceiver { max-arbitration-speed = <2000000> max-data-speed = <4000000> }; is way better to describe the hardware. Regular CAN chips would not consider max-data-speed... Kind regards, Kurt ^ permalink raw reply [flat|nested] 6+ messages in thread
[parent not found: <20170629223551.GA6568-W3bwb+3xS1LIj2mJfgo99rBP9FGTfoIhIWnq8iejnXE@public.gmane.org>]
* Re: CAN-FD Transceiver Limitations [not found] ` <20170629223551.GA6568-W3bwb+3xS1LIj2mJfgo99rBP9FGTfoIhIWnq8iejnXE@public.gmane.org> @ 2017-06-29 23:14 ` Franklin S Cooper Jr [not found] ` <d5c2e2f2-8b74-58e1-0cc8-727ba39bd14c-l0cyMroinI0@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Franklin S Cooper Jr @ 2017-06-29 23:14 UTC (permalink / raw) To: Andrew Lunn, linux-can-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, wg-5Yr1BZd7O62+XT7JhA+gdA, mkl-bIcnvbaLZ9MEGnE8C9+IrQ, devicetree-u79uwXL29TY76Z2rM5mHXA On 06/29/2017 05:36 PM, Kurt Van Dijck wrote: >>>> >>>> mcan@0 { >>>> ... >>>> fixed-transceiver { >>>> max-canfd-speed = <2000> >>>> }; >>>> ... >>>> }; > > Since when would a transceiver support different speeds for CAN & CANFD? When I say CAN I'm referring to CAN 2.0 specification which mentioned speeds upto 1 Mbit/s. While CAN FD supports higher bitrates. > No transceivers were available, but they are now. > I see no datalink problem applying 2MBit for regular CAN with apropriate > physical layer, and CAN does not predefine the physical layer > (advise != define). > > IMHO, > fixed-transceiver { > max-arbitration-speed = <2000000> > max-data-speed = <4000000> > }; > is way better to describe the hardware. > Regular CAN chips would not consider max-data-speed... What is arbitration speed? Also if I understand you correctly then I agree drivers for traditional CAN wouldn't care about this subnode. Although it may be helpful for max-data-speed to become max-canfd-speed or something along those lines. Just so the property's purpose is clear. > > Kind regards, > Kurt > -- 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] 6+ messages in thread
[parent not found: <d5c2e2f2-8b74-58e1-0cc8-727ba39bd14c-l0cyMroinI0@public.gmane.org>]
* Re: CAN-FD Transceiver Limitations [not found] ` <d5c2e2f2-8b74-58e1-0cc8-727ba39bd14c-l0cyMroinI0@public.gmane.org> @ 2017-06-30 8:09 ` Kurt Van Dijck [not found] ` <20170630080906.GA26712-W3bwb+3xS1LIj2mJfgo99rBP9FGTfoIhIWnq8iejnXE@public.gmane.org> 0 siblings, 1 reply; 6+ messages in thread From: Kurt Van Dijck @ 2017-06-30 8:09 UTC (permalink / raw) To: Franklin S Cooper Jr Cc: Andrew Lunn, linux-can-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, wg-5Yr1BZd7O62+XT7JhA+gdA, mkl-bIcnvbaLZ9MEGnE8C9+IrQ, devicetree-u79uwXL29TY76Z2rM5mHXA > On 06/29/2017 05:36 PM, Kurt Van Dijck wrote: > >>>> > >>>> mcan@0 { > >>>> ... > >>>> fixed-transceiver { > >>>> max-canfd-speed = <2000> > >>>> }; > >>>> ... > >>>> }; > > > > Since when would a transceiver support different speeds for CAN & CANFD? > > When I say CAN I'm referring to CAN 2.0 specification which mentioned > speeds upto 1 Mbit/s. While CAN FD supports higher bitrates. linux-can is not necessarily restricted to CAN 2.0B? > > > No transceivers were available, but they are now. > > I see no datalink problem applying 2MBit for regular CAN with apropriate > > physical layer, and CAN does not predefine the physical layer > > (advise != define). > > > > IMHO, > > fixed-transceiver { > > max-arbitration-speed = <2000000> > > max-data-speed = <4000000> > > }; > > is way better to describe the hardware. > > Regular CAN chips would not consider max-data-speed... > > What is arbitration speed? CANFD remains similar during the arbitration phase (when the CAN id is sent on the wire), and after that allows to switch to a higher 'data' speed because the round-trip wire restrictions during arbitration don't apply anymore. > > Also if I understand you correctly then I agree drivers for traditional > CAN wouldn't care about this subnode. Although it may be helpful for > max-data-speed to become max-canfd-speed or something along those lines. > Just so the property's purpose is clear. Transceivers exist that don't support 1MB either. naming the speeds max-arbitration-speed and max-data-speed makes this OF nodes usable for that kind of CAN 2.0 restrtications too. Of course, CAN 2.0 chips only consider max-arbitration-speed as that applies to the whole wire bitstream, where as CANFD considers both. What I understand of your proposal is that max-arbitration-speed is 'fixed to 1MB anyway', and that assumption has been proven not universally applicable with CAN2.0 transceivers already. I found the name 'max-canfd-speed' a bit dubious as CANFD relies on 'flexible datarate'. transceivers may not necessarily support the same speed for both arbitration and data. So I propose to replace it with 'max-data-speed' Kind regards, Kurt > > > > Kind regards, > > Kurt > > > -- > To unsubscribe from this list: send the line "unsubscribe linux-can" in > the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org > More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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] 6+ messages in thread
[parent not found: <20170630080906.GA26712-W3bwb+3xS1LIj2mJfgo99rBP9FGTfoIhIWnq8iejnXE@public.gmane.org>]
* Re: CAN-FD Transceiver Limitations [not found] ` <20170630080906.GA26712-W3bwb+3xS1LIj2mJfgo99rBP9FGTfoIhIWnq8iejnXE@public.gmane.org> @ 2017-06-30 17:51 ` Franklin S Cooper Jr 0 siblings, 0 replies; 6+ messages in thread From: Franklin S Cooper Jr @ 2017-06-30 17:51 UTC (permalink / raw) To: Andrew Lunn, linux-can-u79uwXL29TY76Z2rM5mHXA, netdev-u79uwXL29TY76Z2rM5mHXA, wg-5Yr1BZd7O62+XT7JhA+gdA, mkl-bIcnvbaLZ9MEGnE8C9+IrQ, devicetree-u79uwXL29TY76Z2rM5mHXA Hi Kurt, On 06/30/2017 03:09 AM, Kurt Van Dijck wrote: >> On 06/29/2017 05:36 PM, Kurt Van Dijck wrote: >>>>>> >>>>>> mcan@0 { >>>>>> ... >>>>>> fixed-transceiver { >>>>>> max-canfd-speed = <2000> >>>>>> }; >>>>>> ... >>>>>> }; >>> >>> Since when would a transceiver support different speeds for CAN & CANFD? >> >> When I say CAN I'm referring to CAN 2.0 specification which mentioned >> speeds upto 1 Mbit/s. While CAN FD supports higher bitrates. > > linux-can is not necessarily restricted to CAN 2.0B? > >> >>> No transceivers were available, but they are now. >>> I see no datalink problem applying 2MBit for regular CAN with apropriate >>> physical layer, and CAN does not predefine the physical layer >>> (advise != define). >>> >>> IMHO, >>> fixed-transceiver { >>> max-arbitration-speed = <2000000> >>> max-data-speed = <4000000> >>> }; >>> is way better to describe the hardware. >>> Regular CAN chips would not consider max-data-speed... >> >> What is arbitration speed? > > CANFD remains similar during the arbitration phase (when the CAN id is > sent on the wire), and after that allows to switch to a higher 'data' > speed because the round-trip wire restrictions during arbitration > don't apply anymore. > >> >> Also if I understand you correctly then I agree drivers for traditional >> CAN wouldn't care about this subnode. Although it may be helpful for >> max-data-speed to become max-canfd-speed or something along those lines. >> Just so the property's purpose is clear. > > Transceivers exist that don't support 1MB either. > naming the speeds max-arbitration-speed and max-data-speed makes this > OF nodes usable for that kind of CAN 2.0 restrtications too. > > Of course, CAN 2.0 chips only consider max-arbitration-speed as that > applies to the whole wire bitstream, where as CANFD considers both. > > What I understand of your proposal is that max-arbitration-speed is > 'fixed to 1MB anyway', and that assumption has been proven not > universally applicable with CAN2.0 transceivers already. > > I found the name 'max-canfd-speed' a bit dubious as CANFD relies on > 'flexible datarate'. transceivers may not necessarily support the same > speed for both arbitration and data. > So I propose to replace it with 'max-data-speed' Thanks for the explanation. Makes sense. > > Kind regards, > Kurt > >>> >>> Kind regards, >>> Kurt >>> >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-can" in >> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html -- 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] 6+ messages in thread
end of thread, other threads:[~2017-06-30 17:51 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <de1f6343-4b28-4a5f-c6df-4e54c09fcce2@ti.com>
[not found] ` <20170629142142.GF9244@lunn.ch>
[not found] ` <5d4f2bcf-bd0f-4fa1-5d5a-d7b4a83cbc5e@ti.com>
[not found] ` <20170629154139.GC13221@lunn.ch>
2017-06-29 16:36 ` CAN-FD Transceiver Limitations Franklin S Cooper Jr
2017-06-29 17:19 ` Andrew Lunn
2017-06-29 22:36 ` Kurt Van Dijck
[not found] ` <20170629223551.GA6568-W3bwb+3xS1LIj2mJfgo99rBP9FGTfoIhIWnq8iejnXE@public.gmane.org>
2017-06-29 23:14 ` Franklin S Cooper Jr
[not found] ` <d5c2e2f2-8b74-58e1-0cc8-727ba39bd14c-l0cyMroinI0@public.gmane.org>
2017-06-30 8:09 ` Kurt Van Dijck
[not found] ` <20170630080906.GA26712-W3bwb+3xS1LIj2mJfgo99rBP9FGTfoIhIWnq8iejnXE@public.gmane.org>
2017-06-30 17:51 ` Franklin S Cooper Jr
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).