Skip to content

Broadcom PTP PHY support

Jonathan Lemon netdev 9 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v9 Latest3 patches 0 repliesApplied 3/3
  2. v83 patches 1 replySuperseded
  3. v73 patches 3 repliesSuperseded
Earlier versions · 6
VersionPostedPatchesRepliesStatus
v63 patches11 repliesSuperseded
v52 patches10 repliesSuperseded
v42 patches3 repliesSuperseded
v33 patches2 repliesSuperseded
v23 patches2 repliesSuperseded
v14 patches18 repliesSuperseded

Changes in v9 from the cover letter

Fix Kconfig dependencies from v7 (kernel test robot)

Patches in v9 All 3 applied

#Subject and filesSizeRepliesApplied
1/3net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-libdrivers/net/phy/bcm-phy-lib.h drivers/net/phy/broadcom.c+48 -40 repliesApplied
2/3net: phy: broadcom: Add PTP support for some Broadcom PHYs.drivers/net/phy/Kconfig drivers/net/phy/Makefile drivers/net/phy/bcm-phy-ptp.c+724 -00 repliesApplied
3/3net: phy: Add support for 1PPS out and external timestampsdrivers/net/phy/bcm-phy-ptp.c+226 -00 repliesApplied

Reviews trailers per patch

All 3 patches have a Reviewed-by or Acked-by.

PatchFlorian FainelliRichard Cochran
1/3R-b A-b
2/3R-b A-b
3/3A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v9 thread

Cover letter [PATCH net-next v9 0/3] Broadcom PTP PHY support

This adds PTP support for the Broadcom PHY BCM54210E (and the specific variant BCM54213PE that the rpi-5.15 branch uses).

This has only been tested on the RPI CM4, which has one port.

There are other Broadcom chips which may benefit from using the same framework here, although with different register sets.

v8->v9:
Fix Kconfig dependencies from v7 (kernel test robot)

v7->v8:
Style changes in patch 3 (Florian)

v6->v7:
Fix Kconfig dependencies (Jakub)

v5->v6:
Fix calculations in bcm_ptp_adjtime_locked (Richard) Add bcm_ptp_stop (Florian)
Update framesync handling for better masking and restore Cleanup 1PPS perout function, remove unsync'd version Add 1PPS extts detection
Break out extts/perout into its own patch

v4->v5:
Reorder so bcm-phy-lib.h shows up first, fixing dependency issues. Use set_normalized_timespec for adjusting ns in adjtime Return upscaled config setting from hwtstamp

v3->v4:
Squash bcm-phy-lib.h and broadcom.c changes into one patch Reorder so the main patch shows up first.

v2->v3:
Rearrange patches so they apply in order
Use ERR_CAST

v1->v2:
Squash Kconfig into main patch
Move config checks into bcm-phy-lib.h
Fix delta_ns calculations in adjtime
Uppercase mode selector macros
Only use NSE_INIT when necessary
Remove the inserted Broadcom RX timestamp from the PTP packet
Add perout (chip generated) and fsync out (timer generated)
Remove PHY_ID_BCM54213PE special casing (needed for rpi tree)
---
CC: Andrew Lunn <[email protected]>
CC: Florian Fainelli <[email protected]>
CC: Richard Cochran <[email protected]>
CC: Lasse Johnsen <[email protected]>
CC: Heiner Kallweit <[email protected]>
CC: Russell King <[email protected]>
CC: "David S. Miller" <[email protected]>
CC: Eric Dumazet <[email protected]>
CC: Jakub Kicinski <[email protected]>
CC: Paolo Abeni <[email protected]>
CC: Broadcom internal kernel review list <[email protected]>
---

Jonathan Lemon (3):
net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib
net: phy: broadcom: Add PTP support for some Broadcom PHYs.
net: phy: Add support for 1PPS out and external timestamps

 drivers/net/phy/Kconfig       |   5 +
 drivers/net/phy/Makefile      |   1 +
 drivers/net/phy/bcm-phy-lib.h |  19 +
 drivers/net/phy/bcm-phy-ptp.c | 944 ++++++++++++++++++++++++++++++++++
 drivers/net/phy/broadcom.c    |  33 +-
 5 files changed, 998 insertions(+), 4 deletions(-)
 create mode 100644 drivers/net/phy/bcm-phy-ptp.c
Signature · 1 line
2.34.3