[4/6] net: phy: maxio: extend PHY ID matching

Message ID 20260803101452.2993721-5-andre.przywara@arm.com (mailing list archive)
State New
Headers
Series sunxi: net: add Ethernet support for X96QPro+ |

Commit Message

Andre Przywara Aug. 3, 2026, 10:14 a.m. UTC
Currently the maxio Ethernet PHY driver expects a PHY matching exactly the
one ID provided: 0x7b744412. The Maxio MAE0621A-Q3C model used on
the Allwinner based X96QPro+ TV box uses a slightly different PHY ID:
0x7b744411.

Replace the "exact match" requirement with the more relaxed "model
match" version, which ignores the lowest 4 bits of the PHY ID. Both
PHYs should now be recognised by the driver.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 drivers/net/phy/maxio.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
  

Comments

Per Larsson Aug. 3, 2026, 2:59 p.m. UTC | #1
On Mon,  3 Aug 2026 12:14:50 +0200
Andre Przywara <andre.przywara@arm.com> wrote:

> Currently the maxio Ethernet PHY driver expects a PHY matching
> exactly the one ID provided: 0x7b744412. The Maxio MAE0621A-Q3C model
> used on the Allwinner based X96QPro+ TV box uses a slightly different
> PHY ID: 0x7b744411.

A somewhat unfortunate typo here claims that the TV box has the -Q3C
variant when it in reality has the -Q2C variant (Cover letter and other
pathches in the series gets it right).
  
Andrew Lunn Aug. 4, 2026, 2:49 a.m. UTC | #2
On Mon, Aug 03, 2026 at 12:14:50PM +0200, Andre Przywara wrote:
> Currently the maxio Ethernet PHY driver expects a PHY matching exactly the
> one ID provided: 0x7b744412. The Maxio MAE0621A-Q3C model used on
> the Allwinner based X96QPro+ TV box uses a slightly different PHY ID:
> 0x7b744411.
> 
> Replace the "exact match" requirement with the more relaxed "model
> match" version, which ignores the lowest 4 bits of the PHY ID. Both
> PHYs should now be recognised by the driver.

Is there any documentation to suggest this is different versions of
the same PHY? The datasheet sometimes document the lower nibble as
being version.

	Andrew
  

Patch

diff --git a/drivers/net/phy/maxio.c b/drivers/net/phy/maxio.c
index 5fabf99fb90f..d97fb50cdbe1 100644
--- a/drivers/net/phy/maxio.c
+++ b/drivers/net/phy/maxio.c
@@ -87,7 +87,7 @@  static int maxio_mae0621a_config_init(struct phy_device *phydev)
 
 static struct phy_driver maxio_drivers[] = {
 	{
-		PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_PHY_ID),
+		PHY_ID_MATCH_MODEL(MAXIO_MAE0621A_PHY_ID),
 		.name		= "Maxio MAE0621A",
 		.probe		= maxio_mae0621a_probe,
 		.config_init	= maxio_mae0621a_config_init,
@@ -100,7 +100,7 @@  static struct phy_driver maxio_drivers[] = {
 module_phy_driver(maxio_drivers);
 
 static const struct mdio_device_id __maybe_unused maxio_tbl[] = {
-	{ PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_PHY_ID) },
+	{ PHY_ID_MATCH_MODEL(MAXIO_MAE0621A_PHY_ID) },
 	{ }
 };
 MODULE_DEVICE_TABLE(mdio, maxio_tbl);