From: Oleksij Rempel <o.rempel@pengutronix.de>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Florian Fainelli <f.fainelli@gmail.com>,
kernel@pengutronix.de, linux-kernel@vger.kernel.org,
netdev@vger.kernel.org, Russell King <linux@armlinux.org.uk>,
devicetree@vger.kernel.org
Subject: Re: [PATCH v1] dt-bindings: net: ethernet-phy: Add forced-master/slave properties for SPE PHYs
Date: Fri, 6 Sep 2024 17:50:51 +0200 [thread overview]
Message-ID: <Ztsk23X_0p57KGSS@pengutronix.de> (raw)
In-Reply-To: <c08ac9b7-08e1-4cde-979c-ed66d4a252f1@lunn.ch>
On Fri, Sep 06, 2024 at 05:11:54PM +0200, Andrew Lunn wrote:
> On Fri, Sep 06, 2024 at 04:49:05PM +0200, Oleksij Rempel wrote:
> > Add two new properties, `forced-master` and `forced-slave`, to the
> > ethernet-phy binding. These properties are intended for Single Pair
> > Ethernet (1000/100/10Base-T1) PHYs, where each PHY and product may have
> > a predefined link role (master or slave). Typically, these roles are set
> > by hardware strap pins, but in some cases, device tree configuration is
> > necessary.
> >
> > Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
> > ---
> > .../devicetree/bindings/net/ethernet-phy.yaml | 22 +++++++++++++++++++
> > 1 file changed, 22 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/net/ethernet-phy.yaml b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > index d9b62741a2259..af7a1eb6ceff6 100644
> > --- a/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > +++ b/Documentation/devicetree/bindings/net/ethernet-phy.yaml
> > @@ -158,6 +158,28 @@ properties:
> > Mark the corresponding energy efficient ethernet mode as
> > broken and request the ethernet to stop advertising it.
> >
> > + forced-master:
> > + $ref: /schemas/types.yaml#/definitions/flag
> > + description:
> > + If set, forces the PHY to operate as a master. This is used in Single Pair
> > + Ethernet (1000/100/10Base-T1) where each PHY and product has a predefined
> > + link role (master or slave). This property is board-specific, as the role
> > + is usually configured by strap pins but can be set through the device tree
> > + if needed.
> > + This property is mutually exclusive with 'forced-slave'; only one of them
> > + should be used.
>
> DT reviewers tend to complain about such mutually exclusive
> properties.
Yes, at this point i was uncertain.
> What you are effectively adding is support for the ethtool:
>
> ethtool -s [master-slave preferred-master|preferred-slave|forced-master|forced-slave]
ack
> 10Base-T1 often does not have autoneg, so preferred-master &
> preferred-slave make non sense in this context, but i wounder if
> somebody will want these later. An Ethernet switch is generally
> preferred-master for example, but the client is preferred-slave.
Good point.
> Maybe make the property a string with supported values 'forced-master'
> and 'forced-slave', leaving it open for the other two to be added
> later.
>
> I've not seen the implementation yet, but i don't think there is much
> driver specific here. We already have phydev->master_slave_set, it
> just needs to be set from this property. Can it be done in phylib core
> somewhere?
Yes, this is the idea.
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-09-06 15:51 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-06 14:49 [PATCH v1] dt-bindings: net: ethernet-phy: Add forced-master/slave properties for SPE PHYs Oleksij Rempel
2024-09-06 15:11 ` Andrew Lunn
2024-09-06 15:50 ` Oleksij Rempel [this message]
2024-09-06 15:54 ` Maxime Chevallier
2024-09-06 16:11 ` Andrew Lunn
2024-09-06 16:22 ` Florian Fainelli
2024-09-06 17:49 ` Oleksij Rempel
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=Ztsk23X_0p57KGSS@pengutronix.de \
--to=o.rempel@pengutronix.de \
--cc=andrew@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.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=robh@kernel.org \
/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).