linux/drivers/net/dsa/microchip/ksz_ptp_reg.h

/* SPDX-License-Identifier: GPL-2.0 */
/* Microchip KSZ PTP register definitions
 * Copyright (C) 2022 Microchip Technology Inc.
 */

#ifndef __KSZ_PTP_REGS_H
#define __KSZ_PTP_REGS_H

#define REG_SW_GLOBAL_LED_OVR__4
#define LED_OVR_2
#define LED_OVR_1

#define REG_SW_GLOBAL_LED_SRC__4
#define LED_SRC_PTP_GPIO_1
#define LED_SRC_PTP_GPIO_2

/* 5 - PTP Clock */
#define REG_PTP_CLK_CTRL

#define PTP_STEP_ADJ
#define PTP_STEP_DIR
#define PTP_READ_TIME
#define PTP_LOAD_TIME
#define PTP_CLK_ADJ_ENABLE
#define PTP_CLK_ENABLE
#define PTP_CLK_RESET

#define REG_PTP_RTC_SUB_NANOSEC__2

#define PTP_RTC_SUB_NANOSEC_M
#define PTP_RTC_0NS

#define REG_PTP_RTC_NANOSEC

#define REG_PTP_RTC_SEC

#define REG_PTP_SUBNANOSEC_RATE

#define PTP_SUBNANOSEC_M
#define PTP_RATE_DIR
#define PTP_TMP_RATE_ENABLE

#define REG_PTP_SUBNANOSEC_RATE_L

#define REG_PTP_RATE_DURATION
#define REG_PTP_RATE_DURATION_H
#define REG_PTP_RATE_DURATION_L

#define REG_PTP_MSG_CONF1

#define PTP_802_1AS
#define PTP_ENABLE
#define PTP_ETH_ENABLE
#define PTP_IPV4_UDP_ENABLE
#define PTP_IPV6_UDP_ENABLE
#define PTP_TC_P2P
#define PTP_MASTER
#define PTP_1STEP

#define REG_PTP_UNIT_INDEX__4

#define PTP_GPIO_INDEX
#define PTP_TSI_INDEX
#define PTP_TOU_INDEX

#define REG_PTP_TRIG_STATUS__4

#define TRIG_ERROR_M
#define TRIG_DONE_M

#define REG_PTP_INT_STATUS__4

#define TRIG_INT_M
#define TS_INT_M

#define REG_PTP_CTRL_STAT__4

#define GPIO_IN
#define GPIO_OUT
#define TS_INT_ENABLE
#define TRIG_ACTIVE
#define TRIG_ENABLE
#define TRIG_RESET
#define TS_ENABLE
#define TS_RESET

#define REG_TRIG_TARGET_NANOSEC
#define REG_TRIG_TARGET_SEC

#define REG_TRIG_CTRL__4

#define TRIG_CASCADE_ENABLE
#define TRIG_CASCADE_TAIL
#define TRIG_CASCADE_UPS_M
#define TRIG_NOW
#define TRIG_NOTIFY
#define TRIG_EDGE
#define TRIG_PATTERN_M
#define TRIG_NEG_EDGE
#define TRIG_POS_EDGE
#define TRIG_NEG_PULSE
#define TRIG_POS_PULSE
#define TRIG_NEG_PERIOD
#define TRIG_POS_PERIOD
#define TRIG_REG_OUTPUT
#define TRIG_GPO_M
#define TRIG_CASCADE_ITERATE_CNT_M

#define REG_TRIG_CYCLE_WIDTH
#define TRIG_CYCLE_WIDTH_M

#define REG_TRIG_CYCLE_CNT

#define TRIG_CYCLE_CNT_M
#define TRIG_BIT_PATTERN_M

#define REG_TRIG_ITERATE_TIME

#define REG_TRIG_PULSE_WIDTH__4

#define TRIG_PULSE_WIDTH_M

/* Port PTP Register */
#define REG_PTP_PORT_RX_DELAY__2
#define REG_PTP_PORT_TX_DELAY__2
#define REG_PTP_PORT_ASYM_DELAY__2

#define REG_PTP_PORT_XDELAY_TS
#define REG_PTP_PORT_SYNC_TS
#define REG_PTP_PORT_PDRESP_TS

#define REG_PTP_PORT_TX_INT_STATUS__2
#define REG_PTP_PORT_TX_INT_ENABLE__2

#define PTP_PORT_SYNC_INT
#define PTP_PORT_XDELAY_REQ_INT
#define PTP_PORT_PDELAY_RESP_INT
#define KSZ_SYNC_MSG
#define KSZ_XDREQ_MSG
#define KSZ_PDRES_MSG

#endif