Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: ptp: add ptp-qoriq.txt

This patch is to add a documentation for ptp_qoriq dt-bindings.
The description for ptp_qoriq dt-bindings was actually moved
from Documentation/devicetree/bindings/net/fsl-tsec-phy.txt,
since gianfar_ptp driver was moved to ptp_qoriq driver.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yangbo Lu and committed by
David S. Miller
a98ac8bd 7349a74e

+70 -67
+1 -67
Documentation/devicetree/bindings/net/fsl-tsec-phy.txt
··· 86 86 87 87 * Gianfar PTP clock nodes 88 88 89 - General Properties: 90 - 91 - - compatible Should be "fsl,etsec-ptp" 92 - - reg Offset and length of the register set for the device 93 - - interrupts There should be at least two interrupts. Some devices 94 - have as many as four PTP related interrupts. 95 - 96 - Clock Properties: 97 - 98 - - fsl,cksel Timer reference clock source. 99 - - fsl,tclk-period Timer reference clock period in nanoseconds. 100 - - fsl,tmr-prsc Prescaler, divides the output clock. 101 - - fsl,tmr-add Frequency compensation value. 102 - - fsl,tmr-fiper1 Fixed interval period pulse generator. 103 - - fsl,tmr-fiper2 Fixed interval period pulse generator. 104 - - fsl,max-adj Maximum frequency adjustment in parts per billion. 105 - 106 - These properties set the operational parameters for the PTP 107 - clock. You must choose these carefully for the clock to work right. 108 - Here is how to figure good values: 109 - 110 - TimerOsc = selected reference clock MHz 111 - tclk_period = desired clock period nanoseconds 112 - NominalFreq = 1000 / tclk_period MHz 113 - FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0) 114 - tmr_add = ceil(2^32 / FreqDivRatio) 115 - OutputClock = NominalFreq / tmr_prsc MHz 116 - PulseWidth = 1 / OutputClock microseconds 117 - FiperFreq1 = desired frequency in Hz 118 - FiperDiv1 = 1000000 * OutputClock / FiperFreq1 119 - tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period 120 - max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1 121 - 122 - The calculation for tmr_fiper2 is the same as for tmr_fiper1. The 123 - driver expects that tmr_fiper1 will be correctly set to produce a 1 124 - Pulse Per Second (PPS) signal, since this will be offered to the PPS 125 - subsystem to synchronize the Linux clock. 126 - 127 - Reference clock source is determined by the value, which is holded 128 - in CKSEL bits in TMR_CTRL register. "fsl,cksel" property keeps the 129 - value, which will be directly written in those bits, that is why, 130 - according to reference manual, the next clock sources can be used: 131 - 132 - <0> - external high precision timer reference clock (TSEC_TMR_CLK 133 - input is used for this purpose); 134 - <1> - eTSEC system clock; 135 - <2> - eTSEC1 transmit clock; 136 - <3> - RTC clock input. 137 - 138 - When this attribute is not used, eTSEC system clock will serve as 139 - IEEE 1588 timer reference clock. 140 - 141 - Example: 142 - 143 - ptp_clock@24e00 { 144 - compatible = "fsl,etsec-ptp"; 145 - reg = <0x24E00 0xB0>; 146 - interrupts = <12 0x8 13 0x8>; 147 - interrupt-parent = < &ipic >; 148 - fsl,cksel = <1>; 149 - fsl,tclk-period = <10>; 150 - fsl,tmr-prsc = <100>; 151 - fsl,tmr-add = <0x999999A4>; 152 - fsl,tmr-fiper1 = <0x3B9AC9F6>; 153 - fsl,tmr-fiper2 = <0x00018696>; 154 - fsl,max-adj = <659999998>; 155 - }; 89 + Refer to Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
+69
Documentation/devicetree/bindings/ptp/ptp-qoriq.txt
··· 1 + * Freescale QorIQ 1588 timer based PTP clock 2 + 3 + General Properties: 4 + 5 + - compatible Should be "fsl,etsec-ptp" 6 + - reg Offset and length of the register set for the device 7 + - interrupts There should be at least two interrupts. Some devices 8 + have as many as four PTP related interrupts. 9 + 10 + Clock Properties: 11 + 12 + - fsl,cksel Timer reference clock source. 13 + - fsl,tclk-period Timer reference clock period in nanoseconds. 14 + - fsl,tmr-prsc Prescaler, divides the output clock. 15 + - fsl,tmr-add Frequency compensation value. 16 + - fsl,tmr-fiper1 Fixed interval period pulse generator. 17 + - fsl,tmr-fiper2 Fixed interval period pulse generator. 18 + - fsl,max-adj Maximum frequency adjustment in parts per billion. 19 + 20 + These properties set the operational parameters for the PTP 21 + clock. You must choose these carefully for the clock to work right. 22 + Here is how to figure good values: 23 + 24 + TimerOsc = selected reference clock MHz 25 + tclk_period = desired clock period nanoseconds 26 + NominalFreq = 1000 / tclk_period MHz 27 + FreqDivRatio = TimerOsc / NominalFreq (must be greater that 1.0) 28 + tmr_add = ceil(2^32 / FreqDivRatio) 29 + OutputClock = NominalFreq / tmr_prsc MHz 30 + PulseWidth = 1 / OutputClock microseconds 31 + FiperFreq1 = desired frequency in Hz 32 + FiperDiv1 = 1000000 * OutputClock / FiperFreq1 33 + tmr_fiper1 = tmr_prsc * tclk_period * FiperDiv1 - tclk_period 34 + max_adj = 1000000000 * (FreqDivRatio - 1.0) - 1 35 + 36 + The calculation for tmr_fiper2 is the same as for tmr_fiper1. The 37 + driver expects that tmr_fiper1 will be correctly set to produce a 1 38 + Pulse Per Second (PPS) signal, since this will be offered to the PPS 39 + subsystem to synchronize the Linux clock. 40 + 41 + Reference clock source is determined by the value, which is holded 42 + in CKSEL bits in TMR_CTRL register. "fsl,cksel" property keeps the 43 + value, which will be directly written in those bits, that is why, 44 + according to reference manual, the next clock sources can be used: 45 + 46 + <0> - external high precision timer reference clock (TSEC_TMR_CLK 47 + input is used for this purpose); 48 + <1> - eTSEC system clock; 49 + <2> - eTSEC1 transmit clock; 50 + <3> - RTC clock input. 51 + 52 + When this attribute is not used, eTSEC system clock will serve as 53 + IEEE 1588 timer reference clock. 54 + 55 + Example: 56 + 57 + ptp_clock@24e00 { 58 + compatible = "fsl,etsec-ptp"; 59 + reg = <0x24E00 0xB0>; 60 + interrupts = <12 0x8 13 0x8>; 61 + interrupt-parent = < &ipic >; 62 + fsl,cksel = <1>; 63 + fsl,tclk-period = <10>; 64 + fsl,tmr-prsc = <100>; 65 + fsl,tmr-add = <0x999999A4>; 66 + fsl,tmr-fiper1 = <0x3B9AC9F6>; 67 + fsl,tmr-fiper2 = <0x00018696>; 68 + fsl,max-adj = <659999998>; 69 + };