mbox series

[net-next,v1,0/4] Broadcom PTP PHY support

Message ID 20220424022356.587949-1-jonathan.lemon@gmail.com (mailing list archive)
Headers show
Series Broadcom PTP PHY support | expand

Message

Jonathan Lemon April 24, 2022, 2:23 a.m. UTC
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.

Jonathan Lemon (4):
  net: phy: broadcom: Add PTP support for some Broadcom PHYs.
  net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib
  net: phy: broadcom: Hook up the PTP PHY functions
  net: phy: Kconfig: Add broadcom PTP PHY library

 drivers/net/phy/Kconfig       |  10 +
 drivers/net/phy/Makefile      |   1 +
 drivers/net/phy/bcm-phy-lib.c |  13 +
 drivers/net/phy/bcm-phy-lib.h |   3 +
 drivers/net/phy/bcm-phy-ptp.c | 736 ++++++++++++++++++++++++++++++++++
 drivers/net/phy/broadcom.c    |  23 +-
 6 files changed, 782 insertions(+), 4 deletions(-)
 create mode 100644 drivers/net/phy/bcm-phy-ptp.c

Comments

Richard Cochran April 25, 2022, 1:01 a.m. UTC | #1
On Sat, Apr 23, 2022 at 07:23:52PM -0700, Jonathan Lemon wrote:

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

Based on two examples, the present 542xx and the 541xx (which I am
familiar with), it appears that the registers sets are the same in
gen1, just the base offset is different.

So it would be great to store the base in bcm_ptp_private, adding the
base into each read/write operation.

Thanks,
Richard