All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Lemon <jonathan.lemon@gmail.com>
To: netdev@vger.kernel.org
Cc: kernel-team@fb.com, Andrew Lunn <andrew@lunn.ch>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Richard Cochran <richardcochran@gmail.com>,
	Lasse Johnsen <l@ssejohnsen.me>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Broadcom internal kernel review list 
	<bcm-kernel-feedback-list@broadcom.com>
Subject: [PATCH net-next v6 0/3] Broadcom PTP PHY support
Date: Wed,  8 Jun 2022 13:44:48 -0700	[thread overview]
Message-ID: <20220608204451.3124320-1-jonathan.lemon@gmail.com> (raw)

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.

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 <andrew@lunn.ch>
CC: Florian Fainelli <f.fainelli@gmail.com>
CC: Richard Cochran <richardcochran@gmail.com>
CC: Lasse Johnsen <l@ssejohnsen.me>
CC: Heiner Kallweit <hkallweit1@gmail.com>
CC: Russell King <linux@armlinux.org.uk>
CC: "David S. Miller" <davem@davemloft.net>
CC: Eric Dumazet <edumazet@google.com>
CC: Jakub Kicinski <kuba@kernel.org>
CC: Paolo Abeni <pabeni@redhat.com>
CC: Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
--- 

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       |  10 +
 drivers/net/phy/Makefile      |   1 +
 drivers/net/phy/bcm-phy-lib.h |  19 +
 drivers/net/phy/bcm-phy-ptp.c | 945 ++++++++++++++++++++++++++++++++++
 drivers/net/phy/broadcom.c    |  33 +-
 5 files changed, 1004 insertions(+), 4 deletions(-)
 create mode 100644 drivers/net/phy/bcm-phy-ptp.c

-- 
2.34.3


             reply	other threads:[~2022-06-08 20:47 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-08 20:44 Jonathan Lemon [this message]
2022-06-08 20:44 ` [PATCH net-next v6 1/3] net: phy: broadcom: Add Broadcom PTP hooks to bcm-phy-lib Jonathan Lemon
2022-06-08 20:44 ` [PATCH net-next v6 2/3] net: phy: broadcom: Add PTP support for some Broadcom PHYs Jonathan Lemon
2022-06-08 20:55   ` Richard Cochran
2022-06-08 21:29     ` Jonathan Lemon
2022-06-09  4:01       ` Richard Cochran
2022-06-09 19:21         ` Jonathan Lemon
2022-06-09 20:37           ` Richard Cochran
2022-06-11  1:02   ` Jakub Kicinski
2022-06-11 21:33     ` Jonathan Lemon
2022-06-13 16:13       ` Jakub Kicinski
2022-06-08 20:44 ` [PATCH net-next v6 3/3] net: phy: Add support for 1PPS out and external timestamps Jonathan Lemon
2022-06-08 20:50   ` Richard Cochran
2022-06-08 20:58     ` Jonathan Lemon
2022-06-09 20:38 ` [PATCH net-next v6 0/3] Broadcom PTP PHY support Richard Cochran

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220608204451.3124320-1-jonathan.lemon@gmail.com \
    --to=jonathan.lemon@gmail.com \
    --cc=andrew@lunn.ch \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=f.fainelli@gmail.com \
    --cc=hkallweit1@gmail.com \
    --cc=kernel-team@fb.com \
    --cc=kuba@kernel.org \
    --cc=l@ssejohnsen.me \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.