Intel-Wired-Lan Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jacob Keller <jacob.e.keller@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [net-next v2 00/13] ice: implement support for PTP on E822 hardware
Date: Thu,  1 Jul 2021 15:04:43 -0700	[thread overview]
Message-ID: <20210701220456.3882767-1-jacob.e.keller@intel.com> (raw)

Extend the ice driver implementation to support PTP for the E822 based
devices.

This includes a few cleanup patches, that fix some minor issues spotted
while preparing them. In addition, there are some slight refactors to ease
the addition of E822 support, followed by adding the new hardware
implementation ice_ptp_hw.c.

There are a few major differences with E822 support compared to E810
support:

*) The E822 PHY is a bit different and requires a more complex
initialization procedure that requires delaying the PHY start until link is
up
*) The E822 device has a Clock Generation Unit which must be initialized in
order to generate proper clock frequencies on the output that drives the PTP
hardware clock registers
*) The E822 devices support enhanced timestamp calibration by making use of
a process called Vernier offset measurement. This allows the hardware to
measure phase offset related to the PHY clocks for Serdes and FEC, reducing
the inaccuracy of the timestamp relative to the actual packet transmission.
Making use of this requires programming the PHY to enable vernier
calibration and then detecting when the PHY has completed calibration. This
is done as part of a new kthread, ov_work.
*) E822 devices support crosstimestamping via PCIe PTM, which we enable when
available on the platform.

There is a fair amount of logic required to perform PHY and CGU
initialization, which is the vast majority of the new code, but it is fairly
self contained within ice_ptp_hw.c, with the exception of monitoring for
offset validity being handled by a kthread.

Changes since v1:
* Rebased on top of IWL to resolve conflict
* Fixed build against non-X86 arch for the PCIe PTM support

Jacob Keller (13):
  ice: fix Tx queue iteration for Tx timestamp enablement
  ice: remove dead code for allocating pin_config
  ice: add lock around Tx timestamp tracker flush
  ice: restart periodic outputs around time changes
  ice: introduce ice_base_incval function
  ice: PTP: move setting of tstamp_config
  ice: use 'int err' instead of 'int status'
  ice: introduce ice_ptp_init_phc function
  ice: convert clk_freq capability into time_ref
  ice: implement basic E822 PTP support
  ice: ensure the hardware Clock Generation Unit is configured
  ice: exit bypass mode once hardware finishes timestamp calibration
  ice: support crosstimestamping on E822 devices if supported

 drivers/net/ethernet/intel/Kconfig            |   10 +
 drivers/net/ethernet/intel/ice/ice_cgu_regs.h |  116 +
 drivers/net/ethernet/intel/ice/ice_common.c   |   12 +
 .../net/ethernet/intel/ice/ice_hw_autogen.h   |    9 +
 drivers/net/ethernet/intel/ice/ice_main.c     |    7 +
 drivers/net/ethernet/intel/ice/ice_ptp.c      |  698 +++-
 drivers/net/ethernet/intel/ice/ice_ptp.h      |   30 +-
 .../net/ethernet/intel/ice/ice_ptp_consts.h   |  374 +++
 drivers/net/ethernet/intel/ice/ice_ptp_hw.c   | 2794 ++++++++++++++++-
 drivers/net/ethernet/intel/ice/ice_ptp_hw.h   |  345 ++
 drivers/net/ethernet/intel/ice/ice_type.h     |   23 +-
 11 files changed, 4207 insertions(+), 211 deletions(-)
 create mode 100644 drivers/net/ethernet/intel/ice/ice_cgu_regs.h
 create mode 100644 drivers/net/ethernet/intel/ice/ice_ptp_consts.h


base-commit: 6e3c27180bcf2635f537ff63164e8df9773b56fb
-- 
2.31.1.331.gb0c09ab8796f


             reply	other threads:[~2021-07-01 22:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-01 22:04 Jacob Keller [this message]
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 01/13] ice: fix Tx queue iteration for Tx timestamp enablement Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 02/13] ice: remove dead code for allocating pin_config Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 03/13] ice: add lock around Tx timestamp tracker flush Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 04/13] ice: restart periodic outputs around time changes Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 05/13] ice: introduce ice_base_incval function Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 06/13] ice: PTP: move setting of tstamp_config Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 07/13] ice: use 'int err' instead of 'int status' Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 08/13] ice: introduce ice_ptp_init_phc function Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 09/13] ice: convert clk_freq capability into time_ref Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 10/13] ice: implement basic E822 PTP support Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 11/13] ice: ensure the hardware Clock Generation Unit is configured Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 12/13] ice: exit bypass mode once hardware finishes timestamp calibration Jacob Keller
2021-07-01 22:04 ` [Intel-wired-lan] [net-next v2 13/13] ice: support crosstimestamping on E822 devices if supported Jacob Keller

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=20210701220456.3882767-1-jacob.e.keller@intel.com \
    --to=jacob.e.keller@intel.com \
    --cc=intel-wired-lan@osuosl.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox