Re: [RFC] Defining a home/maintenance model for non-NIC PHC devices using the /dev/ptpX API
From: Wen Gu <guwen@linux.alibaba.com>
Date: 2026-01-14 12:45:49
Also in:
linux-clk, lkml, virtualization
On 2026/1/14 18:50, Vadim Fedorenko wrote:
On 14/01/2026 09:13, Wen Gu wrote:quoted
Thank you all for your suggestions. The drivers under drivers/ptp can be divided into (to my knowledge): 1. Network/1588-oriented clocks, which allow the use of tools like ptp4l to synchronize the local PHC with an external reference clock (based on the network or other methods) via the 1588 protocol to maintain accuracy. Examples include: - ptp_dte - ptp_qoriq - ptp_ines - ptp_pch - ptp_idt82p33 - ptp_clockmatrix - ptp_fc3 - ptp_mock (mock/testing) - ptp_dfl_tod - ptp_netc - ptp_ocp (a special case which provides a grandmaster clock for a PTP enabled network, generally serves as the reference clock)ptp_ocp is a timecard driver, which doesn't require calibration by ptp4l/ts2phc. OCP TimeCards have their own Atomic Clock onboard which is disciplined by 1-PPS or 10mhz signal from configurable source. The disciplining algorithm is implemented in Atomic Clock package controller. The driver exposes ptp device mostly for reading the time. So I believe it belongs to group 2 rather than 1588 group.
Thank you for the correction and detailed explanation. I will move ptp_ocp to group 2.
quoted
2. Platform/infrastructure/hypervisor-provided clocks. They don't require calibration by ptp4l based on 1588 and reference clocks, instead the underlay handle this. Users generally read the time. They include: - ptp_kvm - ptp_vmclock - ptp_vmw - ptp_s390 - ptp_cipu (upstreaming) From this perspective, I agree that "emulating" could be an appropriate name for the second ones. And I would like to further group the first ones to "1588", thus divide drivers/ptp to: - drivers/ptp/core - drivers/ptp/1588 - drivers/ptp/emulating Regards.