sysfs-ptp 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. What: /sys/class/ptp/
  2. Date: September 2010
  3. Contact: Richard Cochran <[email protected]>
  4. Description:
  5. This directory contains files and directories
  6. providing a standardized interface to the ancillary
  7. features of PTP hardware clocks.
  8. What: /sys/class/ptp/ptp<N>/
  9. Date: September 2010
  10. Contact: Richard Cochran <[email protected]>
  11. Description:
  12. This directory contains the attributes of the Nth PTP
  13. hardware clock registered into the PTP class driver
  14. subsystem.
  15. What: /sys/class/ptp/ptp<N>/clock_name
  16. Date: September 2010
  17. Contact: Richard Cochran <[email protected]>
  18. Description:
  19. This file contains the name of the PTP hardware clock
  20. as a human readable string. The purpose of this
  21. attribute is to provide the user with a "friendly
  22. name" and to help distinguish PHY based devices from
  23. MAC based ones. The string does not necessarily have
  24. to be any kind of unique id.
  25. What: /sys/class/ptp/ptp<N>/max_adjustment
  26. Date: September 2010
  27. Contact: Richard Cochran <[email protected]>
  28. Description:
  29. This file contains the PTP hardware clock's maximum
  30. frequency adjustment value (a positive integer) in
  31. parts per billion.
  32. What: /sys/class/ptp/ptp<N>/max_vclocks
  33. Date: May 2021
  34. Contact: Yangbo Lu <[email protected]>
  35. Description:
  36. This file contains the maximum number of ptp vclocks.
  37. Write integer to re-configure it.
  38. What: /sys/class/ptp/ptp<N>/n_alarms
  39. Date: September 2010
  40. Contact: Richard Cochran <[email protected]>
  41. Description:
  42. This file contains the number of periodic or one shot
  43. alarms offer by the PTP hardware clock.
  44. What: /sys/class/ptp/ptp<N>/n_external_timestamps
  45. Date: September 2010
  46. Contact: Richard Cochran <[email protected]>
  47. Description:
  48. This file contains the number of external timestamp
  49. channels offered by the PTP hardware clock.
  50. What: /sys/class/ptp/ptp<N>/n_periodic_outputs
  51. Date: September 2010
  52. Contact: Richard Cochran <[email protected]>
  53. Description:
  54. This file contains the number of programmable periodic
  55. output channels offered by the PTP hardware clock.
  56. What: /sys/class/ptp/ptp<N>/n_pins
  57. Date: March 2014
  58. Contact: Richard Cochran <[email protected]>
  59. Description:
  60. This file contains the number of programmable pins
  61. offered by the PTP hardware clock.
  62. What: /sys/class/ptp/ptp<N>/n_vclocks
  63. Date: May 2021
  64. Contact: Yangbo Lu <[email protected]>
  65. Description:
  66. This file contains the number of virtual PTP clocks in
  67. use. By default, the value is 0 meaning that only the
  68. physical clock is in use. Setting the value creates
  69. the corresponding number of virtual clocks and causes
  70. the physical clock to become free running. Setting the
  71. value back to 0 deletes the virtual clocks and
  72. switches the physical clock back to normal, adjustable
  73. operation.
  74. What: /sys/class/ptp/ptp<N>/pins
  75. Date: March 2014
  76. Contact: Richard Cochran <[email protected]>
  77. Description:
  78. This directory contains one file for each programmable
  79. pin offered by the PTP hardware clock. The file name
  80. is the hardware dependent pin name. Reading from this
  81. file produces two numbers, the assigned function (see
  82. the `PTP_PF_` enumeration values in linux/ptp_clock.h)
  83. and the channel number. The function and channel
  84. assignment may be changed by two writing numbers into
  85. the file.
  86. What: /sys/class/ptp/ptp<N>/pps_available
  87. Date: September 2010
  88. Contact: Richard Cochran <[email protected]>
  89. Description:
  90. This file indicates whether the PTP hardware clock
  91. supports a Pulse Per Second to the host CPU. Reading
  92. "1" means that the PPS is supported, while "0" means
  93. not supported.
  94. What: /sys/class/ptp/ptp<N>/extts_enable
  95. Date: September 2010
  96. Contact: Richard Cochran <[email protected]>
  97. Description:
  98. This write-only file enables or disables external
  99. timestamps. To enable external timestamps, write the
  100. channel index followed by a "1" into the file.
  101. To disable external timestamps, write the channel
  102. index followed by a "0" into the file.
  103. What: /sys/class/ptp/ptp<N>/fifo
  104. Date: September 2010
  105. Contact: Richard Cochran <[email protected]>
  106. Description:
  107. This file provides timestamps on external events, in
  108. the form of three integers: channel index, seconds,
  109. and nanoseconds.
  110. What: /sys/class/ptp/ptp<N>/period
  111. Date: September 2010
  112. Contact: Richard Cochran <[email protected]>
  113. Description:
  114. This write-only file enables or disables periodic
  115. outputs. To enable a periodic output, write five
  116. integers into the file: channel index, start time
  117. seconds, start time nanoseconds, period seconds, and
  118. period nanoseconds. To disable a periodic output, set
  119. all the seconds and nanoseconds values to zero.
  120. What: /sys/class/ptp/ptp<N>/pps_enable
  121. Date: September 2010
  122. Contact: Richard Cochran <[email protected]>
  123. Description:
  124. This write-only file enables or disables delivery of
  125. PPS events to the Linux PPS subsystem. To enable PPS
  126. events, write a "1" into the file. To disable events,
  127. write a "0" into the file.