31#ifndef _DP83TC812_DRIVER_H
32#define _DP83TC812_DRIVER_H
38#ifndef DP83TC812_PHY_ADDR
39 #define DP83TC812_PHY_ADDR 0
40#elif (DP83TC812_PHY_ADDR < 0 || DP83TC812_PHY_ADDR > 31)
41 #error DP83TC812_PHY_ADDR parameter is not valid
45#define DP83TC812_BMCR 0x00
46#define DP83TC812_BMSR 0x01
47#define DP83TC812_PHYIDR1 0x02
48#define DP83TC812_PHYIDR2 0x03
49#define DP83TC812_REGCR 0x0D
50#define DP83TC812_ADDAR 0x0E
51#define DP83TC812_PHYSTS 0x10
52#define DP83TC812_PHYSCR 0x11
53#define DP83TC812_MISR1 0x12
54#define DP83TC812_MISR2 0x13
55#define DP83TC812_RECR 0x15
56#define DP83TC812_BISCR 0x16
57#define DP83TC812_MISR3 0x18
58#define DP83TC812_REG_19 0x19
59#define DP83TC812_TC10_ABORT_REG 0x1B
60#define DP83TC812_CDCR 0x1E
61#define DP83TC812_PHYRCR 0x1F
64#define DP83TC812_MMD1_PMA_CTRL_1 0x01, 0x1000
65#define DP83TC812_MMD1_PMA_STATUS_1 0x01, 0x1001
66#define DP83TC812_MMD1_PMA_STAUS_2 0x01, 0x1007
67#define DP83TC812_MMD1_PMA_EXT_ABILITY_1 0x01, 0x100B
68#define DP83TC812_MMD1_PMA_EXT_ABILITY_2 0x01, 0x1012
69#define DP83TC812_MMD1_PMA_CTRL_2 0x01, 0x1834
70#define DP83TC812_MMD1_PMA_TEST_MODE_CTRL 0x01, 0x1836
71#define DP83TC812_MMD3_PCS_CTRL_1 0x03, 0x3000
72#define DP83TC812_MMD3_PCS_STATUS_1 0x03, 0x3001
73#define DP83TC812_REG_41 0x1F, 0x0041
74#define DP83TC812_REG_133 0x1F, 0x0133
75#define DP83TC812_REG_17F 0x1F, 0x017F
76#define DP83TC812_REG_180 0x1F, 0x0180
77#define DP83TC812_REG_181 0x1F, 0x0181
78#define DP83TC812_REG_182 0x1F, 0x0182
79#define DP83TC812_LPS_CFG4 0x1F, 0x0183
80#define DP83TC812_LPS_CFG 0x1F, 0x0184
81#define DP83TC812_LPS_CFG5 0x1F, 0x0185
82#define DP83TC812_LPS_CFG7 0x1F, 0x0187
83#define DP83TC812_LPS_CFG8 0x1F, 0x0188
84#define DP83TC812_LPS_CFG9 0x1F, 0x0189
85#define DP83TC812_LPS_CFG10 0x1F, 0x018A
86#define DP83TC812_LPS_CFG2 0x1F, 0x018B
87#define DP83TC812_LPS_CFG3 0x1F, 0x018C
88#define DP83TC812_LPS_STATUS 0x1F, 0x018E
89#define DP83TC812_TDR_TX_CFG 0x1F, 0x0300
90#define DP83TC812_TAP_PROCESS_CFG 0x1F, 0x0301
91#define DP83TC812_TDR_CFG1 0x1F, 0x0302
92#define DP83TC812_TDR_CFG2 0x1F, 0x0303
93#define DP83TC812_TDR_CFG3 0x1F, 0x0304
94#define DP83TC812_TDR_CFG4 0x1F, 0x0305
95#define DP83TC812_TDR_CFG5 0x1F, 0x0306
96#define DP83TC812_TDR_TC1 0x1F, 0x0310
97#define DP83TC812_A2D_REG_48 0x1F, 0x0430
98#define DP83TC812_A2D_REG_68 0x1F, 0x0444
99#define DP83TC812_LEDS_CFG_1 0x1F, 0x0450
100#define DP83TC812_LEDS_CFG_2 0x1F, 0x0451
101#define DP83TC812_IO_MUX_CFG_1 0x1F, 0x0452
102#define DP83TC812_IO_MUX_CFG_2 0x1F, 0x0453
103#define DP83TC812_IO_MUX_CFG 0x1F, 0x0456
104#define DP83TC812_IO_STATUS_1 0x1F, 0x0457
105#define DP83TC812_IO_STATUS_2 0x1F, 0x0458
106#define DP83TC812_CHIP_SOR_1 0x1F, 0x045D
107#define DP83TC812_LED1_CLKOUT_ANA_CTRL 0x1F, 0x045F
108#define DP83TC812_PCS_CTRL_1 0x1F, 0x0485
109#define DP83TC812_PCS_CTRL_2 0x1F, 0x0486
110#define DP83TC812_TX_INTER_CFG 0x1F, 0x0489
111#define DP83TC812_JABBER_CFG 0x1F, 0x0496
112#define DP83TC812_TEST_MODE_CTRL 0x1F, 0x0497
113#define DP83TC812_RXF_CFG 0x1F, 0x04A0
114#define DP83TC812_PG_REG_4 0x1F, 0x0553
115#define DP83TC812_TC1_CFG_RW 0x1F, 0x0560
116#define DP83TC812_TC1_LINK_FAIL_LOSS 0x1F, 0x0561
117#define DP83TC812_TC1_LINK_TRAINING_TIME 0x1F, 0x0562
118#define DP83TC812_RGMII_CTRL 0x1F, 0x0600
119#define DP83TC812_RGMII_FIFO_STATUS 0x1F, 0x0601
120#define DP83TC812_RGMII_CLK_SHIFT_CTRL 0x1F, 0x0602
121#define DP83TC812_RGMII_EEE_CTRL 0x1F, 0x0603
122#define DP83TC812_SGMII_CTRL_1 0x1F, 0x0608
123#define DP83TC812_SGMII_EEE_CTRL_1 0x1F, 0x0609
124#define DP83TC812_SGMII_STATUS 0x1F, 0x060A
125#define DP83TC812_SGMII_EEE_CTRL_2 0x1F, 0x060B
126#define DP83TC812_SGMII_CTRL_2 0x1F, 0x060C
127#define DP83TC812_SGMII_FIFO_STATUS 0x1F, 0x060D
128#define DP83TC812_PRBS_STATUS_1 0x1F, 0x0618
129#define DP83TC812_PRBS_CTRL_1 0x1F, 0x0619
130#define DP83TC812_PRBS_CTRL_2 0x1F, 0x061A
131#define DP83TC812_PRBS_CTRL_3 0x1F, 0x061B
132#define DP83TC812_PRBS_STATUS_2 0x1F, 0x061C
133#define DP83TC812_PRBS_STATUS_3 0x1F, 0x061D
134#define DP83TC812_PRBS_STATUS_4 0x1F, 0x061E
135#define DP83TC812_PRBS_STATUS_5 0x1F, 0x0620
136#define DP83TC812_PRBS_STATUS_6 0x1F, 0x0622
137#define DP83TC812_PRBS_STATUS_7 0x1F, 0x0623
138#define DP83TC812_PRBS_CTRL_4 0x1F, 0x0624
139#define DP83TC812_PATTERN_CTRL_1 0x1F, 0x0625
140#define DP83TC812_PATTERN_CTRL_2 0x1F, 0x0626
141#define DP83TC812_PATTERN_CTRL_3 0x1F, 0x0627
142#define DP83TC812_PMATCH_CTRL_1 0x1F, 0x0628
143#define DP83TC812_PMATCH_CTRL_2 0x1F, 0x0629
144#define DP83TC812_PMATCH_CTRL_3 0x1F, 0x062A
145#define DP83TC812_TX_PKT_CNT_1 0x1F, 0x0639
146#define DP83TC812_TX_PKT_CNT_2 0x1F, 0x063A
147#define DP83TC812_TX_PKT_CNT_3 0x1F, 0x063B
148#define DP83TC812_RX_PKT_CNT_1 0x1F, 0x063C
149#define DP83TC812_RX_PKT_CNT_2 0x1F, 0x063D
150#define DP83TC812_RX_PKT_CNT_3 0x1F, 0x063E
151#define DP83TC812_RMII_CTRL_1 0x1F, 0x0648
152#define DP83TC812_RMII_STATUS_1 0x1F, 0x0649
153#define DP83TC812_RMII_OVERRIDE_CTRL 0x1F, 0x064A
154#define DP83TC812_DSP_REG_71 0x1F, 0x0871
157#define DP83TC812_BMCR_RESET 0x8000
158#define DP83TC812_BMCR_LOOPBACK 0x4000
159#define DP83TC812_BMCR_SPEED_SEL 0x2000
160#define DP83TC812_BMCR_AN_EN 0x1000
161#define DP83TC812_BMCR_POWER_DOWN 0x0800
162#define DP83TC812_BMCR_ISOLATE 0x0400
163#define DP83TC812_BMCR_DUPLEX_MODE 0x0100
166#define DP83TC812_BMSR_100BT4 0x8000
167#define DP83TC812_BMSR_100BX_FD 0x4000
168#define DP83TC812_BMSR_100BX_HD 0x2000
169#define DP83TC812_BMSR_10BT_FD 0x1000
170#define DP83TC812_BMSR_10BT_HD 0x0800
171#define DP83TC812_BMSR_MF_PREAMBLE_SUPPR 0x0040
172#define DP83TC812_BMSR_AN_COMPLETE 0x0020
173#define DP83TC812_BMSR_REMOTE_FAULT 0x0010
174#define DP83TC812_BMSR_AN_CAPABLE 0x0008
175#define DP83TC812_BMSR_LINK_STATUS 0x0004
176#define DP83TC812_BMSR_JABBER_DETECT 0x0002
177#define DP83TC812_BMSR_EXTENDED_CAPABLE 0x0001
180#define DP83TC812_PHYIDR1_OUI_MSB 0xFFFF
181#define DP83TC812_PHYIDR1_OUI_MSB_DEFAULT 0x2000
184#define DP83TC812_PHYIDR2_OUI_LSB 0xFC00
185#define DP83TC812_PHYIDR2_OUI_LSB_DEFAULT 0xA000
186#define DP83TC812_PHYIDR2_MODEL_NUM 0x03F0
187#define DP83TC812_PHYIDR2_MODEL_NUM_DEFAULT 0x0270
188#define DP83TC812_PHYIDR2_REVISION_NUM 0x000F
189#define DP83TC812_PHYIDR2_REVISION_NUM_1_0 0x0000
190#define DP83TC812_PHYIDR2_REVISION_NUM_2_0 0x0001
193#define DP83TC812_REGCR_CMD 0xC000
194#define DP83TC812_REGCR_CMD_ADDR 0x0000
195#define DP83TC812_REGCR_CMD_DATA_NO_POST_INC 0x4000
196#define DP83TC812_REGCR_CMD_DATA_POST_INC_RW 0x8000
197#define DP83TC812_REGCR_CMD_DATA_POST_INC_W 0xC000
198#define DP83TC812_REGCR_DEVAD 0x001F
201#define DP83TC812_PHYSTS_RECEIVE_ERROR_LATCH 0x2000
202#define DP83TC812_PHYSTS_SIGNAL_DETECT 0x0400
203#define DP83TC812_PHYSTS_DESCRAMBLER_LOCK 0x0200
204#define DP83TC812_PHYSTS_MII_INTERRUPT 0x0080
205#define DP83TC812_PHYSTS_JABBER_DTCT 0x0020
206#define DP83TC812_PHYSTS_LOOPBACK_STATUS 0x0008
207#define DP83TC812_PHYSTS_DUPLEX_STATUS 0x0004
208#define DP83TC812_PHYSTS_LINK_STATUS 0x0001
211#define DP83TC812_PHYSCR_DIS_CLK_125 0x8000
212#define DP83TC812_PHYSCR_PWR_SAVE_MODE_EN 0x4000
213#define DP83TC812_PHYSCR_PWR_SAVE_MODE 0x3000
214#define DP83TC812_PHYSCR_SGMII_SOFT_RESET 0x0800
215#define DP83TC812_PHYSCR_USE_PHYAD0_AS_ISOLATE 0x0400
216#define DP83TC812_PHYSCR_TX_FIFO_DEPTH 0x0300
217#define DP83TC812_PHYSCR_TX_FIFO_DEPTH_4_NIBBLES 0x0000
218#define DP83TC812_PHYSCR_TX_FIFO_DEPTH_5_NIBBLES 0x0100
219#define DP83TC812_PHYSCR_TX_FIFO_DEPTH_6_NIBBLES 0x0A00
220#define DP83TC812_PHYSCR_TX_FIFO_DEPTH_8_NIBBLES 0x0B00
221#define DP83TC812_PHYSCR_INT_POL 0x0008
222#define DP83TC812_PHYSCR_FORCE_INT 0x0004
223#define DP83TC812_PHYSCR_INT_EN 0x0002
224#define DP83TC812_PHYSCR_INT_OE 0x0001
227#define DP83TC812_MISR1_ENERGY_DET_INT 0x4000
228#define DP83TC812_MISR1_LINK_INT 0x2000
229#define DP83TC812_MISR1_WOL_INT 0x1000
230#define DP83TC812_MISR1_ESD_INT 0x0800
231#define DP83TC812_MISR1_MS_TRAIN_DONE_INT 0x0400
232#define DP83TC812_MISR1_FHF_INT 0x0200
233#define DP83TC812_MISR1_RHF_INT 0x0100
234#define DP83TC812_MISR1_LINK_QUAL_INT_EN 0x0080
235#define DP83TC812_MISR1_ENERGY_DET_INT_EN 0x0040
236#define DP83TC812_MISR1_LINK_INT_EN 0x0020
237#define DP83TC812_MISR1_WOL_INT_EN 0x0010
238#define DP83TC812_MISR1_ESD_INT_EN 0x0008
239#define DP83TC812_MISR1_MS_TRAIN_DONE_INT_EN 0x0004
240#define DP83TC812_MISR1_FHF_INT_EN 0x0002
241#define DP83TC812_MISR1_RHF_INT_EN 0x0001
244#define DP83TC812_MISR2_UNDER_VOLT_INT 0x8000
245#define DP83TC812_MISR2_OVER_VOLT_INT 0x4000
246#define DP83TC812_MISR2_SLEEP_INT 0x0400
247#define DP83TC812_MISR2_POL_INT 0x0200
248#define DP83TC812_MISR2_JABBER_INT 0x0100
249#define DP83TC812_MISR2_UNDER_VOLT_INT_EN 0x0080
250#define DP83TC812_MISR2_OVER_VOLT_INT_EN 0x0040
251#define DP83TC812_MISR2_PAGE_RCVD_INT_EN 0x0020
252#define DP83TC812_MISR2_FIFO_INT_EN 0x0010
253#define DP83TC812_MISR2_SLEEP_INT_EN 0x0004
254#define DP83TC812_MISR2_POL_INT_EN 0x0002
255#define DP83TC812_MISR2_JABBER_INT_EN 0x0001
258#define DP83TC812_RECR_RX_ERR_CNT 0xFFFF
261#define DP83TC812_BISCR_PRBS_SYNC_LOSS 0x0400
262#define DP83TC812_BISCR_CORE_PWR_MODE 0x0100
263#define DP83TC812_BISCR_TX_MII_LPBK 0x0040
264#define DP83TC812_BISCR_LOOPBACK_MODE 0x003C
265#define DP83TC812_BISCR_LOOPBACK_MODE_DIGITAL 0x0004
266#define DP83TC812_BISCR_LOOPBACK_MODE_ANALOG 0x0008
267#define DP83TC812_BISCR_LOOPBACK_MODE_REVERSE 0x0010
268#define DP83TC812_BISCR_LOOPBACK_MODE_EXTERNAL 0x0020
269#define DP83TC812_BISCR_PCS_LPBCK 0x0002
272#define DP83TC812_MISR3_WUP_PSV_INT 0x8000
273#define DP83TC812_MISR3_NO_LINK_INT 0x4000
274#define DP83TC812_MISR3_SLEEP_FAIL_INT 0x2000
275#define DP83TC812_MISR3_POR_DONE_INT 0x1000
276#define DP83TC812_MISR3_NO_FRAME_INT 0x0800
277#define DP83TC812_MISR3_WAKE_REQ_INT 0x0400
278#define DP83TC812_MISR3_WUP_SLEEP_INT 0x0200
279#define DP83TC812_MISR3_LPS_INT 0x0100
280#define DP83TC812_MISR3_WUP_PSV_INT_EN 0x0080
281#define DP83TC812_MISR3_NO_LINK_INT_EN 0x0040
282#define DP83TC812_MISR3_SLEEP_FAIL_INT_EN 0x0020
283#define DP83TC812_MISR3_POR_DONE_INT_EN 0x0010
284#define DP83TC812_MISR3_NO_FRAME_INT_EN 0x0008
285#define DP83TC812_MISR3_WAKE_REQ_INT_EN 0x0004
286#define DP83TC812_MISR3_WUP_SLEEP_INT_EN 0x0002
287#define DP83TC812_MISR3_LPS_INT_EN 0x0001
290#define DP83TC812_REG_19_DSP_ENERGY_DETECT 0x0400
291#define DP83TC812_REG_19_PHY_ADDR 0x001F
294#define DP83TC812_TC10_ABORT_REG_CFG_TC10_ABORT_GPIO_EN 0x0002
295#define DP83TC812_TC10_ABORT_REG_CFG_SLEEP_ABORT 0x0001
298#define DP83TC812_CDCR_TDR_START 0x8000
299#define DP83TC812_CDCR_CFG_TDR_AUTO_RUN 0x4000
300#define DP83TC812_CDCR_TDR_DONE 0x0002
301#define DP83TC812_CDCR_TDR_FAIL 0x0001
304#define DP83TC812_PHYRCR_SOFT_GLOBAL_RESET 0x8000
305#define DP83TC812_PHYRCR_DIGITAL_RESET 0x4000
306#define DP83TC812_PHYRCR_STANDBY_MODE 0x0080
309#define DP83TC812_MMD1_PMA_CTRL_1_PMA_RESET 0x8000
310#define DP83TC812_MMD1_PMA_CTRL_1_PMA_LOOPBACK 0x0001
313#define DP83TC812_MMD1_PMA_STATUS_1_LINK_STATUS 0x0004
316#define DP83TC812_MMD1_PMA_STAUS_2_PMA_PMD_TYPE_SEL 0x003F
319#define DP83TC812_MMD1_PMA_EXT_ABILITY_1_BT1_EXT_ABLE 0x0800
322#define DP83TC812_MMD1_PMA_EXT_ABILITY_2_100BT1_ABLE 0x0001
325#define DP83TC812_MMD1_PMA_CTRL_2_MASTER_SLAVE_MAN_CFG_EN 0x8000
326#define DP83TC812_MMD1_PMA_CTRL_2_BRK_MS_CFG 0x4000
327#define DP83TC812_MMD1_PMA_CTRL_2_TYPE_SEL 0x000F
330#define DP83TC812_MMD1_PMA_TEST_MODE_CTRL_BRK_TEST_MODE 0xE000
333#define DP83TC812_MMD3_PCS_CTRL_1_PCS_RESET 0x8000
334#define DP83TC812_MMD3_PCS_CTRL_1_PCS_LOOPBACK 0x4000
335#define DP83TC812_MMD3_PCS_CTRL_1_RX_CLOCK_STOPPABLE 0x0400
338#define DP83TC812_MMD3_PCS_STATUS_1_TX_LPI_RECEIVED 0x0800
339#define DP83TC812_MMD3_PCS_STATUS_1_RX_LPI_RECEIVED 0x0400
340#define DP83TC812_MMD3_PCS_STATUS_1_TX_LPI_INDICATION 0x0200
341#define DP83TC812_MMD3_PCS_STATUS_1_RX_LPI_INDICATION 0x0100
342#define DP83TC812_MMD3_PCS_STATUS_1_TX_CLOCK_STOPPABLE 0x0040
345#define DP83TC812_REG_41_CFG_ETHER_TYPE_PATTERN 0xFFFF
348#define DP83TC812_REG_133_LINK_UP_C_AND_S 0x4000
349#define DP83TC812_REG_133_LINK_STATUS_PC 0x2000
350#define DP83TC812_REG_133_LINK_STATUS 0x1000
351#define DP83TC812_REG_133_DESCR_SYNC 0x0004
352#define DP83TC812_REG_133_LOC_RCVR_STATUS 0x0002
353#define DP83TC812_REG_133_REM_RCVR_STATUS 0x0001
356#define DP83TC812_REG_17F_CFG_EN_WUR_VIA_WAKE 0x8000
357#define DP83TC812_REG_17F_CFG_EN_WUP_VIA_WAKE 0x4000
358#define DP83TC812_REG_17F_CFG_WAKE_PIN_LEN_FR_WUR_TH 0x00FF
361#define DP83TC812_REG_180_CFG_SLEEP_REQ_TIMER_SEL 0x0018
362#define DP83TC812_REG_180_CFG_SLEEP_ACK_TIMER_SEL 0x0003
365#define DP83TC812_REG_181_RX_LPS_CNT 0x03FF
368#define DP83TC812_REG_182_TX_LPS_CNT 0x03FF
371#define DP83TC812_LPS_CFG4_CFG_SEND_WUP_DIS_TX 0x8000
372#define DP83TC812_LPS_CFG4_CFG_FORCE_LPS_SLEEP_EN 0x4000
373#define DP83TC812_LPS_CFG4_CFG_FORCE_LPS_SLEEP 0x2000
374#define DP83TC812_LPS_CFG4_CFG_FORCE_TX_LPS_EN 0x1000
375#define DP83TC812_LPS_CFG4_CFG_FORCE_TX_LPS 0x0800
376#define DP83TC812_LPS_CFG4_CFG_FORCE_LPS_LINK_CONTROL_EN 0x0400
377#define DP83TC812_LPS_CFG4_CFG_FORCE_LPS_LINK_CONTROL 0x0200
378#define DP83TC812_LPS_CFG4_CFG_FORCE_LPS_ST_EN 0x0100
379#define DP83TC812_LPS_CFG4_CFG_FORCE_LPS_ST 0x007F
382#define DP83TC812_LPS_CFG_CFG_RESET_WUR_CNT_RX_DATA 0x8000
383#define DP83TC812_LPS_CFG_CFG_RESET_LPS_CNT_RX_DATA 0x1000
384#define DP83TC812_LPS_CFG_CFG_RESET_WUR_CNT_TX_DATA 0x0200
385#define DP83TC812_LPS_CFG_CFG_RESET_LPS_CNT_TX_DATA 0x0040
386#define DP83TC812_LPS_CFG_CFG_WAKE_FWD_EN_WUP_PSV_LINK 0x0020
387#define DP83TC812_LPS_CFG_CFG_WAKE_FWD_MAN_TRIG 0x0010
388#define DP83TC812_LPS_CFG_CFG_WAKE_FWD_DIG_TIMER 0x000C
389#define DP83TC812_LPS_CFG_CFG_WAKE_FWD_EN_WUR 0x0002
390#define DP83TC812_LPS_CFG_CFG_WAKE_FWD_EN_WUP 0x0001
393#define DP83TC812_LPS_CFG5_CFG_WUP_TIMER 0xE000
394#define DP83TC812_LPS_CFG5_CFG_RX_WUR_SYM_GAP 0x000C
395#define DP83TC812_LPS_CFG5_CFG_RX_LPS_SYM_GAP 0x0003
398#define DP83TC812_LPS_CFG7_CFG_TX_LPS_STOP_ON_DONE 0x8000
399#define DP83TC812_LPS_CFG7_CFG_TX_LPS_SEL 0x03FF
402#define DP83TC812_LPS_CFG8_CFG_TX_WUR_SEL 0x03FF
405#define DP83TC812_LPS_CFG9_CFG_RX_LPS_SEL 0x03FF
408#define DP83TC812_LPS_CFG10_CFG_RX_WUR_SEL 0x03FF
411#define DP83TC812_LPS_CFG2_CFG_STOP_SLEEP_NEG_ON_NO_SEND_N 0x1000
412#define DP83TC812_LPS_CFG2_CFG_STOP_SLEEP_NEG_ON_ACTIVITY 0x0800
413#define DP83TC812_LPS_CFG2_CFG_AUTO_MODE_EN 0x0040
414#define DP83TC812_LPS_CFG2_CFG_LPS_MON_EN 0x0020
415#define DP83TC812_LPS_CFG2_CFG_LPS_SLEEP_EN 0x0002
418#define DP83TC812_LPS_CFG3_CFG_LPS_PWR_MODE 0x01FF
421#define DP83TC812_LPS_STATUS_STATUS_LPS_ST 0x007F
422#define DP83TC812_LPS_STATUS_STATUS_LPS_ST_SLEEP 0x0001
423#define DP83TC812_LPS_STATUS_STATUS_LPS_ST_STANDBY 0x0002
424#define DP83TC812_LPS_STATUS_STATUS_LPS_ST_NORMAL 0x0004
425#define DP83TC812_LPS_STATUS_STATUS_LPS_ST_SLEEP_ACK 0x0008
426#define DP83TC812_LPS_STATUS_STATUS_LPS_ST_SLEEP_REQ 0x0010
427#define DP83TC812_LPS_STATUS_STATUS_LPS_ST_SLEEP_FAIL 0x0020
428#define DP83TC812_LPS_STATUS_STATUS_LPS_ST_SLEEP_SILENT 0x0040
429#define DP83TC812_LPS_STATUS_STATUS_LPS_ST_PASSIVE_LINK 0x0041
432#define DP83TC812_TDR_TX_CFG_CFG_TDR_TX_DURATION 0xFFFF
435#define DP83TC812_TAP_PROCESS_CFG_CFG_END_TAP_INDEX 0x1F00
436#define DP83TC812_TAP_PROCESS_CFG_CFG_START_TAP_INDEX 0x001F
439#define DP83TC812_TDR_CFG1_CFG_FORWARD_SHADOW 0x00F0
440#define DP83TC812_TDR_CFG1_CFG_POST_SILENCE_TIME 0x000C
441#define DP83TC812_TDR_CFG1_CFG_PRE_SILENCE_TIME 0x0003
444#define DP83TC812_TDR_CFG2_CFG_TDR_FILT_LOC_OFFSET 0x1F00
445#define DP83TC812_TDR_CFG2_CFG_TDR_FILT_INIT 0x00FF
448#define DP83TC812_TDR_CFG3_CFG_TDR_FILT_SLOPE 0x00FF
451#define DP83TC812_TDR_CFG4_HPF_GAIN_TDR 0x0030
452#define DP83TC812_TDR_CFG4_PGA_GAIN_TDR 0x000F
455#define DP83TC812_TDR_CFG5_CFG_HALF_OPEN_DET_EN 0x0010
456#define DP83TC812_TDR_CFG5_CFG_CABLE_DELAY_NUM 0x000F
459#define DP83TC812_TDR_TC1_HALF_OPEN_DETECT 0x0100
460#define DP83TC812_TDR_TC1_PEAK_DETECT 0x0080
461#define DP83TC812_TDR_TC1_PEAK_SIGN 0x0040
462#define DP83TC812_TDR_TC1_PEAK_LOC_IN_METERS 0x003F
465#define DP83TC812_A2D_REG_48_DLL_TX_DELAY_CTRL_RGMII_SL 0x0F00
466#define DP83TC812_A2D_REG_48_DLL_RX_DELAY_CTRL_RGMII_SL 0x00F0
469#define DP83TC812_A2D_REG_68_GOTO_SLEEP_FORCE_VAL 0x0008
470#define DP83TC812_A2D_REG_68_GOTO_SLEEP_FORCE_CONTROL 0x0004
471#define DP83TC812_A2D_REG_68_WAKE_FWD_FORCE_VAL 0x0002
472#define DP83TC812_A2D_REG_68_WAKE_FWD_FORCE_CONTROL 0x0001
475#define DP83TC812_LEDS_CFG_1_LEDS_BYPASS_STRETCHING 0x4000
476#define DP83TC812_LEDS_CFG_1_LEDS_BLINK_RATE 0x3000
477#define DP83TC812_LEDS_CFG_1_LEDS_BLINK_RATE_20HZ 0x0000
478#define DP83TC812_LEDS_CFG_1_LEDS_BLINK_RATE_10HZ 0x1000
479#define DP83TC812_LEDS_CFG_1_LEDS_BLINK_RATE_5HZ 0x2000
480#define DP83TC812_LEDS_CFG_1_LEDS_BLINK_RATE_2HZ 0x3000
481#define DP83TC812_LEDS_CFG_1_LED_2_OPTION 0x0F00
482#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_LINK_OK 0x0000
483#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_LINK_OK_TX_RX_ACT 0x0100
484#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_LINK_OK_TX_ACT 0x0200
485#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_LINK_OK_RX_ACT 0x0300
486#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_LINK_OK_MASTER 0x0400
487#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_LINK_OK_SLAVE 0x0500
488#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_TX_RX_ACT 0x0600
489#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_LINK_LOST 0x0900
490#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_PRBS_ERR 0x0A00
491#define DP83TC812_LEDS_CFG_1_LED_2_OPTION_XMII_TX_RX_ERR 0x0B00
492#define DP83TC812_LEDS_CFG_1_LED_1_OPTION 0x00F0
493#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_LINK_OK 0x0000
494#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_LINK_OK_TX_RX_ACT 0x0010
495#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_LINK_OK_TX_ACT 0x0020
496#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_LINK_OK_RX_ACT 0x0030
497#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_LINK_OK_MASTER 0x0040
498#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_LINK_OK_SLAVE 0x0050
499#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_TX_RX_ACT 0x0060
500#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_LINK_LOST 0x0090
501#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_PRBS_ERR 0x00A0
502#define DP83TC812_LEDS_CFG_1_LED_1_OPTION_XMII_TX_RX_ERR 0x00B0
503#define DP83TC812_LEDS_CFG_1_LED_0_OPTION 0x000F
504#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_LINK_OK 0x0000
505#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_LINK_OK_TX_RX_ACT 0x0001
506#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_LINK_OK_TX_ACT 0x0002
507#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_LINK_OK_RX_ACT 0x0003
508#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_LINK_OK_MASTER 0x0004
509#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_LINK_OK_SLAVE 0x0005
510#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_TX_RX_ACT 0x0006
511#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_LINK_LOST 0x0009
512#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_PRBS_ERR 0x000A
513#define DP83TC812_LEDS_CFG_1_LED_0_OPTION_XMII_TX_RX_ERR 0x000B
516#define DP83TC812_LEDS_CFG_2_CLK_O_GPIO_CTRL_3 0x8000
517#define DP83TC812_LEDS_CFG_2_LED_1_GPIO_CTRL_3 0x4000
518#define DP83TC812_LEDS_CFG_2_LED_0_GPIO_CTRL_3 0x2000
519#define DP83TC812_LEDS_CFG_2_LED_2_DRV_EN 0x0100
520#define DP83TC812_LEDS_CFG_2_LED_2_DRV_VAL 0x0080
521#define DP83TC812_LEDS_CFG_2_LED_2_POLARITY 0x0040
522#define DP83TC812_LEDS_CFG_2_LED_1_DRV_EN 0x0020
523#define DP83TC812_LEDS_CFG_2_LED_1_DRV_VAL 0x0010
524#define DP83TC812_LEDS_CFG_2_LED_1_POLARITY 0x0008
525#define DP83TC812_LEDS_CFG_2_LED_0_DRV_EN 0x0004
526#define DP83TC812_LEDS_CFG_2_LED_0_DRV_VAL 0x0002
527#define DP83TC812_LEDS_CFG_2_LED_0_POLARITY 0x0001
530#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_DIV_2_EN 0x8000
531#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE 0x7000
532#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE_XI_CLK 0x0000
533#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE_200M_PLL_CLK 0x1000
534#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE_67M_ADC_CLK 0x2000
535#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE_FREE_200M_CLK 0x3000
536#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE_25M_MII_CLK 0x4000
537#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE_25M_CLK_TO_PLL 0x5000
538#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE_CORE_100M_CLK 0x6000
539#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_SOURCE_67M_DSP_CLK 0x7000
540#define DP83TC812_IO_MUX_CFG_1_LED_1_CLK_INV_EN 0x0800
541#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL 0x0700
542#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL_LED_1 0x0000
543#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL_LED_1_CLK_MUX_OUT 0x0100
544#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL_WOL 0x0200
545#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL_UV_INDICATION 0x0300
546#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL_1588_TX 0x0400
547#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL_1588_RX 0x0500
548#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL_ESD 0x0600
549#define DP83TC812_IO_MUX_CFG_1_LED_1_GPIO_CTRL_INT 0x0700
550#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_DIV_2_EN 0x0080
551#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE 0x0070
552#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE_XI_CLK 0x0000
553#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE_200M_PLL_CLK 0x0010
554#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE_67M_ADC_CLK 0x0020
555#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE_FREE_200M_CLK 0x0030
556#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE_25M_MII_CLK 0x0040
557#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE_25M_CLK_TO_PLL 0x0050
558#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE_CORE_100M_CLK 0x0060
559#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_SOURCE_67M_DSP_CLK 0x0070
560#define DP83TC812_IO_MUX_CFG_1_LED_0_CLK_INV_EN 0x0008
561#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL 0x0007
562#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL_LED_0 0x0000
563#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL_LED_0_CLK_MUX_OUT 0x0001
564#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL_WOL 0x0002
565#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL_UV_INDICATION 0x0003
566#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL_1588_TX 0x0004
567#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL_1588_RX 0x0005
568#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL_ESD 0x0006
569#define DP83TC812_IO_MUX_CFG_1_LED_0_GPIO_CTRL_INT 0x0007
572#define DP83TC812_IO_MUX_CFG_2_CFG_TX_ER_ON_LED1 0x8000
573#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_DIV_2_EN 0x0100
574#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE 0x00F0
575#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_XI_CLK 0x0000
576#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_200M_PLL_CLK 0x0010
577#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_67M_ADC_CLK 0x0020
578#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_FREE_200M_CLK 0x00B0
579#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_25M_MII_CLK 0x0000
580#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_25M_CLK_TO_PLL 0x0650
581#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_CORE_100M_CLK 0x0020
582#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_67M_DSP_CLK 0x06F0
583#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_25M_50M_CLK 0x0000
584#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_50M_RMII_RX_CLK 0x3E90
585#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_SGMII_SER_CLK 0x0020
586#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_SGMII_DES_CLK 0x3F30
587#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_30NS_TICK 0x0000
588#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_40NS_TICK 0x44D0
589#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_DLL_TX_CLK 0x0020
590#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_DLL_RX_CLK 0x4570
591#define DP83TC812_IO_MUX_CFG_2_CLK_O_CLK_INV_EN 0x0008
592#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL 0x0007
593#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_LED_1 0x0000
594#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_CLKOUT_CLK_MUX_OUT 0x0001
595#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_WOL 0x0002
596#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_UV_INDICATION 0x0003
597#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_1588_TX 0x0004
598#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_1588_RX 0x0005
599#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_ESD 0x0006
600#define DP83TC812_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_INT 0x0007
603#define DP83TC812_IO_MUX_CFG_RX_PINS_PUPD_VALUE 0xC000
604#define DP83TC812_IO_MUX_CFG_RX_PINS_PUPD_VALUE_NO_PULL 0x0000
605#define DP83TC812_IO_MUX_CFG_RX_PINS_PUPD_VALUE_PULL_UP 0x4000
606#define DP83TC812_IO_MUX_CFG_RX_PINS_PUPD_VALUE_PULL_DOWN 0x8000
607#define DP83TC812_IO_MUX_CFG_RX_PINS_PUPD_FORCE_CONTROL 0x2000
608#define DP83TC812_IO_MUX_CFG_TX_PINS_PUPD_VALUE 0x1800
609#define DP83TC812_IO_MUX_CFG_TX_PINS_PUPD_VALUE_NO_PULL 0x0000
610#define DP83TC812_IO_MUX_CFG_TX_PINS_PUPD_VALUE_PULL_UP 0x0800
611#define DP83TC812_IO_MUX_CFG_TX_PINS_PUPD_VALUE_PULL_DOWN 0x1000
612#define DP83TC812_IO_MUX_CFG_TX_PINS_PUPD_FORCE_CONTROL 0x0400
613#define DP83TC812_IO_MUX_CFG_MAC_RX_IMPEDANCE_CTRL 0x03E0
614#define DP83TC812_IO_MUX_CFG_MAC_TX_IMPEDANCE_CTRL 0x001F
617#define DP83TC812_IO_STATUS_1_RX_D0 0x8000
618#define DP83TC812_IO_STATUS_1_LED_1 0x4000
619#define DP83TC812_IO_STATUS_1_RX_ERR 0x2000
620#define DP83TC812_IO_STATUS_1_RX_DV 0x0800
621#define DP83TC812_IO_STATUS_1_RX_CLK 0x0400
622#define DP83TC812_IO_STATUS_1_LED_0 0x0200
623#define DP83TC812_IO_STATUS_1_CLKOUT 0x0100
624#define DP83TC812_IO_STATUS_1_INT_N 0x0080
625#define DP83TC812_IO_STATUS_1_TX_D3 0x0040
626#define DP83TC812_IO_STATUS_1_TX_D2 0x0020
627#define DP83TC812_IO_STATUS_1_TX_D1 0x0010
628#define DP83TC812_IO_STATUS_1_TX_D0 0x0008
629#define DP83TC812_IO_STATUS_1_TX_EN 0x0004
630#define DP83TC812_IO_STATUS_1_TX_CLK 0x0002
631#define DP83TC812_IO_STATUS_1_RX_D3 0x0001
634#define DP83TC812_IO_STATUS_2_IO_STATUS_2 0x0003
637#define DP83TC812_CHIP_SOR_1_LED1_POR 0x2000
638#define DP83TC812_CHIP_SOR_1_RX_D3_POR 0x1000
639#define DP83TC812_CHIP_SOR_1_LED0_STRAP 0x0200
640#define DP83TC812_CHIP_SOR_1_RXD3_STRAP 0x0100
641#define DP83TC812_CHIP_SOR_1_RXD2_STRAP 0x0080
642#define DP83TC812_CHIP_SOR_1_RXD1_STRAP 0x0040
643#define DP83TC812_CHIP_SOR_1_RXD0_STRAP 0x0020
644#define DP83TC812_CHIP_SOR_1_RXCLK_STRAP 0x0010
645#define DP83TC812_CHIP_SOR_1_RXER_STRAP 0x000C
646#define DP83TC812_CHIP_SOR_1_RXDV_STRAP 0x0003
649#define DP83TC812_LED1_CLKOUT_ANA_CTRL_CLKOUT_ANA_SEL_1P0V_SL 0x0010
650#define DP83TC812_LED1_CLKOUT_ANA_CTRL_LED_1_ANA_MUX_CTRL 0x000C
651#define DP83TC812_LED1_CLKOUT_ANA_CTRL_CLKOUT_ANA_MUX_CTRL 0x0003
654#define DP83TC812_PCS_CTRL_1_CFG_FORCE_SLAVE_PHASE1_DONE 0x4000
655#define DP83TC812_PCS_CTRL_1_CFG_DIS_IPG_SCR_LOCK_CHECK 0x2000
656#define DP83TC812_PCS_CTRL_1_CFG_LINK_CONTROL 0x1000
657#define DP83TC812_PCS_CTRL_1_CFG_DESC_FIRST_LOCK_COUNT 0x01FF
660#define DP83TC812_PCS_CTRL_2_CFG_DESC_ERROR_COUNT 0xFF00
661#define DP83TC812_PCS_CTRL_2_CFG_REM_RCVR_STS_ERROR_CNT 0x001F
664#define DP83TC812_TX_INTER_CFG_CFG_FORCE_TX_INTERLEAVE 0x0004
665#define DP83TC812_TX_INTER_CFG_CFG_TX_INTERLEAVE_EN 0x0002
666#define DP83TC812_TX_INTER_CFG_CFG_INTERLEAVE_DET_EN 0x0001
669#define DP83TC812_JABBER_CFG_CFG_RCV_JAB_TIMER_VAL 0x07FF
672#define DP83TC812_TEST_MODE_CTRL_CFG_TEST_MODE1_SYMBOL_CNT 0x03F0
675#define DP83TC812_RXF_CFG_BITS_NIBBLES_SWAP 0xC000
676#define DP83TC812_RXF_CFG_BITS_NIBBLES_SWAP_REGULAR 0x0000
677#define DP83TC812_RXF_CFG_BITS_NIBBLES_SWAP_BITS 0x4000
678#define DP83TC812_RXF_CFG_BITS_NIBBLES_SWAP_NIBBLES 0x8000
679#define DP83TC812_RXF_CFG_BITS_NIBBLES_SWAP_BITS_IN_NIBBLE 0xC000
680#define DP83TC812_RXF_CFG_SFD_BYTE 0x2000
681#define DP83TC812_RXF_CFG_ENHANCED_MAC_SUPPORT 0x0080
684#define DP83TC812_PG_REG_4_FORCE_POL_EN 0x2000
685#define DP83TC812_PG_REG_4_FORCE_POL_VAL 0x1000
688#define DP83TC812_TC1_CFG_RW_CFG_LINK_STATUS_METRIC 0x1800
689#define DP83TC812_TC1_CFG_RW_CFG_LINK_FAILURE_MULTIHOT 0x07E0
690#define DP83TC812_TC1_CFG_RW_CFG_COMM_TIMER_THRS 0x0018
691#define DP83TC812_TC1_CFG_RW_CFG_BAD_SQI_THRS 0x0007
694#define DP83TC812_TC1_LINK_FAIL_LOSS_CFG_BAD_SQI_THRS 0xFC00
695#define DP83TC812_TC1_LINK_FAIL_LOSS_LINK_FAILURES 0x03FF
698#define DP83TC812_TC1_LINK_TRAINING_TIME_COMM_READY 0x8000
699#define DP83TC812_TC1_LINK_TRAINING_TIME_LQ_LTT 0x00FF
702#define DP83TC812_RGMII_CTRL_RGMII_TX_HALF_FULL_TH 0x0070
703#define DP83TC812_RGMII_CTRL_CFG_RGMII_EN 0x0008
704#define DP83TC812_RGMII_CTRL_INV_RGMII_TXD 0x0004
705#define DP83TC812_RGMII_CTRL_INV_RGMII_RXD 0x0002
706#define DP83TC812_RGMII_CTRL_SUP_TX_ERR_FD_RGMII 0x0001
709#define DP83TC812_RGMII_FIFO_STATUS_RGMII_TX_AF_FULL_ERR 0x0002
710#define DP83TC812_RGMII_FIFO_STATUS_RGMII_TX_AF_EMPTY_ERR 0x0001
713#define DP83TC812_RGMII_CLK_SHIFT_CTRL_CFG_RGMII_RX_CLK_SHIFT_SEL 0x0002
714#define DP83TC812_RGMII_CLK_SHIFT_CTRL_CFG_RGMII_TX_CLK_SHIFT_SEL 0x0001
717#define DP83TC812_RGMII_EEE_CTRL_CFG_RGMII_WAKE_SIGNALING_EN 0x0003
720#define DP83TC812_SGMII_CTRL_1_SGMII_TX_ERR_DIS 0x8000
721#define DP83TC812_SGMII_CTRL_1_CFG_ALIGN_IDX_FORCE_EN 0x4000
722#define DP83TC812_SGMII_CTRL_1_CFG_ALIGN_IDX_VALUE 0x3C00
723#define DP83TC812_SGMII_CTRL_1_CFG_SGMII_EN 0x0200
724#define DP83TC812_SGMII_CTRL_1_CFG_SGMII_RX_POL_INVERT 0x0100
725#define DP83TC812_SGMII_CTRL_1_CFG_SGMII_TX_POL_INVERT 0x0080
726#define DP83TC812_SGMII_CTRL_1_SERDES_TX_BITS_ORDER 0x0060
727#define DP83TC812_SGMII_CTRL_1_SERDES_RX_BITS_ORDER 0x0010
728#define DP83TC812_SGMII_CTRL_1_CFG_SGMII_ALIGN_PKT_EN 0x0008
729#define DP83TC812_SGMII_CTRL_1_SGMII_AUTONEG_TIMER 0x0006
730#define DP83TC812_SGMII_CTRL_1_SGMII_AUTONEG_EN 0x0001
733#define DP83TC812_SGMII_EEE_CTRL_1_CFG_SGMII_TX_TR_TIMER_VAL 0xF800
734#define DP83TC812_SGMII_EEE_CTRL_1_CFG_SGMII_TX_TQ_TIMER_VAL 0x07C0
735#define DP83TC812_SGMII_EEE_CTRL_1_CFG_SGMII_TX_TS_TIMER_VAL 0x003E
736#define DP83TC812_SGMII_EEE_CTRL_1_CFG_NON_EEE_MAC_SGMII_EN 0x0001
739#define DP83TC812_SGMII_STATUS_SGMII_PAGE_RECEIVED 0x1000
740#define DP83TC812_SGMII_STATUS_LINK_STATUS_1000BX 0x0800
741#define DP83TC812_SGMII_STATUS_SGMII_AUTONEG_COMPLETE 0x0400
742#define DP83TC812_SGMII_STATUS_CFG_ALIGN_EN 0x0200
743#define DP83TC812_SGMII_STATUS_CFG_SYNC_STATUS 0x0100
744#define DP83TC812_SGMII_STATUS_CFG_ALIGN_IDX 0x00F0
747#define DP83TC812_SGMII_EEE_CTRL_2_CFG_SGMII_RX_QUIET_TIMER_VAL 0x000F
750#define DP83TC812_SGMII_CTRL_2_SGMII_CDR_LOCK_FORCE_VAL 0x0100
751#define DP83TC812_SGMII_CTRL_2_SGMII_CDR_LOCK_FORCE_CTRL 0x0080
752#define DP83TC812_SGMII_CTRL_2_SGMII_MR_RESTART_AN 0x0040
753#define DP83TC812_SGMII_CTRL_2_TX_HALF_FULL_TH 0x0038
754#define DP83TC812_SGMII_CTRL_2_RX_HALF_FULL_TH 0x0007
757#define DP83TC812_SGMII_FIFO_STATUS_SGMII_RX_AF_FULL_ERR 0x0008
758#define DP83TC812_SGMII_FIFO_STATUS_SGMII_RX_AF_EMPTY_ERR 0x0004
759#define DP83TC812_SGMII_FIFO_STATUS_SGMII_TX_AF_FULL_ERR 0x0002
760#define DP83TC812_SGMII_FIFO_STATUS_SGMII_TX_AF_EMPTY_ERR 0x0001
763#define DP83TC812_PRBS_STATUS_1_PRBS_ERR_OV_CNT 0x00FF
766#define DP83TC812_PRBS_CTRL_1_CFG_PKT_GEN_64 0x2000
767#define DP83TC812_PRBS_CTRL_1_SEND_PKT 0x1000
768#define DP83TC812_PRBS_CTRL_1_CFG_PRBS_CHK_SEL 0x0700
769#define DP83TC812_PRBS_CTRL_1_CFG_PRBS_GEN_SEL 0x0070
770#define DP83TC812_PRBS_CTRL_1_CFG_PRBS_CNT_MODE 0x0008
771#define DP83TC812_PRBS_CTRL_1_CFG_PRBS_CHK_ENABLE 0x0004
772#define DP83TC812_PRBS_CTRL_1_CFG_PKT_GEN_PRBS 0x0002
773#define DP83TC812_PRBS_CTRL_1_PKT_GEN_EN 0x0001
776#define DP83TC812_PRBS_CTRL_2_CFG_PKT_LEN_PRBS 0xFFFF
779#define DP83TC812_PRBS_CTRL_3_CFG_IPG_LEN 0x00FF
782#define DP83TC812_PRBS_STATUS_2_PRBS_BYTE_CNT 0xFFFF
785#define DP83TC812_PRBS_STATUS_3_PRBS_PKT_CNT_15_0 0xFFFF
788#define DP83TC812_PRBS_STATUS_4_PRBS_PKT_CNT_31_16 0xFFFF
791#define DP83TC812_PRBS_STATUS_5_PRBS_PKT_CNT_31_16 0x1000
792#define DP83TC812_PRBS_STATUS_5_PKT_GEN_BUSY 0x0800
793#define DP83TC812_PRBS_STATUS_5_PRBS_PKT_OV 0x0400
794#define DP83TC812_PRBS_STATUS_5_PRBS_BYTE_OV 0x0200
795#define DP83TC812_PRBS_STATUS_5_PRBS_LOCK 0x0100
796#define DP83TC812_PRBS_STATUS_5_PRBS_ERR_CNT 0x00FF
799#define DP83TC812_PRBS_STATUS_6_PKT_ERR_CNT_15_0 0xFFFF
802#define DP83TC812_PRBS_STATUS_7_PKT_ERR_CNT_31_16 0xFFFF
805#define DP83TC812_PRBS_CTRL_4_CFG_PKT_DATA 0xFF00
806#define DP83TC812_PRBS_CTRL_4_CFG_PKT_MODE 0x00C0
807#define DP83TC812_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES 0x0038
808#define DP83TC812_PRBS_CTRL_4_CFG_PKT_CNT 0x0007
811#define DP83TC812_PATTERN_CTRL_1_PATTERN_15_0 0xFFFF
814#define DP83TC812_PATTERN_CTRL_2_PATTERN_31_16 0xFFFF
817#define DP83TC812_PATTERN_CTRL_3_PATTERN_47_32 0xFFFF
820#define DP83TC812_PMATCH_CTRL_1_PMATCH_DATA_15_0 0xFFFF
823#define DP83TC812_PMATCH_CTRL_2_PMATCH_DATA_31_16 0xFFFF
826#define DP83TC812_PMATCH_CTRL_3_PMATCH_DATA_47_32 0xFFFF
829#define DP83TC812_TX_PKT_CNT_1_TX_PKT_CNT_15_0 0xFFFF
832#define DP83TC812_TX_PKT_CNT_2_TX_PKT_CNT_31_16 0xFFFF
835#define DP83TC812_TX_PKT_CNT_3_TX_ERR_PKT_CNT 0xFFFF
838#define DP83TC812_RX_PKT_CNT_1_RX_PKT_CNT_15_0 0xFFFF
841#define DP83TC812_RX_PKT_CNT_2_RX_PKT_CNT_31_16 0xFFFF
844#define DP83TC812_RX_PKT_CNT_3_RX_ERR_PKT_CNT 0xFFFF
847#define DP83TC812_RMII_CTRL_1_CFG_RMII_DIS_DELAYED_TXD_EN 0x0400
848#define DP83TC812_RMII_CTRL_1_CFG_RMII_HALF_FULL_TH 0x0380
849#define DP83TC812_RMII_CTRL_1_CFG_RMII_MODE 0x0040
850#define DP83TC812_RMII_CTRL_1_CFG_RMII_BYPASS_AFIFO_EN 0x0020
851#define DP83TC812_RMII_CTRL_1_CFG_XI_50 0x0010
852#define DP83TC812_RMII_CTRL_1_CFG_RMII_REV1_0 0x0002
853#define DP83TC812_RMII_CTRL_1_CFG_RMII_ENH 0x0001
856#define DP83TC812_RMII_STATUS_1_RMII_AF_UNF_ERR 0x0002
857#define DP83TC812_RMII_STATUS_1_RMII_AF_OVF_ERR 0x0001
860#define DP83TC812_RMII_OVERRIDE_CTRL_CFG_CLK50_TX_DLL 0x0400
861#define DP83TC812_RMII_OVERRIDE_CTRL_CFG_CLK50_DLL 0x0200
864#define DP83TC812_DSP_REG_71_WORST_SQI_OUT 0x0080
865#define DP83TC812_DSP_REG_71_SQI_OUT 0x000E
873extern const PhyDriver dp83tc812PhyDriver;
876error_t dp83tc812Init(NetInterface *interface);
877void dp83tc812InitHook(NetInterface *interface);
879void dp83tc812Tick(NetInterface *interface);
881void dp83tc812EnableIrq(NetInterface *interface);
882void dp83tc812DisableIrq(NetInterface *interface);
884void dp83tc812EventHandler(NetInterface *interface);
886void dp83tc812WritePhyReg(NetInterface *interface, uint8_t address,
889uint16_t dp83tc812ReadPhyReg(NetInterface *interface, uint8_t address);
891void dp83tc812DumpPhyReg(NetInterface *interface);
893void dp83tc812WriteMmdReg(NetInterface *interface, uint8_t devAddr,
894 uint16_t regAddr, uint16_t data);
896uint16_t dp83tc812ReadMmdReg(NetInterface *interface, uint8_t devAddr,
error_t
Error codes.
Definition error.h:43
Network interface controller abstraction layer.
Ethernet PHY driver.
Definition nic.h:308