Go to the documentation of this file.
31 #ifndef _VSC8662_DRIVER_H
32 #define _VSC8662_DRIVER_H
38 #ifndef VSC8662_PHY_ADDR
39 #define VSC8662_PHY_ADDR 0
40 #elif (VSC8662_PHY_ADDR < 0 || VSC8662_PHY_ADDR > 31)
41 #error VSC8662_PHY_ADDR parameter is not valid
45 #define VSC8662_BMCR 0x00
46 #define VSC8662_BMSR 0x01
47 #define VSC8662_PHYID1 0x02
48 #define VSC8662_PHYID2 0x03
49 #define VSC8662_ANAR 0x04
50 #define VSC8662_ANLPAR 0x05
51 #define VSC8662_ANER 0x06
52 #define VSC8662_ANNPTR 0x07
53 #define VSC8662_ANLPNPR 0x08
54 #define VSC8662_1000BT_CTRL 0x09
55 #define VSC8662_1000BT_STAT 0x0A
56 #define VSC8662_1000BT_EXT_STAT1 0x0F
59 #define VSC8662_100BTX_EXT_STAT 0x10
60 #define VSC8662_1000BT_EXT_STAT2 0x11
61 #define VSC8662_BYPASS_CTRL 0x12
62 #define VSC8662_ERR_CNT1 0x13
63 #define VSC8662_ERR_CNT2 0x14
64 #define VSC8662_ERR_CNT3 0x15
65 #define VSC8662_EXT_CTRL_STAT 0x16
66 #define VSC8662_EXT_PHY_CTRL1 0x17
67 #define VSC8662_EXT_PHY_CTRL2 0x18
68 #define VSC8662_INT_MASK 0x19
69 #define VSC8662_INT_STATUS 0x1A
70 #define VSC8662_MAC_AN_CTRL_STAT 0x1B
71 #define VSC8662_AUX_CTRL_STAT 0x1C
72 #define VSC8662_LED_MODE_SEL 0x1D
73 #define VSC8662_LED_BEHAVIOR 0x1E
74 #define VSC8662_EXT_PAGE_ACCESS 0x1F
77 #define VSC8662_SERDES_MEDIA_CTRL 0x10
78 #define VSC8662_SERDES_MAC_MEDIA_CTRL 0x11
79 #define VSC8662_CRC_GOOD_CNT 0x12
80 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL 0x13
81 #define VSC8662_EXT_PHY_CTRL3 0x14
82 #define VSC8662_EXT_PHY_CTRL4 0x17
83 #define VSC8662_SERDES_MAC_MEDIA_STAT 0x1C
84 #define VSC8662_EPG_CTRL1 0x1D
85 #define VSC8662_EPG_CTRL2 0x1E
88 #define VSC8662_SIGDET_GPIO_CTRL 0x0D
89 #define VSC8662_GPIO_INPUT 0x0F
90 #define VSC8662_GPIO_OUTPUT 0x10
91 #define VSC8662_GPIO_OUTPUT_EN 0x11
92 #define VSC8662_FAST_LINK_FAIL_CTRL 0x13
93 #define VSC8662_I2C_MUX_CTRL1 0x14
94 #define VSC8662_I2C_MUX_CTRL2 0x15
95 #define VSC8662_I2C_MUX_DATA_RW 0x16
96 #define VSC8662_RECOVERED_CLOCK1 0x17
97 #define VSC8662_RECOVERED_CLOCK2 0x18
98 #define VSC8662_LED_PORT_SWAPPING 0x19
101 #define VSC8662_BMCR_RESET 0x8000
102 #define VSC8662_BMCR_LOOPBACK 0x4000
103 #define VSC8662_BMCR_SPEED_SEL_LSB 0x2000
104 #define VSC8662_BMCR_AN_EN 0x1000
105 #define VSC8662_BMCR_POWER_DOWN 0x0800
106 #define VSC8662_BMCR_ISOLATE 0x0400
107 #define VSC8662_BMCR_RESTART_AN 0x0200
108 #define VSC8662_BMCR_DUPLEX_MODE 0x0100
109 #define VSC8662_BMCR_COL_TEST 0x0080
110 #define VSC8662_BMCR_SPEED_SEL_MSB 0x0040
111 #define VSC8662_BMCR_UNIDIRECTIONAL_EN 0x0020
114 #define VSC8662_BMSR_100BT4 0x8000
115 #define VSC8662_BMSR_100BTX_FD 0x4000
116 #define VSC8662_BMSR_100BTX_HD 0x2000
117 #define VSC8662_BMSR_10BT_FD 0x1000
118 #define VSC8662_BMSR_10BT_HD 0x0800
119 #define VSC8662_BMSR_100BT2_FD 0x0400
120 #define VSC8662_BMSR_100BT2_HD 0x0200
121 #define VSC8662_BMSR_EXTENDED_STATUS 0x0100
122 #define VSC8662_BMSR_UNIDIRECTIONAL_ABLE 0x0080
123 #define VSC8662_BMSR_PREAMBLE_SUPPR 0x0040
124 #define VSC8662_BMSR_AN_COMPLETE 0x0020
125 #define VSC8662_BMSR_REMOTE_FAULT 0x0010
126 #define VSC8662_BMSR_AN_CAPABLE 0x0008
127 #define VSC8662_BMSR_LINK_STATUS 0x0004
128 #define VSC8662_BMSR_JABBER_DETECT 0x0002
129 #define VSC8662_BMSR_EXTENDED_CAPABLE 0x0001
132 #define VSC8662_PHYID1_OUI_MSB 0xFFFF
133 #define VSC8662_PHYID1_OUI_MSB_DEFAULT 0x0007
136 #define VSC8662_PHYID2_OUI_LSB 0xFC00
137 #define VSC8662_PHYID2_OUI_LSB_DEFAULT 0x0400
138 #define VSC8662_PHYID2_MODEL_NUM 0x03F0
139 #define VSC8662_PHYID2_MODEL_NUM_DEFAULT 0x0260
140 #define VSC8662_PHYID2_REVISION_NUM 0x000F
143 #define VSC8662_ANAR_NEXT_PAGE 0x8000
144 #define VSC8662_ANAR_REMOTE_FAULT 0x2000
145 #define VSC8662_ANAR_ASYM_PAUSE 0x0800
146 #define VSC8662_ANAR_SYM_PAUSE 0x0400
147 #define VSC8662_ANAR_100BT4 0x0200
148 #define VSC8662_ANAR_100BTX_FD 0x0100
149 #define VSC8662_ANAR_100BTX_HD 0x0080
150 #define VSC8662_ANAR_10BT_FD 0x0040
151 #define VSC8662_ANAR_10BT_HD 0x0020
152 #define VSC8662_ANAR_SELECTOR 0x001F
153 #define VSC8662_ANAR_SELECTOR_DEFAULT 0x0001
156 #define VSC8662_ANLPAR_NEXT_PAGE 0x8000
157 #define VSC8662_ANLPAR_ACK 0x4000
158 #define VSC8662_ANLPAR_REMOTE_FAULT 0x2000
159 #define VSC8662_ANLPAR_ASYM_PAUSE 0x0800
160 #define VSC8662_ANLPAR_SYM_PAUSE 0x0400
161 #define VSC8662_ANLPAR_100BT4 0x0200
162 #define VSC8662_ANLPAR_100BTX_FD 0x0100
163 #define VSC8662_ANLPAR_100BTX_HD 0x0080
164 #define VSC8662_ANLPAR_10BT_FD 0x0040
165 #define VSC8662_ANLPAR_10BT_HD 0x0020
166 #define VSC8662_ANLPAR_SELECTOR 0x001F
167 #define VSC8662_ANLPAR_SELECTOR_DEFAULT 0x0001
170 #define VSC8662_ANER_PAR_DETECT_FAULT 0x0010
171 #define VSC8662_ANER_LP_NEXT_PAGE_ABLE 0x0008
172 #define VSC8662_ANER_NEXT_PAGE_ABLE 0x0004
173 #define VSC8662_ANER_PAGE_RECEIVED 0x0002
174 #define VSC8662_ANER_LP_AN_ABLE 0x0001
177 #define VSC8662_ANNPTR_NEXT_PAGE 0x8000
178 #define VSC8662_ANNPTR_MSG_PAGE 0x2000
179 #define VSC8662_ANNPTR_ACK2 0x1000
180 #define VSC8662_ANNPTR_TOGGLE 0x0800
181 #define VSC8662_ANNPTR_MESSAGE 0x07FF
184 #define VSC8662_ANLPNPR_NEXT_PAGE 0x8000
185 #define VSC8662_ANLPNPR_ACK 0x4000
186 #define VSC8662_ANLPNPR_MSG_PAGE 0x2000
187 #define VSC8662_ANLPNPR_ACK2 0x1000
188 #define VSC8662_ANLPNPR_TOGGLE 0x0800
189 #define VSC8662_ANLPNPR_MESSAGE 0x07FF
192 #define VSC8662_1000BT_CTRL_TEST_MODE 0xE000
193 #define VSC8662_1000BT_CTRL_MS_MAN_CONF_EN 0x1000
194 #define VSC8662_1000BT_CTRL_MS_MAN_CONF_VAL 0x0800
195 #define VSC8662_1000BT_CTRL_PORT_TYPE 0x0400
196 #define VSC8662_1000BT_CTRL_1000BT_FD 0x0200
197 #define VSC8662_1000BT_CTRL_1000BT_HD 0x0100
200 #define VSC8662_1000BT_STAT_MS_CONF_FAULT 0x8000
201 #define VSC8662_1000BT_STAT_MS_CONF_RES 0x4000
202 #define VSC8662_1000BT_STAT_LOCAL_RECEIVER_STATUS 0x2000
203 #define VSC8662_1000BT_STAT_REMOTE_RECEIVER_STATUS 0x1000
204 #define VSC8662_1000BT_STAT_LP_1000BT_FD 0x0800
205 #define VSC8662_1000BT_STAT_LP_1000BT_HD 0x0400
206 #define VSC8662_1000BT_STAT_IDLE_ERR_COUNT 0x00FF
209 #define VSC8662_1000BT_EXT_STAT1_1000BX_FD 0x8000
210 #define VSC8662_1000BT_EXT_STAT1_1000BX_HD 0x4000
211 #define VSC8662_1000BT_EXT_STAT1_1000BT_FD 0x2000
212 #define VSC8662_1000BT_EXT_STAT1_1000BT_HD 0x1000
215 #define VSC8662_100BTX_EXT_STAT_DESCRAMBLER 0x8000
216 #define VSC8662_100BTX_EXT_STAT_LOCK_ERROR 0x4000
217 #define VSC8662_100BTX_EXT_STAT_DISCONNECT_STATE 0x2000
218 #define VSC8662_100BTX_EXT_STAT_LINK_STATUS 0x1000
219 #define VSC8662_100BTX_EXT_STAT_RECEIVE_ERROR 0x0800
220 #define VSC8662_100BTX_EXT_STAT_TRANSMIT_ERROR 0x0400
221 #define VSC8662_100BTX_EXT_STAT_SSD_ERROR 0x0200
222 #define VSC8662_100BTX_EXT_STAT_ESD_ERROR 0x0100
225 #define VSC8662_1000BT_EXT_STAT2_DESCRAMBLER 0x8000
226 #define VSC8662_1000BT_EXT_STAT2_LOCK_ERROR 0x4000
227 #define VSC8662_1000BT_EXT_STAT2_DISCONNECT_STATE 0x2000
228 #define VSC8662_1000BT_EXT_STAT2_LINK_STATUS 0x1000
229 #define VSC8662_1000BT_EXT_STAT2_RECEIVE_ERROR 0x0800
230 #define VSC8662_1000BT_EXT_STAT2_TRANSMIT_ERROR 0x0400
231 #define VSC8662_1000BT_EXT_STAT2_SSD_ERROR 0x0200
232 #define VSC8662_1000BT_EXT_STAT2_ESD_ERROR 0x0100
233 #define VSC8662_1000BT_EXT_STAT2_CARRIER_EXT_ERROR 0x0080
234 #define VSC8662_1000BT_EXT_STAT2_NON_COMP_BCM5400_DETECT 0x0040
235 #define VSC8662_1000BT_EXT_STAT2_MDI_CROSSOVER_ERROR 0x0020
238 #define VSC8662_BYPASS_CTRL_TRANSMIT_DIS 0x8000
239 #define VSC8662_BYPASS_CTRL_4B5B_ENC_DEC 0x4000
240 #define VSC8662_BYPASS_CTRL_SCRAMBLER 0x2000
241 #define VSC8662_BYPASS_CTRL_DESCRAMBLER 0x1000
242 #define VSC8662_BYPASS_CTRL_PCS_RECEIVE 0x0800
243 #define VSC8662_BYPASS_CTRL_PCS_TRANSMIT 0x0400
244 #define VSC8662_BYPASS_CTRL_LFI_TIMER 0x0200
245 #define VSC8662_BYPASS_CTRL_AUTO_MDX_10_100 0x0080
246 #define VSC8662_BYPASS_CTRL_NON_COMP_BCM5400_DETECT_DIS 0x0040
247 #define VSC8662_BYPASS_CTRL_PAIR_SWAP_CORR_DIS 0x0020
248 #define VSC8662_BYPASS_CTRL_POL_CORR_DIS 0x0010
249 #define VSC8662_BYPASS_CTRL_PAR_DETECT_CONTROL 0x0008
250 #define VSC8662_BYPASS_CTRL_PULSE_SHAPING_FILTER 0x0004
251 #define VSC8662_BYPASS_CTRL_AUTO_1000BT_NP_DIS 0x0002
252 #define VSC8662_BYPASS_CTRL_CLKOUT_OUTPUT_EN 0x0001
255 #define VSC8662_ERR_CNT1_VALUE 0x00FF
258 #define VSC8662_ERR_CNT2_VALUE 0x00FF
261 #define VSC8662_ERR_CNT3_VALUE 0x00FF
264 #define VSC8662_EXT_CTRL_STAT_FORCE_10BT_LINK 0x8000
265 #define VSC8662_EXT_CTRL_STAT_JABBER_DETECT_DIS 0x4000
266 #define VSC8662_EXT_CTRL_STAT_10BT_ECHO_DIS 0x2000
267 #define VSC8662_EXT_CTRL_STAT_SQE_MODE_DIS 0x1000
268 #define VSC8662_EXT_CTRL_STAT_10BT_SQUELCH_CONTROL 0x0C00
269 #define VSC8662_EXT_CTRL_STAT_STICKY_RESET_EN 0x0200
270 #define VSC8662_EXT_CTRL_STAT_EOF_ERROR 0x0100
271 #define VSC8662_EXT_CTRL_STAT_10BT_DISCONNECT_STATE 0x0080
272 #define VSC8662_EXT_CTRL_STAT_10BT_LINK_STATUS 0x0040
273 #define VSC8662_EXT_CTRL_STAT_CRS_CONTROL 0x0006
274 #define VSC8662_EXT_CTRL_STAT_SMI_BROADCAST_WRITE 0x0001
277 #define VSC8662_EXT_PHY_CTRL1_MAC_AN 0x2000
278 #define VSC8662_EXT_PHY_CTRL1_MAC_MODE 0x1000
279 #define VSC8662_EXT_PHY_CTRL1_AMS_PREFERENCE 0x0800
280 #define VSC8662_EXT_PHY_CTRL1_MEDIA_OP_MODE 0x0700
281 #define VSC8662_EXT_PHY_CTRL1_FORCE_AMS_OVERRIDE 0x00C0
282 #define VSC8662_EXT_PHY_CTRL1_FAR_END_LOOPBACK 0x0008
283 #define VSC8662_EXT_PHY_CTRL1_SGMII_ALIGN_ERROR_STATUS 0x0002
286 #define VSC8662_EXT_PHY_CTRL2_100BTX_EDGE_RATE_CONTROL 0xE000
287 #define VSC8662_EXT_PHY_CTRL2_PICMG_2_16_REDUCED_PWR_MODE 0x1000
288 #define VSC8662_EXT_PHY_CTRL2_SGMII_INPUT_PREAMBLE 0x0180
289 #define VSC8662_EXT_PHY_CTRL2_SGMII_OUTPUT_PREAMBLE 0x0040
290 #define VSC8662_EXT_PHY_CTRL2_JUMBO_PACKET_MODE 0x0030
291 #define VSC8662_EXT_PHY_CTRL2_100BTX_TX_AMPLITUDE_CONTROL 0x000E
292 #define VSC8662_EXT_PHY_CTRL2_1000BT_CONNECTOR_LOOPBACK 0x0001
295 #define VSC8662_INT_MASK_MDINT 0x8000
296 #define VSC8662_INT_MASK_SPEED_CHANGE 0x4000
297 #define VSC8662_INT_MASK_LINK_CHANGE 0x2000
298 #define VSC8662_INT_MASK_FDX_CHANGE 0x1000
299 #define VSC8662_INT_MASK_AN_ERROR 0x0800
300 #define VSC8662_INT_MASK_AN_COMPLETE 0x0400
301 #define VSC8662_INT_MASK_POE_DETECT 0x0200
302 #define VSC8662_INT_MASK_SYMBOL_ERROR 0x0100
303 #define VSC8662_INT_MASK_FAST_LINK_FAILURE 0x0080
304 #define VSC8662_INT_MASK_TX_FIFO_OVER_UNDERFLOW 0x0040
305 #define VSC8662_INT_MASK_RX_FIFO_OVER_UNDERFLOW 0x0020
306 #define VSC8662_INT_MASK_AMS_MEDIA_CHANGE 0x0010
307 #define VSC8662_INT_MASK_FALSE_CARRIER 0x0008
308 #define VSC8662_INT_MASK_LINK_SPEED_DOWNSHIFT 0x0004
309 #define VSC8662_INT_MASK_MS_RESOLUTION_ERROR 0x0002
310 #define VSC8662_INT_MASK_RX_ER 0x0001
313 #define VSC8662_INT_STATUS_MDINT 0x8000
314 #define VSC8662_INT_STATUS_SPEED_CHANGE 0x4000
315 #define VSC8662_INT_STATUS_LINK_CHANGE 0x2000
316 #define VSC8662_INT_STATUS_FDX_CHANGE 0x1000
317 #define VSC8662_INT_STATUS_AN_ERROR 0x0800
318 #define VSC8662_INT_STATUS_AN_COMPLETE 0x0400
319 #define VSC8662_INT_STATUS_POE_DETECT 0x0200
320 #define VSC8662_INT_STATUS_SYMBOL_ERROR 0x0100
321 #define VSC8662_INT_STATUS_FAST_LINK_FAILURE 0x0080
322 #define VSC8662_INT_STATUS_TX_FIFO_OVER_UNDERFLOW 0x0040
323 #define VSC8662_INT_STATUS_RX_FIFO_OVER_UNDERFLOW 0x0020
324 #define VSC8662_INT_STATUS_AMS_MEDIA_CHANGE 0x0010
325 #define VSC8662_INT_STATUS_FALSE_CARRIER 0x0008
326 #define VSC8662_INT_STATUS_LINK_SPEED_DOWNSHIFT 0x0004
327 #define VSC8662_INT_STATUS_MS_RESOLUTION_ERROR 0x0002
328 #define VSC8662_INT_STATUS_RX_ER 0x0001
331 #define VSC8662_MAC_AN_CTRL_STAT_MAC_MEDIA_INTERLOCK 0x8000
332 #define VSC8662_MAC_AN_CTRL_STAT_RESTART_AN_INTERLOCK 0x4000
333 #define VSC8662_MAC_AN_CTRL_STAT_AN_AUTO_SENSE 0x2000
334 #define VSC8662_MAC_AN_CTRL_STAT_AN_RESTART 0x1000
335 #define VSC8662_MAC_AN_CTRL_STAT_LP_RESTART_REQ 0x0800
336 #define VSC8662_MAC_AN_CTRL_STAT_REMOTE_FAULT 0x0300
337 #define VSC8662_MAC_AN_CTRL_STAT_ASYM_PAUSE_ADV 0x0080
338 #define VSC8662_MAC_AN_CTRL_STAT_SYM_PAUSE_ADV 0x0040
339 #define VSC8662_MAC_AN_CTRL_STAT_FD_ADV 0x0020
340 #define VSC8662_MAC_AN_CTRL_STAT_HD_ADV 0x0010
341 #define VSC8662_MAC_AN_CTRL_STAT_AN_ABLE 0x0008
342 #define VSC8662_MAC_AN_CTRL_STAT_LINK_STATUS 0x0004
343 #define VSC8662_MAC_AN_CTRL_STAT_AN_COMPLETE 0x0002
344 #define VSC8662_MAC_AN_CTRL_STAT_SIGNAL_DETECT 0x0001
347 #define VSC8662_AUX_CTRL_STAT_AN_COMPLETE 0x8000
348 #define VSC8662_AUX_CTRL_STAT_AN_DIS 0x4000
349 #define VSC8662_AUX_CTRL_STAT_MDI_MDIX_IND 0x2000
350 #define VSC8662_AUX_CTRL_STAT_CD_PAIR_SWAP 0x1000
351 #define VSC8662_AUX_CTRL_STAT_A_POLARITY_INVERSION 0x0800
352 #define VSC8662_AUX_CTRL_STAT_B_POLARITY_INVERSION 0x0400
353 #define VSC8662_AUX_CTRL_STAT_C_POLARITY_INVERSION 0x0200
354 #define VSC8662_AUX_CTRL_STAT_D_POLARITY_INVERSION 0x0100
355 #define VSC8662_AUX_CTRL_STAT_ACTIPHY_LINK_STAT_TMO_MSB 0x0080
356 #define VSC8662_AUX_CTRL_STAT_ACTIPHY_MODE_EN 0x0040
357 #define VSC8662_AUX_CTRL_STAT_FDX_STATUS 0x0020
358 #define VSC8662_AUX_CTRL_STAT_SPEED_STATUS 0x0018
359 #define VSC8662_AUX_CTRL_STAT_SPEED_STATUS_10 0x0000
360 #define VSC8662_AUX_CTRL_STAT_SPEED_STATUS_100 0x0008
361 #define VSC8662_AUX_CTRL_STAT_SPEED_STATUS_1000 0x0010
362 #define VSC8662_AUX_CTRL_STAT_ACTIPHY_LINK_STAT_TMO_LSB 0x0004
363 #define VSC8662_AUX_CTRL_STAT_MEDIA_MODE_STATUS 0x0003
366 #define VSC8662_LED_MODE_SEL_LED3 0xF000
367 #define VSC8662_LED_MODE_SEL_LED2 0x0F00
368 #define VSC8662_LED_MODE_SEL_LED1 0x00F0
369 #define VSC8662_LED_MODE_SEL_LED0 0x000F
372 #define VSC8662_LED_BEHAVIOR_COPPER_FIBER_LED_COMBINE_DIS 0x8000
373 #define VSC8662_LED_BEHAVIOR_ACTIVITY_OUTPUT_SEL 0x4000
374 #define VSC8662_LED_BEHAVIOR_LED_PULSING_EN 0x1000
375 #define VSC8662_LED_BEHAVIOR_LED_BLINK_PULSE_STRETCH_RATE 0x0C00
376 #define VSC8662_LED_BEHAVIOR_LED3_PULSE_STRETCH_BLINK_SEL 0x0100
377 #define VSC8662_LED_BEHAVIOR_LED2_PULSE_STRETCH_BLINK_SEL 0x0080
378 #define VSC8662_LED_BEHAVIOR_LED1_PULSE_STRETCH_BLINK_SEL 0x0040
379 #define VSC8662_LED_BEHAVIOR_LED0_PULSE_STRETCH_BLINK_SEL 0x0020
380 #define VSC8662_LED_BEHAVIOR_LED3_COMBINE_FEATURE_DIS 0x0008
381 #define VSC8662_LED_BEHAVIOR_LED2_COMBINE_FEATURE_DIS 0x0004
382 #define VSC8662_LED_BEHAVIOR_LED1_COMBINE_FEATURE_DIS 0x0002
383 #define VSC8662_LED_BEHAVIOR_LED0_COMBINE_FEATURE_DIS 0x0001
386 #define VSC8662_EXT_PAGE_ACCESS_MAIN 0x0000
387 #define VSC8662_EXT_PAGE_ACCESS_EXTENDED 0x0001
388 #define VSC8662_EXT_PAGE_ACCESS_GPIO 0x0010
391 #define VSC8662_SERDES_MEDIA_CTRL_TRANSMIT_REMOTE_FAULT 0xC000
392 #define VSC8662_SERDES_MEDIA_CTRL_LP_REMOTE_FAULT 0x3000
393 #define VSC8662_SERDES_MEDIA_CTRL_PARALLEL_DETECT 0x0800
394 #define VSC8662_SERDES_MEDIA_CTRL_SERDES_MEDIA_SIGNAL_DETECT 0x0400
395 #define VSC8662_SERDES_MEDIA_CTRL_ALLOW_1000BX_LINK_UP 0x0200
396 #define VSC8662_SERDES_MEDIA_CTRL_ALLOW_100BX_LINK_UP 0x0100
397 #define VSC8662_SERDES_MEDIA_CTRL_SERDES_MEDIA_LP_RESTART_REQ 0x0080
398 #define VSC8662_SERDES_MEDIA_CTRL_FAR_END_FAULT_DETECT_100BFX 0x0040
401 #define VSC8662_SERDES_MAC_MEDIA_CTRL_SERDES_MEDIA_RX_EQUAL 0x0200
402 #define VSC8662_SERDES_MAC_MEDIA_CTRL_SERDES_MEDIA_OUT_SWING 0x00E0
403 #define VSC8662_SERDES_MAC_MEDIA_CTRL_SERDES_MAC_OUT_SWING 0x001C
404 #define VSC8662_SERDES_MAC_MEDIA_CTRL_SERDES_MAC_HYSTERESIS 0x0002
405 #define VSC8662_SERDES_MAC_MEDIA_CTRL_SERDES_MEDIA_HYSTERESIS 0x0001
408 #define VSC8662_CRC_GOOD_CNT_PKT_SINCE_LAST_READ 0x8000
409 #define VSC8662_CRC_GOOD_CNT_CONTENTS 0x3FFF
412 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_LED3_EXT_MODE 0x8000
413 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_LED2_EXT_MODE 0x4000
414 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_LED1_EXT_MODE 0x2000
415 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_LED0_EXT_MODE 0x1000
416 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_LED_RESET_BLINK_SUPPR 0x0800
417 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_SERDES_MEDIA_LOOPBACK_EN 0x0400
418 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_SERDES_MEDIA_LOOPBACK_MODE 0x0300
419 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_SERDES_MAC_LOOPBACK_EN 0x0080
420 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_SERDES_MAC_LOOPBACK_MODE 0x0060
421 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_FAST_LINK_FAILURE_IND 0x0010
422 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_FORCE_MDI_CROSSOVER 0x000C
423 #define VSC8662_SERDES_LOOPBACK_SIGDET_CTRL_SIGDET_POLARITY 0x0001
426 #define VSC8662_EXT_PHY_CTRL3_CARRIER_EXT_DIS 0x8000
427 #define VSC8662_EXT_PHY_CTRL3_ACTIPHY_SLEEP_TIMER 0x6000
428 #define VSC8662_EXT_PHY_CTRL3_ACTIPHY_WAKE_UP_TIMER 0x1800
429 #define VSC8662_EXT_PHY_CTRL3_PHY_ADDR_REVERSAL 0x0200
430 #define VSC8662_EXT_PHY_CTRL3_CLKOUT_FREQ 0x0100
431 #define VSC8662_EXT_PHY_CTRL3_MEDIA_MODE_STATUS 0x00C0
432 #define VSC8662_EXT_PHY_CTRL3_10BT_NO_PREAMBLE_MODE_EN 0x0020
433 #define VSC8662_EXT_PHY_CTRL3_LINK_SPEED_AUTODOWNSHIFT_EN 0x0010
434 #define VSC8662_EXT_PHY_CTRL3_LINK_SPEED_AUTODOWNSHIFT_CTRL 0x000C
435 #define VSC8662_EXT_PHY_CTRL3_LINK_SPEED_AUTODOWNSHIFT_STAT 0x0002
438 #define VSC8662_EXT_PHY_CTRL4_PHY_ADDR 0xF800
439 #define VSC8662_EXT_PHY_CTRL4_INLINE_PWR_DEVICE_DETECT 0x0400
440 #define VSC8662_EXT_PHY_CTRL4_INLINE_PWR_DEVICE_DETECT_STAT 0x0300
441 #define VSC8662_EXT_PHY_CTRL4_CRC_ERROR_CNT 0x00FF
444 #define VSC8662_SERDES_MAC_MEDIA_STAT_MAC_SYNC_STATUS_FAIL 0x0800
445 #define VSC8662_SERDES_MAC_MEDIA_STAT_MAC_CGBAD 0x0400
446 #define VSC8662_SERDES_MAC_MEDIA_STAT_MAC_PHASE_LOCK_LOSS 0x0200
447 #define VSC8662_SERDES_MAC_MEDIA_STAT_MAC_RX_PLL_LOCK_LOSS 0x0100
448 #define VSC8662_SERDES_MAC_MEDIA_STAT_SERDES_MEDIA_SYNC_STATUS_FAIL 0x0008
449 #define VSC8662_SERDES_MAC_MEDIA_STAT_SERDES_MEDIA_CGBAD 0x0004
450 #define VSC8662_SERDES_MAC_MEDIA_STAT_SERDES_MEDIA_PHASE_LOCK_LOSS 0x0002
451 #define VSC8662_SERDES_MAC_MEDIA_STAT_SERDES_MEDIA_RX_PLL_LOCK_LOSS 0x0001
454 #define VSC8662_EPG_CTRL1_EPG_EN 0x8000
455 #define VSC8662_EPG_CTRL1_EPG_RUN_STOP 0x4000
456 #define VSC8662_EPG_CTRL1_TRANSMISSION_DURATION 0x2000
457 #define VSC8662_EPG_CTRL1_PACKET_LENGTH 0x1800
458 #define VSC8662_EPG_CTRL1_INTER_PACKET_GAP 0x0400
459 #define VSC8662_EPG_CTRL1_DEST_ADDR 0x03C0
460 #define VSC8662_EPG_CTRL1_SOURCE_ADDR 0x003C
461 #define VSC8662_EPG_CTRL1_PAYLOAD_TYPE 0x0002
462 #define VSC8662_EPG_CTRL1_BAD_FCS_GENERATION 0x0001
465 #define VSC8662_EPG_CTRL2_EPG_PACKET_PAYLOAD 0xFFFF
468 #define VSC8662_SIGDET_GPIO_CTRL_SIGDET1 0x000C
469 #define VSC8662_SIGDET_GPIO_CTRL_SIGDET0 0x0003
472 #define VSC8662_FAST_LINK_FAIL_CTRL_PORT 0x0001
475 #define VSC8662_I2C_MUX_CTRL1_DEV_ADDR 0xFE00
476 #define VSC8662_I2C_MUX_CTRL1_SCL_CLOCK_FREQ 0x0030
477 #define VSC8662_I2C_MUX_CTRL1_MUX_PORT_1_EN 0x0002
478 #define VSC8662_I2C_MUX_CTRL1_MUX_PORT_0_EN 0x0001
481 #define VSC8662_I2C_MUX_CTRL2_MUX_READY 0x8000
482 #define VSC8662_I2C_MUX_CTRL2_PHY_PORT_ADDR 0x0400
483 #define VSC8662_I2C_MUX_CTRL2_MUX_ACCESS_EN 0x0200
484 #define VSC8662_I2C_MUX_CTRL2_MUX_READ_WRITE 0x0100
485 #define VSC8662_I2C_MUX_CTRL2_MUX_ADDR 0x00FF
488 #define VSC8662_I2C_MUX_DATA_RW_MUX_READ_DATA 0xFF00
489 #define VSC8662_I2C_MUX_DATA_RW_MUX_WRITE_DATA 0x00FF
492 #define VSC8662_RECOVERED_CLOCK1_RCVRD_CLK1_EN 0x8000
493 #define VSC8662_RECOVERED_CLOCK1_PHY_CLOCKOUT_SEL 0x1000
494 #define VSC8662_RECOVERED_CLOCK1_CLOCK_FREQ 0x0100
495 #define VSC8662_RECOVERED_CLOCK1_CLOCK_SQUELCH 0x0030
496 #define VSC8662_RECOVERED_CLOCK1_CLOCK_SEL 0x0003
499 #define VSC8662_RECOVERED_CLOCK2_RCVRD_CLK2_EN 0x8000
500 #define VSC8662_RECOVERED_CLOCK2_PHY_CLOCKOUT_SEL 0x1000
501 #define VSC8662_RECOVERED_CLOCK2_CLOCK_FREQ 0x0100
502 #define VSC8662_RECOVERED_CLOCK2_CLOCK_SQUELCH 0x0030
503 #define VSC8662_RECOVERED_CLOCK2_CLOCK_SEL 0x0003
506 #define VSC8662_LED_PORT_SWAPPING_LED_PORT_SWAPPING 0x0001
uint16_t vsc8662ReadPhyReg(NetInterface *interface, uint8_t address)
Read PHY register.
void vsc8662DumpPhyReg(NetInterface *interface)
Dump PHY registers for debugging purpose.
void vsc8662EventHandler(NetInterface *interface)
VSC8662 event handler.
void vsc8662Tick(NetInterface *interface)
VSC8662 timer handler.
void vsc8662InitHook(NetInterface *interface)
VSC8662 custom configuration.
error_t vsc8662Init(NetInterface *interface)
VSC8662 PHY transceiver initialization.
const PhyDriver vsc8662PhyDriver
VSC8662 Ethernet PHY driver.
void vsc8662DisableIrq(NetInterface *interface)
Disable interrupts.
Network interface controller abstraction layer.
void vsc8662EnableIrq(NetInterface *interface)
Enable interrupts.
void vsc8662WritePhyReg(NetInterface *interface, uint8_t address, uint16_t data)
Write PHY register.