linux/drivers/net/ethernet/stmicro/stmmac/stmmac_ptp.h

/* SPDX-License-Identifier: GPL-2.0-only */
/******************************************************************************
  PTP Header file

  Copyright (C) 2013  Vayavya Labs Pvt Ltd


  Author: Rayagond Kokatanur <[email protected]>
******************************************************************************/

#ifndef	__STMMAC_PTP_H__
#define __STMMAC_PTP_H__

#define PTP_XGMAC_OFFSET
#define PTP_GMAC4_OFFSET
#define PTP_GMAC3_X_OFFSET

/* IEEE 1588 PTP register offsets */
#define PTP_TCR
#define PTP_SSIR
#define PTP_STSR
#define PTP_STNSR
#define PTP_STSUR
#define PTP_STNSUR
#define PTP_TAR
#define PTP_ACR
#define PTP_ATNR
#define PTP_ATSR
#define PTP_TS_INGR_CORR_NS
#define PTP_TS_EGR_CORR_NS
#define PTP_TS_INGR_CORR_SNS
#define PTP_TS_EGR_CORR_SNS
#define PTP_TS_INGR_LAT
#define PTP_TS_EGR_LAT

#define PTP_STNSUR_ADDSUB_SHIFT
#define PTP_DIGITAL_ROLLOVER_MODE
#define PTP_BINARY_ROLLOVER_MODE

/* PTP Timestamp control register defines */
#define PTP_TCR_TSENA
#define PTP_TCR_TSCFUPDT
#define PTP_TCR_TSINIT
#define PTP_TCR_TSUPDT
#define PTP_TCR_TSTRIG
#define PTP_TCR_TSADDREG
#define PTP_TCR_TSENALL
#define PTP_TCR_TSCTRLSSR
/* Enable PTP packet Processing for Version 2 Format */
#define PTP_TCR_TSVER2ENA
/* Enable Processing of PTP over Ethernet Frames */
#define PTP_TCR_TSIPENA
/* Enable Processing of PTP Frames Sent over IPv6-UDP */
#define PTP_TCR_TSIPV6ENA
/* Enable Processing of PTP Frames Sent over IPv4-UDP */
#define PTP_TCR_TSIPV4ENA
/* Enable Timestamp Snapshot for Event Messages */
#define PTP_TCR_TSEVNTENA
/* Enable Snapshot for Messages Relevant to Master */
#define PTP_TCR_TSMSTRENA
/* Select PTP packets for Taking Snapshots
 * On gmac4 specifically:
 * Enable SYNC, Pdelay_Req, Pdelay_Resp when TSEVNTENA is enabled.
 * or
 * Enable  SYNC, Follow_Up, Delay_Req, Delay_Resp, Pdelay_Req, Pdelay_Resp,
 * Pdelay_Resp_Follow_Up if TSEVNTENA is disabled
 */
#define PTP_TCR_SNAPTYPSEL_1
/* Enable MAC address for PTP Frame Filtering */
#define PTP_TCR_TSENMACADDR

/* SSIR defines */
#define PTP_SSIR_SSINC_MAX
#define GMAC4_PTP_SSIR_SSINC_SHIFT

/* Auxiliary Control defines */
#define PTP_ACR_ATSFC
#define PTP_ACR_ATSEN0
#define PTP_ACR_ATSEN1
#define PTP_ACR_ATSEN2
#define PTP_ACR_ATSEN3
#define PTP_ACR_ATSEN(index)
#define PTP_ACR_MASK
#define PMC_ART_VALUE0
#define PMC_ART_VALUE1
#define PMC_ART_VALUE2
#define PMC_ART_VALUE3
#define GMAC4_ART_TIME_SHIFT

enum aux_snapshot {};

#endif	/* __STMMAC_PTP_H__ */