nuttx/Documentation/components
dongjiuzhu1 890a7a6382 Documentation: Add PTP clock driver framework documentation
This patch adds comprehensive documentation for the PTP (Precision Time
Protocol) clock driver framework in NuttX.

The documentation covers:

1. Overview and Architecture:
   - IEEE 1588 PTP clock framework introduction
   - Upper-half and lower-half driver architecture
   - Integration with POSIX clock APIs

2. Configuration Options:
   - CONFIG_PTP_CLOCK: Main framework configuration
   - CONFIG_PTP_CLOCK_DUMMY: Dummy driver for testing
   - CONFIG_CLOCK_ADJTIME: clock_adjtime() system call support

3. Device Interface:
   - Character device interface (/dev/ptpN)
   - IOCTL commands: PTP_CLOCK_GETTIME, PTP_CLOCK_SETTIME,
     PTP_CLOCK_GETRES, PTP_CLOCK_ADJTIME, PTP_CLOCK_GETCAPS,
     PTP_SYS_OFFSET, PTP_SYS_OFFSET_PRECISE

4. POSIX Clock API (CLOCKFD):
   - Using CLOCKFD() macro to access PTP clocks
   - clock_gettime(), clock_settime(), clock_getres() examples
   - clock_adjtime() with various adjustment modes
   - ADJ_OFFSET, ADJ_FREQUENCY, ADJ_SETOFFSET support

5. Dummy PTP Clock Driver:
   - Software-based implementation for testing
   - Features and initialization details

6. Example Usage:
   - Basic time operations
   - Frequency adjustment examples
   - Time offset adjustment examples

7. Implementing Lower-Half Drivers:
   - Step-by-step guide for hardware driver implementation
   - Required operations and structures
   - Registration process

8. Integration with PTP Daemons:
   - ptp4l, timemaster, ptpd compatibility
   - Standard POSIX clock API usage

9. Performance Considerations:
   - Hardware timestamping requirements
   - Cross-timestamping support
   - Frequency adjustment resolution

10. Debugging:
    - Debug configuration options
    - Debug output examples

The documentation is added to:
- Documentation/components/drivers/special/ptp.rst (new file)
- Documentation/components/drivers/special/index.rst (updated)

This provides developers with complete reference material for using
and implementing PTP clock drivers in NuttX.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2025-12-30 10:22:09 -03:00
..
arch Documentation: update organization.rst 2023-10-30 20:29:54 +08:00
audio Documentation: add dummy pages for missing top directories 2023-10-27 13:21:40 -03:00
concurrency Documentation: Add documentation for seqcount. 2025-12-22 10:22:06 -03:00
drivers Documentation: Add PTP clock driver framework documentation 2025-12-30 10:22:09 -03:00
filesystem docs/littlefs: Improve documentation about littelfs on NuttX 2025-08-08 02:09:18 +08:00
libs libc/search: add foreach api for hcreate_data 2025-12-25 09:39:03 +08:00
mm mm/iob: add iob_init method to support external buffer init as iob structure 2025-12-25 10:08:49 +08:00
net net/tcp: support recv packet in the TCP_FIN_WAIT_1/2 state 2025-12-29 19:22:23 +08:00
nxgraphics video/fb: add FBIOGET_PANINFOCNT ioctl 2025-10-14 17:50:42 +08:00
tools tools/nxtagspkgsfetch.sh: Fetch tags packages for NuttX and Apps. 2025-12-17 08:12:44 -03:00
binfmt.rst style: fix typos 2025-04-30 13:45:46 +08:00
boards.rst Documentation: update organization.rst 2023-10-30 20:29:54 +08:00
cmake.rst Documentation: initialize cmake doc 2023-10-27 13:21:40 -03:00
crypto.rst Documentation: add dummy pages for missing top directories 2023-10-27 13:21:40 -03:00
index.rst Documentation: Add documentation for seqcount. 2025-12-22 10:22:06 -03:00
nxflat.rst style: fix typos 2025-04-30 13:45:46 +08:00
openamp.rst Documentation: add dummy pages for missing top directories 2023-10-27 13:21:40 -03:00
paging.rst style: fix typos 2025-04-30 13:45:46 +08:00
syscall.rst Documentation: fix spelling 2025-05-15 11:33:41 +08:00
video.rst Documentation: add dummy pages for missing top directories 2023-10-27 13:21:40 -03:00
wireless.rst Documentation: add dummy pages for missing top directories 2023-10-27 13:21:40 -03:00