1 What: /sys/class/timecard/
4 Description: This directory contains files and directories
5 providing a standardized interface to the ancillary
6 features of the OpenCompute timecard.
8 What: /sys/class/timecard/ocpN/
11 Description: This directory contains the attributes of the Nth timecard
14 What: /sys/class/timecard/ocpN/available_clock_sources
17 Description: (RO) The list of available time sources that the PHC
18 uses for clock adjustments.
20 ==== =================================================
22 PPS adjustments come from the PPS1 selector (default)
23 TOD adjustments from the GNSS/TOD module
24 IRIG adjustments from external IRIG-B signal
25 DCF adjustments from external DCF signal
26 ==== =================================================
28 What: /sys/class/timecard/ocpN/available_sma_inputs
31 Description: (RO) Set of available destinations (sinks) for a SMA
34 ===== ================================================
35 10Mhz signal is used as the 10Mhz reference clock
36 PPS1 signal is sent to the PPS1 selector
37 PPS2 signal is sent to the PPS2 selector
38 TS1 signal is sent to timestamper 1
39 TS2 signal is sent to timestamper 2
40 TS3 signal is sent to timestamper 3
41 TS4 signal is sent to timestamper 4
42 IRIG signal is sent to the IRIG-B module
43 DCF signal is sent to the DCF module
44 FREQ1 signal is sent to frequency counter 1
45 FREQ2 signal is sent to frequency counter 2
46 FREQ3 signal is sent to frequency counter 3
47 FREQ4 signal is sent to frequency counter 4
48 None signal input is disabled
49 ===== ================================================
51 What: /sys/class/timecard/ocpN/available_sma_outputs
54 Description: (RO) Set of available sources for a SMA output signal.
56 ===== ================================================
57 10Mhz output is from the 10Mhz reference clock
58 PHC output PPS is from the PHC clock
59 MAC output PPS is from the Miniature Atomic Clock
60 GNSS1 output PPS is from the first GNSS module
61 GNSS2 output PPS is from the second GNSS module
62 IRIG output is from the PHC, in IRIG-B format
63 DCF output is from the PHC, in DCF format
64 GEN1 output is from frequency generator 1
65 GEN2 output is from frequency generator 2
66 GEN3 output is from frequency generator 3
67 GEN4 output is from frequency generator 4
70 ===== ================================================
72 What: /sys/class/timecard/ocpN/clock_source
75 Description: (RW) Contains the current synchronization source used by
76 the PHC. May be changed by writing one of the listed
77 values from the available_clock_sources attribute set.
79 What: /sys/class/timecard/ocpN/clock_status_drift
82 Description: (RO) Contains the current drift value used by the firmware
83 for internal disciplining of the atomic clock.
85 What: /sys/class/timecard/ocpN/clock_status_offset
88 Description: (RO) Contains the current offset value used by the firmware
89 for internal disciplining of the atomic clock.
91 What: /sys/class/timecard/ocpN/freqX
94 Description: (RO) Optional directory containing the sysfs nodes for
95 frequency counter <X>.
97 What: /sys/class/timecard/ocpN/freqX/frequency
100 Description: (RO) Contains the measured frequency over the specified
103 What: /sys/class/timecard/ocpN/freqX/seconds
106 Description: (RW) Specifies the number of seconds from 0-255 that the
107 frequency should be measured over. Write 0 to disable.
109 What: /sys/class/timecard/ocpN/genX
112 Description: (RO) Optional directory containing the sysfs nodes for
113 frequency generator <X>.
115 What: /sys/class/timecard/ocpN/genX/duty
118 Description: (RO) Specifies the signal duty cycle as a percentage from 1-99.
120 What: /sys/class/timecard/ocpN/genX/period
123 Description: (RO) Specifies the signal period in nanoseconds.
125 What: /sys/class/timecard/ocpN/genX/phase
128 Description: (RO) Specifies the signal phase offset in nanoseconds.
130 What: /sys/class/timecard/ocpN/genX/polarity
133 Description: (RO) Specifies the signal polarity, either 1 or 0.
135 What: /sys/class/timecard/ocpN/genX/running
138 Description: (RO) Either 0 or 1, showing if the signal generator is running.
140 What: /sys/class/timecard/ocpN/genX/start
143 Description: (RO) Shows the time in <sec>.<nsec> that the signal generator
146 What: /sys/class/timecard/ocpN/genX/signal
149 Description: (RW) Used to start the signal generator, and summarize
152 The signal generator may be started by writing the signal
153 period, followed by the optional signal values. If the
154 optional values are not provided, they default to the current
155 settings, which may be obtained from the other sysfs nodes.
157 period [duty [phase [polarity]]]
159 echo 500000000 > signal # 1/2 second period
160 echo 1000000 40 100 > signal
161 echo 0 > signal # turn off generator
163 Period and phase are specified in nanoseconds. Duty cycle is
164 a percentage from 1-99. Polarity is 1 or 0.
166 Reading this node will return:
168 period duty phase polarity start_time
170 What: /sys/class/timecard/ocpN/gnss_sync
173 Description: (RO) Indicates whether a valid GNSS signal is received,
174 or when the signal was lost.
176 What: /sys/class/timecard/ocpN/i2c
179 Description: This optional attribute links to the associated i2c device.
181 What: /sys/class/timecard/ocpN/irig_b_mode
184 Description: (RW) An integer from 0-7 indicating the timecode format
185 of the IRIG-B output signal: B00<n>
187 What: /sys/class/timecard/ocpN/pps
190 Description: This optional attribute links to the associated PPS device.
192 What: /sys/class/timecard/ocpN/ptp
195 Description: This attribute links to the associated PTP device.
197 What: /sys/class/timecard/ocpN/serialnum
200 Description: (RO) Provides the serial number of the timecard.
202 What: /sys/class/timecard/ocpN/sma1
203 What: /sys/class/timecard/ocpN/sma2
204 What: /sys/class/timecard/ocpN/sma3
205 What: /sys/class/timecard/ocpN/sma4
208 Description: (RW) These attributes specify the direction of the signal
209 on the associated SMA connectors, and also the signal sink
212 The display format of the attribute is a space separated
213 list of signals, prefixed by the input/output direction.
215 The signal direction may be changed (if supported) by
216 prefixing the signal list with either "in:" or "out:".
217 If neither prefix is present, then the direction is unchanged.
219 The output signal may be changed by writing one of the listed
220 values from the available_sma_outputs attribute set.
222 The input destinations may be changed by writing multiple
223 values from the available_sma_inputs attribute set,
224 separated by spaces. If there are duplicated input
225 destinations between connectors, the lowest numbered SMA
226 connector is given priority.
228 Note that not all input combinations may make sense.
230 The 10Mhz reference clock input is currently only valid
231 on SMA1 and may not be combined with other destination sinks.
233 What: /sys/class/timecard/ocpN/tod_correction
236 Description: (RW) The incoming GNSS signal is in UTC time, and the NMEA
237 format messages do not provide a TAI offset. This sets the
238 correction value for the incoming time.
240 If UBX_LS is enabled, this should be 0, and the offset is
241 taken from the UBX-NAV-TIMELS message.
243 What: /sys/class/timecard/ocpN/ts_window_adjust
246 Description: (RW) When retrieving the PHC with the PTP SYS_OFFSET_EXTENDED
247 ioctl, a system timestamp is made before and after the PHC
248 time is retrieved. The midpoint between the two system
249 timestamps is usually taken to be the SYS time associated
250 with the PHC time. This estimate may be wrong, as it depends
251 on PCI latencies, and when the PHC time was latched
253 The attribute value reduces the end timestamp by the given
254 number of nanoseconds, so the computed midpoint matches the
257 The initial value is set based on measured PCI latency and
258 the estimated point where the FPGA latches the PHC time. This
259 value may be changed by writing an unsigned integer.
261 What: /sys/class/timecard/ocpN/ttyGNSS
262 What: /sys/class/timecard/ocpN/ttyGNSS2
265 Description: These optional attributes link to the TTY serial ports
266 associated with the GNSS devices.
268 What: /sys/class/timecard/ocpN/ttyMAC
271 Description: This optional attribute links to the TTY serial port
272 associated with the Miniature Atomic Clock.
274 What: /sys/class/timecard/ocpN/ttyNMEA
277 Description: This optional attribute links to the TTY serial port
278 which outputs the PHC time in NMEA ZDA format.
280 What: /sys/class/timecard/ocpN/utc_tai_offset
283 Description: (RW) The DCF and IRIG output signals are in UTC, while the
284 TimeCard operates on TAI. This attribute allows setting the
285 offset in seconds, which is added to the TAI timebase for
288 The offset may be changed by writing an unsigned integer.