Go to the documentation of this file.
31 #ifndef _LAN8841_DRIVER_H
32 #define _LAN8841_DRIVER_H
38 #ifndef LAN8841_PHY_ADDR
39 #define LAN8841_PHY_ADDR 3
40 #elif (LAN8841_PHY_ADDR < 0 || LAN8841_PHY_ADDR > 31)
41 #error LAN8841_PHY_ADDR parameter is not valid
45 #define LAN8841_BMCR 0x00
46 #define LAN8841_BMSR 0x01
47 #define LAN8841_PHYID1 0x02
48 #define LAN8841_PHYID2 0x03
49 #define LAN8841_ANAR 0x04
50 #define LAN8841_ANLPAR 0x05
51 #define LAN8841_ANER 0x06
52 #define LAN8841_ANNPTR 0x07
53 #define LAN8841_ANNPRR 0x08
54 #define LAN8841_GBCR 0x09
55 #define LAN8841_GBSR 0x0A
56 #define LAN8841_MMDACR 0x0D
57 #define LAN8841_MMDAADR 0x0E
58 #define LAN8841_GBESR 0x0F
59 #define LAN8841_RLB 0x11
60 #define LAN8841_LINKMD 0x12
61 #define LAN8841_DPMAPCSS 0x13
62 #define LAN8841_RXERCTR 0x15
63 #define LAN8841_LED_MODE_SEL 0x16
64 #define LAN8841_LED_BEHAVIOR 0x17
65 #define LAN8841_OUT_CTRL 0x19
66 #define LAN8841_LEGACY_LED_MODE 0x1A
67 #define LAN8841_ISR 0x1B
68 #define LAN8841_AUTOMDI 0x1C
69 #define LAN8841_SPDC 0x1D
70 #define LAN8841_EXT_LOOPBACK 0x1E
71 #define LAN8841_PHYCON 0x1F
74 #define LAN8841_MEAN_SLICER_ERROR 0x01, 0x00E1
75 #define LAN8841_DCQ_MEAN_SQUARE_ERROR 0x01, 0x00E2
76 #define LAN8841_DCQ_MEAN_SQUARE_ERROR_WORST_CASE 0x01, 0x00E3
77 #define LAN8841_DCQ_SQI 0x01, 0x00E4
78 #define LAN8841_DCQ_PEAK_MSE 0x01, 0x00E5
79 #define LAN8841_DCQ_CTRL 0x01, 0x00E6
80 #define LAN8841_DCQ_CONFIG 0x01, 0x00E7
81 #define LAN8841_DCQ_SQI_TABLE 0x01, 0x00E8
82 #define LAN8841_COMMON_CTRL 0x02, 0x0000
83 #define LAN8841_STRAP_STAT 0x02, 0x0001
84 #define LAN8841_OP_MODE_STRAP_OVERRIDE 0x02, 0x0002
85 #define LAN8841_OP_MODE_STRAP 0x02, 0x0003
86 #define LAN8841_CLOCK_INV_CTRL_SIGNAL_PAD_SKEW 0x02, 0x0004
87 #define LAN8841_RGMII_RX_DATA_PAD_SKEW 0x02, 0x0005
88 #define LAN8841_RGMII_TX_DATA_PAD_SKEW 0x02, 0x0006
89 #define LAN8841_CLK_PAD_SKEW 0x02, 0x0008
90 #define LAN8841_SELF_TEST_PKT_COUNT_LO 0x02, 0x0009
91 #define LAN8841_SELF_TEST_PKT_COUNT_HI 0x02, 0x000A
92 #define LAN8841_SELF_TEST_STAT 0x02, 0x000B
93 #define LAN8841_SELF_TEST_FRAME_COUNT_EN 0x02, 0x000C
94 #define LAN8841_SELF_TEST_PGEN_EN 0x02, 0x000D
95 #define LAN8841_SELF_TEST_EN 0x02, 0x000E
96 #define LAN8841_WOL_CTRL 0x02, 0x0010
97 #define LAN8841_WOL_MAC_LO 0x02, 0x0011
98 #define LAN8841_WOL_MAC_MI 0x02, 0x0012
99 #define LAN8841_WOL_MAC_HI 0x02, 0x0013
100 #define LAN8841_CUSTOM_PKT0_CRC_LO 0x02, 0x0014
101 #define LAN8841_CUSTOM_PKT0_CRC_HI 0x02, 0x0015
102 #define LAN8841_CUSTOM_PKT1_CRC_LO 0x02, 0x0016
103 #define LAN8841_CUSTOM_PKT1_CRC_HI 0x02, 0x0017
104 #define LAN8841_CUSTOM_PKT2_CRC_LO 0x02, 0x0018
105 #define LAN8841_CUSTOM_PKT2_CRC_HI 0x02, 0x0019
106 #define LAN8841_CUSTOM_PKT3_CRC_LO 0x02, 0x001A
107 #define LAN8841_CUSTOM_PKT3_CRC_HI 0x02, 0x001B
108 #define LAN8841_CUSTOM_PKT0_MASK_LL 0x02, 0x001C
109 #define LAN8841_CUSTOM_PKT0_MASK_LH 0x02, 0x001D
110 #define LAN8841_CUSTOM_PKT0_MASK_HL 0x02, 0x001E
111 #define LAN8841_CUSTOM_PKT0_MASK_HH 0x02, 0x001F
112 #define LAN8841_CUSTOM_PKT1_MASK_LL 0x02, 0x0020
113 #define LAN8841_CUSTOM_PKT1_MASK_LH 0x02, 0x0021
114 #define LAN8841_CUSTOM_PKT1_MASK_HL 0x02, 0x0022
115 #define LAN8841_CUSTOM_PKT1_MASK_HH 0x02, 0x0023
116 #define LAN8841_CUSTOM_PKT2_MASK_LL 0x02, 0x0024
117 #define LAN8841_CUSTOM_PKT2_MASK_LH 0x02, 0x0025
118 #define LAN8841_CUSTOM_PKT2_MASK_HL 0x02, 0x0026
119 #define LAN8841_CUSTOM_PKT2_MASK_HH 0x02, 0x0027
120 #define LAN8841_CUSTOM_PKT3_MASK_LL 0x02, 0x0028
121 #define LAN8841_CUSTOM_PKT3_MASK_LH 0x02, 0x0029
122 #define LAN8841_CUSTOM_PKT3_MASK_HL 0x02, 0x002A
123 #define LAN8841_CUSTOM_PKT3_MASK_HH 0x02, 0x002B
124 #define LAN8841_WOL_CTRL_STAT 0x02, 0x002C
125 #define LAN8841_WOL_CUSTOM_PKT_RECEIVE_STAT 0x02, 0x002D
126 #define LAN8841_WOL_MAGIC_PKT_RECEIVE_STAT 0x02, 0x002E
127 #define LAN8841_WOL_DATA_MODULE_STAT 0x02, 0x002F
128 #define LAN8841_CUSTOM_PKT0_RCVD_CRC_L 0x02, 0x0030
129 #define LAN8841_CUSTOM_PKT0_RCVD_CRC_H 0x02, 0x0031
130 #define LAN8841_CUSTOM_PKT1_RCVD_CRC_L 0x02, 0x0032
131 #define LAN8841_CUSTOM_PKT1_RCVD_CRC_H 0x02, 0x0033
132 #define LAN8841_CUSTOM_PKT2_RCVD_CRC_L 0x02, 0x0034
133 #define LAN8841_CUSTOM_PKT2_RCVD_CRC_H 0x02, 0x0035
134 #define LAN8841_CUSTOM_PKT3_RCVD_CRC_L 0x02, 0x0036
135 #define LAN8841_CUSTOM_PKT3_RCVD_CRC_H 0x02, 0x0037
136 #define LAN8841_SELF_TEST_CORRECT_COUNT_LO 0x02, 0x003C
137 #define LAN8841_SELF_TEST_CORRECT_COUNT_HI 0x02, 0x003D
138 #define LAN8841_SELF_TEST_ERROR_COUNT_LO 0x02, 0x003E
139 #define LAN8841_SELF_TEST_ERROR_COUNT_HI 0x02, 0x003F
140 #define LAN8841_RX_DLL_CTRL 0x02, 0x004C
141 #define LAN8841_TX_DLL_CTRL 0x02, 0x004D
142 #define LAN8841_DRIVING_STRENGTH 0x02, 0x006F
143 #define LAN8841_GPIO_EN 0x02, 0x0080
144 #define LAN8841_GPIO_DIR 0x02, 0x0081
145 #define LAN8841_GPIO_BUF 0x02, 0x0082
146 #define LAN8841_GPIO_DATA_SEL1 0x02, 0x0083
147 #define LAN8841_GPIO_DATA_SEL2 0x02, 0x0084
148 #define LAN8841_GPIO_DATA 0x02, 0x0085
149 #define LAN8841_GPIO_INT_STS 0x02, 0x0086
150 #define LAN8841_GPIO_INT_EN 0x02, 0x0087
151 #define LAN8841_GPIO_INT_POL 0x02, 0x0088
152 #define LAN8841_PTP_CMD_CTL 0x02, 0x0100
153 #define LAN8841_PTP_GENERAL_CONFIG 0x02, 0x0101
154 #define LAN8841_PTP_REF_CLK_CFG 0x02, 0x0102
155 #define LAN8841_PTP_INT_STS 0x02, 0x0103
156 #define LAN8841_PTP_INT_EN 0x02, 0x0104
157 #define LAN8841_PTP_MOD_ERR 0x02, 0x0105
158 #define LAN8841_PTP_LTC_SET_SEC_HI 0x02, 0x0106
159 #define LAN8841_PTP_LTC_SET_SEC_MID 0x02, 0x0107
160 #define LAN8841_PTP_LTC_SET_SEC_LO 0x02, 0x0108
161 #define LAN8841_PTP_LTC_SET_NS_HI 0x02, 0x0109
162 #define LAN8841_PTP_LTC_SET_NS_LO 0x02, 0x010A
163 #define LAN8841_PTP_LTC_SET_SUBNS_HI 0x02, 0x010B
164 #define LAN8841_PTP_LTC_SET_SUBNS_LO 0x02, 0x010C
165 #define LAN8841_PTP_LTC_RATE_ADJ_HI 0x02, 0x010D
166 #define LAN8841_PTP_LTC_RATE_ADJ_LO 0x02, 0x010E
167 #define LAN8841_PTP_LTC_TEMP_RATE_ADJ_HI 0x02, 0x010F
168 #define LAN8841_PTP_LTC_TEMP_RATE_ADJ_LO 0x02, 0x0110
169 #define LAN8841_PTP_LTC_TEMP_RATE_DURATION_HI 0x02, 0x0111
170 #define LAN8841_PTP_LTC_TEMP_RATE_DURATION_LO 0x02, 0x0112
171 #define LAN8841_PTP_LTC_STEP_ADJ_HI 0x02, 0x0113
172 #define LAN8841_PTP_LTC_STEP_ADJ_LO 0x02, 0x0114
173 #define LAN8841_PTP_LTC_EXT_ADJ_CFG 0x02, 0x0115
174 #define LAN8841_PTP_LTC_TARGET_SEC_HI_A 0x02, 0x0116
175 #define LAN8841_PTP_LTC_TARGET_SEC_LO_A 0x02, 0x0117
176 #define LAN8841_PTP_LTC_TARGET_NS_HI_A 0x02, 0x0118
177 #define LAN8841_PTP_LTC_TARGET_NS_LO_A 0x02, 0x0119
178 #define LAN8841_PTP_LTC_TARGET_RELOAD_SEC_HI_A 0x02, 0x011A
179 #define LAN8841_PTP_LTC_TARGET_RELOAD_SEC_LO_A 0x02, 0x011B
180 #define LAN8841_PTP_LTC_TARGET_RELOAD_NS_HI_A 0x02, 0x011C
181 #define LAN8841_PTP_LTC_TARGET_RELOAD_NS_LO_A 0x02, 0x011D
182 #define LAN8841_PTP_LTC_TARGET_ACT_NS_HI_A 0x02, 0x011E
183 #define LAN8841_PTP_LTC_TARGET_ACT_NS_LO_A 0x02, 0x011F
184 #define LAN8841_PTP_LTC_TARGET_SEC_HI_B 0x02, 0x0120
185 #define LAN8841_PTP_LTC_TARGET_SEC_LO_B 0x02, 0x0121
186 #define LAN8841_PTP_LTC_TARGET_NS_HI_B 0x02, 0x0122
187 #define LAN8841_PTP_LTC_TARGET_NS_LO_B 0x02, 0x0123
188 #define LAN8841_PTP_LTC_TARGET_RELOAD_SEC_HI_B 0x02, 0x0124
189 #define LAN8841_PTP_LTC_TARGET_RELOAD_SEC_LO_B 0x02, 0x0125
190 #define LAN8841_PTP_LTC_TARGET_RELOAD_NS_HI_B 0x02, 0x0126
191 #define LAN8841_PTP_LTC_TARGET_RELOAD_NS_LO_B 0x02, 0x0127
192 #define LAN8841_PTP_LTC_TARGET_ACT_NS_HI_B 0x02, 0x0128
193 #define LAN8841_PTP_LTC_TARGET_ACT_NS_LO_B 0x02, 0x0129
194 #define LAN8841_PTP_RX_USER_MAC_HI 0x02, 0x012A
195 #define LAN8841_PTP_RX_USER_MAC_MID 0x02, 0x012B
196 #define LAN8841_PTP_RX_USER_MAC_LO 0x02, 0x012C
197 #define LAN8841_PTP_RX_USER_IP_ADDR0 0x02, 0x012D
198 #define LAN8841_PTP_RX_USER_IP_ADDR1 0x02, 0x012E
199 #define LAN8841_PTP_RX_USER_IP_ADDR2 0x02, 0x012F
200 #define LAN8841_PTP_RX_USER_IP_ADDR3 0x02, 0x0130
201 #define LAN8841_PTP_RX_USER_IP_ADDR4 0x02, 0x0131
202 #define LAN8841_PTP_RX_USER_IP_ADDR5 0x02, 0x0132
203 #define LAN8841_PTP_RX_USER_IP_ADDR6 0x02, 0x0133
204 #define LAN8841_PTP_RX_USER_IP_ADDR7 0x02, 0x0134
205 #define LAN8841_PTP_RX_USER_IP_MASK0 0x02, 0x0135
206 #define LAN8841_PTP_RX_USER_IP_MASK1 0x02, 0x0136
207 #define LAN8841_PTP_RX_USER_IP_MASK2 0x02, 0x0137
208 #define LAN8841_PTP_RX_USER_IP_MASK3 0x02, 0x0138
209 #define LAN8841_PTP_RX_USER_IP_MASK4 0x02, 0x0139
210 #define LAN8841_PTP_RX_USER_IP_MASK5 0x02, 0x013A
211 #define LAN8841_PTP_RX_USER_IP_MASK6 0x02, 0x013B
212 #define LAN8841_PTP_RX_USER_IP_MASK7 0x02, 0x013C
213 #define LAN8841_VLAN_TYPE_ID 0x02, 0x013D
214 #define LAN8841_VLAN1_TYPE_ID 0x02, 0x013E
215 #define LAN8841_VLAN1_ID_MASK 0x02, 0x013F
216 #define LAN8841_VLAN1_VID_RANGE_UP 0x02, 0x0140
217 #define LAN8841_VLAN1_VID_RANGE_LO 0x02, 0x0141
218 #define LAN8841_VLAN2_TYPE_ID 0x02, 0x0142
219 #define LAN8841_VLAN2_ID_MASK 0x02, 0x0143
220 #define LAN8841_VLAN2_VID_RANGE_UP 0x02, 0x0144
221 #define LAN8841_VLAN2_VID_RANGE_LO 0x02, 0x0145
222 #define LAN8841_LLC_TYPE_ID 0x02, 0x0146
223 #define LAN8841_PTP_GPIO_SEL 0x02, 0x0147
224 #define LAN8841_PTP_RX_LATENCY_10 0x02, 0x0148
225 #define LAN8841_PTP_TX_LATENCY_10 0x02, 0x0149
226 #define LAN8841_PTP_RX_LATENCY_100 0x02, 0x014A
227 #define LAN8841_PTP_TX_LATENCY_100 0x02, 0x014B
228 #define LAN8841_PTP_RX_LATENCY_1000 0x02, 0x014C
229 #define LAN8841_PTP_TX_LATENCY_1000 0x02, 0x014D
230 #define LAN8841_PTP_ASYM_DLY_HI 0x02, 0x014E
231 #define LAN8841_PTP_ASYM_DLY_LO 0x02, 0x014F
232 #define LAN8841_PTP_PEERDLY_HI 0x02, 0x0150
233 #define LAN8841_PTP_PEERDLY_LO 0x02, 0x0151
234 #define LAN8841_PTP_CAP_INFO 0x02, 0x0152
235 #define LAN8841_PTP_TX_USER_MAC_HI 0x02, 0x0153
236 #define LAN8841_PTP_TX_USER_MAC_MID 0x02, 0x0154
237 #define LAN8841_PTP_TX_USER_MAC_LO 0x02, 0x0155
238 #define LAN8841_PTP_TX_USER_IP_ADDR0 0x02, 0x0156
239 #define LAN8841_PTP_TX_USER_IP_ADDR1 0x02, 0x0157
240 #define LAN8841_PTP_TX_USER_IP_ADDR2 0x02, 0x0158
241 #define LAN8841_PTP_TX_USER_IP_ADDR3 0x02, 0x0159
242 #define LAN8841_PTP_TX_USER_IP_ADDR4 0x02, 0x015A
243 #define LAN8841_PTP_TX_USER_IP_ADDR5 0x02, 0x015B
244 #define LAN8841_PTP_TX_USER_IP_ADDR6 0x02, 0x015C
245 #define LAN8841_PTP_TX_USER_IP_ADDR7 0x02, 0x015D
246 #define LAN8841_PTP_TX_USER_IP_MASK0 0x02, 0x015E
247 #define LAN8841_PTP_TX_USER_IP_MASK1 0x02, 0x015F
248 #define LAN8841_PTP_TX_USER_IP_MASK2 0x02, 0x0160
249 #define LAN8841_PTP_TX_USER_IP_MASK3 0x02, 0x0161
250 #define LAN8841_PTP_TX_USER_IP_MASK4 0x02, 0x0162
251 #define LAN8841_PTP_TX_USER_IP_MASK5 0x02, 0x0163
252 #define LAN8841_PTP_TX_USER_IP_MASK6 0x02, 0x0164
253 #define LAN8841_PTP_TX_USER_IP_MASK7 0x02, 0x0165
254 #define LAN8841_PTP_LTC_RD_SEC_HI 0x02, 0x0166
255 #define LAN8841_PTP_LTC_RD_SEC_MID 0x02, 0x0167
256 #define LAN8841_PTP_LTC_RD_SEC_LO 0x02, 0x0168
257 #define LAN8841_PTP_LTC_RD_NS_HI 0x02, 0x0169
258 #define LAN8841_PTP_LTC_RD_NS_LO 0x02, 0x016A
259 #define LAN8841_PTP_LTC_RD_SUBNS_HI 0x02, 0x016B
260 #define LAN8841_PTP_LTC_RD_SUBNS_LO 0x02, 0x016C
261 #define LAN8841_PTP_REV 0x02, 0x016D
262 #define LAN8841_PTP_SPARE 0x02, 0x016E
263 #define LAN8841_PTP_RX_PARSE_CONFIG 0x02, 0x0170
264 #define LAN8841_PTP_RX_PARSE_VLAN_CONFIG 0x02, 0x0171
265 #define LAN8841_PTP_RX_PARSE_L2_ADDR_EN 0x02, 0x0172
266 #define LAN8841_PTP_RX_PARSE_IP_ADDR_EN 0x02, 0x0173
267 #define LAN8841_PTP_RX_PARSE_UDP_SRC_PORT 0x02, 0x0174
268 #define LAN8841_PTP_RX_PARSE_UDP_DEST_PORT 0x02, 0x0175
269 #define LAN8841_PTP_RX_VERSION 0x02, 0x0176
270 #define LAN8841_PTP_RX_DOMAIN_DOMAIN_LO 0x02, 0x0177
271 #define LAN8841_PTP_RX_DOMAIN_MASK_DOMAIN_UP 0x02, 0x0178
272 #define LAN8841_PTP_RX_SDOID_SDOID_LO 0x02, 0x0179
273 #define LAN8841_PTP_RX_SDOID_MASK_SDOID_UP 0x02, 0x017A
274 #define LAN8841_PTP_RX_TIMESTAMP_EN 0x02, 0x017B
275 #define LAN8841_PTP_RX_TIMESTAMP_CONFIG 0x02, 0x017C
276 #define LAN8841_PTP_RX_MOD 0x02, 0x017D
277 #define LAN8841_PTP_RX_RSVD_BYTE_CFG 0x02, 0x017E
278 #define LAN8841_PTP_RX_TAIL_TAG 0x02, 0x017F
279 #define LAN8841_PTP_RX_CF_MOD_EN 0x02, 0x0180
280 #define LAN8841_PTP_RX_CF_CFG 0x02, 0x0181
281 #define LAN8841_PTP_RX_INGRESS_NS_HI 0x02, 0x0182
282 #define LAN8841_PTP_RX_INGRESS_NS_LO 0x02, 0x0183
283 #define LAN8841_PTP_RX_INGRESS_SEC_HI 0x02, 0x0184
284 #define LAN8841_PTP_RX_INGRESS_SEC_LO 0x02, 0x0185
285 #define LAN8841_PTP_RX_MSG_HEADER1 0x02, 0x0186
286 #define LAN8841_PTP_RX_MSG_HEADER2 0x02, 0x0187
287 #define LAN8841_PTP_RX_PDREQ_SEC_HI 0x02, 0x0188
288 #define LAN8841_PTP_RX_PDREQ_SEC_MID 0x02, 0x0189
289 #define LAN8841_PTP_RX_PDREQ_SEC_LOW 0x02, 0x018A
290 #define LAN8841_PTP_RX_PDREQ_NS_HI 0x02, 0x018B
291 #define LAN8841_PTP_RX_PDREQ_NS_LO 0x02, 0x018C
292 #define LAN8841_PTP_RX_RAW_TS_SEC 0x02, 0x018D
293 #define LAN8841_PTP_RX_RAW_TS_NS_HI 0x02, 0x018E
294 #define LAN8841_PTP_RX_RAW_TS_NS_LO 0x02, 0x018F
295 #define LAN8841_PTP_RX_CHKSUM_DROPPED_CNT_HI 0x02, 0x0190
296 #define LAN8841_PTP_RX_CHKSUM_DROPPED_CNT_LO 0x02, 0x0191
297 #define LAN8841_PTP_RX_FRMS_MOD_CNT_HI 0x02, 0x0192
298 #define LAN8841_PTP_RX_FRMS_MOD_CNT_LO 0x02, 0x0193
299 #define LAN8841_PTP_TX_PARSE_CONFIG 0x02, 0x01B0
300 #define LAN8841_PTP_TX_PARSE_VLAN_CONFIG 0x02, 0x01B1
301 #define LAN8841_PTP_TX_PARSE_L2_ADDR_EN 0x02, 0x01B2
302 #define LAN8841_PTP_TX_PARSE_IP_ADDR_EN 0x02, 0x01B3
303 #define LAN8841_PTP_TX_PARSE_UDP_SRC_PORT 0x02, 0x01B4
304 #define LAN8841_PTP_TX_PARSE_UDP_DEST_PORT 0x02, 0x01B5
305 #define LAN8841_PTP_TX_VERSION 0x02, 0x01B6
306 #define LAN8841_PTP_TX_DOMAIN_DOMAIN_LO 0x02, 0x01B7
307 #define LAN8841_PTP_TX_DOMAIN_MASK_DOMAIN_UP 0x02, 0x01B8
308 #define LAN8841_PTP_TX_SDOID_SDOID_LO 0x02, 0x01B9
309 #define LAN8841_PTP_TX_SDOID_MASK_SDOID_UP 0x02, 0x01BA
310 #define LAN8841_PTP_TX_TIMESTAMP_EN 0x02, 0x01BB
311 #define LAN8841_PTP_TX_TIMESTAMP_CONFIG 0x02, 0x01BC
312 #define LAN8841_PTP_TX_MOD 0x02, 0x01BD
313 #define LAN8841_PTP_TX_RSVD_BYTE_CFG 0x02, 0x01BE
314 #define LAN8841_PTP_TX_TAIL_TAG 0x02, 0x01BF
315 #define LAN8841_PTP_TX_CF_MOD_EN 0x02, 0x01C0
316 #define LAN8841_PTP_TX_CF_CFG 0x02, 0x01C1
317 #define LAN8841_PTP_TX_EGRESS_NS_HI 0x02, 0x01C2
318 #define LAN8841_PTP_TX_EGRESS_NS_LO 0x02, 0x01C3
319 #define LAN8841_PTP_TX_EGRESS_SEC_HI 0x02, 0x01C4
320 #define LAN8841_PTP_TX_EGRESS_SEC_LO 0x02, 0x01C5
321 #define LAN8841_PTP_TX_MSG_HEADER1 0x02, 0x01C6
322 #define LAN8841_PTP_TX_MSG_HEADER2 0x02, 0x01C7
323 #define LAN8841_PTP_TX_SYNC_SEC_HI 0x02, 0x01C8
324 #define LAN8841_PTP_TX_SYNC_SEC_MID 0x02, 0x01C9
325 #define LAN8841_PTP_TX_SYNC_SEC_LOW 0x02, 0x01CA
326 #define LAN8841_PTP_TX_SYNC_NS_HI 0x02, 0x01CB
327 #define LAN8841_PTP_TX_SYNC_NS_LO 0x02, 0x01CC
328 #define LAN8841_PTP_TX_PDRESP_SEC_HI 0x02, 0x01CD
329 #define LAN8841_PTP_TX_PDRESP_SEC_MID 0x02, 0x01CE
330 #define LAN8841_PTP_TX_PDRESP_SEC_LOW 0x02, 0x01CF
331 #define LAN8841_PTP_TX_PDRESP_NS_HI 0x02, 0x01D0
332 #define LAN8841_PTP_TX_PDRESP_NS_LO 0x02, 0x01D1
333 #define LAN8841_PTP_TX_RAW_TS_SEC 0x02, 0x01D2
334 #define LAN8841_PTP_TX_RAW_TS_NS_HI 0x02, 0x01D3
335 #define LAN8841_PTP_TX_RAW_TS_NS_LO 0x02, 0x01D4
336 #define LAN8841_PTP_TX_CHKSUM_DROPPED_CNT_HI 0x02, 0x01D5
337 #define LAN8841_PTP_TX_CHKSUM_DROPPED_CNT_LO 0x02, 0x01D6
338 #define LAN8841_PTP_TX_FRMS_MOD_CNT_HI 0x02, 0x01D7
339 #define LAN8841_PTP_TX_FRMS_MOD_CNT_LO 0x02, 0x01D8
340 #define LAN8841_PTP_GPIO_CAP_EN 0x02, 0x01F0
341 #define LAN8841_PTP_GPIO_CAP_LOCK 0x02, 0x01F1
342 #define LAN8841_PTP_GPIO_RE_LTC_SEC_HI_CAP_X 0x02, 0x01F2
343 #define LAN8841_PTP_GPIO_RE_LTC_SEC_LO_CAP_X 0x02, 0x01F3
344 #define LAN8841_PTP_GPIO_RE_LTC_NS_HI_CAP_X 0x02, 0x01F4
345 #define LAN8841_PTP_GPIO_RE_LTC_NS_LO_CAP_X 0x02, 0x01F5
346 #define LAN8841_PTP_GPIO_FE_LTC_SEC_HI_CAP_X 0x02, 0x01F6
347 #define LAN8841_PTP_GPIO_FE_LTC_SEC_LO_CAP_X 0x02, 0x01F7
348 #define LAN8841_PTP_GPIO_FE_LTC_NS_HI_CAP_X 0x02, 0x01F8
349 #define LAN8841_PTP_GPIO_FE_LTC_NS_LO_CAP_X 0x02, 0x01F9
350 #define LAN8841_PTP_GPIO_CAP_STS 0x02, 0x01FA
351 #define LAN8841_PTP_GPIO_INT_CLR_CFG 0x02, 0x01FB
352 #define LAN8841_PTP_DEBUG_SEL 0x02, 0x01FE
353 #define LAN8841_PCS_CTRL1 0x03, 0x0000
354 #define LAN8841_PCS_STAT1 0x03, 0x0001
355 #define LAN8841_EEE_QUIET_TIMER 0x03, 0x0008
356 #define LAN8841_EEE_UPDATE_TIMER 0x03, 0x0009
357 #define LAN8841_EEE_LINK_FAIL_TIMER 0x03, 0x000A
358 #define LAN8841_EEE_POST_UPDATE_TIMER 0x03, 0x000B
359 #define LAN8841_EEE_WAIT_WQ_TIMER 0x03, 0x000C
360 #define LAN8841_EEE_WAKE_TIMER 0x03, 0x000D
361 #define LAN8841_EEE_WAKE_TX_TIMER 0x03, 0x000E
362 #define LAN8841_EEE_WAKE_MZ_TIMER 0x03, 0x000F
363 #define LAN8841_EEE_CTRL_CAPABILITY 0x03, 0x0014
364 #define LAN8841_EEE_WAKE_ERROR_COUNTER 0x03, 0x0016
365 #define LAN8841_EEE_100_TIMER0 0x03, 0x0018
366 #define LAN8841_EEE_100_TIMER1 0x03, 0x0019
367 #define LAN8841_EEE_100_TIMER2 0x03, 0x001A
368 #define LAN8841_EEE_100_TIMER3 0x03, 0x001B
369 #define LAN8841_EEE_ADV 0x07, 0x003C
370 #define LAN8841_EEE_LP_ABILITY 0x07, 0x003D
371 #define LAN8841_EEE_LP_ABILITY_OVERRIDE 0x07, 0x003E
372 #define LAN8841_EEE_MSG_CODE 0x07, 0x003F
373 #define LAN8841_XTAL_CTRL 0x1C, 0x0001
374 #define LAN8841_AFED_CTRL 0x1C, 0x0009
375 #define LAN8841_LDO_CTRL 0x1C, 0x000E
376 #define LAN8841_EDPD_CTRL 0x1C, 0x0024
377 #define LAN8841_EMITX_CTRL 0x1C, 0x0025
378 #define LAN8841_EMITX_COEFF 0x1C, 0x0026
381 #define LAN8841_BMCR_RESET 0x8000
382 #define LAN8841_BMCR_LOOPBACK 0x4000
383 #define LAN8841_BMCR_SPEED_SEL_LSB 0x2000
384 #define LAN8841_BMCR_AN_EN 0x1000
385 #define LAN8841_BMCR_POWER_DOWN 0x0800
386 #define LAN8841_BMCR_ISOLATE 0x0400
387 #define LAN8841_BMCR_RESTART_AN 0x0200
388 #define LAN8841_BMCR_DUPLEX_MODE 0x0100
389 #define LAN8841_BMCR_COL_TEST 0x0080
390 #define LAN8841_BMCR_SPEED_SEL_MSB 0x0040
393 #define LAN8841_BMSR_100BT4 0x8000
394 #define LAN8841_BMSR_100BTX_FD 0x4000
395 #define LAN8841_BMSR_100BTX_HD 0x2000
396 #define LAN8841_BMSR_10BT_FD 0x1000
397 #define LAN8841_BMSR_10BT_HD 0x0800
398 #define LAN8841_BMSR_100BT2_FD 0x0400
399 #define LAN8841_BMSR_100BT2_HD 0x0200
400 #define LAN8841_BMSR_EXTENDED_STATUS 0x0100
401 #define LAN8841_BMSR_UNIDIRECTIONAL_ABLE 0x0080
402 #define LAN8841_BMSR_MF_PREAMBLE_SUPPR 0x0040
403 #define LAN8841_BMSR_AN_COMPLETE 0x0020
404 #define LAN8841_BMSR_REMOTE_FAULT 0x0010
405 #define LAN8841_BMSR_AN_CAPABLE 0x0008
406 #define LAN8841_BMSR_LINK_STATUS 0x0004
407 #define LAN8841_BMSR_JABBER_DETECT 0x0002
408 #define LAN8841_BMSR_EXTENDED_CAPABLE 0x0001
411 #define LAN8841_PHYID1_PHY_ID_MSB 0xFFFF
412 #define LAN8841_PHYID1_PHY_ID_MSB_DEFAULT 0x0022
415 #define LAN8841_PHYID2_PHY_ID_LSB 0xFC00
416 #define LAN8841_PHYID2_PHY_ID_LSB_DEFAULT 0x1400
417 #define LAN8841_PHYID2_MODEL_NUM 0x03F0
418 #define LAN8841_PHYID2_MODEL_NUM_DEFAULT 0x0250
419 #define LAN8841_PHYID2_REVISION_NUM 0x000F
422 #define LAN8841_ANAR_NEXT_PAGE 0x8000
423 #define LAN8841_ANAR_REMOTE_FAULT 0x2000
424 #define LAN8841_ANAR_EXTENDED_NEXT_PAGE 0x1000
425 #define LAN8841_ANAR_ASYM_PAUSE 0x0800
426 #define LAN8841_ANAR_SYM_PAUSE 0x0400
427 #define LAN8841_ANAR_100BT4 0x0200
428 #define LAN8841_ANAR_100BTX_FD 0x0100
429 #define LAN8841_ANAR_100BTX_HD 0x0080
430 #define LAN8841_ANAR_10BT_FD 0x0040
431 #define LAN8841_ANAR_10BT_HD 0x0020
432 #define LAN8841_ANAR_SELECTOR 0x001F
433 #define LAN8841_ANAR_SELECTOR_DEFAULT 0x0001
436 #define LAN8841_ANLPAR_NEXT_PAGE 0x8000
437 #define LAN8841_ANLPAR_ACK 0x4000
438 #define LAN8841_ANLPAR_REMOTE_FAULT 0x2000
439 #define LAN8841_ANLPAR_EXTENDED_NEXT_PAGE 0x1000
440 #define LAN8841_ANLPAR_ASYM_PAUSE 0x0800
441 #define LAN8841_ANLPAR_PAUSE 0x0400
442 #define LAN8841_ANLPAR_100BT4 0x0200
443 #define LAN8841_ANLPAR_100BTX_FD 0x0100
444 #define LAN8841_ANLPAR_100BTX_HD 0x0080
445 #define LAN8841_ANLPAR_10BT_FD 0x0040
446 #define LAN8841_ANLPAR_10BT_HD 0x0020
447 #define LAN8841_ANLPAR_SELECTOR 0x001F
448 #define LAN8841_ANLPAR_SELECTOR_DEFAULT 0x0001
451 #define LAN8841_ANER_RECEIVE_NP_LOC_ABLE 0x0040
452 #define LAN8841_ANER_RECEIVE_NP_STOR_LOC 0x0020
453 #define LAN8841_ANER_PAR_DETECT_FAULT 0x0010
454 #define LAN8841_ANER_LP_NEXT_PAGE_ABLE 0x0008
455 #define LAN8841_ANER_NEXT_PAGE_ABLE 0x0004
456 #define LAN8841_ANER_PAGE_RECEIVED 0x0002
457 #define LAN8841_ANER_LP_AN_ABLE 0x0001
460 #define LAN8841_ANNPTR_NEXT_PAGE 0x8000
461 #define LAN8841_ANNPTR_MSG_PAGE 0x2000
462 #define LAN8841_ANNPTR_ACK2 0x1000
463 #define LAN8841_ANNPTR_TOGGLE 0x0800
464 #define LAN8841_ANNPTR_MESSAGE 0x07FF
467 #define LAN8841_ANNPRR_NEXT_PAGE 0x8000
468 #define LAN8841_ANNPRR_ACK 0x4000
469 #define LAN8841_ANNPRR_MSG_PAGE 0x2000
470 #define LAN8841_ANNPRR_ACK2 0x1000
471 #define LAN8841_ANNPRR_TOGGLE 0x0800
472 #define LAN8841_ANNPRR_MESSAGE 0x07FF
475 #define LAN8841_GBCR_TEST_MODE 0xE000
476 #define LAN8841_GBCR_MS_MAN_CONF_EN 0x1000
477 #define LAN8841_GBCR_MS_MAN_CONF_VAL 0x0800
478 #define LAN8841_GBCR_PORT_TYPE 0x0400
479 #define LAN8841_GBCR_1000BT_FD 0x0200
480 #define LAN8841_GBCR_1000BT_HD 0x0100
483 #define LAN8841_GBSR_MS_CONF_FAULT 0x8000
484 #define LAN8841_GBSR_MS_CONF_RES 0x4000
485 #define LAN8841_GBSR_LOCAL_RECEIVER_STATUS 0x2000
486 #define LAN8841_GBSR_REMOTE_RECEIVER_STATUS 0x1000
487 #define LAN8841_GBSR_LP_1000BT_FD 0x0800
488 #define LAN8841_GBSR_LP_1000BT_HD 0x0400
489 #define LAN8841_GBSR_IDLE_ERR_COUNT 0x00FF
492 #define LAN8841_MMDACR_FUNC 0xC000
493 #define LAN8841_MMDACR_FUNC_ADDR 0x0000
494 #define LAN8841_MMDACR_FUNC_DATA_NO_POST_INC 0x4000
495 #define LAN8841_MMDACR_FUNC_DATA_POST_INC_RW 0x8000
496 #define LAN8841_MMDACR_FUNC_DATA_POST_INC_W 0xC000
497 #define LAN8841_MMDACR_DEVAD 0x001F
500 #define LAN8841_GBESR_1000BX_FD 0x8000
501 #define LAN8841_GBESR_1000BX_HD 0x4000
502 #define LAN8841_GBESR_1000BT_FD 0x2000
503 #define LAN8841_GBESR_1000BT_HD 0x1000
506 #define LAN8841_RLB_REMOTE_LOOPBACK 0x0100
509 #define LAN8841_LINKMD_TEST_EN 0x8000
510 #define LAN8841_LINKMD_TX_DIS 0x4000
511 #define LAN8841_LINKMD_PAIR 0x3000
512 #define LAN8841_LINKMD_PAIR_A 0x0000
513 #define LAN8841_LINKMD_PAIR_B 0x1000
514 #define LAN8841_LINKMD_PAIR_C 0x2000
515 #define LAN8841_LINKMD_PAIR_D 0x3000
516 #define LAN8841_LINKMD_SEL 0x0C00
517 #define LAN8841_LINKMD_STATUS 0x0300
518 #define LAN8841_LINKMD_STATUS_NORMAL 0x0000
519 #define LAN8841_LINKMD_STATUS_OPEN 0x0100
520 #define LAN8841_LINKMD_STATUS_SHORT 0x0200
521 #define LAN8841_LINKMD_STATUS_TEST_FAILED 0x0300
522 #define LAN8841_LINKMD_FAULT_DATA 0x00FF
525 #define LAN8841_DPMAPCSS_1000BT_LINK_STATUS 0x0002
526 #define LAN8841_DPMAPCSS_100BTX_LINK_STATUS 0x0001
529 #define LAN8841_LED_MODE_SEL_LED4_CONFIG 0xF000
530 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_LINK_ACT 0x0000
531 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_LINK_1000_ACT 0x1000
532 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_LINK_100_ACT 0x2000
533 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_LINK_10_ACT 0x3000
534 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_LINK_100_1000_ACT 0x4000
535 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_LINK_10_1000_ACT 0x5000
536 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_LINK_10_100_ACT 0x6000
537 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_DUPLEX_COL 0x8000
538 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_COL 0x9000
539 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_ACT 0xA000
540 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_AN_FAULT 0xC000
541 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_OFF 0xE000
542 #define LAN8841_LED_MODE_SEL_LED4_CONFIG_ON 0xF000
543 #define LAN8841_LED_MODE_SEL_LED3_CONFIG 0x0F00
544 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_LINK_ACT 0x0000
545 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_LINK_1000_ACT 0x0100
546 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_LINK_100_ACT 0x0200
547 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_LINK_10_ACT 0x0300
548 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_LINK_100_1000_ACT 0x0400
549 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_LINK_10_1000_ACT 0x0500
550 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_LINK_10_100_ACT 0x0600
551 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_DUPLEX_COL 0x0800
552 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_COL 0x0900
553 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_ACT 0x0A00
554 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_AN_FAULT 0x0C00
555 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_OFF 0x0E00
556 #define LAN8841_LED_MODE_SEL_LED3_CONFIG_ON 0x0F00
557 #define LAN8841_LED_MODE_SEL_LED2_CONFIG 0x00F0
558 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_LINK_ACT 0x0000
559 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_LINK_1000_ACT 0x0010
560 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_LINK_100_ACT 0x0020
561 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_LINK_10_ACT 0x0030
562 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_LINK_100_1000_ACT 0x0040
563 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_LINK_10_1000_ACT 0x0050
564 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_LINK_10_100_ACT 0x0060
565 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_DUPLEX_COL 0x0080
566 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_COL 0x0090
567 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_ACT 0x00A0
568 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_AN_FAULT 0x00C0
569 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_OFF 0x00E0
570 #define LAN8841_LED_MODE_SEL_LED2_CONFIG_ON 0x00F0
571 #define LAN8841_LED_MODE_SEL_LED1_CONFIG 0x000F
572 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_LINK_ACT 0x0000
573 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_LINK_1000_ACT 0x0001
574 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_LINK_100_ACT 0x0002
575 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_LINK_10_ACT 0x0003
576 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_LINK_100_1000_ACT 0x0004
577 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_LINK_10_1000_ACT 0x0005
578 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_LINK_10_100_ACT 0x0006
579 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_DUPLEX_COL 0x0008
580 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_COL 0x0009
581 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_ACT 0x000A
582 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_AN_FAULT 0x000C
583 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_OFF 0x000E
584 #define LAN8841_LED_MODE_SEL_LED1_CONFIG_ON 0x000F
587 #define LAN8841_LED_BEHAVIOR_LED_ACT_OUT_SEL 0x4000
588 #define LAN8841_LED_BEHAVIOR_LED_PULSING_EN 0x1000
589 #define LAN8841_LED_BEHAVIOR_LED_BLINK_RATE 0x0C00
590 #define LAN8841_LED_BEHAVIOR_LED_BLINK_RATE_2_5HZ 0x0000
591 #define LAN8841_LED_BEHAVIOR_LED_BLINK_RATE_5HZ 0x0400
592 #define LAN8841_LED_BEHAVIOR_LED_BLINK_RATE_10HZ 0x0800
593 #define LAN8841_LED_BEHAVIOR_LED_BLINK_RATE_20HZ 0x0C00
594 #define LAN8841_LED_BEHAVIOR_LED_PULSE_STRECH_EN 0x01E0
595 #define LAN8841_LED_BEHAVIOR_LED_PULSE_STRECH_EN_LED4 0x0100
596 #define LAN8841_LED_BEHAVIOR_LED_PULSE_STRECH_EN_LED3 0x0080
597 #define LAN8841_LED_BEHAVIOR_LED_PULSE_STRECH_EN_LED2 0x0040
598 #define LAN8841_LED_BEHAVIOR_LED_PULSE_STRECH_EN_LED1 0x0020
599 #define LAN8841_LED_BEHAVIOR_LED_COMBINATION_DIS 0x000F
600 #define LAN8841_LED_BEHAVIOR_LED_COMBINATION_DIS_LED4 0x0008
601 #define LAN8841_LED_BEHAVIOR_LED_COMBINATION_DIS_LED3 0x0004
602 #define LAN8841_LED_BEHAVIOR_LED_COMBINATION_DIS_LED2 0x0002
603 #define LAN8841_LED_BEHAVIOR_LED_COMBINATION_DIS_LED1 0x0001
606 #define LAN8841_OUT_CTRL_MDIO_BUFFER_TYPE 0x8000
607 #define LAN8841_OUT_CTRL_INT_BUFFER_TYPE 0x4000
608 #define LAN8841_OUT_CTRL_LED_BUFFER_TYPE 0x3F00
609 #define LAN8841_OUT_CTRL_LED_BUFFER_TYPE_LED4 0x0800
610 #define LAN8841_OUT_CTRL_LED_BUFFER_TYPE_LED3 0x0400
611 #define LAN8841_OUT_CTRL_LED_BUFFER_TYPE_LED2 0x0200
612 #define LAN8841_OUT_CTRL_LED_BUFFER_TYPE_LED1 0x0100
613 #define LAN8841_OUT_CTRL_PME_POLARITY 0x0080
614 #define LAN8841_OUT_CTRL_LED_POLARITY 0x003F
615 #define LAN8841_OUT_CTRL_LED_POLARITY_LED4 0x0008
616 #define LAN8841_OUT_CTRL_LED_POLARITY_LED3 0x0004
617 #define LAN8841_OUT_CTRL_LED_POLARITY_LED2 0x0002
618 #define LAN8841_OUT_CTRL_LED_POLARITY_LED1 0x0001
621 #define LAN8841_LEGACY_LED_MODE_KSZ9031_LED_MODE 0x4000
624 #define LAN8841_ISR_ENERGY_NOT_DETECT 0x0800
625 #define LAN8841_ISR_ENERGY_DETECT 0x0400
626 #define LAN8841_ISR_1588 0x0200
627 #define LAN8841_ISR_GPIO 0x0100
628 #define LAN8841_ISR_JABBER 0x0080
629 #define LAN8841_ISR_RECEIVE_ERROR 0x0040
630 #define LAN8841_ISR_PAGE_RECEIVED 0x0020
631 #define LAN8841_ISR_PAR_DETECT_FAULT 0x0010
632 #define LAN8841_ISR_LP_ACK 0x0008
633 #define LAN8841_ISR_LINK_DOWN 0x0004
634 #define LAN8841_ISR_ADC_FIFO_ERROR 0x0002
635 #define LAN8841_ISR_LINK_UP 0x0001
638 #define LAN8841_AUTOMDI_MDI_SET 0x0080
639 #define LAN8841_AUTOMDI_SWAP_OFF 0x0040
642 #define LAN8841_SPDC_CLK_GATE_OVERRIDE 0x0800
643 #define LAN8841_SPDC_PLL_DIS 0x0400
644 #define LAN8841_SPDC_IO_DC_TEST_EN 0x0080
645 #define LAN8841_SPDC_VOH 0x0040
648 #define LAN8841_EXT_LOOPBACK_EXT_LPBK 0x0008
651 #define LAN8841_PHYCON_INT_POL_INVERT 0x4000
652 #define LAN8841_PHYCON_JABBER_EN 0x0200
653 #define LAN8841_PHYCON_SQE_TEST_EN 0x0100
654 #define LAN8841_PHYCON_SPEED_1000BT 0x0040
655 #define LAN8841_PHYCON_SPEED_100BTX 0x0020
656 #define LAN8841_PHYCON_SPEED_10BT 0x0010
657 #define LAN8841_PHYCON_DUPLEX_STATUS 0x0008
658 #define LAN8841_PHYCON_1000BT_MS_STATUS 0x0004
659 #define LAN8841_PHYCON_SOFT_RESET 0x0002
660 #define LAN8841_PHYCON_LINK_STATUS_CHECK_FAIL 0x0001
663 #define LAN8841_RX_DLL_CTRL_RXDLL_TUNE_DIS 0x8000
664 #define LAN8841_RX_DLL_CTRL_BYPASS_RXDLL 0x4000
665 #define LAN8841_RX_DLL_CTRL_RXDLL_TAP_SEL 0x3F80
666 #define LAN8841_RX_DLL_CTRL_RXDLL_TAP_SEL_DEFAULT 0x0D80
667 #define LAN8841_RX_DLL_CTRL_RXDLL_TAP_ADJ 0x007F
668 #define LAN8841_RX_DLL_CTRL_RXDLL_TAP_ADJ_DEFAULT 0x001B
671 #define LAN8841_TX_DLL_CTRL_TXDLL_TUNE_DIS 0x8000
672 #define LAN8841_TX_DLL_CTRL_BYPASS_TXDLL 0x4000
673 #define LAN8841_TX_DLL_CTRL_TXDLL_TAP_SEL 0x3F80
674 #define LAN8841_TX_DLL_CTRL_TXDLL_TAP_SEL_DEFAULT 0x0D80
675 #define LAN8841_TX_DLL_CTRL_TXDLL_TAP_ADJ 0x007F
676 #define LAN8841_TX_DLL_CTRL_TXDLL_TAP_ADJ_DEFAULT 0x001B
uint16_t lan8841ReadPhyReg(NetInterface *interface, uint8_t address)
Read PHY register.
void lan8841Tick(NetInterface *interface)
LAN8841 timer handler.
void lan8841EnableIrq(NetInterface *interface)
Enable interrupts.
void lan8841DisableIrq(NetInterface *interface)
Disable interrupts.
void lan8841WriteMmdReg(NetInterface *interface, uint8_t devAddr, uint16_t regAddr, uint16_t data)
Write MMD register.
void lan8841DumpPhyReg(NetInterface *interface)
Dump PHY registers for debugging purpose.
error_t lan8841Init(NetInterface *interface)
LAN8841 PHY transceiver initialization.
Network interface controller abstraction layer.
void lan8841InitHook(NetInterface *interface)
LAN8841 custom configuration.
uint16_t lan8841ReadMmdReg(NetInterface *interface, uint8_t devAddr, uint16_t regAddr)
Read MMD register.
const PhyDriver lan8841PhyDriver
LAN8841 Ethernet PHY driver.
void lan8841EventHandler(NetInterface *interface)
LAN8841 event handler.
void lan8841WritePhyReg(NetInterface *interface, uint8_t address, uint16_t data)
Write PHY register.