public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership
@ 2026-02-27  8:19 Wen Gu
  2026-02-27  8:19 ` [RFC v2 1/2] ptp: split clock drivers into two subdirectories Wen Gu
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Wen Gu @ 2026-02-27  8:19 UTC (permalink / raw)
  To: tglx, tglx, richardcochran, andrew+netdev, davem, edumazet, kuba,
	pabeni, linux-kernel, netdev, mani, imran.shaik
  Cc: vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, dwmw2, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das

Hi all,

This RFC v2 is a follow-up to [1].


# Background

The PTP Hardware Clock (PHC) interface (/dev/ptpX and the standard PTP_*
ioctls) was originally introduced for IEEE 1588 / network oriented clock
drivers. Over time, it has also become a common userspace API for many non-NIC
high-precision clock implementations (virtualization/platform/architecture
provided clocks) [2-6], and more are expected to appear [7-8].

During the review of these incoming non IEEE 1588 based PHC drivers, concerns
were raised that such "non-NIC" clocks may not be a good fit for the netdev
maintainership model [9], where PTP/PHC drivers are currently maintained. This
leaves an unclear upstream home and maintainership model for this class of
drivers.


# Proposal

This RFC proposes moving PHC drivers that expose a high-precision clock to
userspace via the existing PTP interface (/dev/ptpX + standard PTP_* ioctls),
but are not tied to the traditional NIC/IEEE 1588 packet timestamping
pipeline, out of the netdev maintainership scope and into a clock/timekeeping
maintainership scope.

As discussed in [1], this series makes the separation explicit by splitting
drivers/ptp/ into the following groups, to prepare for clearer ownership and
future maintenance:

  - drivers/ptp/          : PTP core infrastructure and userspace ABI
                            (ptp_clock.c, ptp_chardev.c, ptp_sysfs.c,
                             ptp_vclock.c, etc.) remain here.

  - drivers/ptp/ieee1588/ : network / IEEE 1588 oriented PTP drivers.

  - drivers/ptp/emulated/ : non IEEE 1588 PTP drivers. they are typically
                            platform/architecture/virtualization/speical
                            hardware provided high precision time sources.

Patch 1 performs the refactor: move drivers and split Kconfig/Makefiles
accordingly, without intended functional changes.

Patch 2 updates MAINTAINERS to match the new layout and adds a dedicated entry
for drivers/ptp/emulated/, moving review and ownership routing for this class
of drivers away from the netdev maintainership.

No userspace ABI changes are intended, this is a refactor and maintenance
metadata update only.


# Request for comments

1. Following the clocksource/timekeeping and POSIX timer areas, this RFC routes
changes for drivers/ptp/emulated/ to linux-kernel@vger.kernel.org (rather than
netdev). However, the preferred integration path is still unclear (e.g. which
tree should take such changes, and who should collect/pull them for merging). We
would really appreciate guidance from the time/clock maintainers, especially any
input from Thomas Gleixner, on the preferred tree/workflow for these changes.

2. This RFC currently lists us as the maintainers for drivers/ptp/emulated/ as a
fallback contact point. Ideally, we would prefer this area to be maintained by
clock/time experts in the long run. Suggestions on more suitable maintainers are
very welcome.


Thanks for any input.

Regards.

[1] https://lore.kernel.org/all/0afe19db-9c7f-4228-9fc2-f7b34c4bc227@linux.alibaba.com/
[2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=a0e136d436ded817c0aade72efdefa56a00b4e5e
[3] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=7d10001e20e46ad6ad95622164686bc2cbfc9802
[4] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=2d7de7a3010d713fb89b7ba99e6fdc14475ad106
[5] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3716a49a81ba19dda7202633a68b28564ba95eb5
[6] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=9a17125a18f9ae1e1233a8e2d919059445b9d6fd
[7] https://lore.kernel.org/netdev/20251030121314.56729-1-guwen@linux.alibaba.com/
[8] https://lore.kernel.org/mhi/20250818-tsc_time_sync-v1-0-2747710693ba@oss.qualcomm.com/
[9] https://lore.kernel.org/netdev/20251127083610.6b66a728@kernel.org/

Wen Gu (2):
  ptp: split clock drivers into two subdirectories
  MAINTAINERS: update PTP maintainer entries after directory split

 MAINTAINERS                                  |  39 ++-
 drivers/ptp/Kconfig                          | 255 ++-----------------
 drivers/ptp/Makefile                         |  27 +-
 drivers/ptp/emulated/Kconfig                 |  81 ++++++
 drivers/ptp/emulated/Makefile                |  12 +
 drivers/ptp/{ => emulated}/ptp_kvm_arm.c     |   0
 drivers/ptp/{ => emulated}/ptp_kvm_common.c  |   0
 drivers/ptp/{ => emulated}/ptp_kvm_x86.c     |   0
 drivers/ptp/{ => emulated}/ptp_ocp.c         |   0
 drivers/ptp/{ => emulated}/ptp_s390.c        |   0
 drivers/ptp/{ => emulated}/ptp_vmclock.c     |   0
 drivers/ptp/{ => emulated}/ptp_vmw.c         |   0
 drivers/ptp/ieee1588/Kconfig                 | 159 ++++++++++++
 drivers/ptp/ieee1588/Makefile                |  15 ++
 drivers/ptp/{ => ieee1588}/ptp_clockmatrix.c |   0
 drivers/ptp/{ => ieee1588}/ptp_clockmatrix.h |   0
 drivers/ptp/{ => ieee1588}/ptp_dfl_tod.c     |   0
 drivers/ptp/{ => ieee1588}/ptp_dte.c         |   0
 drivers/ptp/{ => ieee1588}/ptp_fc3.c         |   0
 drivers/ptp/{ => ieee1588}/ptp_fc3.h         |   0
 drivers/ptp/{ => ieee1588}/ptp_idt82p33.c    |   0
 drivers/ptp/{ => ieee1588}/ptp_idt82p33.h    |   0
 drivers/ptp/{ => ieee1588}/ptp_ines.c        |   0
 drivers/ptp/{ => ieee1588}/ptp_mock.c        |   0
 drivers/ptp/{ => ieee1588}/ptp_netc.c        |   0
 drivers/ptp/{ => ieee1588}/ptp_pch.c         |   0
 drivers/ptp/{ => ieee1588}/ptp_qoriq.c       |   0
 27 files changed, 322 insertions(+), 266 deletions(-)
 create mode 100644 drivers/ptp/emulated/Kconfig
 create mode 100644 drivers/ptp/emulated/Makefile
 rename drivers/ptp/{ => emulated}/ptp_kvm_arm.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_kvm_common.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_kvm_x86.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_ocp.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_s390.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_vmclock.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_vmw.c (100%)
 create mode 100644 drivers/ptp/ieee1588/Kconfig
 create mode 100644 drivers/ptp/ieee1588/Makefile
 rename drivers/ptp/{ => ieee1588}/ptp_clockmatrix.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_clockmatrix.h (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_dfl_tod.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_dte.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_fc3.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_fc3.h (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_idt82p33.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_idt82p33.h (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_ines.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_mock.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_netc.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_pch.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_qoriq.c (100%)

-- 
2.43.5


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

* [RFC v2 1/2] ptp: split clock drivers into two subdirectories
  2026-02-27  8:19 [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership Wen Gu
@ 2026-02-27  8:19 ` Wen Gu
  2026-02-27  8:19 ` [RFC v2 2/2] MAINTAINERS: update PTP maintainer entries after directory split Wen Gu
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Wen Gu @ 2026-02-27  8:19 UTC (permalink / raw)
  To: tglx, tglx, richardcochran, andrew+netdev, davem, edumazet, kuba,
	pabeni, linux-kernel, netdev, mani, imran.shaik
  Cc: vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, dwmw2, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das

The PTP subsystem has grown beyond the original IEEE 1588/NIC use case
and today contains both network-oriented PHC drivers and various
emulated/virtual clock implementations.

Prepare for clearer ownership and future maintenance by refactoring
drivers/ptp/ to make the split explicit. Keep the PTP core
infrastructure in drivers/ptp/ and move the drivers into two new
subdirectories:

  - drivers/ptp/ieee1588/  : network/IEEE 1588 oriented drivers
  - drivers/ptp/emulated/  : emulated/virtual/non-NIC implementations

Move the corresponding Kconfig entries into the new directories and
include them from drivers/ptp/Kconfig. Update the top-level
drivers/ptp/Makefile to build the core as before and recurse into the
two subdirectories.

No functional changes are intended; this is a refactor only.

Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
---
 drivers/ptp/Kconfig                          | 255 ++-----------------
 drivers/ptp/Makefile                         |  27 +-
 drivers/ptp/emulated/Kconfig                 |  81 ++++++
 drivers/ptp/emulated/Makefile                |  12 +
 drivers/ptp/{ => emulated}/ptp_kvm_arm.c     |   0
 drivers/ptp/{ => emulated}/ptp_kvm_common.c  |   0
 drivers/ptp/{ => emulated}/ptp_kvm_x86.c     |   0
 drivers/ptp/{ => emulated}/ptp_ocp.c         |   0
 drivers/ptp/{ => emulated}/ptp_s390.c        |   0
 drivers/ptp/{ => emulated}/ptp_vmclock.c     |   0
 drivers/ptp/{ => emulated}/ptp_vmw.c         |   0
 drivers/ptp/ieee1588/Kconfig                 | 159 ++++++++++++
 drivers/ptp/ieee1588/Makefile                |  15 ++
 drivers/ptp/{ => ieee1588}/ptp_clockmatrix.c |   0
 drivers/ptp/{ => ieee1588}/ptp_clockmatrix.h |   0
 drivers/ptp/{ => ieee1588}/ptp_dfl_tod.c     |   0
 drivers/ptp/{ => ieee1588}/ptp_dte.c         |   0
 drivers/ptp/{ => ieee1588}/ptp_fc3.c         |   0
 drivers/ptp/{ => ieee1588}/ptp_fc3.h         |   0
 drivers/ptp/{ => ieee1588}/ptp_idt82p33.c    |   0
 drivers/ptp/{ => ieee1588}/ptp_idt82p33.h    |   0
 drivers/ptp/{ => ieee1588}/ptp_ines.c        |   0
 drivers/ptp/{ => ieee1588}/ptp_mock.c        |   0
 drivers/ptp/{ => ieee1588}/ptp_netc.c        |   0
 drivers/ptp/{ => ieee1588}/ptp_pch.c         |   0
 drivers/ptp/{ => ieee1588}/ptp_qoriq.c       |   0
 26 files changed, 296 insertions(+), 253 deletions(-)
 create mode 100644 drivers/ptp/emulated/Kconfig
 create mode 100644 drivers/ptp/emulated/Makefile
 rename drivers/ptp/{ => emulated}/ptp_kvm_arm.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_kvm_common.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_kvm_x86.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_ocp.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_s390.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_vmclock.c (100%)
 rename drivers/ptp/{ => emulated}/ptp_vmw.c (100%)
 create mode 100644 drivers/ptp/ieee1588/Kconfig
 create mode 100644 drivers/ptp/ieee1588/Makefile
 rename drivers/ptp/{ => ieee1588}/ptp_clockmatrix.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_clockmatrix.h (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_dfl_tod.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_dte.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_fc3.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_fc3.h (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_idt82p33.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_idt82p33.h (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_ines.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_mock.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_netc.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_pch.c (100%)
 rename drivers/ptp/{ => ieee1588}/ptp_qoriq.c (100%)

diff --git a/drivers/ptp/Kconfig b/drivers/ptp/Kconfig
index b93640ca08b7..abcb6ca7dfb8 100644
--- a/drivers/ptp/Kconfig
+++ b/drivers/ptp/Kconfig
@@ -12,17 +12,27 @@ config PTP_1588_CLOCK
 	select PPS
 	select NET_PTP_CLASSIFY
 	help
-	  The IEEE 1588 standard defines a method to precisely
-	  synchronize distributed clocks over Ethernet networks. The
-	  standard defines a Precision Time Protocol (PTP), which can
-	  be used to achieve synchronization within a few dozen
-	  microseconds. In addition, with the help of special hardware
-	  time stamping units, it can be possible to achieve
-	  synchronization to within a few hundred nanoseconds.
+	  Enable the core infrastructure for PTP (Precision Time Protocol)
+	  clock devices
 
-	  This driver adds support for PTP clocks as character
-	  devices. If you want to use a PTP clock, then you should
-	  also enable at least one clock driver as well.
+	  The core provides the common user space interfaces for PTP
+	  clocks, including the character device (/dev/ptpX), sysfs
+	  attributes and ioctl operations.
+
+	  This infrastructure was originally introduced for hardware
+	  clocks on network devices implementing IEEE 1588 to
+	  synchronize distributed clocks over Ethernet networks. With
+	  special hardware time stamping units, synchronization within
+	  a few dozen microseconds, and in some cases a few hundred
+	  nanoseconds, can be achieved.
+
+	  Over time it has evolved into a generic clock device framework
+	  and is also used by other high precision clocks exposed by
+	  platforms, hypervisors or special hardware, even when those
+	  clocks are not synchronized via IEEE 1588 over a network.
+
+	  If you want to use any PTP clock device, enable this option and
+	  at least one clock driver.
 
 	  To compile this driver as a module, choose M here: the module
 	  will be called ptp.
@@ -39,228 +49,7 @@ config PTP_1588_CLOCK_OPTIONAL
 	  If PTP support is disabled, this dependency will still be
 	  met, and drivers refer to dummy helpers.
 
-config PTP_1588_CLOCK_DTE
-	tristate "Broadcom DTE as PTP clock"
-	depends on PTP_1588_CLOCK
-	depends on NET && HAS_IOMEM
-	depends on ARCH_BCM_MOBILE || (ARCH_BCM_IPROC && !(ARCH_BCM_NSP || ARCH_BCM_5301X)) || COMPILE_TEST
-	default y if ARCH_BCM_MOBILE || ARCH_BCM_IPROC
-	help
-	  This driver adds support for using the Digital timing engine
-	  (DTE) in the Broadcom SoC's as a PTP clock.
-
-	  The clock can be used in both wired and wireless networks
-	  for PTP purposes.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_dte.
-
-config PTP_1588_CLOCK_QORIQ
-	tristate "Freescale QorIQ 1588 timer as PTP clock"
-	depends on GIANFAR || FSL_DPAA_ETH || FSL_DPAA2_ETH || FSL_ENETC || FSL_ENETC_VF || COMPILE_TEST
-	depends on PTP_1588_CLOCK
-	default y if GIANFAR || FSL_DPAA_ETH || FSL_DPAA2_ETH || FSL_ENETC || FSL_ENETC_VF
-	help
-	  This driver adds support for using the Freescale QorIQ 1588
-	  timer as a PTP clock. This clock is only useful if your PTP
-	  programs are getting hardware time stamps on the PTP Ethernet
-	  packets using the SO_TIMESTAMPING API.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_qoriq.
-
-comment "Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks."
-	depends on PHYLIB=n || NETWORK_PHY_TIMESTAMPING=n
-
-config DP83640_PHY
-	tristate "Driver for the National Semiconductor DP83640 PHYTER"
-	depends on NETWORK_PHY_TIMESTAMPING
-	depends on PHYLIB
-	depends on PTP_1588_CLOCK
-	select CRC32
-	help
-	  Supports the DP83640 PHYTER with IEEE 1588 features.
-
-	  This driver adds support for using the DP83640 as a PTP
-	  clock. This clock is only useful if your PTP programs are
-	  getting hardware time stamps on the PTP Ethernet packets
-	  using the SO_TIMESTAMPING API.
-
-	  In order for this to work, your MAC driver must also
-	  implement the skb_tx_timestamp() function.
-
-config PTP_1588_CLOCK_INES
-	tristate "ZHAW InES PTP time stamping IP core"
-	depends on NETWORK_PHY_TIMESTAMPING
-	depends on HAS_IOMEM
-	depends on PHYLIB
-	depends on PTP_1588_CLOCK
-	help
-	  This driver adds support for using the ZHAW InES 1588 IP
-	  core.  This clock is only useful if the MII bus of your MAC
-	  is wired up to the core.
-
-config PTP_1588_CLOCK_PCH
-	tristate "Intel PCH EG20T as PTP clock"
-	depends on MIPS_GENERIC || X86_32 || COMPILE_TEST
-	depends on HAS_IOMEM && PCI
-	depends on NET
-	depends on PTP_1588_CLOCK
-	help
-	  This driver adds support for using the PCH EG20T as a PTP
-	  clock. The hardware supports time stamping of PTP packets
-	  when using the end-to-end delay (E2E) mechanism. The peer
-	  delay mechanism (P2P) is not supported.
-
-	  This clock is only useful if your PTP programs are getting
-	  hardware time stamps on the PTP Ethernet packets using the
-	  SO_TIMESTAMPING API.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_pch.
-
-config PTP_1588_CLOCK_KVM
-	tristate "KVM virtual PTP clock"
-	depends on PTP_1588_CLOCK
-	depends on (KVM_GUEST && X86) || (HAVE_ARM_SMCCC_DISCOVERY && ARM_ARCH_TIMER)
-	default y
-	help
-	  This driver adds support for using kvm infrastructure as a PTP
-	  clock. This clock is only useful if you are using KVM guests.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_kvm.
-
-config PTP_1588_CLOCK_VMCLOCK
-	tristate "Virtual machine PTP clock"
-	depends on X86_TSC || ARM_ARCH_TIMER
-	depends on PTP_1588_CLOCK && ARCH_SUPPORTS_INT128
-	default PTP_1588_CLOCK_KVM
-	help
-	  This driver adds support for using a virtual precision clock
-	  advertised by the hypervisor. This clock is only useful in virtual
-	  machines where such a device is present.
-
-	  Unlike the KVM virtual PTP clock, the VMCLOCK device offers support
-	  for reliable timekeeping even across live migration. So this driver
-	  is enabled by default whenever the KVM PTP clock is.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_vmclock.
-
-config PTP_1588_CLOCK_IDT82P33
-	tristate "IDT 82P33xxx PTP clock"
-	depends on PTP_1588_CLOCK && I2C
-	default n
-	help
-	  This driver adds support for using the IDT 82P33xxx as a PTP
-	  clock. This clock is only useful if your time stamping MAC
-	  is connected to the IDT chip.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_idt82p33.
-
-config PTP_1588_CLOCK_IDTCM
-	tristate "IDT CLOCKMATRIX as PTP clock"
-	depends on PTP_1588_CLOCK && I2C
-	default n
-	help
-	  This driver adds support for using IDT CLOCKMATRIX(TM) as a PTP
-	  clock. This clock is only useful if your time stamping MAC
-	  is connected to the IDT chip.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_clockmatrix.
-
-config PTP_1588_CLOCK_FC3W
-	tristate "RENESAS FemtoClock3 Wireless as PTP clock"
-	depends on PTP_1588_CLOCK && I2C
-	default n
-	help
-	  This driver adds support for using Renesas FemtoClock3 Wireless
-	  as a PTP clock. This clock is only useful if your time stamping
-	  MAC is connected to the RENESAS chip.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_fc3.
-
-config PTP_1588_CLOCK_MOCK
-	tristate "Mock-up PTP clock"
-	depends on PTP_1588_CLOCK
-	help
-	  This driver offers a set of PTP clock manipulation operations over
-	  the system monotonic time. It can be used by virtual network device
-	  drivers to emulate PTP capabilities.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_mock.
-
-config PTP_1588_CLOCK_VMW
-	tristate "VMware virtual PTP clock"
-	depends on ACPI && HYPERVISOR_GUEST && X86
-	depends on PTP_1588_CLOCK
-	help
-	  This driver adds support for using VMware virtual precision
-	  clock device as a PTP clock. This is only useful in virtual
-	  machines running on VMware virtual infrastructure.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_vmw.
-
-config PTP_1588_CLOCK_OCP
-	tristate "OpenCompute TimeCard as PTP clock"
-	depends on PTP_1588_CLOCK
-	depends on HAS_IOMEM && PCI
-	depends on I2C && MTD
-	depends on SERIAL_8250
-	depends on !S390
-	depends on COMMON_CLK
-	select NET_DEVLINK
-	select CRC16
-	select DPLL
-	help
-	  This driver adds support for an OpenCompute time card.
-
-	  The OpenCompute time card is an atomic clock along with
-	  a GPS receiver that provides a Grandmaster clock source
-	  for a PTP enabled network.
-
-	  More information is available at http://www.timingcard.com/
-
-config PTP_DFL_TOD
-	tristate "FPGA DFL ToD Driver"
-	depends on FPGA_DFL
-	depends on PTP_1588_CLOCK
-	help
-	  The DFL (Device Feature List) device driver for the Intel ToD
-	  (Time-of-Day) device in FPGA card. The ToD IP within the FPGA
-	  is exposed as PTP Hardware Clock (PHC) device to the Linux PTP
-	  stack to synchronize the system clock to its ToD information
-	  using phc2sys utility of the Linux PTP stack.
-
-	  To compile this driver as a module, choose M here: the module
-	  will be called ptp_dfl_tod.
-
-config PTP_S390
-	tristate "S390 PTP driver"
-	depends on PTP_1588_CLOCK
-	depends on S390
-	help
-	  This driver adds support for S390 time steering via the PtP
-	  interface. This works by adding a in-kernel clock delta value,
-	  which is always added to time values used in the kernel. The PtP
-	  driver provides the raw clock value without the delta to
-	  userspace. That way userspace programs like chrony could steer
-	  the kernel clock.
-
-config PTP_NETC_V4_TIMER
-	tristate "NXP NETC V4 Timer PTP Driver"
-	depends on PTP_1588_CLOCK
-	depends on PCI_MSI
-	help
-	  This driver adds support for using the NXP NETC V4 Timer as a PTP
-	  clock, the clock is used by ENETC V4 or NETC V4 Switch for PTP time
-	  synchronization. It also supports periodic output signal (e.g. PPS)
-	  and external trigger timestamping.
+source "drivers/ptp/ieee1588/Kconfig"
+source "drivers/ptp/emulated/Kconfig"
 
 endmenu
diff --git a/drivers/ptp/Makefile b/drivers/ptp/Makefile
index bdc47e284f14..740443a8d419 100644
--- a/drivers/ptp/Makefile
+++ b/drivers/ptp/Makefile
@@ -1,24 +1,11 @@
 # SPDX-License-Identifier: GPL-2.0
 #
-# Makefile for PTP 1588 clock support.
+# Makefile for PTP clock support.
 #
 
-ptp-y					:= ptp_clock.o ptp_chardev.o ptp_sysfs.o ptp_vclock.o
-ptp_kvm-$(CONFIG_X86)			:= ptp_kvm_x86.o ptp_kvm_common.o
-ptp_kvm-$(CONFIG_HAVE_ARM_SMCCC)	:= ptp_kvm_arm.o ptp_kvm_common.o
-obj-$(CONFIG_PTP_1588_CLOCK)		+= ptp.o
-obj-$(CONFIG_PTP_1588_CLOCK_DTE)	+= ptp_dte.o
-obj-$(CONFIG_PTP_1588_CLOCK_INES)	+= ptp_ines.o
-obj-$(CONFIG_PTP_1588_CLOCK_PCH)	+= ptp_pch.o
-obj-$(CONFIG_PTP_1588_CLOCK_KVM)	+= ptp_kvm.o
-obj-$(CONFIG_PTP_1588_CLOCK_VMCLOCK)	+= ptp_vmclock.o
-obj-$(CONFIG_PTP_1588_CLOCK_QORIQ)	+= ptp_qoriq.o
-obj-$(CONFIG_PTP_1588_CLOCK_IDTCM)	+= ptp_clockmatrix.o
-obj-$(CONFIG_PTP_1588_CLOCK_FC3W)	+= ptp_fc3.o
-obj-$(CONFIG_PTP_1588_CLOCK_IDT82P33)	+= ptp_idt82p33.o
-obj-$(CONFIG_PTP_1588_CLOCK_MOCK)	+= ptp_mock.o
-obj-$(CONFIG_PTP_1588_CLOCK_VMW)	+= ptp_vmw.o
-obj-$(CONFIG_PTP_1588_CLOCK_OCP)	+= ptp_ocp.o
-obj-$(CONFIG_PTP_DFL_TOD)		+= ptp_dfl_tod.o
-obj-$(CONFIG_PTP_S390)			+= ptp_s390.o
-obj-$(CONFIG_PTP_NETC_V4_TIMER)		+= ptp_netc.o
+subdir-ccflags-y += -I$(srctree)/drivers/ptp
+
+ptp-y				:= ptp_clock.o ptp_chardev.o ptp_sysfs.o ptp_vclock.o
+obj-$(CONFIG_PTP_1588_CLOCK)	+= ptp.o
+obj-$(CONFIG_PTP_1588_CLOCK)	+= emulated/
+obj-$(CONFIG_PTP_1588_CLOCK)	+= ieee1588/
diff --git a/drivers/ptp/emulated/Kconfig b/drivers/ptp/emulated/Kconfig
new file mode 100644
index 000000000000..7fc5c5172e6b
--- /dev/null
+++ b/drivers/ptp/emulated/Kconfig
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# Emulated PTP clock drivers configuration
+#
+
+menu "Emulated PTP clock drivers"
+
+config PTP_1588_CLOCK_KVM
+	tristate "KVM virtual PTP clock"
+	depends on PTP_1588_CLOCK
+	depends on (KVM_GUEST && X86) || (HAVE_ARM_SMCCC_DISCOVERY && ARM_ARCH_TIMER)
+	default y
+	help
+	  This driver adds support for using kvm infrastructure as a PTP
+	  clock. This clock is only useful if you are using KVM guests.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_kvm.
+
+config PTP_1588_CLOCK_VMCLOCK
+	tristate "Virtual machine PTP clock"
+	depends on X86_TSC || ARM_ARCH_TIMER
+	depends on PTP_1588_CLOCK && ARCH_SUPPORTS_INT128
+	default PTP_1588_CLOCK_KVM
+	help
+	  This driver adds support for using a virtual precision clock
+	  advertised by the hypervisor. This clock is only useful in virtual
+	  machines where such a device is present.
+
+	  Unlike the KVM virtual PTP clock, the VMCLOCK device offers support
+	  for reliable timekeeping even across live migration. So this driver
+	  is enabled by default whenever the KVM PTP clock is.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_vmclock.
+
+config PTP_1588_CLOCK_VMW
+	tristate "VMware virtual PTP clock"
+	depends on ACPI && HYPERVISOR_GUEST && X86
+	depends on PTP_1588_CLOCK
+	help
+	  This driver adds support for using VMware virtual precision
+	  clock device as a PTP clock. This is only useful in virtual
+	  machines running on VMware virtual infrastructure.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_vmw.
+
+config PTP_1588_CLOCK_OCP
+	tristate "OpenCompute TimeCard as PTP clock"
+	depends on PTP_1588_CLOCK
+	depends on HAS_IOMEM && PCI
+	depends on I2C && MTD
+	depends on SERIAL_8250
+	depends on !S390
+	depends on COMMON_CLK
+	select NET_DEVLINK
+	select CRC16
+	select DPLL
+	help
+	  This driver adds support for an OpenCompute time card.
+
+	  The OpenCompute time card is an atomic clock along with
+	  a GPS receiver that provides a Grandmaster clock source
+	  for a PTP enabled network.
+
+	  More information is available at http://www.timingcard.com/
+
+config PTP_S390
+	tristate "S390 PTP driver"
+	depends on PTP_1588_CLOCK
+	depends on S390
+	help
+	  This driver adds support for S390 time steering via the PtP
+	  interface. This works by adding a in-kernel clock delta value,
+	  which is always added to time values used in the kernel. The PtP
+	  driver provides the raw clock value without the delta to
+	  userspace. That way userspace programs like chrony could steer
+	  the kernel clock.
+
+endmenu
diff --git a/drivers/ptp/emulated/Makefile b/drivers/ptp/emulated/Makefile
new file mode 100644
index 000000000000..33c64cb1ab83
--- /dev/null
+++ b/drivers/ptp/emulated/Makefile
@@ -0,0 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for emulated PTP clocks.
+#
+
+ptp_kvm-$(CONFIG_X86)			:= ptp_kvm_x86.o ptp_kvm_common.o
+ptp_kvm-$(CONFIG_HAVE_ARM_SMCCC)	:= ptp_kvm_arm.o ptp_kvm_common.o
+obj-$(CONFIG_PTP_1588_CLOCK_KVM)	+= ptp_kvm.o
+obj-$(CONFIG_PTP_1588_CLOCK_VMCLOCK)	+= ptp_vmclock.o
+obj-$(CONFIG_PTP_1588_CLOCK_VMW)	+= ptp_vmw.o
+obj-$(CONFIG_PTP_1588_CLOCK_OCP)	+= ptp_ocp.o
+obj-$(CONFIG_PTP_S390)			+= ptp_s390.o
diff --git a/drivers/ptp/ptp_kvm_arm.c b/drivers/ptp/emulated/ptp_kvm_arm.c
similarity index 100%
rename from drivers/ptp/ptp_kvm_arm.c
rename to drivers/ptp/emulated/ptp_kvm_arm.c
diff --git a/drivers/ptp/ptp_kvm_common.c b/drivers/ptp/emulated/ptp_kvm_common.c
similarity index 100%
rename from drivers/ptp/ptp_kvm_common.c
rename to drivers/ptp/emulated/ptp_kvm_common.c
diff --git a/drivers/ptp/ptp_kvm_x86.c b/drivers/ptp/emulated/ptp_kvm_x86.c
similarity index 100%
rename from drivers/ptp/ptp_kvm_x86.c
rename to drivers/ptp/emulated/ptp_kvm_x86.c
diff --git a/drivers/ptp/ptp_ocp.c b/drivers/ptp/emulated/ptp_ocp.c
similarity index 100%
rename from drivers/ptp/ptp_ocp.c
rename to drivers/ptp/emulated/ptp_ocp.c
diff --git a/drivers/ptp/ptp_s390.c b/drivers/ptp/emulated/ptp_s390.c
similarity index 100%
rename from drivers/ptp/ptp_s390.c
rename to drivers/ptp/emulated/ptp_s390.c
diff --git a/drivers/ptp/ptp_vmclock.c b/drivers/ptp/emulated/ptp_vmclock.c
similarity index 100%
rename from drivers/ptp/ptp_vmclock.c
rename to drivers/ptp/emulated/ptp_vmclock.c
diff --git a/drivers/ptp/ptp_vmw.c b/drivers/ptp/emulated/ptp_vmw.c
similarity index 100%
rename from drivers/ptp/ptp_vmw.c
rename to drivers/ptp/emulated/ptp_vmw.c
diff --git a/drivers/ptp/ieee1588/Kconfig b/drivers/ptp/ieee1588/Kconfig
new file mode 100644
index 000000000000..71d8e1596104
--- /dev/null
+++ b/drivers/ptp/ieee1588/Kconfig
@@ -0,0 +1,159 @@
+# SPDX-License-Identifier: GPL-2.0-only
+#
+# IEEE 1588 PTP clock drivers configuration
+#
+
+menu "IEEE 1588 network-oriented PTP clock drivers"
+
+config PTP_1588_CLOCK_DTE
+	tristate "Broadcom DTE as PTP clock"
+	depends on PTP_1588_CLOCK
+	depends on NET && HAS_IOMEM
+	depends on ARCH_BCM_MOBILE || (ARCH_BCM_IPROC && !(ARCH_BCM_NSP || ARCH_BCM_5301X)) || COMPILE_TEST
+	default y if ARCH_BCM_MOBILE || ARCH_BCM_IPROC
+	help
+	  This driver adds support for using the Digital timing engine
+	  (DTE) in the Broadcom SoC's as a PTP clock.
+
+	  The clock can be used in both wired and wireless networks
+	  for PTP purposes.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_dte.
+
+config PTP_1588_CLOCK_QORIQ
+	tristate "Freescale QorIQ 1588 timer as PTP clock"
+	depends on GIANFAR || FSL_DPAA_ETH || FSL_DPAA2_ETH || FSL_ENETC || FSL_ENETC_VF || COMPILE_TEST
+	depends on PTP_1588_CLOCK
+	default y if GIANFAR || FSL_DPAA_ETH || FSL_DPAA2_ETH || FSL_ENETC || FSL_ENETC_VF
+	help
+	  This driver adds support for using the Freescale QorIQ 1588
+	  timer as a PTP clock. This clock is only useful if your PTP
+	  programs are getting hardware time stamps on the PTP Ethernet
+	  packets using the SO_TIMESTAMPING API.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_qoriq.
+
+comment "Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks."
+	depends on PHYLIB=n || NETWORK_PHY_TIMESTAMPING=n
+
+config DP83640_PHY
+	tristate "Driver for the National Semiconductor DP83640 PHYTER"
+	depends on NETWORK_PHY_TIMESTAMPING
+	depends on PHYLIB
+	depends on PTP_1588_CLOCK
+	select CRC32
+	help
+	  Supports the DP83640 PHYTER with IEEE 1588 features.
+
+	  This driver adds support for using the DP83640 as a PTP
+	  clock. This clock is only useful if your PTP programs are
+	  getting hardware time stamps on the PTP Ethernet packets
+	  using the SO_TIMESTAMPING API.
+
+	  In order for this to work, your MAC driver must also
+	  implement the skb_tx_timestamp() function.
+
+config PTP_1588_CLOCK_INES
+	tristate "ZHAW InES PTP time stamping IP core"
+	depends on NETWORK_PHY_TIMESTAMPING
+	depends on HAS_IOMEM
+	depends on PHYLIB
+	depends on PTP_1588_CLOCK
+	help
+	  This driver adds support for using the ZHAW InES 1588 IP
+	  core.  This clock is only useful if the MII bus of your MAC
+	  is wired up to the core.
+
+config PTP_1588_CLOCK_PCH
+	tristate "Intel PCH EG20T as PTP clock"
+	depends on MIPS_GENERIC || X86_32 || COMPILE_TEST
+	depends on HAS_IOMEM && PCI
+	depends on NET
+	depends on PTP_1588_CLOCK
+	help
+	  This driver adds support for using the PCH EG20T as a PTP
+	  clock. The hardware supports time stamping of PTP packets
+	  when using the end-to-end delay (E2E) mechanism. The peer
+	  delay mechanism (P2P) is not supported.
+
+	  This clock is only useful if your PTP programs are getting
+	  hardware time stamps on the PTP Ethernet packets using the
+	  SO_TIMESTAMPING API.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_pch.
+
+config PTP_1588_CLOCK_IDT82P33
+	tristate "IDT 82P33xxx PTP clock"
+	depends on PTP_1588_CLOCK && I2C
+	default n
+	help
+	  This driver adds support for using the IDT 82P33xxx as a PTP
+	  clock. This clock is only useful if your time stamping MAC
+	  is connected to the IDT chip.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_idt82p33.
+
+config PTP_1588_CLOCK_IDTCM
+	tristate "IDT CLOCKMATRIX as PTP clock"
+	depends on PTP_1588_CLOCK && I2C
+	default n
+	help
+	  This driver adds support for using IDT CLOCKMATRIX(TM) as a PTP
+	  clock. This clock is only useful if your time stamping MAC
+	  is connected to the IDT chip.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_clockmatrix.
+
+config PTP_1588_CLOCK_FC3W
+	tristate "RENESAS FemtoClock3 Wireless as PTP clock"
+	depends on PTP_1588_CLOCK && I2C
+	default n
+	help
+	  This driver adds support for using Renesas FemtoClock3 Wireless
+	  as a PTP clock. This clock is only useful if your time stamping
+	  MAC is connected to the RENESAS chip.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_fc3.
+
+config PTP_1588_CLOCK_MOCK
+	tristate "Mock-up PTP clock"
+	depends on PTP_1588_CLOCK
+	help
+	  This driver offers a set of PTP clock manipulation operations over
+	  the system monotonic time. It can be used by virtual network device
+	  drivers to emulate PTP capabilities.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_mock.
+
+config PTP_DFL_TOD
+	tristate "FPGA DFL ToD Driver"
+	depends on FPGA_DFL
+	depends on PTP_1588_CLOCK
+	help
+	  The DFL (Device Feature List) device driver for the Intel ToD
+	  (Time-of-Day) device in FPGA card. The ToD IP within the FPGA
+	  is exposed as PTP Hardware Clock (PHC) device to the Linux PTP
+	  stack to synchronize the system clock to its ToD information
+	  using phc2sys utility of the Linux PTP stack.
+
+	  To compile this driver as a module, choose M here: the module
+	  will be called ptp_dfl_tod.
+
+config PTP_NETC_V4_TIMER
+	tristate "NXP NETC V4 Timer PTP Driver"
+	depends on PTP_1588_CLOCK
+	depends on PCI_MSI
+	help
+	  This driver adds support for using the NXP NETC V4 Timer as a PTP
+	  clock, the clock is used by ENETC V4 or NETC V4 Switch for PTP time
+	  synchronization. It also supports periodic output signal (e.g. PPS)
+	  and external trigger timestamping.
+
+endmenu
diff --git a/drivers/ptp/ieee1588/Makefile b/drivers/ptp/ieee1588/Makefile
new file mode 100644
index 000000000000..995ae90aa43c
--- /dev/null
+++ b/drivers/ptp/ieee1588/Makefile
@@ -0,0 +1,15 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# Makefile for IEEE 1588 network-oriented PTP clocks.
+#
+
+obj-$(CONFIG_PTP_1588_CLOCK_DTE)	+= ptp_dte.o
+obj-$(CONFIG_PTP_1588_CLOCK_INES)	+= ptp_ines.o
+obj-$(CONFIG_PTP_1588_CLOCK_PCH)	+= ptp_pch.o
+obj-$(CONFIG_PTP_1588_CLOCK_QORIQ)	+= ptp_qoriq.o
+obj-$(CONFIG_PTP_1588_CLOCK_IDTCM)	+= ptp_clockmatrix.o
+obj-$(CONFIG_PTP_1588_CLOCK_FC3W)	+= ptp_fc3.o
+obj-$(CONFIG_PTP_1588_CLOCK_IDT82P33)	+= ptp_idt82p33.o
+obj-$(CONFIG_PTP_1588_CLOCK_MOCK)	+= ptp_mock.o
+obj-$(CONFIG_PTP_DFL_TOD)		+= ptp_dfl_tod.o
+obj-$(CONFIG_PTP_NETC_V4_TIMER)		+= ptp_netc.o
diff --git a/drivers/ptp/ptp_clockmatrix.c b/drivers/ptp/ieee1588/ptp_clockmatrix.c
similarity index 100%
rename from drivers/ptp/ptp_clockmatrix.c
rename to drivers/ptp/ieee1588/ptp_clockmatrix.c
diff --git a/drivers/ptp/ptp_clockmatrix.h b/drivers/ptp/ieee1588/ptp_clockmatrix.h
similarity index 100%
rename from drivers/ptp/ptp_clockmatrix.h
rename to drivers/ptp/ieee1588/ptp_clockmatrix.h
diff --git a/drivers/ptp/ptp_dfl_tod.c b/drivers/ptp/ieee1588/ptp_dfl_tod.c
similarity index 100%
rename from drivers/ptp/ptp_dfl_tod.c
rename to drivers/ptp/ieee1588/ptp_dfl_tod.c
diff --git a/drivers/ptp/ptp_dte.c b/drivers/ptp/ieee1588/ptp_dte.c
similarity index 100%
rename from drivers/ptp/ptp_dte.c
rename to drivers/ptp/ieee1588/ptp_dte.c
diff --git a/drivers/ptp/ptp_fc3.c b/drivers/ptp/ieee1588/ptp_fc3.c
similarity index 100%
rename from drivers/ptp/ptp_fc3.c
rename to drivers/ptp/ieee1588/ptp_fc3.c
diff --git a/drivers/ptp/ptp_fc3.h b/drivers/ptp/ieee1588/ptp_fc3.h
similarity index 100%
rename from drivers/ptp/ptp_fc3.h
rename to drivers/ptp/ieee1588/ptp_fc3.h
diff --git a/drivers/ptp/ptp_idt82p33.c b/drivers/ptp/ieee1588/ptp_idt82p33.c
similarity index 100%
rename from drivers/ptp/ptp_idt82p33.c
rename to drivers/ptp/ieee1588/ptp_idt82p33.c
diff --git a/drivers/ptp/ptp_idt82p33.h b/drivers/ptp/ieee1588/ptp_idt82p33.h
similarity index 100%
rename from drivers/ptp/ptp_idt82p33.h
rename to drivers/ptp/ieee1588/ptp_idt82p33.h
diff --git a/drivers/ptp/ptp_ines.c b/drivers/ptp/ieee1588/ptp_ines.c
similarity index 100%
rename from drivers/ptp/ptp_ines.c
rename to drivers/ptp/ieee1588/ptp_ines.c
diff --git a/drivers/ptp/ptp_mock.c b/drivers/ptp/ieee1588/ptp_mock.c
similarity index 100%
rename from drivers/ptp/ptp_mock.c
rename to drivers/ptp/ieee1588/ptp_mock.c
diff --git a/drivers/ptp/ptp_netc.c b/drivers/ptp/ieee1588/ptp_netc.c
similarity index 100%
rename from drivers/ptp/ptp_netc.c
rename to drivers/ptp/ieee1588/ptp_netc.c
diff --git a/drivers/ptp/ptp_pch.c b/drivers/ptp/ieee1588/ptp_pch.c
similarity index 100%
rename from drivers/ptp/ptp_pch.c
rename to drivers/ptp/ieee1588/ptp_pch.c
diff --git a/drivers/ptp/ptp_qoriq.c b/drivers/ptp/ieee1588/ptp_qoriq.c
similarity index 100%
rename from drivers/ptp/ptp_qoriq.c
rename to drivers/ptp/ieee1588/ptp_qoriq.c
-- 
2.43.5


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

* [RFC v2 2/2] MAINTAINERS: update PTP maintainer entries after directory split
  2026-02-27  8:19 [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership Wen Gu
  2026-02-27  8:19 ` [RFC v2 1/2] ptp: split clock drivers into two subdirectories Wen Gu
@ 2026-02-27  8:19 ` Wen Gu
  2026-02-27 10:25 ` [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership David Woodhouse
  2026-03-09  6:54 ` Wen Gu
  3 siblings, 0 replies; 9+ messages in thread
From: Wen Gu @ 2026-02-27  8:19 UTC (permalink / raw)
  To: tglx, tglx, richardcochran, andrew+netdev, davem, edumazet, kuba,
	pabeni, linux-kernel, netdev, mani, imran.shaik
  Cc: vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, dwmw2, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das

Update MAINTAINERS to match the new drivers/ptp/ directory layout after
splitting emulated and IEEE 1588 network-oriented drivers into
subdirectories.

Adjust file patterns and per-driver entries to point to their new
locations, and add a dedicated MAINTAINERS entry for the emulated PTP
clock drivers.

Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
---
 MAINTAINERS | 39 ++++++++++++++++++++++++++-------------
 1 file changed, 26 insertions(+), 13 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index b8d8a5c41597..c87715fc8d1f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10253,7 +10253,7 @@ F:	Documentation/devicetree/bindings/ptp/fsl,ptp.yaml
 F:	drivers/net/ethernet/freescale/dpaa2/dpaa2-ptp*
 F:	drivers/net/ethernet/freescale/dpaa2/dprtc*
 F:	drivers/net/ethernet/freescale/enetc/enetc_ptp.c
-F:	drivers/ptp/ptp_qoriq.c
+F:	drivers/ptp/ieee1588/ptp_qoriq.c
 F:	include/linux/fsl/ptp_qoriq.h
 
 FREESCALE QUAD SPI DRIVER
@@ -13134,7 +13134,7 @@ INTEL PTP DFL ToD DRIVER
 L:	linux-fpga@vger.kernel.org
 L:	netdev@vger.kernel.org
 S:	Orphan
-F:	drivers/ptp/ptp_dfl_tod.c
+F:	drivers/ptp/ieee1588/ptp_dfl_tod.c
 
 INTEL QUADRATURE ENCODER PERIPHERAL DRIVER
 M:	Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
@@ -18321,7 +18321,10 @@ F:	Documentation/devicetree/bindings/net/
 F:	Documentation/networking/net_cachelines/net_device.rst
 F:	drivers/connector/
 F:	drivers/net/
-F:	drivers/ptp/
+F:	drivers/ptp/Kconfig
+F:	drivers/ptp/Makefile
+F:	drivers/ptp/ieee1588/
+F:	drivers/ptp/ptp*
 F:	drivers/s390/net/
 F:	include/dt-bindings/net/
 F:	include/linux/cn_proc.h
@@ -19104,7 +19107,7 @@ L:	imx@lists.linux.dev
 L:	netdev@vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/ptp/nxp,ptp-netc.yaml
-F:	drivers/ptp/ptp_netc.c
+F:	drivers/ptp/ieee1588/ptp_netc.c
 
 NXP PF5300/PF5301/PF5302 PMIC REGULATOR DEVICE DRIVER
 M:	Woodrow Douglass <wdouglass@carnegierobotics.com>
@@ -19815,9 +19818,9 @@ F:	include/dt-bindings/
 OPENCOMPUTE PTP CLOCK DRIVER
 M:	Jonathan Lemon <jonathan.lemon@gmail.com>
 M:	Vadim Fedorenko <vadim.fedorenko@linux.dev>
-L:	netdev@vger.kernel.org
+L:	linux-kernel@vger.kernel.org
 S:	Maintained
-F:	drivers/ptp/ptp_ocp.c
+F:	drivers/ptp/emulated/ptp_ocp.c
 
 OPENCORES I2C BUS DRIVER
 M:	Peter Korsgaard <peter@korsgaard.com>
@@ -21255,15 +21258,25 @@ W:	http://linuxptp.sourceforge.net/
 F:	Documentation/ABI/testing/sysfs-ptp
 F:	Documentation/driver-api/ptp.rst
 F:	drivers/net/phy/dp83640*
-F:	drivers/ptp/*
+F:	drivers/ptp/Kconfig
+F:	drivers/ptp/Makefile
+F:	drivers/ptp/ieee1588/
+F:	drivers/ptp/ptp*
 F:	include/linux/ptp_cl*
 K:	(?:\b|_)ptp(?:\b|_)
 
+PTP EMULATED CLOCK SUPPORT
+M:	Wen Gu <guwen@linux.alibaba.com>
+M:	Xuan Zhuo <xuanzhuo@linux.alibaba.com>
+L:	linux-kernel@vger.kernel.org
+S:	Maintained
+F:	drivers/ptp/emulated/
+
 PTP MOCKUP CLOCK SUPPORT
 M:	Vladimir Oltean <vladimir.oltean@nxp.com>
 L:	netdev@vger.kernel.org
 S:	Maintained
-F:	drivers/ptp/ptp_mock.c
+F:	drivers/ptp/ieee1588/ptp_mock.c
 F:	include/linux/ptp_mock.h
 
 PTP VIRTUAL CLOCK SUPPORT
@@ -21275,10 +21288,10 @@ F:	net/ethtool/phc_vclocks.c
 
 PTP VMCLOCK SUPPORT
 M:	David Woodhouse <dwmw2@infradead.org>
-L:	netdev@vger.kernel.org
+L:	linux-kernel@vger.kernel.org
 S:	Maintained
 F:	Documentation/devicetree/bindings/ptp/amazon,vmclock.yaml
-F:	drivers/ptp/ptp_vmclock.c
+F:	drivers/ptp/emulated/ptp_vmclock.c
 F:	include/uapi/linux/vmclock-abi.h
 
 PTRACE SUPPORT
@@ -23328,7 +23341,7 @@ S390 PTP DRIVER
 M:	Sven Schnelle <svens@linux.ibm.com>
 L:	linux-s390@vger.kernel.org
 S:	Supported
-F:	drivers/ptp/ptp_s390.c
+F:	drivers/ptp/emulated/ptp_s390.c
 
 S390 SCM DRIVER
 M:	Vineeth Vijayan <vneethv@linux.ibm.com>
@@ -28217,9 +28230,9 @@ M:	Nick Shi <nick.shi@broadcom.com>
 R:	Ajay Kaher <ajay.kaher@broadcom.com>
 R:	Alexey Makhalov <alexey.makhalov@broadcom.com>
 R:	Broadcom internal kernel review list <bcm-kernel-feedback-list@broadcom.com>
-L:	netdev@vger.kernel.org
+L:	linux-kernel@vger.kernel.org
 S:	Supported
-F:	drivers/ptp/ptp_vmw.c
+F:	drivers/ptp/emulated/ptp_vmw.c
 
 VMWARE VMCI DRIVER
 M:	Bryan Tan <bryan-bt.tan@broadcom.com>
-- 
2.43.5


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

* Re: [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership
  2026-02-27  8:19 [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership Wen Gu
  2026-02-27  8:19 ` [RFC v2 1/2] ptp: split clock drivers into two subdirectories Wen Gu
  2026-02-27  8:19 ` [RFC v2 2/2] MAINTAINERS: update PTP maintainer entries after directory split Wen Gu
@ 2026-02-27 10:25 ` David Woodhouse
  2026-02-27 12:25   ` Wen Gu
  2026-03-09  6:54 ` Wen Gu
  3 siblings, 1 reply; 9+ messages in thread
From: David Woodhouse @ 2026-02-27 10:25 UTC (permalink / raw)
  To: Wen Gu, tglx, tglx, richardcochran, andrew+netdev, davem,
	edumazet, kuba, pabeni, linux-kernel, netdev, mani, imran.shaik
  Cc: vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das

[-- Attachment #1: Type: text/plain, Size: 2130 bytes --]

On Fri, 2026-02-27 at 16:19 +0800, Wen Gu wrote:
> 
> Patch 1 performs the refactor: move drivers and split Kconfig/Makefiles
> accordingly, without intended functional changes.
> 
> Patch 2 updates MAINTAINERS to match the new layout and adds a dedicated entry
> for drivers/ptp/emulated/, moving review and ownership routing for this class
> of drivers away from the netdev maintainership.
> 
> No userspace ABI changes are intended, this is a refactor and maintenance
> metadata update only.

While no ABI changes are intended in *this* patch series, we do need
some.

These 'emulated' clocks mostly exist not to emulate IEEE1588 per se,
but as a way to provide a precision real time clock to systems
(especially virtual guests).

We have already discussed the need to expose clock error bounds, and to
expose paired timestamps against the actual hardware counter (TSC, arch
counter, timebase, etc.).

Another key difference is that we'll generally want to be able to
derive UTC from these clocks, and feed them directly into the kernel's
CLOCK_REALTIME.

I don't have strong views on whether we extend the /dev/ptpX userspace
ABI, or start to treat these 'emulated' clocks as a class of device in
their own right and just shim them to /dev/ptpX for compatibility.

> # Request for comments
> 
> 1. Following the clocksource/timekeeping and POSIX timer areas, this RFC routes
> changes for drivers/ptp/emulated/ to linux-kernel@vger.kernel.org (rather than
> netdev). However, the preferred integration path is still unclear (e.g. which
> tree should take such changes, and who should collect/pull them for merging). We
> would really appreciate guidance from the time/clock maintainers, especially any
> input from Thomas Gleixner, on the preferred tree/workflow for these changes.
> 
> 2. This RFC currently lists us as the maintainers for drivers/ptp/emulated/ as a
> fallback contact point. Ideally, we would prefer this area to be maintained by
> clock/time experts in the long run. Suggestions on more suitable maintainers are
> very welcome.

I'm happy to be involved too.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5069 bytes --]

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

* Re: [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership
  2026-02-27 10:25 ` [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership David Woodhouse
@ 2026-02-27 12:25   ` Wen Gu
  2026-03-06  2:41     ` Jakub Kicinski
  2026-03-17  2:12     ` Wen Gu
  0 siblings, 2 replies; 9+ messages in thread
From: Wen Gu @ 2026-02-27 12:25 UTC (permalink / raw)
  To: David Woodhouse, tglx, tglx, richardcochran, andrew+netdev, davem,
	edumazet, kuba, pabeni, linux-kernel, netdev, mani, imran.shaik
  Cc: vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das



On 2026/2/27 18:25, David Woodhouse wrote:
> On Fri, 2026-02-27 at 16:19 +0800, Wen Gu wrote:
>>
>> Patch 1 performs the refactor: move drivers and split Kconfig/Makefiles
>> accordingly, without intended functional changes.
>>
>> Patch 2 updates MAINTAINERS to match the new layout and adds a dedicated entry
>> for drivers/ptp/emulated/, moving review and ownership routing for this class
>> of drivers away from the netdev maintainership.
>>
>> No userspace ABI changes are intended, this is a refactor and maintenance
>> metadata update only.
> 
> While no ABI changes are intended in *this* patch series, we do need
> some.
> 
> These 'emulated' clocks mostly exist not to emulate IEEE1588 per se,
> but as a way to provide a precision real time clock to systems
> (especially virtual guests).
> 
> We have already discussed the need to expose clock error bounds, and to
> expose paired timestamps against the actual hardware counter (TSC, arch
> counter, timebase, etc.).
> 
> Another key difference is that we'll generally want to be able to
> derive UTC from these clocks, and feed them directly into the kernel's
> CLOCK_REALTIME.
> 
> I don't have strong views on whether we extend the /dev/ptpX userspace
> ABI, or start to treat these 'emulated' clocks as a class of device in
> their own right and just shim them to /dev/ptpX for compatibility.
> 

As mentioned in RFC v1, the use cases for drivers in the emulated PHC category
are expected to be quite diverse, and not limited to the virtualization/guest
time sync use case. For example, existing drivers such as ptp_ocp [1] and
upcoming ones such as mhi_phc [2] are not related to virtualization use cases.

The main motivation for this RFC is to find a clear in-tree home, upstreaming
path, and review/maintainership model for PHC/PTP drivers that use the existing
PTP userspace interface, but are not based on the IEEE 1588/network packet
timestamping pipeline, both for those already in the tree and for future
additions.

For virtualization-specific extensions (e.g. additional capabilities or ABI
changes), I agree they are valuable, but I think they are outside the scope of
this RFC series.

[1] https://lore.kernel.org/netdev/c85c77bc-9a8c-4336-ab79-89a981c43e01@linux.dev/
[2] https://lore.kernel.org/mhi/20250818-tsc_time_sync-v1-0-2747710693ba@oss.qualcomm.com/

>> # Request for comments
>>
>> 1. Following the clocksource/timekeeping and POSIX timer areas, this RFC routes
>> changes for drivers/ptp/emulated/ to linux-kernel@vger.kernel.org (rather than
>> netdev). However, the preferred integration path is still unclear (e.g. which
>> tree should take such changes, and who should collect/pull them for merging). We
>> would really appreciate guidance from the time/clock maintainers, especially any
>> input from Thomas Gleixner, on the preferred tree/workflow for these changes.
>>
>> 2. This RFC currently lists us as the maintainers for drivers/ptp/emulated/ as a
>> fallback contact point. Ideally, we would prefer this area to be maintained by
>> clock/time experts in the long run. Suggestions on more suitable maintainers are
>> very welcome.
> 
> I'm happy to be involved too.

Thanks, David. It would be great to have you involved. Would you be willing to
be listed in MAINTAINERS for drivers/ptp/emulated/?

Regards.

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

* Re: [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership
  2026-02-27 12:25   ` Wen Gu
@ 2026-03-06  2:41     ` Jakub Kicinski
  2026-03-09  2:28       ` Wen Gu
  2026-03-17  2:12     ` Wen Gu
  1 sibling, 1 reply; 9+ messages in thread
From: Jakub Kicinski @ 2026-03-06  2:41 UTC (permalink / raw)
  To: Wen Gu
  Cc: David Woodhouse, tglx, tglx, richardcochran, andrew+netdev, davem,
	edumazet, pabeni, linux-kernel, netdev, mani, imran.shaik,
	vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das

On Fri, 27 Feb 2026 20:25:11 +0800 Wen Gu wrote:
> As mentioned in RFC v1, the use cases for drivers in the emulated PHC category
> are expected to be quite diverse, and not limited to the virtualization/guest
> time sync use case. For example, existing drivers such as ptp_ocp [1] and
> upcoming ones such as mhi_phc [2] are not related to virtualization use cases.

ptp_ocp is a real PCIe device with an atomic clock. mhi_phc is some
qualcomm fw-defined thing, so more closely mapping what you're doing.
ptp_ocp should probably stay under netdev, we maintain DPLL drivers,
too. Main thing we/I don't want to deal with is all the corporate NIH
virtualization excreta.

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

* Re: [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership
  2026-03-06  2:41     ` Jakub Kicinski
@ 2026-03-09  2:28       ` Wen Gu
  0 siblings, 0 replies; 9+ messages in thread
From: Wen Gu @ 2026-03-09  2:28 UTC (permalink / raw)
  To: Jakub Kicinski
  Cc: David Woodhouse, tglx, tglx, richardcochran, andrew+netdev, davem,
	edumazet, pabeni, linux-kernel, netdev, mani, imran.shaik,
	vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das



On 2026/3/6 10:41, Jakub Kicinski wrote:
> On Fri, 27 Feb 2026 20:25:11 +0800 Wen Gu wrote:
>> As mentioned in RFC v1, the use cases for drivers in the emulated PHC category
>> are expected to be quite diverse, and not limited to the virtualization/guest
>> time sync use case. For example, existing drivers such as ptp_ocp [1] and
>> upcoming ones such as mhi_phc [2] are not related to virtualization use cases.
> 
> ptp_ocp is a real PCIe device with an atomic clock. mhi_phc is some
> qualcomm fw-defined thing, so more closely mapping what you're doing.
> ptp_ocp should probably stay under netdev, we maintain DPLL drivers,
> too. Main thing we/I don't want to deal with is all the corporate NIH
> virtualization excreta.

OK. ptp_ocp will be kept under netdev in the next version.

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

* Re: [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership
  2026-02-27  8:19 [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership Wen Gu
                   ` (2 preceding siblings ...)
  2026-02-27 10:25 ` [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership David Woodhouse
@ 2026-03-09  6:54 ` Wen Gu
  3 siblings, 0 replies; 9+ messages in thread
From: Wen Gu @ 2026-03-09  6:54 UTC (permalink / raw)
  To: tglx, tglx, richardcochran, andrew+netdev, davem, edumazet, kuba,
	pabeni, linux-kernel, netdev, mani, imran.shaik, John Stultz,
	Anna-Maria Behnsen, Frederic Weisbecker, Daniel Lezcano,
	Stephen Boyd
  Cc: vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, dwmw2, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das



On 2026/2/27 16:19, Wen Gu wrote:

To get more clock/timekeeping-side input on this RFC (in particular, the two open
questions below), I’m CC’ing a few additional maintainers from the clock/time area.

> # Request for comments
> 
> 1. Following the clocksource/timekeeping and POSIX timer areas, this RFC routes
> changes for drivers/ptp/emulated/ to linux-kernel@vger.kernel.org (rather than
> netdev). However, the preferred integration path is still unclear (e.g. which
> tree should take such changes, and who should collect/pull them for merging). We
> would really appreciate guidance from the time/clock maintainers, especially any
> input from Thomas Gleixner, on the preferred tree/workflow for these changes.

As a concrete option for (1): would it be acceptable to merge changes for
drivers/ptp/emulated/ via tip.git (timers/core branch)?

> 2. This RFC currently lists us as the maintainers for drivers/ptp/emulated/ as a
> fallback contact point. Ideally, we would prefer this area to be maintained by
> clock/time experts in the long run. Suggestions on more suitable maintainers are
> very welcome.

We’d appreciate guidance from the clock/timekeeping maintainers on the preferred
workflow and long-term maintainership for this class of clock drivers.

Thanks!

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

* Re: [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership
  2026-02-27 12:25   ` Wen Gu
  2026-03-06  2:41     ` Jakub Kicinski
@ 2026-03-17  2:12     ` Wen Gu
  1 sibling, 0 replies; 9+ messages in thread
From: Wen Gu @ 2026-03-17  2:12 UTC (permalink / raw)
  To: David Woodhouse, tglx, tglx, richardcochran, andrew+netdev, davem,
	edumazet, kuba, pabeni, linux-kernel, netdev, mani, imran.shaik,
	John Stultz, Anna-Maria Behnsen, Frederic Weisbecker,
	Daniel Lezcano, Stephen Boyd
  Cc: vladimir.oltean, wei.fang, xiaoning.wang, jonathan.lemon,
	vadim.fedorenko, yangbo.lu, svens, nick.shi, ajay.kaher,
	alexey.makhalov, bcm-kernel-feedback-list, linux-fpga, imx,
	linux-s390, dust.li, xuanzhuo, taniya.das



On 2026/2/27 20:25, Wen Gu wrote:
> 
> 
> On 2026/2/27 18:25, David Woodhouse wrote:
>> On Fri, 2026-02-27 at 16:19 +0800, Wen Gu wrote:
>>>
>>> # Request for comments
>>>
>>> 1. Following the clocksource/timekeeping and POSIX timer areas, this RFC routes
>>> changes for drivers/ptp/emulated/ to linux-kernel@vger.kernel.org (rather than
>>> netdev). However, the preferred integration path is still unclear (e.g. which
>>> tree should take such changes, and who should collect/pull them for merging). We
>>> would really appreciate guidance from the time/clock maintainers, especially any
>>> input from Thomas Gleixner, on the preferred tree/workflow for these changes.
>>>
>>> 2. This RFC currently lists us as the maintainers for drivers/ptp/emulated/ as a
>>> fallback contact point. Ideally, we would prefer this area to be maintained by
>>> clock/time experts in the long run. Suggestions on more suitable maintainers are
>>> very welcome.
>>
>> I'm happy to be involved too.
> 
> Thanks, David. It would be great to have you involved. Would you be willing to
> be listed in MAINTAINERS for drivers/ptp/emulated/?

Hi David,

Just following up in case this got lost in the thread.

You mentioned earlier that you'd be happy to be involved, so I wanted to
check whether you'd be comfortable being listed as a co-maintainer.

Thanks!

> 
> Regards.

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

end of thread, other threads:[~2026-03-17  2:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27  8:19 [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership Wen Gu
2026-02-27  8:19 ` [RFC v2 1/2] ptp: split clock drivers into two subdirectories Wen Gu
2026-02-27  8:19 ` [RFC v2 2/2] MAINTAINERS: update PTP maintainer entries after directory split Wen Gu
2026-02-27 10:25 ` [RFC v2 0/2] ptp: Move non-NIC PHC drivers from netdev to clock/timekeeping maintainership David Woodhouse
2026-02-27 12:25   ` Wen Gu
2026-03-06  2:41     ` Jakub Kicinski
2026-03-09  2:28       ` Wen Gu
2026-03-17  2:12     ` Wen Gu
2026-03-09  6:54 ` Wen Gu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox