3 Contact: Richard Cochran <richardcochran@gmail.com>
5 This directory contains files and directories
6 providing a standardized interface to the ancillary
7 features of PTP hardware clocks.
9 What: /sys/class/ptp/ptp<N>/
11 Contact: Richard Cochran <richardcochran@gmail.com>
13 This directory contains the attributes of the Nth PTP
14 hardware clock registered into the PTP class driver
17 What: /sys/class/ptp/ptp<N>/clock_name
19 Contact: Richard Cochran <richardcochran@gmail.com>
21 This file contains the name of the PTP hardware clock
22 as a human readable string. The purpose of this
23 attribute is to provide the user with a "friendly
24 name" and to help distinguish PHY based devices from
25 MAC based ones. The string does not necessarily have
26 to be any kind of unique id.
28 What: /sys/class/ptp/ptp<N>/max_adjustment
30 Contact: Richard Cochran <richardcochran@gmail.com>
32 This file contains the PTP hardware clock's maximum
33 frequency adjustment value (a positive integer) in
36 What: /sys/class/ptp/ptp<N>/max_vclocks
38 Contact: Yangbo Lu <yangbo.lu@nxp.com>
40 This file contains the maximum number of ptp vclocks.
41 Write integer to re-configure it.
43 What: /sys/class/ptp/ptp<N>/n_alarms
45 Contact: Richard Cochran <richardcochran@gmail.com>
47 This file contains the number of periodic or one shot
48 alarms offer by the PTP hardware clock.
50 What: /sys/class/ptp/ptp<N>/n_external_timestamps
52 Contact: Richard Cochran <richardcochran@gmail.com>
54 This file contains the number of external timestamp
55 channels offered by the PTP hardware clock.
57 What: /sys/class/ptp/ptp<N>/n_periodic_outputs
59 Contact: Richard Cochran <richardcochran@gmail.com>
61 This file contains the number of programmable periodic
62 output channels offered by the PTP hardware clock.
64 What: /sys/class/ptp/ptp<N>/n_pins
66 Contact: Richard Cochran <richardcochran@gmail.com>
68 This file contains the number of programmable pins
69 offered by the PTP hardware clock.
71 What: /sys/class/ptp/ptp<N>/n_vclocks
73 Contact: Yangbo Lu <yangbo.lu@nxp.com>
75 This file contains the number of virtual PTP clocks in
76 use. By default, the value is 0 meaning that only the
77 physical clock is in use. Setting the value creates
78 the corresponding number of virtual clocks and causes
79 the physical clock to become free running. Setting the
80 value back to 0 deletes the virtual clocks and
81 switches the physical clock back to normal, adjustable
84 What: /sys/class/ptp/ptp<N>/pins
86 Contact: Richard Cochran <richardcochran@gmail.com>
88 This directory contains one file for each programmable
89 pin offered by the PTP hardware clock. The file name
90 is the hardware dependent pin name. Reading from this
91 file produces two numbers, the assigned function (see
92 the `PTP_PF_` enumeration values in linux/ptp_clock.h)
93 and the channel number. The function and channel
94 assignment may be changed by two writing numbers into
97 What: /sys/class/ptp/ptp<N>/pps_available
99 Contact: Richard Cochran <richardcochran@gmail.com>
101 This file indicates whether the PTP hardware clock
102 supports a Pulse Per Second to the host CPU. Reading
103 "1" means that the PPS is supported, while "0" means
106 What: /sys/class/ptp/ptp<N>/extts_enable
108 Contact: Richard Cochran <richardcochran@gmail.com>
110 This write-only file enables or disables external
111 timestamps. To enable external timestamps, write the
112 channel index followed by a "1" into the file.
113 To disable external timestamps, write the channel
114 index followed by a "0" into the file.
116 What: /sys/class/ptp/ptp<N>/fifo
118 Contact: Richard Cochran <richardcochran@gmail.com>
120 This file provides timestamps on external events, in
121 the form of three integers: channel index, seconds,
124 What: /sys/class/ptp/ptp<N>/period
126 Contact: Richard Cochran <richardcochran@gmail.com>
128 This write-only file enables or disables periodic
129 outputs. To enable a periodic output, write five
130 integers into the file: channel index, start time
131 seconds, start time nanoseconds, period seconds, and
132 period nanoseconds. To disable a periodic output, set
133 all the seconds and nanoseconds values to zero.
135 What: /sys/class/ptp/ptp<N>/pps_enable
137 Contact: Richard Cochran <richardcochran@gmail.com>
139 This write-only file enables or disables delivery of
140 PPS events to the Linux PPS subsystem. To enable PPS
141 events, write a "1" into the file. To disable events,
142 write a "0" into the file.