Skip to content

Commit 3c72011

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 2b3f2d0 commit 3c72011

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
@@ -914,6 +914,18 @@ struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev)
914914
switch (BRCM_PHY_MODEL(phydev)) {
915915
case PHY_ID_BCM54210E:
916916
break;
917+
#ifdef PHY_ID_BCM54213PE
918+
case PHY_ID_BCM54213PE:
919+
switch (phydev->mdio.addr) {
920+
case 0: // CM4 - this is a BCM54210PE which supports PTP
921+
break;
922+
case 1: // 4B - this is a BCM54213PE which doesn't
923+
return NULL;
924+
default: // Unknown - assume it's BCM54210PE
925+
break;
926+
}
927+
break;
928+
#endif
917929
default:
918930
return NULL;
919931
}

0 commit comments

Comments
 (0)