[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20251122193341.332324-1-vladimir.oltean@nxp.com>
Date: Sat, 22 Nov 2025 21:33:32 +0200
From: Vladimir Oltean <vladimir.oltean@....com>
To: netdev@...r.kernel.org,
devicetree@...r.kernel.org,
linux-phy@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org,
Daniel Golle <daniel@...rotopia.org>,
Horatiu Vultur <horatiu.vultur@...rochip.com>,
Andrew Lunn <andrew@...n.ch>,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Vinod Koul <vkoul@...nel.org>,
Kishon Vijay Abraham I <kishon@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
Eric Woudstra <ericwouds@...il.com>,
Marek BehĂșn <kabel@...nel.org>,
Lee Jones <lee@...nel.org>,
Patrice Chotard <patrice.chotard@...s.st.com>
Subject: [PATCH net-next 0/9] XPCS polarity inversion via generic device tree properties
Polarity inversion (described in patch 3/6) is a feature with at least 3
potential new users waiting for a generic description:
- Horatiu Vultur with the lan966x SerDes
- Daniel Golle with the MaxLinear GSW1xx switches
- Me with a custom SJA1105 board, switch which uses the DesignWare XPCS
I became interested in exploring the problem space because I was averse
to the idea of adding vendor-specific device tree properties to describe
a common need.
This set contains an implementation of a generic feature that should
cater to all known needs that were identified during my documentation
phase. I've added a new user - the XPCS - and I've converted an existing
user - the EN8811H Ethernet PHY.
I haven't converted the rest due to various reasons:
- "mediatek,pnswap" is defined bidirectionally and the underlying
SGMII_PN_SWAP_TX_RX register field doesn't make it clear which bit is
RX and which is TX. Needs more work and expert knowledge from maintainer.
- "st,px_rx_pol_inv" - its binding is a .txt file and I don't have time
for such a large detour to convert it to dtschema.
- "st,pcie-tx-pol-inv" and "st,sata-tx-pol-inv" - these are defined in a
.txt schema but are not implemented in any driver. My verdict would be
"delete the properties" but again, I would prefer not introducing such
dependency to this series.
Vladimir Oltean (9):
dt-bindings: phy: rename transmit-amplitude.yaml to
phy-common-props.yaml
dt-bindings: phy-common-props: create a reusable "protocol-names"
definition
dt-bindings: phy-common-props: RX and TX lane polarity inversion
dt-bindings: net: xpcs: allow properties from phy-common-props.yaml
phy: add phy_get_rx_polarity() and phy_get_tx_polarity()
net: pcs: xpcs: promote SJA1105 TX polarity inversion to core
net: pcs: xpcs: allow lane polarity inversion
net: phy: air_en8811h: deprecate "airoha,pnswap-rx" and
"airoha,pnswap-tx"
dt-bindings: net: airoha,en8811h: deprecate "airoha,pnswap-rx" and
"airoha,pnswap-tx"
.../bindings/net/airoha,en8811h.yaml | 11 +-
.../bindings/net/pcs/snps,dw-xpcs.yaml | 5 +-
.../bindings/phy/phy-common-props.yaml | 152 ++++++++++++++++++
.../bindings/phy/transmit-amplitude.yaml | 103 ------------
MAINTAINERS | 21 +++
drivers/net/pcs/Kconfig | 1 +
drivers/net/pcs/pcs-xpcs-nxp.c | 11 --
drivers/net/pcs/pcs-xpcs.c | 58 ++++++-
drivers/net/pcs/pcs-xpcs.h | 2 +-
drivers/net/phy/Kconfig | 1 +
drivers/net/phy/air_en8811h.c | 50 ++++--
drivers/phy/Kconfig | 9 ++
drivers/phy/Makefile | 1 +
drivers/phy/phy-common-props.c | 117 ++++++++++++++
include/dt-bindings/phy/phy.h | 4 +
include/linux/phy/phy-common-props.h | 20 +++
16 files changed, 426 insertions(+), 140 deletions(-)
create mode 100644 Documentation/devicetree/bindings/phy/phy-common-props.yaml
delete mode 100644 Documentation/devicetree/bindings/phy/transmit-amplitude.yaml
create mode 100644 drivers/phy/phy-common-props.c
create mode 100644 include/linux/phy/phy-common-props.h
--
2.34.1
Powered by blists - more mailing lists