[PATCH net-next v3 5/5] net: phy: maxio: add support for -Q2C variant

From: Andre Przywara

Date: Sat Sep 26 2026 - 19:05:55 EST


Currently the maxio Ethernet PHY driver expects a Maxio MAE0621A-Q3C PHY
matching exactly the one ID provided: 0x7b744412. There exist an earlier
variant of the PHY, still used on some devices, its label differs by using
the -Q2C suffix, and its PHY ID is 0x7b744411.

Some vendor drivers floating around in the web suggest they are somewhat
different, although for now this driver does not deal with any of those
registers, and the 125M clock switch is identical between the two.
Nevertheless prepare for future driver divergence by describing two
drivers, although using the same functions for now.

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

diff --git a/drivers/net/phy/maxio.c b/drivers/net/phy/maxio.c
index 266be95b949a8..8c33c8433b127 100644
--- a/drivers/net/phy/maxio.c
+++ b/drivers/net/phy/maxio.c
@@ -7,7 +7,8 @@
#include <linux/phy.h>
#include <linux/property.h>

-#define MAXIO_MAE0621A_PHY_ID 0x7b744412
+#define MAXIO_MAE0621A_Q2C_PHY_ID 0x7b744411
+#define MAXIO_MAE0621A_Q3C_PHY_ID 0x7b744412

#define MAXIO_PAGE_SELECT 0x1f
#define MAXIO_MAE0621A_PHYCR2_PAGE 0xa43
@@ -89,8 +90,18 @@ static int maxio_mae0621a_config_init(struct phy_device *phydev)

static struct phy_driver maxio_drivers[] = {
{
- PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_PHY_ID),
- .name = "Maxio MAE0621A",
+ PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q2C_PHY_ID),
+ .name = "Maxio MAE0621A-Q2C",
+ .probe = maxio_mae0621a_probe,
+ .config_init = maxio_mae0621a_config_init,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+ .read_page = maxio_read_page,
+ .write_page = maxio_write_page,
+ },
+ {
+ PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q3C_PHY_ID),
+ .name = "Maxio MAE0621A-Q3C",
.probe = maxio_mae0621a_probe,
.config_init = maxio_mae0621a_config_init,
.suspend = genphy_suspend,
@@ -102,7 +113,8 @@ 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_EXACT(MAXIO_MAE0621A_Q2C_PHY_ID) },
+ { PHY_ID_MATCH_EXACT(MAXIO_MAE0621A_Q3C_PHY_ID) },
{ }
};
MODULE_DEVICE_TABLE(mdio, maxio_tbl);
--
2.46.4