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 9*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/ 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 17*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/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 22de465846SRichard Cochran as a human readable string. The purpose of this 23de465846SRichard Cochran attribute is to provide the user with a "friendly 24de465846SRichard Cochran name" and to help distinguish PHY based devices from 25de465846SRichard Cochran MAC based ones. The string does not necessarily have 26de465846SRichard Cochran to be any kind of unique id. 27d94ba80eSRichard Cochran 28*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/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 36*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/max_vclocks 3773f37068SYangbo LuDate: May 2021 3873f37068SYangbo LuContact: Yangbo Lu <yangbo.lu@nxp.com> 3973f37068SYangbo LuDescription: 4073f37068SYangbo Lu This file contains the maximum number of ptp vclocks. 4173f37068SYangbo Lu Write integer to re-configure it. 4273f37068SYangbo Lu 43*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/n_alarms 44d94ba80eSRichard CochranDate: September 2010 45d94ba80eSRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 46d94ba80eSRichard CochranDescription: 47d94ba80eSRichard Cochran This file contains the number of periodic or one shot 48d94ba80eSRichard Cochran alarms offer by the PTP hardware clock. 49d94ba80eSRichard Cochran 50*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/n_external_timestamps 51d94ba80eSRichard CochranDate: September 2010 52d94ba80eSRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 53d94ba80eSRichard CochranDescription: 54d94ba80eSRichard Cochran This file contains the number of external timestamp 55d94ba80eSRichard Cochran channels offered by the PTP hardware clock. 56d94ba80eSRichard Cochran 57*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/n_periodic_outputs 58d94ba80eSRichard CochranDate: September 2010 59d94ba80eSRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 60d94ba80eSRichard CochranDescription: 61d94ba80eSRichard Cochran This file contains the number of programmable periodic 62d94ba80eSRichard Cochran output channels offered by the PTP hardware clock. 63d94ba80eSRichard Cochran 64*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/n_pins 65653104d1SRichard CochranDate: March 2014 66653104d1SRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 67653104d1SRichard CochranDescription: 68653104d1SRichard Cochran This file contains the number of programmable pins 69653104d1SRichard Cochran offered by the PTP hardware clock. 70653104d1SRichard Cochran 71*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/n_vclocks 7273f37068SYangbo LuDate: May 2021 7373f37068SYangbo LuContact: Yangbo Lu <yangbo.lu@nxp.com> 7473f37068SYangbo LuDescription: 7573f37068SYangbo Lu This file contains the number of virtual PTP clocks in 7673f37068SYangbo Lu use. By default, the value is 0 meaning that only the 7773f37068SYangbo Lu physical clock is in use. Setting the value creates 7873f37068SYangbo Lu the corresponding number of virtual clocks and causes 7973f37068SYangbo Lu the physical clock to become free running. Setting the 8073f37068SYangbo Lu value back to 0 deletes the virtual clocks and 8173f37068SYangbo Lu switches the physical clock back to normal, adjustable 8273f37068SYangbo Lu operation. 8373f37068SYangbo Lu 84*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/pins 85653104d1SRichard CochranDate: March 2014 86653104d1SRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 87653104d1SRichard CochranDescription: 88653104d1SRichard Cochran This directory contains one file for each programmable 89653104d1SRichard Cochran pin offered by the PTP hardware clock. The file name 90653104d1SRichard Cochran is the hardware dependent pin name. Reading from this 91653104d1SRichard Cochran file produces two numbers, the assigned function (see 9234433332SMauro Carvalho Chehab the `PTP_PF_` enumeration values in linux/ptp_clock.h) 93653104d1SRichard Cochran and the channel number. The function and channel 94653104d1SRichard Cochran assignment may be changed by two writing numbers into 95653104d1SRichard Cochran the file. 96653104d1SRichard Cochran 97*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/pps_available 98d94ba80eSRichard CochranDate: September 2010 99d94ba80eSRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 100d94ba80eSRichard CochranDescription: 101d94ba80eSRichard Cochran This file indicates whether the PTP hardware clock 102d94ba80eSRichard Cochran supports a Pulse Per Second to the host CPU. Reading 103d94ba80eSRichard Cochran "1" means that the PPS is supported, while "0" means 104d94ba80eSRichard Cochran not supported. 105d94ba80eSRichard Cochran 106*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/extts_enable 107d94ba80eSRichard CochranDate: September 2010 108d94ba80eSRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 109d94ba80eSRichard CochranDescription: 110d94ba80eSRichard Cochran This write-only file enables or disables external 111d94ba80eSRichard Cochran timestamps. To enable external timestamps, write the 112d94ba80eSRichard Cochran channel index followed by a "1" into the file. 113d94ba80eSRichard Cochran To disable external timestamps, write the channel 114d94ba80eSRichard Cochran index followed by a "0" into the file. 115d94ba80eSRichard Cochran 116*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/fifo 117d94ba80eSRichard CochranDate: September 2010 118d94ba80eSRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 119d94ba80eSRichard CochranDescription: 120d94ba80eSRichard Cochran This file provides timestamps on external events, in 121d94ba80eSRichard Cochran the form of three integers: channel index, seconds, 122d94ba80eSRichard Cochran and nanoseconds. 123d94ba80eSRichard Cochran 124*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/period 125d94ba80eSRichard CochranDate: September 2010 126d94ba80eSRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 127d94ba80eSRichard CochranDescription: 128d94ba80eSRichard Cochran This write-only file enables or disables periodic 129d94ba80eSRichard Cochran outputs. To enable a periodic output, write five 130d94ba80eSRichard Cochran integers into the file: channel index, start time 131d94ba80eSRichard Cochran seconds, start time nanoseconds, period seconds, and 132d94ba80eSRichard Cochran period nanoseconds. To disable a periodic output, set 133d94ba80eSRichard Cochran all the seconds and nanoseconds values to zero. 134d94ba80eSRichard Cochran 135*64b609fdSMauro Carvalho ChehabWhat: /sys/class/ptp/ptp<N>/pps_enable 136d94ba80eSRichard CochranDate: September 2010 137d94ba80eSRichard CochranContact: Richard Cochran <richardcochran@gmail.com> 138d94ba80eSRichard CochranDescription: 139d94ba80eSRichard Cochran This write-only file enables or disables delivery of 140d94ba80eSRichard Cochran PPS events to the Linux PPS subsystem. To enable PPS 141d94ba80eSRichard Cochran events, write a "1" into the file. To disable events, 142d94ba80eSRichard Cochran write a "0" into the file. 143