1What: /sys/class/timecard/ 2Date: September 2021 3Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 4Description: This directory contains files and directories 5 providing a standardized interface to the ancillary 6 features of the OpenCompute timecard. 7 8What: /sys/class/timecard/ocpN/ 9Date: September 2021 10Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 11Description: This directory contains the attributes of the Nth timecard 12 registered. 13 14What: /sys/class/timecard/ocpN/available_clock_sources 15Date: September 2021 16Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 17Description: (RO) The list of available time sources that the PHC 18 uses for clock adjustments. 19 20 ==== ================================================= 21 NONE no adjustments 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 ==== ================================================= 27 28What: /sys/class/timecard/ocpN/available_sma_inputs 29Date: September 2021 30Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 31Description: (RO) Set of available destinations (sinks) for a SMA 32 input signal. 33 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 IRIG signal is sent to the IRIG-B module 41 DCF signal is sent to the DCF module 42 ===== ================================================ 43 44What: /sys/class/timecard/ocpN/available_sma_outputs 45Date: May 2021 46Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 47Description: (RO) Set of available sources for a SMA output signal. 48 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 GNSS output PPS is from the 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 ===== ================================================ 58 59What: /sys/class/timecard/ocpN/clock_source 60Date: September 2021 61Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 62Description: (RW) Contains the current synchronization source used by 63 the PHC. May be changed by writing one of the listed 64 values from the available_clock_sources attribute set. 65 66What: /sys/class/timecard/ocpN/clock_status_drift 67Date: March 2022 68Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 69Description: (RO) Contains the current drift value used by the firmware 70 for internal disciplining of the atomic clock. 71 72What: /sys/class/timecard/ocpN/clock_status_offset 73Date: March 2022 74Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 75Description: (RO) Contains the current offset value used by the firmware 76 for internal disciplining of the atomic clock. 77 78What: /sys/class/timecard/ocpN/gnss_sync 79Date: September 2021 80Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 81Description: (RO) Indicates whether a valid GNSS signal is received, 82 or when the signal was lost. 83 84What: /sys/class/timecard/ocpN/i2c 85Date: September 2021 86Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 87Description: This optional attribute links to the associated i2c device. 88 89What: /sys/class/timecard/ocpN/irig_b_mode 90Date: September 2021 91Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 92Description: (RW) An integer from 0-7 indicating the timecode format 93 of the IRIG-B output signal: B00<n> 94 95What: /sys/class/timecard/ocpN/pps 96Date: September 2021 97Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 98Description: This optional attribute links to the associated PPS device. 99 100What: /sys/class/timecard/ocpN/ptp 101Date: September 2021 102Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 103Description: This attribute links to the associated PTP device. 104 105What: /sys/class/timecard/ocpN/serialnum 106Date: September 2021 107Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 108Description: (RO) Provides the serial number of the timecard. 109 110What: /sys/class/timecard/ocpN/sma1 111What: /sys/class/timecard/ocpN/sma2 112What: /sys/class/timecard/ocpN/sma3 113What: /sys/class/timecard/ocpN/sma4 114Date: September 2021 115Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 116Description: (RW) These attributes specify the direction of the signal 117 on the associated SMA connectors, and also the signal sink 118 or source. 119 120 The display format of the attribute is a space separated 121 list of signals, prefixed by the input/output direction. 122 123 The signal direction may be changed (if supported) by 124 prefixing the signal list with either "in:" or "out:". 125 If neither prefix is present, then the direction is unchanged. 126 127 The output signal may be changed by writing one of the listed 128 values from the available_sma_outputs attribute set. 129 130 The input destinations may be changed by writing multiple 131 values from the available_sma_inputs attribute set, 132 separated by spaces. If there are duplicated input 133 destinations between connectors, the lowest numbered SMA 134 connector is given priority. 135 136 Note that not all input combinations may make sense. 137 138 The 10Mhz reference clock input is currently only valid 139 on SMA1 and may not be combined with other destination sinks. 140 141What: /sys/class/timecard/ocpN/tod_correction 142Date: March 2022 143Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 144Description: (RW) The incoming GNSS signal is in UTC time, and the NMEA 145 format messages do not provide a TAI offset. This sets the 146 correction value for the incoming time. 147 148 If UBX_LS is enabled, this should be 0, and the offset is 149 taken from the UBX-NAV-TIMELS message. 150 151What: /sys/class/timecard/ocpN/ts_window_adjust 152Date: September 2021 153Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 154Description: (RW) When retrieving the PHC with the PTP SYS_OFFSET_EXTENDED 155 ioctl, a system timestamp is made before and after the PHC 156 time is retrieved. The midpoint between the two system 157 timestamps is usually taken to be the SYS time associated 158 with the PHC time. This estimate may be wrong, as it depends 159 on PCI latencies, and when the PHC time was latched 160 161 The attribute value reduces the end timestamp by the given 162 number of nanoseconds, so the computed midpoint matches the 163 retrieved PHC time. 164 165 The initial value is set based on measured PCI latency and 166 the estimated point where the FPGA latches the PHC time. This 167 value may be changed by writing an unsigned integer. 168 169What: /sys/class/timecard/ocpN/ttyGNSS 170What: /sys/class/timecard/ocpN/ttyGNSS2 171Date: September 2021 172Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 173Description: These optional attributes link to the TTY serial ports 174 associated with the GNSS devices. 175 176What: /sys/class/timecard/ocpN/ttyMAC 177Date: September 2021 178Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 179Description: This optional attribute links to the TTY serial port 180 associated with the Miniature Atomic Clock. 181 182What: /sys/class/timecard/ocpN/ttyNMEA 183Date: September 2021 184Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 185Description: This optional attribute links to the TTY serial port 186 which outputs the PHC time in NMEA ZDA format. 187 188What: /sys/class/timecard/ocpN/utc_tai_offset 189Date: September 2021 190Contact: Jonathan Lemon <jonathan.lemon@gmail.com> 191Description: (RW) The DCF and IRIG output signals are in UTC, while the 192 TimeCard operates on TAI. This attribute allows setting the 193 offset in seconds, which is added to the TAI timebase for 194 these formats. 195 196 The offset may be changed by writing an unsigned integer. 197