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