This is an automated email from the ASF dual-hosted git repository.
xiaoxiang781216 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new bda32d3a74e Documentation/ptp: add the existing implementations.
bda32d3a74e is described below
commit bda32d3a74e7d831efed955aa31aea242f0ddddb
Author: Daniel P. Carvalho <[email protected]>
AuthorDate: Sun Sep 20 14:26:34 2026 -0300
Documentation/ptp: add the existing implementations.
The page described how to write a lower-half driver but did not say
which ones are in the tree.
- List the two lower-half drivers that register a PTP clock, the dummy
driver and the Ethernet MAC of the STM32, with the option that
enables each.
- Say that the clock of the STM32 driver is the PTP counter of the MAC,
which is also the time base of the timestamps of the received
packets, and not CLOCK_REALTIME.
- Say that both use the device number 0 by default and so cannot be
registered at the same time.
Signed-off-by: Daniel P. Carvalho <[email protected]>
Assisted-by: Claude:claude-sonnet-5
---
Documentation/components/drivers/special/ptp.rst | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/components/drivers/special/ptp.rst
b/Documentation/components/drivers/special/ptp.rst
index 0bacee1f2e4..5e592ef9196 100644
--- a/Documentation/components/drivers/special/ptp.rst
+++ b/Documentation/components/drivers/special/ptp.rst
@@ -496,6 +496,24 @@ that embeds a ``struct ptp_lowerhalf_s`` and provides the
operations of
return ptp_clock_register(&priv->base, 500000, 0);
}
+Existing Implementations
+========================
+
+The following lower-half drivers are available in the tree:
+
+- ``drivers/timers/ptp_clock_dummy.c`` - The dummy driver described above,
+ enabled with ``CONFIG_PTP_CLOCK_DUMMY``. It is registered as ``/dev/ptp0``
+ at start-up.
+- ``arch/arm/src/common/stm32/stm32_eth_m3m4_v1.c`` - The Ethernet MAC of the
+ STM32 (the legacy driver), registered with ``CONFIG_PTP_CLOCK`` and
+ ``CONFIG_STM32_ETH_PTP`` as ``/dev/ptpN``, where N is the number of the
+ Ethernet interface. The clock is the PTP counter of the MAC. It is also the
+ time base of the hardware timestamps of the received packets, so those are
+ not values of ``CLOCK_REALTIME``.
+
+Both use the device number 0 by default, so they cannot be registered at the
+same time.
+
Integration with PTP Daemon
===========================