octeontx2-af: Add external ptp input clock
PTP hardware block can be configured to utilize the external clock. Also the current ptp timestamp can be captured when external trigger is applied on a gpio pin. These features are required in scenarios like connecting a external timing device to the chip for time synchronization. The timing device provides the clock and trigger(PPS signal) to the PTP block. This patch does the following: 1. configures PTP block to use external clock frequency and timestamp capture on external event. 2. sends PTP_REQ_EXTTS events to kernel ptp phc susbsytem with captured timestamps 3. aligns PPS edge to adjusted ptp clock in the ptp device by setting the PPS_THRESH to the reminder of the last timestamp value captured by external PPS Signed-off-by:Yi Guo <yig@marvell.com> Signed-off-by:
Hariprasad Kelam <hkelam@marvell.com> Signed-off-by:
Subbaraya Sundeep <sbhatta@marvell.com> Signed-off-by:
Sunil Goutham <sgoutham@marvell.com> Signed-off-by:
David S. Miller <davem@davemloft.net>
Showing
- drivers/net/ethernet/marvell/octeontx2/af/mbox.h 3 additions, 0 deletionsdrivers/net/ethernet/marvell/octeontx2/af/mbox.h
- drivers/net/ethernet/marvell/octeontx2/af/ptp.c 54 additions, 1 deletiondrivers/net/ethernet/marvell/octeontx2/af/ptp.c
- drivers/net/ethernet/marvell/octeontx2/af/ptp.h 1 addition, 1 deletiondrivers/net/ethernet/marvell/octeontx2/af/ptp.h
- drivers/net/ethernet/marvell/octeontx2/af/rvu.c 2 additions, 1 deletiondrivers/net/ethernet/marvell/octeontx2/af/rvu.c
- drivers/net/ethernet/marvell/octeontx2/af/rvu.h 3 additions, 1 deletiondrivers/net/ethernet/marvell/octeontx2/af/rvu.h
- drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h 6 additions, 0 deletionsdrivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
- drivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c 118 additions, 2 deletionsdrivers/net/ethernet/marvell/octeontx2/nic/otx2_ptp.c
Loading
Please register or sign in to comment