Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751454AbdGZRGB (ORCPT ); Wed, 26 Jul 2017 13:06:01 -0400 Received: from mo4-p00-ob.smtp.rzone.de ([81.169.146.219]:18611 "EHLO mo4-p00-ob.smtp.rzone.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750790AbdGZRF7 (ORCPT ); Wed, 26 Jul 2017 13:05:59 -0400 X-RZG-AUTH: :P2MHfkW8eP4Mre39l357AZT/I7AY/7nT2yrT1q0ngWNsKR9DbcHksQLwp93IWrp3K3EQaA== X-RZG-CLASS-ID: mo00 Subject: Re: [PATCH v2 2/4] can: fixed-transceiver: Add documentation for CAN fixed transceiver bindings To: Andrew Lunn , Franklin S Cooper Jr References: <20170724230521.1436-1-fcooper@ti.com> <20170724230521.1436-3-fcooper@ti.com> <20170726164124.GL12049@lunn.ch> Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, linux-can@vger.kernel.org, wg@grandegger.com, mkl@pengutronix.de, robh+dt@kernel.org, quentin.schulz@free-electrons.com, dev.kurt@vandijck-laurijssen.be, sergei.shtylyov@cogentembedded.com From: Oliver Hartkopp Message-ID: <355b90b3-97ce-1057-6617-d5d709449c48@hartkopp.net> Date: Wed, 26 Jul 2017 19:05:47 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170726164124.GL12049@lunn.ch> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1598 Lines: 48 On 07/26/2017 06:41 PM, Andrew Lunn wrote: > On Mon, Jul 24, 2017 at 06:05:19PM -0500, Franklin S Cooper Jr wrote: >> + >> +Optional: >> + max-arbitration-speed: a positive non 0 value that determines the max >> + speed that CAN can run in non CAN-FD mode or during the >> + arbitration phase in CAN-FD mode. > > Hi Franklin > > Since this and the next property are optional, it is good to document > what happens when they are not in the DT blob. Also document what 0 > means. > >> + >> + max-data-speed: a positive non 0 value that determines the max data rate >> + that can be used in CAN-FD mode. A value of -1 implies >> + CAN-FD is not supported by the transceiver. > > -1 is ugly. I think it would be better to have a missing > max-data-speed property indicate that CAN-FD is not supported. Thanks Andrew! I had the same feeling about '-1' :-) > And > maybe put 'fd' into the property name. Good point. In fact the common naming to set bitrates for CAN(FD) controllers are 'bitrate' and 'data bitrate'. 'speed' is not really a good word for that. Finally, @Franklin: A CAN transceiver is limited in bandwidth. But you only have one RX and one TX line between the CAN controller and the CAN transceiver. The transceiver does not know about CAN FD - it has just a physical(!) layer with a limited bandwidth. This is ONE limitation. So I tend to specify only ONE 'max-bitrate' property for the fixed-transceiver binding. The fact whether the CAN controller is CAN FD capable or not is provided by the netlink configuration interface for CAN controllers. Regards, Oliver