Skip to contentSkip to conversation

hw/net: Support Marvell 88E1111 phy driver

PATCH In review Fea.Wang 1 participant 2 messages Nov 15, 2024 – Dec 11, 2024 Arm/Zynq architecture

lore
Share & tools
lore

Fea.Wang

author
#0 lore raw

PATCH 1/1 hw/net: Support Marvell 88E1111 phy driver

When the ethernet PHY's compatible string is 'ethernet-phy-id0141.0cc2', it will be matched with the Marvell driver in Linux instead of the generic driver. They differ from reading the PHY register17.11 bit which is for 'Speed and Duplex Resolved' and the value 0 will clear phydev->link and stop the flow. To avoid getting stuck, change the constant return value in QEMU for the bit to 1 to keep the driver going.

---
 hw/net/xilinx_axienet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/xilinx_axienet.c +1 -1
index faf27947b0..ee4b3afe9c 100644
@@ -102,7 +102,7 @@ static unsigned int tdk_read(struct PHY *phy, unsigned int req)
             break;
         case 17:
             /* Marvell PHY on many xilinx boards.  */
-            r = 0x8000; /* 1000Mb  */
+            r = 0x8800; /* 1000Mb  */
             break;
         case 18:
             {
Signature · 1 line
2.34.1
author
#1 lore raw

Ping

Quoted 30 lines · Fea.Wang

When the ethernet PHY's compatible string is 'ethernet-phy-id0141.0cc2', it will be matched with the Marvell driver in Linux instead of the generic driver. They differ from reading the PHY register17.11 bit which is for 'Speed and Duplex Resolved' and the value 0 will clear phydev->link and stop the flow. To avoid getting stuck, change the constant return value in QEMU for the bit to 1 to keep the driver going.

---
 hw/net/xilinx_axienet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
hw/net/xilinx_axienet.c +1 -1
index faf27947b0..ee4b3afe9c 100644
@@ -102,7 +102,7 @@ static unsigned int tdk_read(struct PHY *phy, unsigned
 int req)
             break;
         case 17:
             /* Marvell PHY on many xilinx boards.  */
-            r = 0x8000; /* 1000Mb  */
+            r = 0x8800; /* 1000Mb  */
             break;
         case 18:
             {

--
2.34.1