From: Daniel Golle <daniel@makrotopia.org>
To: Vladimir Oltean <olteanv@gmail.com>
Cc: Hauke Mehrtens <hauke@hauke-m.de>, Andrew Lunn <andrew@lunn.ch>,
"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>,
Simon Horman <horms@kernel.org>,
Russell King <linux@armlinux.org.uk>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Andreas Schirm <andreas.schirm@siemens.com>,
Lukas Stockmann <lukas.stockmann@siemens.com>,
Alexander Sverdlin <alexander.sverdlin@siemens.com>,
Peter Christen <peter.christen@siemens.com>,
Avinash Jayaraman <ajayaraman@maxlinear.com>,
Bing tao Xu <bxu@maxlinear.com>, Liang Xu <lxu@maxlinear.com>,
Juraj Povazanec <jpovazanec@maxlinear.com>,
"Fanni (Fang-Yi) Chan" <fchan@maxlinear.com>,
"Benny (Ying-Tsan) Weng" <yweng@maxlinear.com>,
"Livia M. Rosu" <lrosu@maxlinear.com>,
John Crispin <john@phrozen.org>
Subject: Re: [PATCH net-next v3 10/12] dt-bindings: net: dsa: lantiq,gswip: add support for MaxLinear GSW1xx switches
Date: Tue, 28 Oct 2025 01:27:39 +0000 [thread overview]
Message-ID: <aQAcC3lj5G_uoXPd@makrotopia.org> (raw)
In-Reply-To: <20251028000959.3kiac5kwo5pcl4ft@skbuf>
On Tue, Oct 28, 2025 at 02:09:59AM +0200, Vladimir Oltean wrote:
> On Sun, Oct 26, 2025 at 11:48:06PM +0000, Daniel Golle wrote:
> > Extend the Lantiq GSWIP device tree binding to also cover MaxLinear
> > GSW1xx switches which are based on the same hardware IP but connected
> > via MDIO instead of being memory-mapped.
> >
> > Add compatible strings for MaxLinear GSW120, GSW125, GSW140, GSW141,
> > and GSW145 switches and adjust the schema to handle the different
> > connection methods with conditional properties.
> >
> > Add MaxLinear GSW125 example showing MDIO-connected configuration.
> >
> > Signed-off-by: Daniel Golle <daniel@makrotopia.org>
> > ---
> > v3:
> > * add maxlinear,rx-inverted and maxlinear,tx-inverted properties
> >
> > v2:
> > * remove git conflict left-overs which somehow creeped in
> > * indent example with 4 spaces instead of tabs
> >
> > .../bindings/net/dsa/lantiq,gswip.yaml | 275 +++++++++++++-----
> > 1 file changed, 202 insertions(+), 73 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
> > index dd3858bad8ca..1148fdd0b6bc 100644
> > --- a/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
> > +++ b/Documentation/devicetree/bindings/net/dsa/lantiq,gswip.yaml
> > @@ -4,7 +4,12 @@
> > $id: http://devicetree.org/schemas/net/dsa/lantiq,gswip.yaml#
> > $schema: http://devicetree.org/meta-schemas/core.yaml#
> >
> > -title: Lantiq GSWIP Ethernet switches
> > +title: Lantiq GSWIP and MaxLinear GSW1xx Ethernet switches
> > +
> > +description:
> > + Lantiq GSWIP and MaxLinear GSW1xx switches share the same hardware IP.
> > + Lantiq switches are embedded in SoCs and accessed via memory-mapped I/O,
> > + while MaxLinear switches are standalone ICs connected via MDIO.
> >
> > $ref: dsa.yaml#
> >
> > @@ -34,6 +39,108 @@ patternProperties:
> > description:
> > Configure the RMII reference clock to be a clock output
> > rather than an input. Only applicable for RMII mode.
> > + maxlinear,rx-inverted:
> > + type: boolean
> > + description:
> > + Enable RX polarity inversion for SerDes port.
> > + maxlinear,tx-inverted:
> > + type: boolean
> > + description:
> > + Enable TX polarity inversion for SerDes port.
>
> How urgently do you need these two properties? They are truly general,
> not vendor-specific, and while I wanted to add such support to the
> Synopsys XPCS, I started working on some generic variants.
Inverting the RX inversion is required for the MaxLinear GSW145 demo
board I got which got an MxL86111 PHY wired to the SGMII port of the
switch. That's why I had to implement at least that in order to be able
to test the SerDes port.
> There's some cleanup and consolidation to do. "st,pcie-tx-pol-inv" and
> "st,sata-tx-pol-inv" are defined in .txt bindings but not implemented.
> Then we have "st,px_rx_pol_inv" and "mediatek,pnswap" which would also
> need deprecating and converted to the new formats.
Sounds like a good plan, I'm all for it :)
>
> Where I left things was that I haven't decided if there's any value in
> defining the polarity per SerDes protocol (like
> Documentation/devicetree/bindings/phy/transmit-amplitude.yaml) or if a
> global value is fine. I.e. if the polarity is inverted for SATA, it's
> normal for PCIe, or something like that. The existence of the independent
> "st,pcie-tx-pol-inv" and "st,sata-tx-pol-inv" properties would suggest
> yes, but the lack of an implementation casts some doubt on that.
>
> Anyway, I do have some prototype patches that add something like this:
>
> phy: phy {
> #phy-cells = <1>;
> tx-p2p-microvolt = <915000>, <1100000>, <1200000>;
> tx-p2p-microvolt-names = "2500base-x", "usb-hs", "usb-ss";
>
> /* RX polarity is inverted for usb-hs, normal for usb-ss */
> rx-polarity = <PHY_POL_INVERT>, <PHY_POL_NORMAL>;
> rx-polarity-names = "usb-hs", "usb-ss";
>
> /* TX polarity is normal for all modes */
> tx-polarity = <PHY_POL_NORMAL>;
> tx-polarity-names = "default";
> };
>
> and a new drivers/phy/phy-common-props.c file (yes, outside of netdev)
> with two exported API functions:
>
> int phy_get_rx_polarity(struct fwnode_handle *fwnode, const char *mode_name);
> int phy_get_tx_polarity(struct fwnode_handle *fwnode, const char *mode_name);
>
> If you can split this up from the rest of the MDIO discrete switch
> introduction series, I can accelerate work on these common properties in
> the following weeks.
I can break out the SGMII polarity dt-bindings and functional patch
and postpone it until generic properties to describe SerDes polarities
are introduced.
Also note that the SerDes PHY also got a bunch of other tunables which
can make sense but aren't required on the demo board:
* RX LOS Detector Enable
* RX LOS Filter Count
* RX LOS Threshold Level in mV
* RX LOS Sensitivity Level
* TX Amplitude Control
* TX Vboost Enable
* TX Vboost Level (0.844 V, 1.008 V, 1.156 V)
* TX Remote Receiver Detection Request Enable
* TX Preemphasis
* ...
Especially the voltage levels cry for being described in a generic
way...
next prev parent reply other threads:[~2025-10-28 1:27 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-26 23:43 [PATCH net-next v3 00/12] net: dsa: lantiq_gswip: Add support for MaxLinear GSW1xx switch family Daniel Golle
2025-10-26 23:43 ` [PATCH net-next v3 01/12] net: dsa: lantiq_gswip: split into common and MMIO parts Daniel Golle
2025-10-27 11:37 ` Sverdlin, Alexander
2025-10-27 22:22 ` Vladimir Oltean
2025-10-26 23:44 ` [PATCH net-next v3 02/12] net: dsa: lantiq_gswip: support enable/disable learning Daniel Golle
2025-10-27 22:29 ` Vladimir Oltean
2025-10-26 23:44 ` [PATCH net-next v3 03/12] net: dsa: lantiq_gswip: support Energy Efficient Ethernet Daniel Golle
2025-10-26 23:44 ` [PATCH net-next v3 04/12] net: dsa: lantiq_gswip: set link parameters also for CPU port Daniel Golle
2025-10-27 8:03 ` Sverdlin, Alexander
2025-10-27 22:39 ` Vladimir Oltean
2025-10-26 23:44 ` [PATCH net-next v3 05/12] net: dsa: lantiq_gswip: define and use GSWIP_TABLE_MAC_BRIDGE_VAL1_VALID Daniel Golle
2025-10-27 22:47 ` Vladimir Oltean
2025-10-26 23:45 ` [PATCH net-next v3 06/12] dt-bindings: net: dsa: lantiq,gswip: add support for MII delay properties Daniel Golle
2025-10-27 23:04 ` Vladimir Oltean
2025-10-27 23:41 ` Daniel Golle
2025-10-28 1:39 ` Vladimir Oltean
2025-10-28 2:30 ` Daniel Golle
2025-10-26 23:45 ` [PATCH net-next v3 07/12] net: dsa: lantiq_gswip: allow adjusting MII delays Daniel Golle
2025-10-26 23:47 ` [PATCH net-next v3 08/12] dt-bindings: net: dsa: lantiq,gswip: add MaxLinear RMII refclk output property Daniel Golle
2025-10-27 9:41 ` Sverdlin, Alexander
2025-10-26 23:47 ` [PATCH net-next v3 09/12] net: dsa: lantiq_gswip: add vendor property to setup MII refclk output Daniel Golle
2025-10-27 11:39 ` Sverdlin, Alexander
2025-10-27 23:36 ` Vladimir Oltean
2025-10-27 23:48 ` Daniel Golle
2025-10-28 1:44 ` Vladimir Oltean
2025-10-26 23:48 ` [PATCH net-next v3 10/12] dt-bindings: net: dsa: lantiq,gswip: add support for MaxLinear GSW1xx switches Daniel Golle
2025-10-28 0:09 ` Vladimir Oltean
2025-10-28 1:27 ` Daniel Golle [this message]
2025-10-26 23:48 ` [PATCH net-next v3 11/12] net: dsa: add tagging driver for MaxLinear GSW1xx switch family Daniel Golle
2025-10-27 11:48 ` Sverdlin, Alexander
2025-10-28 0:28 ` Vladimir Oltean
2025-10-28 17:24 ` Daniel Golle
2025-10-26 23:49 ` [PATCH net-next v3 12/12] net: dsa: add " Daniel Golle
2025-10-28 1:24 ` Vladimir Oltean
2025-10-28 2:14 ` Daniel Golle
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=aQAcC3lj5G_uoXPd@makrotopia.org \
--to=daniel@makrotopia.org \
--cc=ajayaraman@maxlinear.com \
--cc=alexander.sverdlin@siemens.com \
--cc=andreas.schirm@siemens.com \
--cc=andrew@lunn.ch \
--cc=bxu@maxlinear.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=fchan@maxlinear.com \
--cc=hauke@hauke-m.de \
--cc=horms@kernel.org \
--cc=john@phrozen.org \
--cc=jpovazanec@maxlinear.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lrosu@maxlinear.com \
--cc=lukas.stockmann@siemens.com \
--cc=lxu@maxlinear.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=peter.christen@siemens.com \
--cc=robh@kernel.org \
--cc=yweng@maxlinear.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).