xref: /linux/Documentation/ABI/testing/sysfs-ptp (revision de46584675fad02b7f8255f31be0ea1be5cd185b)
1d94ba80eSRichard CochranWhat:		/sys/class/ptp/
2d94ba80eSRichard CochranDate:		September 2010
3d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
4d94ba80eSRichard CochranDescription:
5d94ba80eSRichard Cochran		This directory contains files and directories
6d94ba80eSRichard Cochran		providing a standardized interface to the ancillary
7d94ba80eSRichard Cochran		features of PTP hardware clocks.
8d94ba80eSRichard Cochran
9d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/
10d94ba80eSRichard CochranDate:		September 2010
11d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
12d94ba80eSRichard CochranDescription:
13d94ba80eSRichard Cochran		This directory contains the attributes of the Nth PTP
14d94ba80eSRichard Cochran		hardware clock registered into the PTP class driver
15d94ba80eSRichard Cochran		subsystem.
16d94ba80eSRichard Cochran
17d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/clock_name
18d94ba80eSRichard CochranDate:		September 2010
19d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
20d94ba80eSRichard CochranDescription:
21d94ba80eSRichard Cochran		This file contains the name of the PTP hardware clock
22*de465846SRichard Cochran		as a human readable string. The purpose of this
23*de465846SRichard Cochran		attribute is to provide the user with a "friendly
24*de465846SRichard Cochran		name" and to help distinguish PHY based devices from
25*de465846SRichard Cochran		MAC based ones. The string does not necessarily have
26*de465846SRichard Cochran		to be any kind of unique id.
27d94ba80eSRichard Cochran
28d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/max_adjustment
29d94ba80eSRichard CochranDate:		September 2010
30d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
31d94ba80eSRichard CochranDescription:
32d94ba80eSRichard Cochran		This file contains the PTP hardware clock's maximum
33d94ba80eSRichard Cochran		frequency adjustment value (a positive integer) in
34d94ba80eSRichard Cochran		parts per billion.
35d94ba80eSRichard Cochran
36d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/n_alarms
37d94ba80eSRichard CochranDate:		September 2010
38d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
39d94ba80eSRichard CochranDescription:
40d94ba80eSRichard Cochran		This file contains the number of periodic or one shot
41d94ba80eSRichard Cochran		alarms offer by the PTP hardware clock.
42d94ba80eSRichard Cochran
43d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/n_external_timestamps
44d94ba80eSRichard CochranDate:		September 2010
45d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
46d94ba80eSRichard CochranDescription:
47d94ba80eSRichard Cochran		This file contains the number of external timestamp
48d94ba80eSRichard Cochran		channels offered by the PTP hardware clock.
49d94ba80eSRichard Cochran
50d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/n_periodic_outputs
51d94ba80eSRichard CochranDate:		September 2010
52d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
53d94ba80eSRichard CochranDescription:
54d94ba80eSRichard Cochran		This file contains the number of programmable periodic
55d94ba80eSRichard Cochran		output channels offered by the PTP hardware clock.
56d94ba80eSRichard Cochran
57d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/pps_avaiable
58d94ba80eSRichard CochranDate:		September 2010
59d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
60d94ba80eSRichard CochranDescription:
61d94ba80eSRichard Cochran		This file indicates whether the PTP hardware clock
62d94ba80eSRichard Cochran		supports a Pulse Per Second to the host CPU. Reading
63d94ba80eSRichard Cochran		"1" means that the PPS is supported, while "0" means
64d94ba80eSRichard Cochran		not supported.
65d94ba80eSRichard Cochran
66d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/extts_enable
67d94ba80eSRichard CochranDate:		September 2010
68d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
69d94ba80eSRichard CochranDescription:
70d94ba80eSRichard Cochran		This write-only file enables or disables external
71d94ba80eSRichard Cochran		timestamps. To enable external timestamps, write the
72d94ba80eSRichard Cochran		channel index followed by a "1" into the file.
73d94ba80eSRichard Cochran		To disable external timestamps, write the channel
74d94ba80eSRichard Cochran		index followed by a "0" into the file.
75d94ba80eSRichard Cochran
76d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/fifo
77d94ba80eSRichard CochranDate:		September 2010
78d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
79d94ba80eSRichard CochranDescription:
80d94ba80eSRichard Cochran		This file provides timestamps on external events, in
81d94ba80eSRichard Cochran		the form of three integers: channel index, seconds,
82d94ba80eSRichard Cochran		and nanoseconds.
83d94ba80eSRichard Cochran
84d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/period
85d94ba80eSRichard CochranDate:		September 2010
86d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
87d94ba80eSRichard CochranDescription:
88d94ba80eSRichard Cochran		This write-only file enables or disables periodic
89d94ba80eSRichard Cochran		outputs. To enable a periodic output, write five
90d94ba80eSRichard Cochran		integers into the file: channel index, start time
91d94ba80eSRichard Cochran		seconds, start time nanoseconds, period seconds, and
92d94ba80eSRichard Cochran		period nanoseconds. To disable a periodic output, set
93d94ba80eSRichard Cochran		all the seconds and nanoseconds values to zero.
94d94ba80eSRichard Cochran
95d94ba80eSRichard CochranWhat:		/sys/class/ptp/ptpN/pps_enable
96d94ba80eSRichard CochranDate:		September 2010
97d94ba80eSRichard CochranContact:	Richard Cochran <richardcochran@gmail.com>
98d94ba80eSRichard CochranDescription:
99d94ba80eSRichard Cochran		This write-only file enables or disables delivery of
100d94ba80eSRichard Cochran		PPS events to the Linux PPS subsystem. To enable PPS
101d94ba80eSRichard Cochran		events, write a "1" into the file. To disable events,
102d94ba80eSRichard Cochran		write a "0" into the file.
103