mikroSDK Reference Manual
dp83td510_driver.h
Go to the documentation of this file.
1
31#ifndef _DP83TD510_DRIVER_H
32#define _DP83TD510_DRIVER_H
33
34//Dependencies
35#include "core/nic.h"
36
37//PHY address
38#ifndef DP83TD510_PHY_ADDR
39 #define DP83TD510_PHY_ADDR 0
40#elif (DP83TD510_PHY_ADDR < 0 || DP83TD510_PHY_ADDR > 31)
41 #error DP83TD510_PHY_ADDR parameter is not valid
42#endif
43
44//DP83TD510 PHY registers
45#define DP83TD510_MII_REG_0 0x00
46#define DP83TD510_MII_REG_2 0x02
47#define DP83TD510_MII_REG_3 0x03
48#define DP83TD510_REGCR 0x0D
49#define DP83TD510_ADDAR 0x0E
50#define DP83TD510_PHY_STS 0x10
51#define DP83TD510_GEN_CFG 0x11
52#define DP83TD510_INTERRUPT_REG_1 0x12
53#define DP83TD510_INTERRUPT_REG_2 0x13
54#define DP83TD510_RX_ERR_CNT 0x15
55#define DP83TD510_BISCR 0x16
56#define DP83TD510_MAC_CFG_1 0x17
57#define DP83TD510_MAC_CFG_2 0x18
58#define DP83TD510_SOR_PHYAD 0x19
59#define DP83TD510_TDR_CFG 0x1E
60
61//DP83TD510 MMD registers
62#define DP83TD510_PAM_PMD_CTRL_1 0x01, 0x0000
63#define DP83TD510_PMA_PMD_CTRL_2 0x01, 0x0007
64#define DP83TD510_PMA_PMD_EXTENDED_ABILITY_2 0x01, 0x000B
65#define DP83TD510_PMA_PMD_EXTENDED_ABILITY 0x01, 0x0012
66#define DP83TD510_PMA_PMD_CTRL 0x01, 0x0834
67#define DP83TD510_PMA_CTRL 0x01, 0x08F6
68#define DP83TD510_PMA_STATUS 0x01, 0x08F7
69#define DP83TD510_TEST_MODE_CTRL 0x01, 0x08F8
70#define DP83TD510_PCS_CTRL 0x03, 0x0000
71#define DP83TD510_PCS_CTRL_2 0x03, 0x08E6
72#define DP83TD510_PCS_STATUS 0x03, 0x08E7
73#define DP83TD510_AN_CONTROL 0x07, 0x0200
74#define DP83TD510_AN_STATUS 0x07, 0x0201
75#define DP83TD510_AN_ADV_1 0x07, 0x0202
76#define DP83TD510_AN_ADV_2 0x07, 0x0203
77#define DP83TD510_AN_ADV_3 0x07, 0x0204
78#define DP83TD510_AN_LP_ADV_1 0x07, 0x0205
79#define DP83TD510_AN_LP_ADV_2 0x07, 0x0206
80#define DP83TD510_AN_LP_ADV_3 0x07, 0x0207
81#define DP83TD510_AN_NP_ADV_1 0x07, 0x0208
82#define DP83TD510_AN_NP_ADV_2 0x07, 0x0209
83#define DP83TD510_AN_NP_ADV_3 0x07, 0x020A
84#define DP83TD510_AN_LP_NP_ADV_1 0x07, 0x020B
85#define DP83TD510_AN_LP_NP_ADV_2 0x07, 0x020C
86#define DP83TD510_AN_LP_NP_ADV_3 0x07, 0x020D
87#define DP83TD510_AN_CTRL_10BT1 0x07, 0x020E
88#define DP83TD510_AN_STATUS_10BT1 0x07, 0x020F
89#define DP83TD510_PRBS_CFG_1 0x1F, 0x0119
90#define DP83TD510_PRBS_CFG_2 0x1F, 0x011A
91#define DP83TD510_PRBS_CFG_3 0x1F, 0x011B
92#define DP83TD510_PRBS_STATUS_1 0x1F, 0x011C
93#define DP83TD510_PRBS_STATUS_2 0x1F, 0x011D
94#define DP83TD510_PRBS_STATUS_3 0x1F, 0x011E
95#define DP83TD510_PRBS_STATUS_4 0x1F, 0x011F
96#define DP83TD510_PRBS_STATUS_5 0x1F, 0x0120
97#define DP83TD510_PRBS_STATUS_6 0x1F, 0x0121
98#define DP83TD510_PRBS_STATUS_7 0x1F, 0x0122
99#define DP83TD510_PRBS_CFG_4 0x1F, 0x0123
100#define DP83TD510_PRBS_CFG_5 0x1F, 0x0124
101#define DP83TD510_PRBS_CFG_6 0x1F, 0x0125
102#define DP83TD510_PRBS_CFG_7 0x1F, 0x0126
103#define DP83TD510_PRBS_CFG_8 0x1F, 0x0127
104#define DP83TD510_PRBS_CFG_9 0x1F, 0x0128
105#define DP83TD510_PRBS_CFG_10 0x1F, 0x0129
106#define DP83TD510_CRC_STATUS 0x1F, 0x012A
107#define DP83TD510_PKT_STAT_1 0x1F, 0x012B
108#define DP83TD510_PKT_STAT_2 0x1F, 0x012C
109#define DP83TD510_PKT_STAT_3 0x1F, 0x012D
110#define DP83TD510_PKT_STAT_4 0x1F, 0x012E
111#define DP83TD510_PKT_STAT_5 0x1F, 0x012F
112#define DP83TD510_PKT_STAT_6 0x1F, 0x0130
113#define DP83TD510_TDR_CFG1 0x1F, 0x0300
114#define DP83TD510_TDR_CFG2 0x1F, 0x0301
115#define DP83TD510_TDR_CFG3 0x1F, 0x0302
116#define DP83TD510_FAULT_CFG1 0x1F, 0x0303
117#define DP83TD510_FAULT_CFG2 0x1F, 0x0304
118#define DP83TD510_FAULT_STAT1 0x1F, 0x0305
119#define DP83TD510_FAULT_STAT2 0x1F, 0x0306
120#define DP83TD510_FAULT_STAT3 0x1F, 0x0307
121#define DP83TD510_FAULT_STAT4 0x1F, 0x0308
122#define DP83TD510_FAULT_STAT5 0x1F, 0x0309
123#define DP83TD510_FAULT_STAT6 0x1F, 0x030A
124#define DP83TD510_CHIP_SOR_0 0x1F, 0x0420
125#define DP83TD510_LEDS_CFG_1 0x1F, 0x0460
126#define DP83TD510_IO_MUX_CFG 0x1F, 0x0461
127#define DP83TD510_IO_MUX_GPIO_CTRL_1 0x1F, 0x0462
128#define DP83TD510_IO_MUX_GPIO_CTRL_2 0x1F, 0x0463
129#define DP83TD510_CHIP_SOR_1 0x1F, 0x0467
130#define DP83TD510_CHIP_SOR_2 0x1F, 0x0468
131#define DP83TD510_LEDS_CFG_2 0x1F, 0x0469
132#define DP83TD510_AN_STAT_1 0x1F, 0x060C
133#define DP83TD510_DSP_REG_72 0x1F, 0x0872
134#define DP83TD510_DSP_REG_8D 0x1F, 0x088D
135#define DP83TD510_DSP_REG_8E 0x1F, 0x088E
136#define DP83TD510_DSP_REG_8F 0x1F, 0x088F
137#define DP83TD510_DSP_REG_90 0x1F, 0x0890
138#define DP83TD510_DSP_REG_91 0x1F, 0x0891
139#define DP83TD510_DSP_REG_92 0x1F, 0x0892
140#define DP83TD510_DSP_REG_98 0x1F, 0x0898
141#define DP83TD510_DSP_REG_99 0x1F, 0x0899
142#define DP83TD510_DSP_REG_9A 0x1F, 0x089A
143#define DP83TD510_DSP_REG_9B 0x1F, 0x089B
144#define DP83TD510_DSP_REG_9C 0x1F, 0x089C
145#define DP83TD510_DSP_REG_9D 0x1F, 0x089D
146#define DP83TD510_DSP_REG_E9 0x1F, 0x08E9
147#define DP83TD510_DSP_REG_EA 0x1F, 0x08EA
148#define DP83TD510_DSP_REG_EB 0x1F, 0x08EB
149#define DP83TD510_DSP_REG_EC 0x1F, 0x08EC
150#define DP83TD510_DSP_REG_ED 0x1F, 0x08ED
151#define DP83TD510_DSP_REG_EE 0x1F, 0x08EE
152#define DP83TD510_MSE_DETECT 0x1F, 0x0A85
153#define DP83TD510_ALCD_METRIC 0x1F, 0x0A9D
154#define DP83TD510_ALCD_STATUS 0x1F, 0x0A9F
155#define DP83TD510_SCAN_2 0x1F, 0x0E01
156
157//MII_REG_0 register
158#define DP83TD510_MII_REG_0_MII_RESET 0x8000
159#define DP83TD510_MII_REG_0_LOOPBACK 0x4000
160#define DP83TD510_MII_REG_0_POWER_DOWN 0x0800
161#define DP83TD510_MII_REG_0_ISOLATE 0x0400
162#define DP83TD510_MII_REG_0_UNIDIRECTIONAL_ABILITY 0x0020
163
164//MII_REG_2 register
165#define DP83TD510_MII_REG_2_OUI_21_16 0xFFFF
166#define DP83TD510_MII_REG_2_OUI_21_16_DEFAULT 0x2000
167
168//MII_REG_3 register
169#define DP83TD510_MII_REG_3_OUI_5_0 0xFC00
170#define DP83TD510_MII_REG_3_OUI_5_0_DEFAULT 0x0000
171#define DP83TD510_MII_REG_3_MODEL_NUMBER 0x03E0
172#define DP83TD510_MII_REG_3_MODEL_NUMBER_DEFAULT 0x0180
173#define DP83TD510_MII_REG_3_REVISION_NUMBER 0x001F
174
175//Register Control register
176#define DP83TD510_REGCR_CMD 0xC000
177#define DP83TD510_REGCR_CMD_ADDR 0x0000
178#define DP83TD510_REGCR_CMD_DATA_NO_POST_INC 0x4000
179#define DP83TD510_REGCR_CMD_DATA_POST_INC_RW 0x8000
180#define DP83TD510_REGCR_CMD_DATA_POST_INC_W 0xC000
181#define DP83TD510_REGCR_DEVAD 0x001F
182
183//PHY_STS register
184#define DP83TD510_PHY_STS_MII_INTERRUPT 0x0080
185#define DP83TD510_PHY_STS_LINK_STATUS 0x0001
186
187//GEN_CFG register
188#define DP83TD510_GEN_CFG_CHANNEL_DEBUG_MODE 0x0800
189#define DP83TD510_GEN_CFG_DEBUG_MODE 0x0400
190#define DP83TD510_GEN_CFG_TX_FIFO_DEPTH 0x0060
191#define DP83TD510_GEN_CFG_TX_FIFO_DEPTH_4_NIBBLES 0x0000
192#define DP83TD510_GEN_CFG_TX_FIFO_DEPTH_5_NIBBLES 0x0020
193#define DP83TD510_GEN_CFG_TX_FIFO_DEPTH_6_NIBBLES 0x0040
194#define DP83TD510_GEN_CFG_TX_FIFO_DEPTH_8_NIBBLES 0x0060
195#define DP83TD510_GEN_CFG_INT_POLARITY 0x0008
196#define DP83TD510_GEN_CFG_INT_POLARITY_HIGH 0x0000
197#define DP83TD510_GEN_CFG_INT_POLARITY_LOW 0x0008
198#define DP83TD510_GEN_CFG_FORCE_INTERRUPT 0x0004
199#define DP83TD510_GEN_CFG_INT_EN 0x0002
200#define DP83TD510_GEN_CFG_INT_OE 0x0001
201
202//INTERRUPT_REG_1 register
203#define DP83TD510_INTERRUPT_REG_1_RHF_INT 0x8000
204#define DP83TD510_INTERRUPT_REG_1_LINK_INT 0x2000
205#define DP83TD510_INTERRUPT_REG_1_ESD_INT 0x0800
206#define DP83TD510_INTERRUPT_REG_1_RHF_INT_EN 0x0080
207#define DP83TD510_INTERRUPT_REG_1_LINK_INT_EN 0x0020
208#define DP83TD510_INTERRUPT_REG_1_ESD_INT_EN 0x0008
209
210//INTERRUPT_REG_2 register
211#define DP83TD510_INTERRUPT_REG_2_PAGE_INT 0x2000
212#define DP83TD510_INTERRUPT_REG_2_POL_INT 0x0200
213#define DP83TD510_INTERRUPT_REG_2_PAGE_INT_EN 0x0020
214#define DP83TD510_INTERRUPT_REG_2_POL_INT_EN 0x0002
215
216//RX_ERR_CNT register
217#define DP83TD510_RX_ERR_CNT_RX_ERR_CNT 0xFFFF
218
219//BISCR register
220#define DP83TD510_BISCR_CORE_PWR_MODE 0x0100
221#define DP83TD510_BISCR_LOOPBACK_MODE 0x007F
222#define DP83TD510_BISCR_LOOPBACK_MODE_PCS 0x0002
223#define DP83TD510_BISCR_LOOPBACK_MODE_DIGITAL 0x0004
224#define DP83TD510_BISCR_LOOPBACK_MODE_ANALOG 0x0008
225#define DP83TD510_BISCR_LOOPBACK_MODE_REVERSE 0x0010
226#define DP83TD510_BISCR_LOOPBACK_MODE_TX_TO_MAC_IN_REVERSE 0x0020
227#define DP83TD510_BISCR_LOOPBACK_MODE_TX_TO_MDI_IN_MAC 0x0040
228
229//MAC_CFG_1 register
230#define DP83TD510_MAC_CFG_1_CFG_RMII_DIS_DELAYED_TXD_EN 0x8000
231#define DP83TD510_MAC_CFG_1_MIN_IPG_MODE_EN 0x4000
232#define DP83TD510_MAC_CFG_1_CFG_RMII_ENH 0x2000
233#define DP83TD510_MAC_CFG_1_CFG_RGMII_RX_CLK_SHIFT_SEL 0x1000
234#define DP83TD510_MAC_CFG_1_CFG_RGMII_TX_CLK_SHIFT_SEL 0x0800
235#define DP83TD510_MAC_CFG_1_CFG_RGMII_EN 0x0200
236#define DP83TD510_MAC_CFG_1_CFG_RMII_CLK_SHIFT_EN 0x0100
237#define DP83TD510_MAC_CFG_1_CFG_XI_50 0x0080
238#define DP83TD510_MAC_CFG_1_CFG_RMII_SLOW_MODE 0x0040
239#define DP83TD510_MAC_CFG_1_CFG_RMII_MODE 0x0020
240#define DP83TD510_MAC_CFG_1_CFG_RMII_REV1_0 0x0010
241#define DP83TD510_MAC_CFG_1_RMII_OVF_STS 0x0008
242#define DP83TD510_MAC_CFG_1_RMII_UNF_STS 0x0004
243#define DP83TD510_MAC_CFG_1_CFG_RMII_ELAST_BUF 0x0003
244#define DP83TD510_MAC_CFG_1_CFG_RMII_ELAST_BUF_14_BIT_TOLERANCE 0x0000
245#define DP83TD510_MAC_CFG_1_CFG_RMII_ELAST_BUF_2_BIT_TOLERANCE 0x0001
246#define DP83TD510_MAC_CFG_1_CFG_RMII_ELAST_BUF_6_BIT_TOLERANCE 0x0002
247#define DP83TD510_MAC_CFG_1_CFG_RMII_ELAST_BUF_10_BIT_TOLERANCE 0x0003
248
249//MAC_CFG_2 register
250#define DP83TD510_MAC_CFG_2_CFG_INV_RX_CLK 0x0800
251#define DP83TD510_MAC_CFG_2_CFG_RMII_CRS_DV_SEL 0x0400
252#define DP83TD510_MAC_CFG_2_RGMII_TX_AF_EMPTY_ERR 0x0200
253#define DP83TD510_MAC_CFG_2_RGMII_TX_AF_FULL_ERR 0x0100
254#define DP83TD510_MAC_CFG_2_INV_RGMII_RXD 0x0020
255#define DP83TD510_MAC_CFG_2_INV_RGMII_TXD 0x0010
256#define DP83TD510_MAC_CFG_2_SUP_TX_ERR_FD_RGMII 0x0008
257#define DP83TD510_MAC_CFG_2_CFG_RGMII_HALF_FULL_TH 0x0007
258
259//SOR_PHYAD register
260#define DP83TD510_SOR_PHYAD_SOR_PHYADDR 0x001F
261
262//TDR_CFG register
263#define DP83TD510_TDR_CFG_TDR_START 0x8000
264#define DP83TD510_TDR_CFG_TDR_DONE 0x0002
265#define DP83TD510_TDR_CFG_TDR_FAIL 0x0001
266
267//PAM_PMD_CTRL_1 register
268#define DP83TD510_PAM_PMD_CTRL_1_PMA_RESET 0x8000
269#define DP83TD510_PAM_PMD_CTRL_1_CFG_LOW_POWER 0x0800
270#define DP83TD510_PAM_PMD_CTRL_1_PMA_LOOPBACK 0x0001
271
272//PMA_PMD_CTRL_2 register
273#define DP83TD510_PMA_PMD_CTRL_2_CFG_PMA_TYPE_SELECTION 0x003F
274#define DP83TD510_PMA_PMD_CTRL_2_CFG_PMA_TYPE_SELECTION_BASE_T1 0x003D
275
276//PMA_PMD_EXTENDED_ABILITY_2 register
277#define DP83TD510_PMA_PMD_EXTENDED_ABILITY_2_BASE_T1_EXTENDED_ABILITIES 0x0800
278
279//PMA_PMD_EXTENDED_ABILITY register
280#define DP83TD510_PMA_PMD_EXTENDED_ABILITY_MR_10_BASE_T1L_ABILITY 0x0004
281
282//PMA_PMD_CTRL register
283#define DP83TD510_PMA_PMD_CTRL_CFG_MASTER_SLAVE_VAL 0x4000
284#define DP83TD510_PMA_PMD_CTRL_CFG_TYPE_SELECTION 0x000F
285#define DP83TD510_PMA_PMD_CTRL_CFG_TYPE_SELECTION_10BASE_T1L 0x0002
286
287//PMA_CTRL register
288#define DP83TD510_PMA_CTRL_PMA_RESET 0x8000
289#define DP83TD510_PMA_CTRL_CFG_TRANSMIT_DISABLE 0x4000
290#define DP83TD510_PMA_CTRL_CFG_INCR_TX_LVL 0x1000
291#define DP83TD510_PMA_CTRL_CFG_INCR_TX_LVL_1V0 0x0000
292#define DP83TD510_PMA_CTRL_CFG_INCR_TX_LVL_2V4 0x1000
293#define DP83TD510_PMA_CTRL_CFG_LOW_POWER 0x0800
294#define DP83TD510_PMA_CTRL_CFG_EEE_ENABLE 0x0400
295#define DP83TD510_PMA_CTRL_PMA_LOOPBACK 0x0001
296
297//PMA_STATUS register
298#define DP83TD510_PMA_STATUS_LOOPBACK_ABILITY 0x2000
299#define DP83TD510_PMA_STATUS_TX_LVL_INCR_ABILITY 0x1000
300#define DP83TD510_PMA_STATUS_LOW_POWER_ABILITY 0x0800
301#define DP83TD510_PMA_STATUS_EEE_ABILITY 0x0400
302#define DP83TD510_PMA_STATUS_RECEIVE_FAULT_ABILITY 0x0200
303#define DP83TD510_PMA_STATUS_RECEIVE_POLARITY 0x0004
304#define DP83TD510_PMA_STATUS_RECEIVE_FAULT 0x0002
305#define DP83TD510_PMA_STATUS_RECEIVE_LINK_STATUS 0x0001
306
307//TEST_MODE_CTRL register
308#define DP83TD510_TEST_MODE_CTRL_CFG_TEST_MODE 0xE000
309#define DP83TD510_TEST_MODE_CTRL_CFG_TEST_MODE_NORMAL 0x0000
310#define DP83TD510_TEST_MODE_CTRL_CFG_TEST_MODE_1 0x2000
311#define DP83TD510_TEST_MODE_CTRL_CFG_TEST_MODE_2 0x4000
312#define DP83TD510_TEST_MODE_CTRL_CFG_TEST_MODE_3 0x6000
313
314//PCS_CTRL register
315#define DP83TD510_PCS_CTRL_PCS_RESET 0x8000
316#define DP83TD510_PCS_CTRL_MMD3_LOOPBACK 0x4000
317
318//PCS_CTRL_2 register
319#define DP83TD510_PCS_CTRL_2_PCS_RESET 0x8000
320#define DP83TD510_PCS_CTRL_2_MMD3_LOOPBACK 0x4000
321
322//PCS_STATUS register
323#define DP83TD510_PCS_STATUS_TX_LPI_RECEIVED 0x0800
324#define DP83TD510_PCS_STATUS_RX_LPI_RECEIVED 0x0400
325#define DP83TD510_PCS_STATUS_TX_LPI_INDICATION 0x0200
326#define DP83TD510_PCS_STATUS_RX_LPI_INDICATION 0x0100
327#define DP83TD510_PCS_STATUS_FAULT 0x0080
328#define DP83TD510_PCS_STATUS_RECEIVE_LINK_STATUS 0x0004
329
330//AN_CONTROL register
331#define DP83TD510_AN_CONTROL_MR_MAIN_RESET 0x8000
332#define DP83TD510_AN_CONTROL_MR_AN_ENABLE 0x1000
333#define DP83TD510_AN_CONTROL_MR_RESTART_AN 0x0200
334
335//AN_STATUS register
336#define DP83TD510_AN_STATUS_MR_PAGE_RECEIVED 0x0040
337#define DP83TD510_AN_STATUS_MR_AN_COMPLETE 0x0020
338#define DP83TD510_AN_STATUS_REMOTE_FAULT 0x0010
339#define DP83TD510_AN_STATUS_MR_AN_ABILITY 0x0008
340#define DP83TD510_AN_STATUS_LINK_STATUS 0x0004
341
342//AN_ADV_1 register
343#define DP83TD510_AN_ADV_1_MR_BP_NP_ABILITY 0x8000
344#define DP83TD510_AN_ADV_1_MR_BP_ACK 0x4000
345#define DP83TD510_AN_ADV_1_MR_BP_REMOTE_FAULT 0x2000
346#define DP83TD510_AN_ADV_1_MR_BP_12_5 0x1FE0
347#define DP83TD510_AN_ADV_1_SELECTOR_FIELD 0x001F
348
349//AN_ADV_2 register
350#define DP83TD510_AN_ADV_2_MR_BP_31_16 0xFFFF
351
352//AN_ADV_3 register
353#define DP83TD510_AN_ADV_3_MR_BP_47_32 0xFFFF
354
355//AN_LP_ADV_1 register
356#define DP83TD510_AN_LP_ADV_1_MR_LP_BP_15_0 0xFFFF
357
358//AN_LP_ADV_2 register
359#define DP83TD510_AN_LP_ADV_2_MR_LP_BP_31_16 0xFFFF
360
361//AN_LP_ADV_3 register
362#define DP83TD510_AN_LP_ADV_3_MR_LP_BP_47_32 0xFFFF
363
364//AN_NP_ADV_1 register
365#define DP83TD510_AN_NP_ADV_1_MR_NP_NP_ABILITY 0x8000
366#define DP83TD510_AN_NP_ADV_1_MR_NP_MESSAGE_PAGE 0x2000
367#define DP83TD510_AN_NP_ADV_1_MR_NP_ACK2 0x1000
368#define DP83TD510_AN_NP_ADV_1_MR_NP_TOGGLE 0x0800
369#define DP83TD510_AN_NP_ADV_1_MR_NP_MSG_UNFORM_CODE_FIELD 0x07FF
370
371//AN_NP_ADV_2 register
372#define DP83TD510_AN_NP_ADV_2_MR_NP_UNFORM_CODE_FIELD_1 0xFFFF
373
374//AN_NP_ADV_3 register
375#define DP83TD510_AN_NP_ADV_3_MR_NP_UNFORM_CODE_FIELD_2 0xFFFF
376
377//AN_LP_NP_ADV_1 register
378#define DP83TD510_AN_LP_NP_ADV_1_MR_LP_NP_NP_ABILITY 0x8000
379#define DP83TD510_AN_LP_NP_ADV_1_MR_LP_NP_ACK 0x4000
380#define DP83TD510_AN_LP_NP_ADV_1_MR_LP_NP_MESSAGE_PAGE 0x2000
381#define DP83TD510_AN_LP_NP_ADV_1_MR_LP_NP_ACK2 0x1000
382#define DP83TD510_AN_LP_NP_ADV_1_MR_LP_NP_TOGGLE 0x0800
383#define DP83TD510_AN_LP_NP_ADV_1_MR_LP_NP_MSG_UNFORM_CODE_FIELD 0x07FF
384
385//AN_LP_NP_ADV_2 register
386#define DP83TD510_AN_LP_NP_ADV_2_MR_LP_NP_UNFORM_CODE_FIELD_1 0xFFFF
387
388//AN_LP_NP_ADV_3 register
389#define DP83TD510_AN_LP_NP_ADV_3_MR_LP_NP_UNFORM_CODE_FIELD_2 0xFFFF
390
391//AN_CTRL_10BT1 register
392#define DP83TD510_AN_CTRL_10BT1_MR_10BT1_L_CAPABILITY 0x8000
393#define DP83TD510_AN_CTRL_10BT1_MR_ABILITY_10BT1_L_EEE 0x4000
394#define DP83TD510_AN_CTRL_10BT1_MR_ABILITY_10BT1_L_INCR_TX_RX_LVL 0x2000
395#define DP83TD510_AN_CTRL_10BT1_MR_10BT1_L_INCR_TX_RX_LVL_RQST 0x1000
396
397//AN_STATUS_10BT1 register
398#define DP83TD510_AN_STATUS_10BT1_MR_LP_10BT1_L_CAPABILITY 0x8000
399#define DP83TD510_AN_STATUS_10BT1_MR_LP_ABILITY_10BT1_L_EEE 0x4000
400#define DP83TD510_AN_STATUS_10BT1_MR_LP_ABILITY_10BT1_L_INCR_TX_RX_LVL 0x2000
401#define DP83TD510_AN_STATUS_10BT1_MR_LP_10BT1_L_INCR_TX_RX_LVL_RQST 0x1000
402
403//PRBS_CFG_1 register
404#define DP83TD510_PRBS_CFG_1_SEND_PKT 0x1000
405#define DP83TD510_PRBS_CFG_1_CFG_PRBS_CHK_SEL 0x0700
406#define DP83TD510_PRBS_CFG_1_CFG_PRBS_CHK_SEL_RGMII_TX 0x0000
407#define DP83TD510_PRBS_CFG_1_CFG_PRBS_CHK_SEL_RMII_TX 0x0200
408#define DP83TD510_PRBS_CFG_1_CFG_PRBS_CHK_SEL_MII_TX 0x0300
409#define DP83TD510_PRBS_CFG_1_CFG_PRBS_CHK_SEL_CU_RX 0x0500
410#define DP83TD510_PRBS_CFG_1_CFG_PRBS_GEN_SEL 0x0070
411#define DP83TD510_PRBS_CFG_1_CFG_PRBS_GEN_SEL_RGMII_RX 0x0000
412#define DP83TD510_PRBS_CFG_1_CFG_PRBS_GEN_SEL_RMII_RX 0x0020
413#define DP83TD510_PRBS_CFG_1_CFG_PRBS_GEN_SEL_MII_RX 0x0030
414#define DP83TD510_PRBS_CFG_1_CFG_PRBS_GEN_SEL_CU_TX 0x0040
415#define DP83TD510_PRBS_CFG_1_CFG_PRBS_CNT_MODE 0x0008
416#define DP83TD510_PRBS_CFG_1_CFG_PRBS_CHK_ENABLE 0x0004
417#define DP83TD510_PRBS_CFG_1_CFG_PKT_GEN_PRBS 0x0002
418#define DP83TD510_PRBS_CFG_1_PKT_GEN_EN 0x0001
419
420//PRBS_CFG_2 register
421#define DP83TD510_PRBS_CFG_2_CFG_PKT_LEN_PRBS 0xFFFF
422
423//PRBS_CFG_3 register
424#define DP83TD510_PRBS_CFG_3_CFG_PRBS_FIX_PATT_EN 0x1000
425#define DP83TD510_PRBS_CFG_3_CFG_PRBS_FIX_PATT 0x0F00
426#define DP83TD510_PRBS_CFG_3_CFG_IPG_LEN 0x00FF
427
428//PRBS_STATUS_1 register
429#define DP83TD510_PRBS_STATUS_1_PRBS_BYTE_CNT 0xFFFF
430
431//PRBS_STATUS_2 register
432#define DP83TD510_PRBS_STATUS_2_PRBS_PKT_CNT_15_0 0xFFFF
433
434//PRBS_STATUS_3 register
435#define DP83TD510_PRBS_STATUS_3_PRBS_PKT_CNT_31_16 0xFFFF
436
437//PRBS_STATUS_4 register
438#define DP83TD510_PRBS_STATUS_4_PRBS_SYNC_LOSS 0x2000
439#define DP83TD510_PRBS_STATUS_4_PKT_DONE 0x1000
440#define DP83TD510_PRBS_STATUS_4_PKT_GEN_BUSY 0x0800
441#define DP83TD510_PRBS_STATUS_4_PRBS_PKT_OV 0x0400
442#define DP83TD510_PRBS_STATUS_4_PRBS_BYTE_OV 0x0200
443#define DP83TD510_PRBS_STATUS_4_PRBS_LOCK 0x0100
444#define DP83TD510_PRBS_STATUS_4_PRBS_ERR_CNT 0x00FF
445
446//PRBS_STATUS_5 register
447#define DP83TD510_PRBS_STATUS_5_PRBS_ERR_OV_CNT 0x00FF
448
449//PRBS_STATUS_6 register
450#define DP83TD510_PRBS_STATUS_6_PKT_ERR_CNT_15_0 0xFFFF
451
452//PRBS_STATUS_7 register
453#define DP83TD510_PRBS_STATUS_7_PKT_ERR_CNT_31_16 0xFFFF
454
455//PRBS_CFG_4 register
456#define DP83TD510_PRBS_CFG_4_PKT_ERR_CNT_31_16 0xFF00
457#define DP83TD510_PRBS_CFG_4_CFG_PKT_MODE 0x00C0
458#define DP83TD510_PRBS_CFG_4_CFG_PATTERN_VLD_BYTES 0x0038
459#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT 0x0007
460#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT_1_PKT 0x0000
461#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT_10_PKTS 0x0001
462#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT_100_PKTS 0x0002
463#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT_1000_PKTS 0x0003
464#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT_10000_PKTS 0x0004
465#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT_100000_PKTS 0x0005
466#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT_1000000_PKTS 0x0006
467#define DP83TD510_PRBS_CFG_4_CFG_PKT_CNT_CONTINUOUS_PKTS 0x0007
468
469//PRBS_CFG_5 register
470#define DP83TD510_PRBS_CFG_5_PATTERN_15_0 0xFFFF
471
472//PRBS_CFG_6 register
473#define DP83TD510_PRBS_CFG_6_PATTERN_31_16 0xFFFF
474
475//PRBS_CFG_7 register
476#define DP83TD510_PRBS_CFG_7_PATTERN_47_32 0xFFFF
477
478//PRBS_CFG_8 register
479#define DP83TD510_PRBS_CFG_8_PMATCH_DATA_15_0 0xFFFF
480
481//PRBS_CFG_9 register
482#define DP83TD510_PRBS_CFG_9_PMATCH_DATA_31_16 0xFFFF
483
484//PRBS_CFG_10 register
485#define DP83TD510_PRBS_CFG_10_PMATCH_DATA_47_32 0xFFFF
486
487//CRC_STATUS register
488#define DP83TD510_CRC_STATUS_RX_BAD_CRC 0x0002
489#define DP83TD510_CRC_STATUS_TX_BAD_CRC 0x0001
490
491//PKT_STAT_1 register
492#define DP83TD510_PKT_STAT_1_TX_PKT_CNT_15_0 0xFFFF
493
494//PKT_STAT_2 register
495#define DP83TD510_PKT_STAT_2_TX_PKT_CNT_31_16 0xFFFF
496
497//PKT_STAT_3 register
498#define DP83TD510_PKT_STAT_3_TX_ERR_PKT_CNT 0xFFFF
499
500//PKT_STAT_4 register
501#define DP83TD510_PKT_STAT_4_RX_PKT_CNT_15_0 0xFFFF
502
503//PKT_STAT_5 register
504#define DP83TD510_PKT_STAT_5_RX_PKT_CNT_31_16 0xFFFF
505
506//PKT_STAT_6 register
507#define DP83TD510_PKT_STAT_6_RX_ERR_PKT_CNT 0xFFFF
508
509//TDR_CFG1 register
510#define DP83TD510_TDR_CFG1_CFG_TDR_TX_TYPE 0x1000
511#define DP83TD510_TDR_CFG1_CFG_TDR_TX_TYPE_1V0 0x0000
512#define DP83TD510_TDR_CFG1_CFG_TDR_TX_TYPE_2V4 0x1000
513#define DP83TD510_TDR_CFG1_CFG_FORWARD_SHADOW_2 0x0F00
514#define DP83TD510_TDR_CFG1_CFG_FORWARD_SHADOW_1 0x00F0
515#define DP83TD510_TDR_CFG1_CFG_POST_SILENCE_TIME 0x000C
516#define DP83TD510_TDR_CFG1_CFG_PRE_SILENCE_TIME 0x0003
517
518//TDR_CFG2 register
519#define DP83TD510_TDR_CFG2_CFG_END_TAP_INDEX_1 0x7F00
520#define DP83TD510_TDR_CFG2_CFG_START_TAP_INDEX_1 0x007F
521
522//TDR_CFG3 register
523#define DP83TD510_TDR_CFG3_CFG_TDR_TX_DURATION 0xFFFF
524
525//FAULT_CFG1 register
526#define DP83TD510_FAULT_CFG1_CFG_TDR_FLT_LOC_OFFSET_1 0x7F00
527#define DP83TD510_FAULT_CFG1_CFG_TDR_FLT_INIT_1 0x00FF
528
529//FAULT_CFG2 register
530#define DP83TD510_FAULT_CFG2_CFG_TDR_FLT_SLOPE_1 0x00FF
531
532//FAULT_STAT1 register
533#define DP83TD510_FAULT_STAT1_PEAKS_LOC_1 0x7F00
534#define DP83TD510_FAULT_STAT1_PEAKS_LOC_0 0x007F
535
536//FAULT_STAT2 register
537#define DP83TD510_FAULT_STAT2_PEAKS_LOC_3 0x7F00
538#define DP83TD510_FAULT_STAT2_PEAKS_LOC_2 0x007F
539
540//FAULT_STAT3 register
541#define DP83TD510_FAULT_STAT3_PEAKS_AMP_0 0xFF00
542#define DP83TD510_FAULT_STAT3_PEAKS_LOC_4 0x007F
543
544//FAULT_STAT4 register
545#define DP83TD510_FAULT_STAT4_PEAKS_AMP_2 0xFF00
546#define DP83TD510_FAULT_STAT4_PEAKS_AMP_1 0x00FF
547
548//FAULT_STAT5 register
549#define DP83TD510_FAULT_STAT5_PEAKS_AMP_1 0xFF00
550#define DP83TD510_FAULT_STAT5_PEAKS_AMP_3 0x00FF
551
552//FAULT_STAT6 register
553#define DP83TD510_FAULT_STAT6_PEAKS_SIGN_4 0x0010
554#define DP83TD510_FAULT_STAT6_PEAKS_SIGN_3 0x0008
555#define DP83TD510_FAULT_STAT6_PEAKS_SIGN_2 0x0004
556#define DP83TD510_FAULT_STAT6_PEAKS_SIGN_1 0x0002
557#define DP83TD510_FAULT_STAT6_PEAKS_SIGN_0 0x0001
558
559//CHIP_SOR_0 register
560#define DP83TD510_CHIP_SOR_0_READ_STRAP_TERM_SL 0x0040
561
562//LEDS_CFG_1 register
563#define DP83TD510_LEDS_CFG_1_LEDS_BYPASS_STRETCHING 0x4000
564#define DP83TD510_LEDS_CFG_1_LEDS_BLINK_RATE 0x3000
565#define DP83TD510_LEDS_CFG_1_LEDS_BLINK_RATE_20HZ 0x0000
566#define DP83TD510_LEDS_CFG_1_LEDS_BLINK_RATE_10HZ 0x1000
567#define DP83TD510_LEDS_CFG_1_LEDS_BLINK_RATE_5HZ 0x2000
568#define DP83TD510_LEDS_CFG_1_LEDS_BLINK_RATE_2HZ 0x3000
569#define DP83TD510_LEDS_CFG_1_LED_2_OPTION 0x0F00
570#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_LINK_OK 0x0000
571#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_TX_RX_ACT 0x0100
572#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_TX_ACT 0x0200
573#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_RX_ACT 0x0300
574#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_LR 0x0400
575#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_SR 0x0500
576#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_SPEED 0x0600
577#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_DUPLEX 0x0700
578#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_LINK_ACT_BLINK 0x0800
579#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_TX_RX_ACT_BLINK 0x0900
580#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_TX_BLINK 0x0A00
581#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_RX_BLINK 0x0B00
582#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_LINK_LOST 0x0C00
583#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_PRBS_ERROR 0x0D00
584#define DP83TD510_LEDS_CFG_1_LED_2_OPTION_XMII_TX_RX_ERROR 0x0E00
585#define DP83TD510_LEDS_CFG_1_LED_1_OPTION 0x00F0
586#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_LINK_OK 0x0000
587#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_TX_RX_ACT 0x0010
588#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_TX_ACT 0x0020
589#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_RX_ACT 0x0030
590#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_LR 0x0040
591#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_SR 0x0050
592#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_SPEED 0x0060
593#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_DUPLEX 0x0070
594#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_LINK_ACT_BLINK 0x0080
595#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_TX_RX_ACT_BLINK 0x0090
596#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_TX_BLINK 0x00A0
597#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_RX_BLINK 0x00B0
598#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_LINK_LOST 0x00C0
599#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_PRBS_ERROR 0x00D0
600#define DP83TD510_LEDS_CFG_1_LED_1_OPTION_XMII_TX_RX_ERROR 0x00E0
601#define DP83TD510_LEDS_CFG_1_LED_0_OPTION 0x000F
602#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_LINK_OK 0x0000
603#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_TX_RX_ACT 0x0001
604#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_TX_ACT 0x0002
605#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_RX_ACT 0x0003
606#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_LR 0x0004
607#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_SR 0x0005
608#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_SPEED 0x0006
609#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_DUPLEX 0x0007
610#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_LINK_ACT_BLINK 0x0008
611#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_TX_RX_ACT_BLINK 0x0009
612#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_TX_BLINK 0x000A
613#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_RX_BLINK 0x000B
614#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_LINK_LOST 0x000C
615#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_PRBS_ERROR 0x000D
616#define DP83TD510_LEDS_CFG_1_LED_0_OPTION_XMII_TX_RX_ERROR 0x000E
617
618//IO_MUX_CFG register
619#define DP83TD510_IO_MUX_CFG_IO_OE_N_VALUE 0x8000
620#define DP83TD510_IO_MUX_CFG_IO_OE_N_VALUE_OUTPUT 0x0000
621#define DP83TD510_IO_MUX_CFG_IO_OE_N_VALUE_INPUT 0x8000
622#define DP83TD510_IO_MUX_CFG_IO_OE_N_FORCE_CTRL 0x4000
623#define DP83TD510_IO_MUX_CFG_PUPD_VALUE 0x3000
624#define DP83TD510_IO_MUX_CFG_PUPD_FORCE_CNTL 0x0800
625#define DP83TD510_IO_MUX_CFG_IMPEDANCE_CTRL 0x0030
626#define DP83TD510_IO_MUX_CFG_MAC_RX_IMPEDANCE_CTRL 0x000C
627#define DP83TD510_IO_MUX_CFG_MAC_TX_IMPEDANCE_CTRL 0x0003
628
629//IO_MUX_GPIO_CTRL_1 register
630#define DP83TD510_IO_MUX_GPIO_CTRL_1_MAC_TX_IMPEDANCE_CTRL 0x8000
631#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_SOURCE 0x7000
632#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_SOURCE_XI_CLK 0x0000
633#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_SOURCE_LD_30MHZ_CLK 0x1000
634#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_SOURCE_30MHZ_ADC_CLK 0x2000
635#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_SOURCE_FREE_60MHZ_CLK 0x3000
636#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_SOURCE_7_5MHZ_CLK 0x4000
637#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_SOURCE_25MHZ_CLK 0x5000
638#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_SOURCE_2_5MHZ_CLK 0x6000
639#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_CLK_INV_EN 0x0800
640#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_GPIO_CTRL 0x0700
641#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_GPIO_CTRL_LED_2 0x0000
642#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_GPIO_CTRL_CLK_OUT 0x0100
643#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_GPIO_CTRL_INTERRUPT 0x0200
644#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_GPIO_CTRL_LOW 0x0600
645#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_2_GPIO_CTRL_HIGH 0x0700
646#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_DIV_2_EN 0x0080
647#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_SOURCE 0x0070
648#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_SOURCE_XI_CLK 0x0000
649#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_SOURCE_LD_30MHZ_CLK 0x0010
650#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_SOURCE_30MHZ_ADC_CLK 0x0020
651#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_SOURCE_FREE_60MHZ_CLK 0x0030
652#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_SOURCE_7_5MHZ_CLK 0x0040
653#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_SOURCE_25MHZ_CLK 0x0050
654#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_SOURCE_2_5MHZ_CLK 0x0060
655#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_CLK_INV_EN 0x0008
656#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_GPIO_CTRL 0x0007
657#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_GPIO_CTRL_LED_0 0x0000
658#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_GPIO_CTRL_CLK_OUT 0x0001
659#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_GPIO_CTRL_INTERRUPT 0x0002
660#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_GPIO_CTRL_LOW 0x0006
661#define DP83TD510_IO_MUX_GPIO_CTRL_1_LED_0_GPIO_CTRL_HIGH 0x0007
662
663//IO_MUX_GPIO_CTRL_2 register
664#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CLK_SOURCE 0xE000
665#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CLK_SOURCE_XI_CLK 0x0000
666#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CLK_SOURCE_LD_30MHZ_CLK 0x2000
667#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CLK_SOURCE_30MHZ_ADC_CLK 0x4000
668#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CLK_SOURCE_FREE_60MHZ_CLK 0x6000
669#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CLK_SOURCE_7_5MHZ_CLK 0x8000
670#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CLK_SOURCE_25MHZ_CLK 0xA000
671#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CLK_SOURCE_2_5MHZ_CLK 0xC000
672#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CTRL 0x1C00
673#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CTRL_LED_1 0x0000
674#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CTRL_CLK_OUT 0x0400
675#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CTRL_INTERRUPT 0x0800
676#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CTRL_LOW 0x1800
677#define DP83TD510_IO_MUX_GPIO_CTRL_2_GPIO_CTRL_HIGH 0x1C00
678#define DP83TD510_IO_MUX_GPIO_CTRL_2_CFG_TX_ER_ON_LED2 0x0200
679#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_DIV_2_EN 0x0100
680#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE 0x00F0
681#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_XI_CLK 0x0000
682#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_LD_30MHZ_CLK 0x0010
683#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_30MHZ_ADC_CLK 0x0020
684#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_FREE_60MHZ_CLK 0x0030
685#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_7_5MHZ_CLK 0x0040
686#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_25MHZ_CLK 0x0050
687#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_2_5MHZ_CLK 0x0060
688#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_25_50MHZ_CLK 0x0080
689#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_RMII_RX_50MHz_CLK 0x0090
690#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_RMII_TX_50MHZ_CLK 0x00A0
691#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_MII_RX_CLK 0x00B0
692#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_RGMII_RX_ALIGN_CLK 0x00C0
693#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_SOURCE_RGMII_RX_SHIFT_CLK 0x00D0
694#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_CLK_INV_EN 0x0008
695#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_GPIO_CTRL 0x0007
696#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_GPIO_CTRL_LED_1 0x0000
697#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_GPIO_CTRL_CLK_OUT 0x0001
698#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_GPIO_CTRL_INTERRUPT 0x0002
699#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_GPIO_CTRL_LOW 0x0006
700#define DP83TD510_IO_MUX_GPIO_CTRL_2_CLK_O_GPIO_CTRL_HIGH 0x0007
701
702//CHIP_SOR_1 register
703#define DP83TD510_CHIP_SOR_1_SOR_15_0 0xFFFF
704#define DP83TD510_CHIP_SOR_1_SOR_15_0_RX_D3 0x0001
705#define DP83TD510_CHIP_SOR_1_SOR_15_0_RX_D2 0x0002
706#define DP83TD510_CHIP_SOR_1_SOR_15_0_RX_D1 0x0004
707#define DP83TD510_CHIP_SOR_1_SOR_15_0_RX_D0 0x0008
708#define DP83TD510_CHIP_SOR_1_SOR_15_0_CLK_OUT_LED_1 0x0010
709#define DP83TD510_CHIP_SOR_1_SOR_15_0_RX_CTRL 0x0020
710#define DP83TD510_CHIP_SOR_1_SOR_15_0_RX_ER 0x0040
711#define DP83TD510_CHIP_SOR_1_SOR_15_0_LED_2 0x0080
712#define DP83TD510_CHIP_SOR_1_SOR_15_0_LED_0 0x0100
713#define DP83TD510_CHIP_SOR_1_SOR_15_0_GPIO 0x0200
714
715//CHIP_SOR_2 register
716#define DP83TD510_CHIP_SOR_2_SOR_19_16 0x000F
717
718//LEDS_CFG_2 register
719#define DP83TD510_LEDS_CFG_2_LED_2_POLARITY 0x0400
720#define DP83TD510_LEDS_CFG_2_LED_2_POLARITY_LOW 0x0000
721#define DP83TD510_LEDS_CFG_2_LED_2_POLARITY_HIGH 0x0400
722#define DP83TD510_LEDS_CFG_2_LED_2_DRV_VAL 0x0200
723#define DP83TD510_LEDS_CFG_2_LED_2_DRV_EN 0x0100
724#define DP83TD510_LEDS_CFG_2_LED_1_POLARITY 0x0040
725#define DP83TD510_LEDS_CFG_2_LED_1_POLARITY_LOW 0x0000
726#define DP83TD510_LEDS_CFG_2_LED_1_POLARITY_HIGH 0x0040
727#define DP83TD510_LEDS_CFG_2_LED_1_DRV_VAL 0x0020
728#define DP83TD510_LEDS_CFG_2_LED_1_DRV_EN 0x0010
729#define DP83TD510_LEDS_CFG_2_LED_0_POLARITY 0x0004
730#define DP83TD510_LEDS_CFG_2_LED_0_POLARITY_LOW 0x0000
731#define DP83TD510_LEDS_CFG_2_LED_0_POLARITY_HIGH 0x0004
732#define DP83TD510_LEDS_CFG_2_LED_0_DRV_VAL 0x0002
733#define DP83TD510_LEDS_CFG_2_LED_0_DRV_EN 0x0001
734
735//AN_STAT_1 register
736#define DP83TD510_AN_STAT_1_MASTER_SLAVE_RESOL_FAIL 0x8000
737#define DP83TD510_AN_STAT_1_AN_STATE 0x7000
738#define DP83TD510_AN_STAT_1_HD_STATE 0x0700
739#define DP83TD510_AN_STAT_1_RX_STATE 0x0070
740#define DP83TD510_AN_STAT_1_AN_TX_STATE 0x000F
741
742//DSP_REG_72 register
743#define DP83TD510_DSP_REG_72_MSE_SQI 0x03FF
744
745//DSP_REG_8D register
746#define DP83TD510_DSP_REG_8D_CFG_ALCD_2P4_METRIC_STEP_1 0x0FFF
747
748//DSP_REG_8E register
749#define DP83TD510_DSP_REG_8E_CFG_ALCD_2P4_METRIC_STEP_2 0x0FFF
750
751//DSP_REG_8F register
752#define DP83TD510_DSP_REG_8F_CFG_ALCD_2P4_METRIC_STEP_3 0x0FFF
753
754//DSP_REG_90 register
755#define DP83TD510_DSP_REG_90_CFG_ALCD_2P4_METRIC_STEP_4 0x0FFF
756
757//DSP_REG_91 register
758#define DP83TD510_DSP_REG_91_CFG_ALCD_2P4_METRIC_STEP_5 0x0FFF
759
760//DSP_REG_92 register
761#define DP83TD510_DSP_REG_92_CFG_ALCD_2P4_METRIC_STEP_6 0x0FFF
762
763//DSP_REG_98 register
764#define DP83TD510_DSP_REG_98_CFG_ALCD_1P0_METRIC_STEP_1 0x0FFF
765
766//DSP_REG_99 register
767#define DP83TD510_DSP_REG_99_CFG_ALCD_1P0_METRIC_STEP_2 0x0FFF
768
769//DSP_REG_9A register
770#define DP83TD510_DSP_REG_9A_CFG_ALCD_1P0_METRIC_STEP_3 0x0FFF
771
772//DSP_REG_9B register
773#define DP83TD510_DSP_REG_9B_CFG_ALCD_1P0_METRIC_STEP_4 0x0FFF
774
775//DSP_REG_9C register
776#define DP83TD510_DSP_REG_9C_CFG_ALCD_1P0_METRIC_STEP_5 0x0FFF
777
778//DSP_REG_9D register
779#define DP83TD510_DSP_REG_9D_CFG_ALCD_1P0_METRIC_STEP_6 0x0FFF
780
781//DSP_REG_E9 register
782#define DP83TD510_DSP_REG_E9_CFG_ALCD_CABLE_0 0x00FF
783
784//DSP_REG_EA register
785#define DP83TD510_DSP_REG_EA_CFG_ALCD_CABLE_1 0x00FF
786
787//DSP_REG_EB register
788#define DP83TD510_DSP_REG_EB_CFG_ALCD_CABLE_2 0x00FF
789
790//DSP_REG_EC register
791#define DP83TD510_DSP_REG_EC_CFG_ALCD_CABLE_3 0x00FF
792
793//DSP_REG_ED register
794#define DP83TD510_DSP_REG_ED_CFG_ALCD_CABLE_4 0x00FF
795
796//DSP_REG_EE register
797#define DP83TD510_DSP_REG_EE_CFG_ALCD_CABLE_5 0x00FF
798
799//MSE_DETECT register
800#define DP83TD510_MSE_DETECT_SQI 0xFFFF
801#define DP83TD510_MSE_DETECT_SQI_GOOD 0x0320
802#define DP83TD510_MSE_DETECT_SQI_POOR 0x0660
803
804//ALCD_METRIC register
805#define DP83TD510_ALCD_METRIC_ALCD_METRIC_VALUE 0xFFF0
806
807//ALCD_STATUS register
808#define DP83TD510_ALCD_STATUS_ALCD_COMPLETE 0x8000
809#define DP83TD510_ALCD_STATUS_ALCD_CABLE_LENGTH 0x07FF
810
811//SCAN_2 register
812#define DP83TD510_SCAN_2_SCAN_STATE_SAF 0x01F0
813#define DP83TD510_SCAN_2_CFG_EN_EFUSE_BURN 0x0008
814
815//C++ guard
816#ifdef __cplusplus
817extern "C" {
818#endif
819
820//DP83TD510 Ethernet PHY driver
821extern const PhyDriver dp83td510PhyDriver;
822
823//DP83TD510 related functions
824error_t dp83td510Init(NetInterface *interface);
825void dp83td510InitHook(NetInterface *interface);
826
827void dp83td510Tick(NetInterface *interface);
828
829void dp83td510EnableIrq(NetInterface *interface);
830void dp83td510DisableIrq(NetInterface *interface);
831
832void dp83td510EventHandler(NetInterface *interface);
833
834void dp83td510WritePhyReg(NetInterface *interface, uint8_t address,
835 uint16_t data);
836
837uint16_t dp83td510ReadPhyReg(NetInterface *interface, uint8_t address);
838
839void dp83td510DumpPhyReg(NetInterface *interface);
840
841void dp83td510WriteMmdReg(NetInterface *interface, uint8_t devAddr,
842 uint16_t regAddr, uint16_t data);
843
844uint16_t dp83td510ReadMmdReg(NetInterface *interface, uint8_t devAddr,
845 uint16_t regAddr);
846
847//C++ guard
848#ifdef __cplusplus
849}
850#endif
851
852#endif
error_t
Error codes.
Definition error.h:43
Network interface controller abstraction layer.
Ethernet PHY driver.
Definition nic.h:308