sysfs-timecard 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. What: /sys/class/timecard/
  2. Date: September 2021
  3. Contact: Jonathan Lemon <[email protected]>
  4. Description: This directory contains files and directories
  5. providing a standardized interface to the ancillary
  6. features of the OpenCompute timecard.
  7. What: /sys/class/timecard/ocpN/
  8. Date: September 2021
  9. Contact: Jonathan Lemon <[email protected]>
  10. Description: This directory contains the attributes of the Nth timecard
  11. registered.
  12. What: /sys/class/timecard/ocpN/available_clock_sources
  13. Date: September 2021
  14. Contact: Jonathan Lemon <[email protected]>
  15. Description: (RO) The list of available time sources that the PHC
  16. uses for clock adjustments.
  17. ==== =================================================
  18. NONE no adjustments
  19. PPS adjustments come from the PPS1 selector (default)
  20. TOD adjustments from the GNSS/TOD module
  21. IRIG adjustments from external IRIG-B signal
  22. DCF adjustments from external DCF signal
  23. ==== =================================================
  24. What: /sys/class/timecard/ocpN/available_sma_inputs
  25. Date: September 2021
  26. Contact: Jonathan Lemon <[email protected]>
  27. Description: (RO) Set of available destinations (sinks) for a SMA
  28. input signal.
  29. ===== ================================================
  30. 10Mhz signal is used as the 10Mhz reference clock
  31. PPS1 signal is sent to the PPS1 selector
  32. PPS2 signal is sent to the PPS2 selector
  33. TS1 signal is sent to timestamper 1
  34. TS2 signal is sent to timestamper 2
  35. TS3 signal is sent to timestamper 3
  36. TS4 signal is sent to timestamper 4
  37. IRIG signal is sent to the IRIG-B module
  38. DCF signal is sent to the DCF module
  39. FREQ1 signal is sent to frequency counter 1
  40. FREQ2 signal is sent to frequency counter 2
  41. FREQ3 signal is sent to frequency counter 3
  42. FREQ4 signal is sent to frequency counter 4
  43. None signal input is disabled
  44. ===== ================================================
  45. What: /sys/class/timecard/ocpN/available_sma_outputs
  46. Date: May 2021
  47. Contact: Jonathan Lemon <[email protected]>
  48. Description: (RO) Set of available sources for a SMA output signal.
  49. ===== ================================================
  50. 10Mhz output is from the 10Mhz reference clock
  51. PHC output PPS is from the PHC clock
  52. MAC output PPS is from the Miniature Atomic Clock
  53. GNSS1 output PPS is from the first GNSS module
  54. GNSS2 output PPS is from the second GNSS module
  55. IRIG output is from the PHC, in IRIG-B format
  56. DCF output is from the PHC, in DCF format
  57. GEN1 output is from frequency generator 1
  58. GEN2 output is from frequency generator 2
  59. GEN3 output is from frequency generator 3
  60. GEN4 output is from frequency generator 4
  61. GND output is GND
  62. VCC output is VCC
  63. ===== ================================================
  64. What: /sys/class/timecard/ocpN/clock_source
  65. Date: September 2021
  66. Contact: Jonathan Lemon <[email protected]>
  67. Description: (RW) Contains the current synchronization source used by
  68. the PHC. May be changed by writing one of the listed
  69. values from the available_clock_sources attribute set.
  70. What: /sys/class/timecard/ocpN/clock_status_drift
  71. Date: March 2022
  72. Contact: Jonathan Lemon <[email protected]>
  73. Description: (RO) Contains the current drift value used by the firmware
  74. for internal disciplining of the atomic clock.
  75. What: /sys/class/timecard/ocpN/clock_status_offset
  76. Date: March 2022
  77. Contact: Jonathan Lemon <[email protected]>
  78. Description: (RO) Contains the current offset value used by the firmware
  79. for internal disciplining of the atomic clock.
  80. What: /sys/class/timecard/ocpN/freqX
  81. Date: March 2022
  82. Contact: Jonathan Lemon <[email protected]>
  83. Description: (RO) Optional directory containing the sysfs nodes for
  84. frequency counter <X>.
  85. What: /sys/class/timecard/ocpN/freqX/frequency
  86. Date: March 2022
  87. Contact: Jonathan Lemon <[email protected]>
  88. Description: (RO) Contains the measured frequency over the specified
  89. measurement period.
  90. What: /sys/class/timecard/ocpN/freqX/seconds
  91. Date: March 2022
  92. Contact: Jonathan Lemon <[email protected]>
  93. Description: (RW) Specifies the number of seconds from 0-255 that the
  94. frequency should be measured over. Write 0 to disable.
  95. What: /sys/class/timecard/ocpN/genX
  96. Date: March 2022
  97. Contact: Jonathan Lemon <[email protected]>
  98. Description: (RO) Optional directory containing the sysfs nodes for
  99. frequency generator <X>.
  100. What: /sys/class/timecard/ocpN/genX/duty
  101. Date: March 2022
  102. Contact: Jonathan Lemon <[email protected]>
  103. Description: (RO) Specifies the signal duty cycle as a percentage from 1-99.
  104. What: /sys/class/timecard/ocpN/genX/period
  105. Date: March 2022
  106. Contact: Jonathan Lemon <[email protected]>
  107. Description: (RO) Specifies the signal period in nanoseconds.
  108. What: /sys/class/timecard/ocpN/genX/phase
  109. Date: March 2022
  110. Contact: Jonathan Lemon <[email protected]>
  111. Description: (RO) Specifies the signal phase offset in nanoseconds.
  112. What: /sys/class/timecard/ocpN/genX/polarity
  113. Date: March 2022
  114. Contact: Jonathan Lemon <[email protected]>
  115. Description: (RO) Specifies the signal polarity, either 1 or 0.
  116. What: /sys/class/timecard/ocpN/genX/running
  117. Date: March 2022
  118. Contact: Jonathan Lemon <[email protected]>
  119. Description: (RO) Either 0 or 1, showing if the signal generator is running.
  120. What: /sys/class/timecard/ocpN/genX/start
  121. Date: March 2022
  122. Contact: Jonathan Lemon <[email protected]>
  123. Description: (RO) Shows the time in <sec>.<nsec> that the signal generator
  124. started running.
  125. What: /sys/class/timecard/ocpN/genX/signal
  126. Date: March 2022
  127. Contact: Jonathan Lemon <[email protected]>
  128. Description: (RW) Used to start the signal generator, and summarize
  129. the current status.
  130. The signal generator may be started by writing the signal
  131. period, followed by the optional signal values. If the
  132. optional values are not provided, they default to the current
  133. settings, which may be obtained from the other sysfs nodes.
  134. period [duty [phase [polarity]]]
  135. echo 500000000 > signal # 1/2 second period
  136. echo 1000000 40 100 > signal
  137. echo 0 > signal # turn off generator
  138. Period and phase are specified in nanoseconds. Duty cycle is
  139. a percentage from 1-99. Polarity is 1 or 0.
  140. Reading this node will return:
  141. period duty phase polarity start_time
  142. What: /sys/class/timecard/ocpN/gnss_sync
  143. Date: September 2021
  144. Contact: Jonathan Lemon <[email protected]>
  145. Description: (RO) Indicates whether a valid GNSS signal is received,
  146. or when the signal was lost.
  147. What: /sys/class/timecard/ocpN/i2c
  148. Date: September 2021
  149. Contact: Jonathan Lemon <[email protected]>
  150. Description: This optional attribute links to the associated i2c device.
  151. What: /sys/class/timecard/ocpN/irig_b_mode
  152. Date: September 2021
  153. Contact: Jonathan Lemon <[email protected]>
  154. Description: (RW) An integer from 0-7 indicating the timecode format
  155. of the IRIG-B output signal: B00<n>
  156. What: /sys/class/timecard/ocpN/pps
  157. Date: September 2021
  158. Contact: Jonathan Lemon <[email protected]>
  159. Description: This optional attribute links to the associated PPS device.
  160. What: /sys/class/timecard/ocpN/ptp
  161. Date: September 2021
  162. Contact: Jonathan Lemon <[email protected]>
  163. Description: This attribute links to the associated PTP device.
  164. What: /sys/class/timecard/ocpN/serialnum
  165. Date: September 2021
  166. Contact: Jonathan Lemon <[email protected]>
  167. Description: (RO) Provides the serial number of the timecard.
  168. What: /sys/class/timecard/ocpN/sma1
  169. What: /sys/class/timecard/ocpN/sma2
  170. What: /sys/class/timecard/ocpN/sma3
  171. What: /sys/class/timecard/ocpN/sma4
  172. Date: September 2021
  173. Contact: Jonathan Lemon <[email protected]>
  174. Description: (RW) These attributes specify the direction of the signal
  175. on the associated SMA connectors, and also the signal sink
  176. or source.
  177. The display format of the attribute is a space separated
  178. list of signals, prefixed by the input/output direction.
  179. The signal direction may be changed (if supported) by
  180. prefixing the signal list with either "in:" or "out:".
  181. If neither prefix is present, then the direction is unchanged.
  182. The output signal may be changed by writing one of the listed
  183. values from the available_sma_outputs attribute set.
  184. The input destinations may be changed by writing multiple
  185. values from the available_sma_inputs attribute set,
  186. separated by spaces. If there are duplicated input
  187. destinations between connectors, the lowest numbered SMA
  188. connector is given priority.
  189. Note that not all input combinations may make sense.
  190. The 10Mhz reference clock input is currently only valid
  191. on SMA1 and may not be combined with other destination sinks.
  192. What: /sys/class/timecard/ocpN/tod_correction
  193. Date: March 2022
  194. Contact: Jonathan Lemon <[email protected]>
  195. Description: (RW) The incoming GNSS signal is in UTC time, and the NMEA
  196. format messages do not provide a TAI offset. This sets the
  197. correction value for the incoming time.
  198. If UBX_LS is enabled, this should be 0, and the offset is
  199. taken from the UBX-NAV-TIMELS message.
  200. What: /sys/class/timecard/ocpN/ts_window_adjust
  201. Date: September 2021
  202. Contact: Jonathan Lemon <[email protected]>
  203. Description: (RW) When retrieving the PHC with the PTP SYS_OFFSET_EXTENDED
  204. ioctl, a system timestamp is made before and after the PHC
  205. time is retrieved. The midpoint between the two system
  206. timestamps is usually taken to be the SYS time associated
  207. with the PHC time. This estimate may be wrong, as it depends
  208. on PCI latencies, and when the PHC time was latched
  209. The attribute value reduces the end timestamp by the given
  210. number of nanoseconds, so the computed midpoint matches the
  211. retrieved PHC time.
  212. The initial value is set based on measured PCI latency and
  213. the estimated point where the FPGA latches the PHC time. This
  214. value may be changed by writing an unsigned integer.
  215. What: /sys/class/timecard/ocpN/ttyGNSS
  216. What: /sys/class/timecard/ocpN/ttyGNSS2
  217. Date: September 2021
  218. Contact: Jonathan Lemon <[email protected]>
  219. Description: These optional attributes link to the TTY serial ports
  220. associated with the GNSS devices.
  221. What: /sys/class/timecard/ocpN/ttyMAC
  222. Date: September 2021
  223. Contact: Jonathan Lemon <[email protected]>
  224. Description: This optional attribute links to the TTY serial port
  225. associated with the Miniature Atomic Clock.
  226. What: /sys/class/timecard/ocpN/ttyNMEA
  227. Date: September 2021
  228. Contact: Jonathan Lemon <[email protected]>
  229. Description: This optional attribute links to the TTY serial port
  230. which outputs the PHC time in NMEA ZDA format.
  231. What: /sys/class/timecard/ocpN/utc_tai_offset
  232. Date: September 2021
  233. Contact: Jonathan Lemon <[email protected]>
  234. Description: (RW) The DCF and IRIG output signals are in UTC, while the
  235. TimeCard operates on TAI. This attribute allows setting the
  236. offset in seconds, which is added to the TAI timebase for
  237. these formats.
  238. The offset may be changed by writing an unsigned integer.