162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0+ */
262306a36Sopenharmony_ci/* Copyright (C) 2018 Microchip Technology Inc. */
362306a36Sopenharmony_ci
462306a36Sopenharmony_ci#ifndef _LAN743X_ETHTOOL_H
562306a36Sopenharmony_ci#define _LAN743X_ETHTOOL_H
662306a36Sopenharmony_ci
762306a36Sopenharmony_ci#include "linux/ethtool.h"
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#define LAN743X_ETH_REG_VERSION         1
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_cienum {
1262306a36Sopenharmony_ci	ETH_PRIV_FLAGS,
1362306a36Sopenharmony_ci	ETH_ID_REV,
1462306a36Sopenharmony_ci	ETH_FPGA_REV,
1562306a36Sopenharmony_ci	ETH_STRAP_READ,
1662306a36Sopenharmony_ci	ETH_INT_STS,
1762306a36Sopenharmony_ci	ETH_HW_CFG,
1862306a36Sopenharmony_ci	ETH_PMT_CTL,
1962306a36Sopenharmony_ci	ETH_E2P_CMD,
2062306a36Sopenharmony_ci	ETH_E2P_DATA,
2162306a36Sopenharmony_ci	ETH_MAC_CR,
2262306a36Sopenharmony_ci	ETH_MAC_RX,
2362306a36Sopenharmony_ci	ETH_MAC_TX,
2462306a36Sopenharmony_ci	ETH_FLOW,
2562306a36Sopenharmony_ci	ETH_MII_ACC,
2662306a36Sopenharmony_ci	ETH_MII_DATA,
2762306a36Sopenharmony_ci	ETH_EEE_TX_LPI_REQ_DLY,
2862306a36Sopenharmony_ci	ETH_WUCSR,
2962306a36Sopenharmony_ci	ETH_WK_SRC,
3062306a36Sopenharmony_ci
3162306a36Sopenharmony_ci	/* Add new registers above */
3262306a36Sopenharmony_ci	MAX_LAN743X_ETH_COMMON_REGS
3362306a36Sopenharmony_ci};
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_cienum {
3662306a36Sopenharmony_ci	/* SGMII Register */
3762306a36Sopenharmony_ci	ETH_SR_VSMMD_DEV_ID1,
3862306a36Sopenharmony_ci	ETH_SR_VSMMD_DEV_ID2,
3962306a36Sopenharmony_ci	ETH_SR_VSMMD_PCS_ID1,
4062306a36Sopenharmony_ci	ETH_SR_VSMMD_PCS_ID2,
4162306a36Sopenharmony_ci	ETH_SR_VSMMD_STS,
4262306a36Sopenharmony_ci	ETH_SR_VSMMD_CTRL,
4362306a36Sopenharmony_ci	ETH_SR_MII_CTRL,
4462306a36Sopenharmony_ci	ETH_SR_MII_STS,
4562306a36Sopenharmony_ci	ETH_SR_MII_DEV_ID1,
4662306a36Sopenharmony_ci	ETH_SR_MII_DEV_ID2,
4762306a36Sopenharmony_ci	ETH_SR_MII_AN_ADV,
4862306a36Sopenharmony_ci	ETH_SR_MII_LP_BABL,
4962306a36Sopenharmony_ci	ETH_SR_MII_EXPN,
5062306a36Sopenharmony_ci	ETH_SR_MII_EXT_STS,
5162306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_ABL,
5262306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_TX_MAX_DLY_LWR,
5362306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_TX_MAX_DLY_UPR,
5462306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_TX_MIN_DLY_LWR,
5562306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_TX_MIN_DLY_UPR,
5662306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_RX_MAX_DLY_LWR,
5762306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_RX_MAX_DLY_UPR,
5862306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_RX_MIN_DLY_LWR,
5962306a36Sopenharmony_ci	ETH_SR_MII_TIME_SYNC_RX_MIN_DLY_UPR,
6062306a36Sopenharmony_ci	ETH_VR_MII_DIG_CTRL1,
6162306a36Sopenharmony_ci	ETH_VR_MII_AN_CTRL,
6262306a36Sopenharmony_ci	ETH_VR_MII_AN_INTR_STS,
6362306a36Sopenharmony_ci	ETH_VR_MII_TC,
6462306a36Sopenharmony_ci	ETH_VR_MII_DBG_CTRL,
6562306a36Sopenharmony_ci	ETH_VR_MII_EEE_MCTRL0,
6662306a36Sopenharmony_ci	ETH_VR_MII_EEE_TXTIMER,
6762306a36Sopenharmony_ci	ETH_VR_MII_EEE_RXTIMER,
6862306a36Sopenharmony_ci	ETH_VR_MII_LINK_TIMER_CTRL,
6962306a36Sopenharmony_ci	ETH_VR_MII_EEE_MCTRL1,
7062306a36Sopenharmony_ci	ETH_VR_MII_DIG_STS,
7162306a36Sopenharmony_ci	ETH_VR_MII_ICG_ERRCNT1,
7262306a36Sopenharmony_ci	ETH_VR_MII_GPIO,
7362306a36Sopenharmony_ci	ETH_VR_MII_EEE_LPI_STATUS,
7462306a36Sopenharmony_ci	ETH_VR_MII_EEE_WKERR,
7562306a36Sopenharmony_ci	ETH_VR_MII_MISC_STS,
7662306a36Sopenharmony_ci	ETH_VR_MII_RX_LSTS,
7762306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_TX_BSTCTRL0,
7862306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_TX_LVLCTRL0,
7962306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_TXGENCTRL0,
8062306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_TXGENCTRL1,
8162306a36Sopenharmony_ci	ETH_VR_MII_GEN4_TXGENCTRL2,
8262306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_TX_STS,
8362306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_RXGENCTRL0,
8462306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_RXGENCTRL1,
8562306a36Sopenharmony_ci	ETH_VR_MII_GEN4_RXEQ_CTRL,
8662306a36Sopenharmony_ci	ETH_VR_MII_GEN4_RXLOS_CTRL0,
8762306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_MPLL_CTRL0,
8862306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_MPLL_CTRL1,
8962306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_MPLL_STS,
9062306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_LVL_CTRL,
9162306a36Sopenharmony_ci	ETH_VR_MII_GEN4_MISC_CTRL2,
9262306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_MISC_CTRL0,
9362306a36Sopenharmony_ci	ETH_VR_MII_GEN2_GEN4_MISC_CTRL1,
9462306a36Sopenharmony_ci	ETH_VR_MII_SNPS_CR_CTRL,
9562306a36Sopenharmony_ci	ETH_VR_MII_SNPS_CR_ADDR,
9662306a36Sopenharmony_ci	ETH_VR_MII_SNPS_CR_DATA,
9762306a36Sopenharmony_ci	ETH_VR_MII_DIG_CTRL2,
9862306a36Sopenharmony_ci	ETH_VR_MII_DIG_ERRCNT,
9962306a36Sopenharmony_ci
10062306a36Sopenharmony_ci	/* Add new registers above */
10162306a36Sopenharmony_ci	MAX_LAN743X_ETH_SGMII_REGS
10262306a36Sopenharmony_ci};
10362306a36Sopenharmony_ci
10462306a36Sopenharmony_ciextern const struct ethtool_ops lan743x_ethtool_ops;
10562306a36Sopenharmony_ci
10662306a36Sopenharmony_ci#endif /* _LAN743X_ETHTOOL_H */
107