Skip to content

net: dsa: microchip: add PTP support for KSZ9563/KSZ8563 and LAN937x

Arun Ramadoss lkml netdev 8 versions – Applied

Status from this message: Applied, thanks!

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v8 Latest13 patches 1 replyApplied
  2. v713 patches 6 repliesSuperseded
  3. v613 patches 5 repliesSuperseded
Earlier versions · 5
VersionPostedPatchesRepliesStatus
v5 RFC13 patches1 replySuperseded
v413 patches4 repliesSuperseded
v313 patches12 repliesSuperseded
v213 patches9 repliesSuperseded
v112 patches21 repliesSuperseded

RFC v2 -> Patch v1 from the cover letter

- Changed the patch author based on past patch submission
- Changed the commit message prefix as net: dsa: microchip: ptp Individual patch changes are listed in correspondig commits.

Patches in v8 Applied

#Subject and filesSizeRepliesApplied
1/13net: dsa: microchip: ptp: add the posix clock supportdrivers/net/dsa/microchip/Kconfig drivers/net/dsa/microchip/Makefile drivers/net/dsa/microchip/ksz_common.c +4 more+374 -10 replies
2/13net: dsa: microchip: ptp: Initial hardware time stamping supportdrivers/net/dsa/microchip/ksz_common.c drivers/net/dsa/microchip/ksz_common.h drivers/net/dsa/microchip/ksz_ptp.c +1 more+118 -00 replies
3/13net: dsa: microchip: ptp: add 4 bytes in tail tag when ptp enabledMAINTAINERS drivers/net/dsa/microchip/ksz_common.h drivers/net/dsa/microchip/ksz_ptp.c +2 more+145 -90 replies
4/13net: dsa: microchip: ptp: manipulating absolute time using ptp hw clockdrivers/net/dsa/microchip/ksz_ptp.c drivers/net/dsa/microchip/ksz_ptp.h+62 -10 replies
5/13net: dsa: microchip: ptp: enable interrupt for timestampingdrivers/net/dsa/microchip/ksz_common.c drivers/net/dsa/microchip/ksz_common.h drivers/net/dsa/microchip/ksz_ptp.c +2 more+259 -20 replies
6/13net: ptp: add helper for one-step P2P clocksinclude/linux/ptp_classify.h+73 -00 replies
7/13net: dsa: microchip: ptp: add packet reception timestampingdrivers/net/dsa/microchip/ksz_common.c drivers/net/dsa/microchip/ksz_ptp.c drivers/net/dsa/microchip/ksz_ptp.h +2 more+108 -60 replies
8/13net: dsa: microchip: ptp: add packet transmission timestampingdrivers/net/dsa/microchip/ksz_common.c drivers/net/dsa/microchip/ksz_common.h drivers/net/dsa/microchip/ksz_ptp.c +3 more+196 -40 replies
9/13net: dsa: microchip: ptp: move pdelay_rsp correction field to tail tagdrivers/net/dsa/microchip/ksz_ptp.c include/linux/dsa/ksz_common.h net/dsa/tag_ksz.c+34 -10 replies
10/13net: dsa: microchip: ptp: add periodic output signaldrivers/net/dsa/microchip/ksz_common.h drivers/net/dsa/microchip/ksz_ptp.c drivers/net/dsa/microchip/ksz_ptp.h +1 more+373 -00 replies
11/13net: dsa: microchip: ptp: add support for perout programmable pinsdrivers/net/dsa/microchip/ksz_ptp.c drivers/net/dsa/microchip/ksz_ptp.h+38 -00 replies
12/13net: dsa: microchip: ptp: lan937x: add 2 step timestampingdrivers/net/dsa/microchip/ksz_ptp.c+40 -30 replies
13/13net: dsa: microchip: ptp: lan937x: Enable periodic output in LED pinsdrivers/net/dsa/microchip/ksz_ptp.c drivers/net/dsa/microchip/ksz_ptp_reg.h+34 -00 replies

Reviews trailers per patch

5 of 13 patches have a Reviewed-by or Acked-by.

PatchVladimir OlteanFlorian FainelliJacob Keller
1/13R-b R-b R-b
2/13
3/13R-b
4/13R-b
5/13
6/13
7/13R-b
8/13R-b
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v8 thread

Cover letter [Patch net-next v8 00/13] net: dsa: microchip: add PTP support for KSZ9563/KSZ8563 and LAN937x

KSZ9563/KSZ8563 and LAN937x switch are capable for supporting IEEE 1588 PTP protocol. LAN937x has the same PTP register set similar to KSZ9563, hence the implementation has been made common for the KSZ switches. KSZ9563 does not support two step timestamping but LAN937x supports both. Tested the 1step & 2step p2p timestamping in LAN937x and p2p1step timestamping in KSZ9563.

This patch series is based on the Christian Eggers PTP support for KSZ9563. Applied the Christian patch and updated as per the latest refactoring of KSZ series code. The features added on top are PTP packet Interrupt implementation based on nested handler, LAN937x two step timestamping and programmable per_out pins.

Patch v7 -> v8
- set skb->ip_summed = CHECKSUM_NONE after updating the checksum

Patch v6 -> v7
- Corrected the misplaced spaces and tabs
- Added mutex lock in do_aux_work
- Replaced 0/1 with false/true for ts_en
- SKB_TX_INPROGRESS flag is set before dsa_enqueue_skb
- Removed the fallthrough keyword
- pdelay_resp header correction is performed based on KSZ_SKB_CB(skb)->update_correction instead of clone

Patch v5 -> v6
- Rebased to latest net-next and renamed from RFC to patch net-next.

Patch v4 -> v5
- Replaced irq_domain_add_simple with irq_doamin_add_linear
- Used the helper diff_by_scaled_ppm() for adjfine.

Patch v3 -> v4
- removed IRQF_TRIGGER_FALLING from the request_threaded_irq of ptp msg
- addressed review comments on patch 10 periodic output
- added sign off in patch 6 & 9
- reverted to set PTP_1STEP bit for lan937x which is missed during v3 regression

Patch v2-> v3
- used port_rxtstamp for reconstructing the absolute timestamp instead of tagger function pointer.
- Reverted to setting of 802.1As bit.

Patch v1 -> v2
- GPIO perout enable bit is different for LAN937x and KSZ9x. Added new patch for configuring LAN937x programmable pins.
- PTP enabled in hardware based on both tx and rx timestamping of all the user ports.
- Replaced setting of 802.1AS bit with P2P bit in PTP_MSG_CONF1 register.

RFC v2 -> Patch v1
- Changed the patch author based on past patch submission
- Changed the commit message prefix as net: dsa: microchip: ptp Individual patch changes are listed in correspondig commits.

RFC v1 -> v2
- Added the p2p1step timestamping and conditional execution of 2 step for LAN937x only.
- Added the periodic output support

Arun Ramadoss (5):
net: dsa: microchip: ptp: add 4 bytes in tail tag when ptp enabled
net: dsa: microchip: ptp: enable interrupt for timestamping
net: dsa: microchip: ptp: add support for perout programmable pins
net: dsa: microchip: ptp: lan937x: add 2 step timestamping
net: dsa: microchip: ptp: lan937x: Enable periodic output in LED pins

Christian Eggers (8):
net: dsa: microchip: ptp: add the posix clock support
net: dsa: microchip: ptp: Initial hardware time stamping support
net: dsa: microchip: ptp: manipulating absolute time using ptp hw
clock
net: ptp: add helper for one-step P2P clocks
net: dsa: microchip: ptp: add packet reception timestamping
net: dsa: microchip: ptp: add packet transmission timestamping
net: dsa: microchip: ptp: move pdelay_rsp correction field to tail tag
net: dsa: microchip: ptp: add periodic output signal

 MAINTAINERS                             |    1 +
 drivers/net/dsa/microchip/Kconfig       |   11 +
 drivers/net/dsa/microchip/Makefile      |    5 +
 drivers/net/dsa/microchip/ksz_common.c  |   44 +-
 drivers/net/dsa/microchip/ksz_common.h  |   48 +
 drivers/net/dsa/microchip/ksz_ptp.c     | 1199 +++++++++++++++++++++++
 drivers/net/dsa/microchip/ksz_ptp.h     |   86 ++
 drivers/net/dsa/microchip/ksz_ptp_reg.h |  142 +++
 include/linux/dsa/ksz_common.h          |   53 +
 include/linux/ptp_classify.h            |   73 ++
 net/dsa/tag_ksz.c                       |  201 +++-
 11 files changed, 1845 insertions(+), 18 deletions(-)
 create mode 100644 drivers/net/dsa/microchip/ksz_ptp.c
 create mode 100644 drivers/net/dsa/microchip/ksz_ptp.h
 create mode 100644 drivers/net/dsa/microchip/ksz_ptp_reg.h
 create mode 100644 include/linux/dsa/ksz_common.h

base-commit: cbdbb58b6c796e48ad6346e07bf3ae65cf4dc69b

Signature · 1 line
2.36.1