Skip to content

Commit f8e9383

Browse files
pelwellpopcornmix
authored andcommitted
net: phy: BCM54210PE does not support PTP
BCM54213PE is an Ethernet PHY that supports PTP hardware timestamping. BCM54210PW ia another Ethernet PHY, but one without PTP support. Unfortunately the two PHYs return the same ID when queried, so some extra information is required to determine whether the PHY is PTP- capable. There are two Raspberry Pi products that use these PHYs - Pi 4B and CM4 - and fortunately they use different PHY addresses, so use that as a differentiator. Choose to treat a PHY with the same ID but another address as a BCM54210PE, which seems more common. See: #5104 Signed-off-by: Phil Elwell <[email protected]>
1 parent 6f7609e commit f8e9383

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

drivers/net/phy/bcm-phy-ptp.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -913,6 +913,18 @@ struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev)
913913
switch (BRCM_PHY_MODEL(phydev)) {
914914
case PHY_ID_BCM54210E:
915915
break;
916+
#ifdef PHY_ID_BCM54213PE
917+
case PHY_ID_BCM54213PE:
918+
switch (phydev->mdio.addr) {
919+
case 0: // CM4 - this is a BCM54210PE which supports PTP
920+
break;
921+
case 1: // 4B - this is a BCM54213PE which doesn't
922+
return NULL;
923+
default: // Unknown - assume it's BCM54210PE
924+
break;
925+
}
926+
break;
927+
#endif
916928
default:
917929
return NULL;
918930
}

0 commit comments

Comments
 (0)