devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Conor Dooley <conor@kernel.org>, Rob Herring <robh@kernel.org>,
	Bastien Curutchet <bastien.curutchet@bootlin.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Richard Cochran <richardcochran@gmail.com>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	Herve Codina <herve.codina@bootlin.com>
Subject: Re: [PATCH 1/2] dt-bindings: net: Add TI DP83640
Date: Fri, 23 Feb 2024 16:07:04 +0100	[thread overview]
Message-ID: <20240223160704.4018cac2@device-28.home> (raw)
In-Reply-To: <a1e54836-51d2-4990-9444-56d9414eb28c@lunn.ch>

Hi Andrew, Bastien,

On Wed, 31 Jan 2024 23:40:45 +0100
Andrew Lunn <andrew@lunn.ch> wrote:

> On Wed, Jan 31, 2024 at 09:18:39PM +0000, Conor Dooley wrote:
> > On Wed, Jan 31, 2024 at 03:05:21PM -0600, Rob Herring wrote:  
> > > On Tue, Jan 30, 2024 at 05:56:37PM +0000, Conor Dooley wrote:  
> > > > On Tue, Jan 30, 2024 at 09:59:34AM +0100, Bastien Curutchet wrote:  
> >   
> > > > > +  ti,fiber-mode:
> > > > > +    $ref: /schemas/types.yaml#/definitions/uint32
> > > > > +    enum: [0, 1]
> > > > > +    description: |
> > > > > +      If present, enables or disables the FX Fiber Mode.
> > > > > +      Fiber mode support can also be strapped. If the strap pin is not set
> > > > > +      correctly or not set at all then this can be used to configure it.
> > > > > +       - 0     = FX Fiber Mode disabled
> > > > > +       - 1     = FX Fiber Mode enabled
> > > > > +       - unset = Configured by straps  
> > > > 
> > > > I don't like these properties that map meanings onto numbers. We can
> > > > have enums of strings in bindings that allow you to use something more
> > > > meaningful than "0" or "1".  
> > > 
> > > Tristate properties are fairly common pattern where we need 
> > > on/off/default. I've thought about making it a type. I don't think we 
> > > need defines for it.  
> > 
> > I think a type would be a good idea. I am not at all a fan of any of the
> > properties people introduce along these lines.  
> 
> Before going too far with that, i'm not actually sure it is required
> here. I've not looked at the PHY driver itself, but i expect there is
> some indication somewhere that the network stack expects a fibre link
> is to be used. We probably can determine at runtime if fibre should be
> used.

I've missed that thread initially. I guess that if Fiber is to be used,
this would be done through sfp, then we have all the regular interfaces
to configure the phy_interface_mode, in that case that would be
100BaseX.

So, a sane behaviour could simply be to configure the PHY in copper
mode by default, without relying on any DT property ? If anyone wants to
use fiber mode, then they would have to implement the
sfp_upstreamp_ops, which would take care of reconfiguring the MDI
interface of the PHY in the correct mode.

Maxime

  reply	other threads:[~2024-02-23 15:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  8:59 [PATCH 0/2] Add device tree binding support to TI's DP83640 Bastien Curutchet
2024-01-30  8:59 ` [PATCH 1/2] dt-bindings: net: Add TI DP83640 Bastien Curutchet
2024-01-30 13:34   ` Andrew Lunn
2024-02-16 15:44     ` Bastien Curutchet
2024-02-16 17:28       ` Andrew Lunn
2024-01-30 17:56   ` Conor Dooley
2024-01-31 21:05     ` Rob Herring
2024-01-31 21:18       ` Conor Dooley
2024-01-31 22:40         ` Andrew Lunn
2024-02-23 15:07           ` Maxime Chevallier [this message]
2024-02-23 15:10             ` Maxime Chevallier
2024-01-30  8:59 ` [PATCH 2/2] net: phy: Add some configuration from device-tree Bastien Curutchet

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=20240223160704.4018cac2@device-28.home \
    --to=maxime.chevallier@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=bastien.curutchet@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=herve.codina@bootlin.com \
    --cc=hkallweit1@gmail.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=robh@kernel.org \
    --cc=thomas.petazzoni@bootlin.com \
    /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 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).