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