• Yi Guo's avatar
    octeontx2-af: Add external ptp input clock · 99bbc4ae
    Yi Guo authored
    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: default avatarYi Guo <yig@marvell.com>
    Signed-off-by: default avatarHariprasad Kelam <hkelam@marvell.com>
    Signed-off-by: default avatarSubbaraya Sundeep <sbhatta@marvell.com>
    Signed-off-by: default avatarSunil Goutham <sgoutham@marvell.com>
    Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
    99bbc4ae
rvu.c 81.9 KB