All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next v5 0/2] Broadcom PTP PHY support
@ 2022-05-18 22:39 Jonathan Lemon
  2022-05-18 22:39 ` [PATCH net-next v5 1/2] net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib Jonathan Lemon
                   ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Jonathan Lemon @ 2022-05-18 22:39 UTC (permalink / raw)
  To: netdev
  Cc: f.fainelli, andrew, hkallweit1, linux, bcm-kernel-feedback-list,
	kernel-team, davem, kuba, pabeni, edumazet

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.

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)

Thanks to Lasse Johnsen <lasse@timebeat.app> for pointing out
that the chip's periodic output generation isn't sync'd to any
time base.

Jonathan Lemon (2):
  net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib
  net: phy: broadcom: Add PTP support for some Broadcom PHYs.

 drivers/net/phy/Kconfig       |  10 +
 drivers/net/phy/Makefile      |   1 +
 drivers/net/phy/bcm-phy-lib.h |  14 +
 drivers/net/phy/bcm-phy-ptp.c | 868 ++++++++++++++++++++++++++++++++++
 drivers/net/phy/broadcom.c    |  23 +-
 5 files changed, 912 insertions(+), 4 deletions(-)
 create mode 100644 drivers/net/phy/bcm-phy-ptp.c

-- 
2.34.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2022-05-31  1:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18 22:39 [PATCH net-next v5 0/2] Broadcom PTP PHY support Jonathan Lemon
2022-05-18 22:39 ` [PATCH net-next v5 1/2] net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib Jonathan Lemon
2022-05-18 22:39 ` [PATCH net-next v5 2/2] net: phy: broadcom: Add PTP support for some Broadcom PHYs Jonathan Lemon
2022-05-20 17:24   ` Florian Fainelli
2022-05-21  2:04     ` Jonathan Lemon
2022-05-23  2:49       ` Florian Fainelli
2022-05-30 22:18         ` Jonathan Lemon
2022-05-29  0:34   ` Richard Cochran
2022-05-30 17:07     ` Jonathan Lemon
2022-05-30 23:04       ` Richard Cochran
2022-05-31  1:15         ` Flugsvamp
2022-05-28  3:27 ` [PATCH net-next v5 0/2] Broadcom PTP PHY support Richard Cochran
2022-05-30 16:48   ` Jonathan Lemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.