[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <cover.1767926665.git.daniel@makrotopia.org>
Date: Fri, 9 Jan 2026 03:02:55 +0000
From: Daniel Golle <daniel@...rotopia.org>
To: 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>,
Daniel Golle <daniel@...rotopia.org>,
Vladimir Oltean <vladimir.oltean@....com>,
Michael Klein <michael@...sekall.de>,
Aleksander Jan Bajkowski <olek2@...pl>, netdev@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: [PATCH net-next 0/5] net: phy: realtek: simplify and reunify C22/C45
drivers
The RTL8221B PHY variants (VB-CG and VM-CG) were previously split into
separate C22 and C45 driver instances to support copper SFP modules
using the RollBall MDIO-over-I2C protocol, which only supports Clause-45
access. However, this split created significant code duplication and
complexity.
Commit 8af2136e77989 ("net: phy: realtek: add helper
RTL822X_VND2_C22_REG") exposed that RealTek PHYs map all standard
Clause-22 registers into MDIO_MMD_VEND2 at offset 0xa400.
With commit 1850ec20d6e71 ("net: phy: realtek: use paged access for
MDIO_MMD_VEND2 in C22 mode") it is now possible to access all MMD
registers transparently, regardless of whether the PHY is accessed via
C22 or C45 MDIO.
Further improve the translation logic for this register mapping, so a
single unified driver works efficiently with both access methods,
reducing code duplication.
The series also includes cleanup to remove unnecessary paged operations
on registers that aren't actually affected by page selection.
Testing was done on RTL8211F and RTL8221B-VB-CG (the latter in both
C22 and C45 modes).
Daniel Golle (5):
net: phy: realtek: support interrupt also for C22 variants
net: phy: realtek: simplify C22 reg access via MDIO_MMD_VEND2
net: phy: realtek: reunify C22 and C45 drivers
net: phy: realtek: demystify PHYSR register location
net: phy: realtek: simplify bogus paged operations
drivers/net/phy/realtek/realtek_main.c | 122 ++++++++++---------------
1 file changed, 47 insertions(+), 75 deletions(-)
--
2.52.0
Powered by blists - more mailing lists