summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/microchip/lan743x_ethtool.h
blob: 267d5035b8ad8dc131ae68ef170d226a0f00f217 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
/* SPDX-License-Identifier: GPL-2.0+ */
/* Copyright (C) 2018 Microchip Technology Inc. */

#ifndef _LAN743X_ETHTOOL_H
#define _LAN743X_ETHTOOL_H

#include "linux/ethtool.h"

#define LAN743X_ETH_REG_VERSION         1

enum {
	ETH_PRIV_FLAGS,
	ETH_ID_REV,
	ETH_FPGA_REV,
	ETH_STRAP_READ,
	ETH_INT_STS,
	ETH_HW_CFG,
	ETH_PMT_CTL,
	ETH_E2P_CMD,
	ETH_E2P_DATA,
	ETH_MAC_CR,
	ETH_MAC_RX,
	ETH_MAC_TX,
	ETH_FLOW,
	ETH_MII_ACC,
	ETH_MII_DATA,
	ETH_EEE_TX_LPI_REQ_DLY,
	ETH_WUCSR,
	ETH_WK_SRC,

	/* Add new registers above */
	MAX_LAN743X_ETH_COMMON_REGS
};

enum {
	/* SGMII Register */
	ETH_SR_VSMMD_DEV_ID1,
	ETH_SR_VSMMD_DEV_ID2,
	ETH_SR_VSMMD_PCS_ID1,
	ETH_SR_VSMMD_PCS_ID2,
	ETH_SR_VSMMD_STS,
	ETH_SR_VSMMD_CTRL,
	ETH_SR_MII_CTRL,
	ETH_SR_MII_STS,
	ETH_SR_MII_DEV_ID1,
	ETH_SR_MII_DEV_ID2,
	ETH_SR_MII_AN_ADV,
	ETH_SR_MII_LP_BABL,
	ETH_SR_MII_EXPN,
	ETH_SR_MII_EXT_STS,
	ETH_SR_MII_TIME_SY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L_CTRL1,
	ETH_VR_MII_GEN2_GEN4_MPLL_STS,
	ETH_VR_MII_GEN2_GEN4_LVL_CTRL,
	ETH_VR_MII_GEN4_MISC_CTRL2,
	ETH_VR_MII_GEN2_GEN4_MISC_CTRL0,
	ETH_VR_MII_GEN2_GEN4_MISC_CTRL1,
	ETH_VR_MII_SNPS_CR_CTRL,
	ETH_VR_MII_SNPS_CR_ADDR,
	ETH_VR_MII_SNPS_CR_DATA,
	ETH_VR_MII_DIG_CTRL2,
	ETH_VR_MII_DIG_ERRCNT,

	/* Add new registers above */
	MAX_LAN743X_ETH_SGMII_REGS
};

extern const struct ethtool_ops lan743x_ethtool_ops;

#endif /* _LAN743X_ETHTOOL_H */