Go to the documentation of this file.
31 #ifndef _DP83TG720_DRIVER_H
32 #define _DP83TG720_DRIVER_H
38 #ifndef DP83TG720_PHY_ADDR
39 #define DP83TG720_PHY_ADDR 0
40 #elif (DP83TG720_PHY_ADDR < 0 || DP83TG720_PHY_ADDR > 31)
41 #error DP83TG720_PHY_ADDR parameter is not valid
45 #define DP83TG720_BMCR 0x00
46 #define DP83TG720_BMSR 0x01
47 #define DP83TG720_PHYID1 0x02
48 #define DP83TG720_PHYID2 0x03
49 #define DP83TG720_REGCR 0x0D
50 #define DP83TG720_ADDAR 0x0E
51 #define DP83TG720_MII_REG_10 0x10
52 #define DP83TG720_MII_REG_11 0x11
53 #define DP83TG720_MII_REG_12 0x12
54 #define DP83TG720_MII_REG_13 0x13
55 #define DP83TG720_MII_REG_16 0x16
56 #define DP83TG720_MII_REG_18 0x18
57 #define DP83TG720_MII_REG_19 0x19
58 #define DP83TG720_MII_REG_1E 0x1E
59 #define DP83TG720_MII_REG_1F 0x1F
62 #define DP83TG720_PMA_PMD_CONTROL_1 0x01, 0x1000
63 #define DP83TG720_PMA_PMD_CONTROL_2 0x01, 0x1007
64 #define DP83TG720_PMA_PMD_TRANSMIT_DISABLE 0x01, 0x1009
65 #define DP83TG720_PMA_PMD_EXTENDED_ABILITY2 0x01, 0x100B
66 #define DP83TG720_PMA_PMD_EXTENDED_ABILITY 0x01, 0x1012
67 #define DP83TG720_PMA_PMD_CONTROL 0x01, 0x1834
68 #define DP83TG720_PMA_CONTROL 0x01, 0x1900
69 #define DP83TG720_PMA_STATUS 0x01, 0x1901
70 #define DP83TG720_TRAINING 0x01, 0x1902
71 #define DP83TG720_LP_TRAINING 0x01, 0x1903
72 #define DP83TG720_TEST_MODE_CONTROL 0x01, 0x1904
73 #define DP83TG720_PCS_CONTROL_COPY 0x03, 0x3000
74 #define DP83TG720_PCS_CONTROL 0x03, 0x3900
75 #define DP83TG720_PCS_STATUS 0x03, 0x3901
76 #define DP83TG720_PCS_STATUS_2 0x03, 0x3902
77 #define DP83TG720_OAM_TRANSMIT 0x03, 0x3904
78 #define DP83TG720_OAM_TX_MESSAGE_1 0x03, 0x3905
79 #define DP83TG720_OAM_TX_MESSAGE_2 0x03, 0x3906
80 #define DP83TG720_OAM_TX_MESSAGE_3 0x03, 0x3907
81 #define DP83TG720_OAM_TX_MESSAGE_4 0x03, 0x3908
82 #define DP83TG720_OAM_RECEIVE 0x03, 0x3909
83 #define DP83TG720_OAM_RX_MESSAGE_1 0x03, 0x390A
84 #define DP83TG720_OAM_RX_MESSAGE_2 0x03, 0x390B
85 #define DP83TG720_OAM_RX_MESSAGE_3 0x03, 0x390C
86 #define DP83TG720_OAM_RX_MESSAGE_4 0x03, 0x390D
87 #define DP83TG720_AN_CFG 0x07, 0x7200
88 #define DP83TG720_LSR 0x1F, 0x0180
89 #define DP83TG720_LPS_CFG2 0x1F, 0x018B
90 #define DP83TG720_LPS_CFG3 0x1F, 0x018C
91 #define DP83TG720_TDR_STATUS0 0x1F, 0x0309
92 #define DP83TG720_TDR_STATUS1 0x1F, 0x030A
93 #define DP83TG720_TDR_STATUS2 0x1F, 0x030B
94 #define DP83TG720_TDR_STATUS5 0x1F, 0x030E
95 #define DP83TG720_TDR_TC12 0x1F, 0x030F
96 #define DP83TG720_A2D_REG_05 0x1F, 0x0405
97 #define DP83TG720_A2D_REG_30 0x1F, 0x041E
98 #define DP83TG720_A2D_REG_31 0x1F, 0x041F
99 #define DP83TG720_A2D_REG_40 0x1F, 0x0428
100 #define DP83TG720_A2D_REG_41 0x1F, 0x0429
101 #define DP83TG720_A2D_REG_43 0x1F, 0x042B
102 #define DP83TG720_A2D_REG_44 0x1F, 0x042C
103 #define DP83TG720_A2D_REG_46 0x1F, 0x042E
104 #define DP83TG720_A2D_REG_47 0x1F, 0x042F
105 #define DP83TG720_A2D_REG_48 0x1F, 0x0430
106 #define DP83TG720_A2D_REG_66 0x1F, 0x0442
107 #define DP83TG720_LEDS_CFG_1 0x1F, 0x0450
108 #define DP83TG720_LEDS_CFG_2 0x1F, 0x0451
109 #define DP83TG720_IO_MUX_CFG_1 0x1F, 0x0452
110 #define DP83TG720_IO_MUX_CFG_2 0x1F, 0x0453
111 #define DP83TG720_IO_CONTROL_1 0x1F, 0x0454
112 #define DP83TG720_IO_CONTROL_2 0x1F, 0x0455
113 #define DP83TG720_IO_CONTROL_3 0x1F, 0x0456
114 #define DP83TG720_IO_STATUS_1 0x1F, 0x0457
115 #define DP83TG720_IO_STATUS_2 0x1F, 0x0458
116 #define DP83TG720_IO_CONTROL_4 0x1F, 0x0459
117 #define DP83TG720_IO_CONTROL_5 0x1F, 0x045A
118 #define DP83TG720_SOR_VECTOR_1 0x1F, 0x045D
119 #define DP83TG720_SOR_VECTOR_2 0x1F, 0x045E
120 #define DP83TG720_MONITOR_CTRL1 0x1F, 0x0467
121 #define DP83TG720_MONITOR_CTRL2 0x1F, 0x0468
122 #define DP83TG720_MONITOR_CTRL4 0x1F, 0x046A
123 #define DP83TG720_MONITOR_STAT1 0x1F, 0x047B
124 #define DP83TG720_BREAK_LINK_TIMER 0x1F, 0x050A
125 #define DP83TG720_RS_DECODER 0x1F, 0x0510
126 #define DP83TG720_LPS_CONTROL_1 0x1F, 0x0514
127 #define DP83TG720_LPS_CONTROL_2 0x1F, 0x0515
128 #define DP83TG720_MAXWAIT_TIMER 0x1F, 0x0518
129 #define DP83TG720_PHY_CTRL_1G 0x1F, 0x0519
130 #define DP83TG720_TEST_MODE 0x1F, 0x0531
131 #define DP83TG720_LINK_QUAL_1 0x1F, 0x0543
132 #define DP83TG720_LINK_QUAL_2 0x1F, 0x0544
133 #define DP83TG720_LINK_DOWN_LATCH_STAT 0x1F, 0x0545
134 #define DP83TG720_LINK_QUAL_3 0x1F, 0x0547
135 #define DP83TG720_LINK_QUAL_4 0x1F, 0x0548
136 #define DP83TG720_RS_DECODER_FRAME_STAT_2 0x1F, 0x0552
137 #define DP83TG720_PMA_WATCHDOG 0x1F, 0x0559
138 #define DP83TG720_SYMB_POL_CFG 0x1F, 0x055B
139 #define DP83TG720_OAM_CFG 0x1F, 0x055C
140 #define DP83TG720_TEST_MEM_CFG 0x1F, 0x0561
141 #define DP83TG720_FORCE_CTRL1 0x1F, 0x0573
142 #define DP83TG720_RGMII_CTRL 0x1F, 0x0600
143 #define DP83TG720_RGMII_FIFO_STATUS 0x1F, 0x0601
144 #define DP83TG720_RGMII_DELAY_CTRL 0x1F, 0x0602
145 #define DP83TG720_SGMII_CTRL_1 0x1F, 0x0608
146 #define DP83TG720_SGMII_STATUS 0x1F, 0x060A
147 #define DP83TG720_SGMII_CTRL_2 0x1F, 0x060C
148 #define DP83TG720_SGMII_FIFO_STATUS 0x1F, 0x060D
149 #define DP83TG720_PRBS_STATUS_1 0x1F, 0x0618
150 #define DP83TG720_PRBS_CTRL_1 0x1F, 0x0619
151 #define DP83TG720_PRBS_CTRL_2 0x1F, 0x061A
152 #define DP83TG720_PRBS_CTRL_3 0x1F, 0x061B
153 #define DP83TG720_PRBS_STATUS_2 0x1F, 0x061C
154 #define DP83TG720_PRBS_STATUS_3 0x1F, 0x061D
155 #define DP83TG720_PRBS_STATUS_4 0x1F, 0x061E
156 #define DP83TG720_PRBS_STATUS_6 0x1F, 0x0620
157 #define DP83TG720_PRBS_STATUS_8 0x1F, 0x0622
158 #define DP83TG720_PRBS_STATUS_9 0x1F, 0x0623
159 #define DP83TG720_PRBS_CTRL_4 0x1F, 0x0624
160 #define DP83TG720_PRBS_CTRL_5 0x1F, 0x0625
161 #define DP83TG720_PRBS_CTRL_6 0x1F, 0x0626
162 #define DP83TG720_PRBS_CTRL_7 0x1F, 0x0627
163 #define DP83TG720_PRBS_CTRL_8 0x1F, 0x0628
164 #define DP83TG720_PRBS_CTRL_9 0x1F, 0x0629
165 #define DP83TG720_PRBS_CTRL_10 0x1F, 0x062A
166 #define DP83TG720_CRC_STATUS 0x1F, 0x0638
167 #define DP83TG720_PKT_STAT_1 0x1F, 0x0639
168 #define DP83TG720_PKT_STAT_2 0x1F, 0x063A
169 #define DP83TG720_PKT_STAT_3 0x1F, 0x063B
170 #define DP83TG720_PKT_STAT_4 0x1F, 0x063C
171 #define DP83TG720_PKT_STAT_5 0x1F, 0x063D
172 #define DP83TG720_PKT_STAT_6 0x1F, 0x063E
173 #define DP83TG720_SQI_REG_1 0x1F, 0x0871
174 #define DP83TG720_DSP_REG_75 0x1F, 0x0875
175 #define DP83TG720_SQI_1 0x1F, 0x08AD
178 #define DP83TG720_BMCR_MII_RESET 0x8000
179 #define DP83TG720_BMCR_LOOPBACK 0x4000
180 #define DP83TG720_BMCR_POWER_DOWN 0x0800
181 #define DP83TG720_BMCR_ISOLATE 0x0400
182 #define DP83TG720_BMCR_SPEED_SEL_MSB 0x0040
185 #define DP83TG720_BMSR_EXTENDED_STATUS 0x0100
186 #define DP83TG720_BMSR_UNIDIRECTIONAL_ABILITY 0x0080
187 #define DP83TG720_BMSR_PREAMBLE_SUPRESSION 0x0040
188 #define DP83TG720_BMSR_ANEG_COMPLETE 0x0020
189 #define DP83TG720_BMSR_REMOTE_FAULT 0x0010
190 #define DP83TG720_BMSR_ANEG_ABILITY 0x0008
191 #define DP83TG720_BMSR_LINK_STATUS 0x0004
192 #define DP83TG720_BMSR_JABBER_DETECT 0x0002
193 #define DP83TG720_BMSR_EXTENDED_CAPABILITY 0x0001
196 #define DP83TG720_PHYID1_OUI_21_16 0xFFFF
197 #define DP83TG720_PHYID1_OUI_21_16_DEFAULT 0x2000
200 #define DP83TG720_PHYID2_OUI_5_0 0xFC00
201 #define DP83TG720_PHYID2_OUI_5_0_DEFAULT 0xA000
202 #define DP83TG720_PHYID2_MODEL_NUMBER 0x03E0
203 #define DP83TG720_PHYID2_MODEL_NUMBER_DEFAULT 0x0500
204 #define DP83TG720_PHYID2_REVISION_NUMBER 0x001F
205 #define DP83TG720_PHYID2_REVISION_NUMBER_DEFAULT 0x0004
208 #define DP83TG720_REGCR_CMD 0xC000
209 #define DP83TG720_REGCR_CMD_ADDR 0x0000
210 #define DP83TG720_REGCR_CMD_DATA_NO_POST_INC 0x4000
211 #define DP83TG720_REGCR_CMD_DATA_POST_INC_RW 0x8000
212 #define DP83TG720_REGCR_CMD_DATA_POST_INC_W 0xC000
213 #define DP83TG720_REGCR_DEVAD 0x001F
216 #define DP83TG720_MII_REG_10_SIGNAL_DETECT 0x0400
217 #define DP83TG720_MII_REG_10_DESCR_LOCK 0x0200
218 #define DP83TG720_MII_REG_10_MII_INT 0x0080
219 #define DP83TG720_MII_REG_10_MII_LOOPBACK 0x0008
220 #define DP83TG720_MII_REG_10_DUPLEX_MODE_ENV 0x0004
221 #define DP83TG720_MII_REG_10_LINK_STATUS 0x0001
224 #define DP83TG720_MII_REG_11_INT_POLARITY 0x0008
225 #define DP83TG720_MII_REG_11_FORCE_INTERRUPT 0x0004
226 #define DP83TG720_MII_REG_11_INT_EN 0x0002
229 #define DP83TG720_MII_REG_12_LINK_QUAL_INT 0x8000
230 #define DP83TG720_MII_REG_12_ENERGY_DET_INT 0x4000
231 #define DP83TG720_MII_REG_12_LINK_INT 0x2000
232 #define DP83TG720_MII_REG_12_ESD_INT 0x0800
233 #define DP83TG720_MII_REG_12_MS_TRAIN_DONE_INT 0x0400
234 #define DP83TG720_MII_REG_12_LINK_QUAL_INT_EN 0x0080
235 #define DP83TG720_MII_REG_12_ENERGY_DET_INT_EN 0x0040
236 #define DP83TG720_MII_REG_12_LINK_INT_EN 0x0020
237 #define DP83TG720_MII_REG_12_UNUSED_INT_3 0x0010
238 #define DP83TG720_MII_REG_12_ESD_INT_EN 0x0008
239 #define DP83TG720_MII_REG_12_MS_TRAIN_DONE_INT_EN 0x0004
240 #define DP83TG720_MII_REG_12_UNUSED_INT_2 0x0002
241 #define DP83TG720_MII_REG_12_UNUSED_INT_1 0x0001
244 #define DP83TG720_MII_REG_13_UNDER_VOLT_INT 0x8000
245 #define DP83TG720_MII_REG_13_OVER_VOLT_INT 0x4000
246 #define DP83TG720_MII_REG_13_OVER_TEMP_INT 0x0800
247 #define DP83TG720_MII_REG_13_SLEEP_INT 0x0400
248 #define DP83TG720_MII_REG_13_POL_CHANGE_INT 0x0200
249 #define DP83TG720_MII_REG_13_NOT_ONE_HOT_INT 0x0100
250 #define DP83TG720_MII_REG_13_UNDER_VOLT_INT_EN 0x0080
251 #define DP83TG720_MII_REG_13_OVER_VOLT_INT_EN 0x0040
252 #define DP83TG720_MII_REG_13_UNUSED_INT_6 0x0020
253 #define DP83TG720_MII_REG_13_UNUSED_INT_5 0x0010
254 #define DP83TG720_MII_REG_13_OVER_TEMP_INT_EN 0x0008
255 #define DP83TG720_MII_REG_13_SLEEP_INT_EN 0x0004
256 #define DP83TG720_MII_REG_13_POL_CHANGE_INT_EN 0x0002
257 #define DP83TG720_MII_REG_13_NOT_ONE_HOT_INT_EN 0x0001
260 #define DP83TG720_MII_REG_16_PRBS_SYNC_LOSS 0x0400
261 #define DP83TG720_MII_REG_16_CORE_PWR_MODE 0x0100
262 #define DP83TG720_MII_REG_16_CFG_DIG_PCS_LOOPBACK 0x0080
263 #define DP83TG720_MII_REG_16_LOOPBACK_MODE 0x007F
264 #define DP83TG720_MII_REG_16_LOOPBACK_MODE_PCS 0x0001
265 #define DP83TG720_MII_REG_16_LOOPBACK_MODE_RS 0x0002
266 #define DP83TG720_MII_REG_16_LOOPBACK_MODE_DIGITAL 0x0004
267 #define DP83TG720_MII_REG_16_LOOPBACK_MODE_ANALOG 0x0008
268 #define DP83TG720_MII_REG_16_LOOPBACK_MODE_REVERSE 0x0010
271 #define DP83TG720_MII_REG_18_ACK_RECEIVED_INT 0x8000
272 #define DP83TG720_MII_REG_18_TX_VALID_CLR_INT 0x4000
273 #define DP83TG720_MII_REG_18_POR_DONE_INT 0x0800
274 #define DP83TG720_MII_REG_18_NO_FRAME_INT 0x0400
275 #define DP83TG720_MII_REG_18_WAKE_REQ_INT 0x0200
276 #define DP83TG720_MII_REG_18_LPS_INT 0x0100
277 #define DP83TG720_MII_REG_18_ACK_RECEIVED_INT_EN 0x0080
278 #define DP83TG720_MII_REG_18_TX_VALID_CLR_INT_EN 0x0040
279 #define DP83TG720_MII_REG_18_POR_DONE_INT_EN 0x0008
280 #define DP83TG720_MII_REG_18_NO_FRAME_INT_EN 0x0004
281 #define DP83TG720_MII_REG_18_WAKE_REQ_INT_EN 0x0002
282 #define DP83TG720_MII_REG_18_LPS_INT_EN 0x0001
285 #define DP83TG720_MII_REG_19_SOR_PHYADDR 0x001F
288 #define DP83TG720_MII_REG_1E_TDR_START 0x8000
289 #define DP83TG720_MII_REG_1E_CFG_TDR_AUTO_RUN 0x4000
290 #define DP83TG720_MII_REG_1E_TDR_DONE 0x0002
291 #define DP83TG720_MII_REG_1E_TDR_FAIL 0x0001
294 #define DP83TG720_MII_REG_1F_SW_GLOBAL_RESET 0x8000
295 #define DP83TG720_MII_REG_1F_DIGITAL_RESET 0x4000
298 #define DP83TG720_PMA_PMD_CONTROL_1_PMA_RESET_2 0x8000
299 #define DP83TG720_PMA_PMD_CONTROL_1_CFG_LOW_POWER_2 0x0800
302 #define DP83TG720_PMA_PMD_CONTROL_2_CFG_PMA_TYPE_SELECTION 0x003F
305 #define DP83TG720_PMA_PMD_TRANSMIT_DISABLE_CFG_TRANSMIT_DISABLE_2 0x0001
308 #define DP83TG720_PMA_PMD_EXTENDED_ABILITY2_BASE_T1_EXTENDED_ABILITIES 0x0800
311 #define DP83TG720_PMA_PMD_EXTENDED_ABILITY_MR_1000_BASE_T1_ABILITY 0x0002
312 #define DP83TG720_PMA_PMD_EXTENDED_ABILITY_MR_100_BASE_T1_ABILITY 0x0001
315 #define DP83TG720_PMA_PMD_CONTROL_CFG_MASTER_SLAVE_VAL 0x4000
318 #define DP83TG720_PMA_CONTROL_PMA_RESET 0x8000
319 #define DP83TG720_PMA_CONTROL_CFG_TRANSMIT_DISABLE 0x4000
320 #define DP83TG720_PMA_CONTROL_CFG_LOW_POWER 0x0800
323 #define DP83TG720_PMA_STATUS_OAM_ABILITY 0x0800
324 #define DP83TG720_PMA_STATUS_EEE_ABILITY 0x0400
325 #define DP83TG720_PMA_STATUS_RECEIVE_FAULT_ABILITY 0x0200
326 #define DP83TG720_PMA_STATUS_LOW_POWER_ABILITY 0x0100
327 #define DP83TG720_PMA_STATUS_RECEIVE_POLARITY 0x0004
328 #define DP83TG720_PMA_STATUS_RECEIVE_FAULT 0x0002
329 #define DP83TG720_PMA_STATUS_PMA_RECEIVE_LINK_STATUS_LL 0x0001
332 #define DP83TG720_TRAINING_CFG_TRAINING_USER_FLD 0x07F0
333 #define DP83TG720_TRAINING_CFG_OAM_EN 0x0002
334 #define DP83TG720_TRAINING_CFG_EEE_EN 0x0001
337 #define DP83TG720_LP_TRAINING_LP_TRAINING_USER_FLD 0x07F0
338 #define DP83TG720_LP_TRAINING_LP_OAM_ADV 0x0002
339 #define DP83TG720_LP_TRAINING_LP_EEE_ADV 0x0001
342 #define DP83TG720_TEST_MODE_CONTROL_CFG_TEST_MODE 0xE000
345 #define DP83TG720_PCS_CONTROL_COPY_PCS_RESET_2 0x8000
346 #define DP83TG720_PCS_CONTROL_COPY_MMD3_LOOPBACK_2 0x4000
349 #define DP83TG720_PCS_CONTROL_PCS_RESET 0x8000
350 #define DP83TG720_PCS_CONTROL_MMD3_LOOPBACK 0x4000
353 #define DP83TG720_PCS_STATUS_TX_LPI_RECEIVED_LH 0x0800
354 #define DP83TG720_PCS_STATUS_RX_LPI_RECEIVED_LH 0x0400
355 #define DP83TG720_PCS_STATUS_TX_LPI_INDICATION 0x0200
356 #define DP83TG720_PCS_STATUS_RX_LPI_INDICATION 0x0100
357 #define DP83TG720_PCS_STATUS_PCS_FAULT 0x0080
358 #define DP83TG720_PCS_STATUS_PCS_RECEIVE_LINK_STATUS_LL 0x0004
361 #define DP83TG720_PCS_STATUS_2_PCS_RECEIVE_LINK_STATUS 0x0400
362 #define DP83TG720_PCS_STATUS_2_HI_RFER 0x0200
363 #define DP83TG720_PCS_STATUS_2_BLOCK_LOCK 0x0100
364 #define DP83TG720_PCS_STATUS_2_HI_RFER_LH 0x0080
365 #define DP83TG720_PCS_STATUS_2_BLOCK_LOCK_LL 0x0040
368 #define DP83TG720_OAM_TRANSMIT_MR_TX_VALID 0x8000
369 #define DP83TG720_OAM_TRANSMIT_MR_TX_TOGGLE 0x4000
370 #define DP83TG720_OAM_TRANSMIT_MR_TX_RECEIVED 0x2000
371 #define DP83TG720_OAM_TRANSMIT_MR_TX_RECEIVED_TOGGLE 0x1000
372 #define DP83TG720_OAM_TRANSMIT_MR_TX_MESSAGE_NUM 0x0F00
373 #define DP83TG720_OAM_TRANSMIT_MR_RX_PING 0x0008
374 #define DP83TG720_OAM_TRANSMIT_MR_TX_PING 0x0004
375 #define DP83TG720_OAM_TRANSMIT_MR_TX_SNR 0x0003
378 #define DP83TG720_OAM_TX_MESSAGE_1_MR_TX_MESSAGE_15_0 0xFFFF
381 #define DP83TG720_OAM_TX_MESSAGE_2_MR_TX_MESSAGE_31_16 0xFFFF
384 #define DP83TG720_OAM_TX_MESSAGE_3_MR_TX_MESSAGE_47_32 0xFFFF
387 #define DP83TG720_OAM_TX_MESSAGE_4_MR_TX_MESSAGE_63_48 0xFFFF
390 #define DP83TG720_OAM_RECEIVE_MR_RX_LP_VALID 0x8000
391 #define DP83TG720_OAM_RECEIVE_MR_RX_LP_TOGGLE 0x4000
392 #define DP83TG720_OAM_RECEIVE_MR_RX_LP_MESSAGE_NUM 0x0F00
393 #define DP83TG720_OAM_RECEIVE_MR_RX_LP_SNR 0x0003
396 #define DP83TG720_OAM_RX_MESSAGE_1_MR_RX_LP_MESSAGE_15_0 0xFFFF
399 #define DP83TG720_OAM_RX_MESSAGE_2_MR_RX_LP_MESSAGE_31_16 0xFFFF
402 #define DP83TG720_OAM_RX_MESSAGE_3_MR_RX_LP_MESSAGE_47_32 0xFFFF
405 #define DP83TG720_OAM_RX_MESSAGE_4_MR_RX_LP_MESSAGE_63_48 0xFFFF
408 #define DP83TG720_LSR_LINK_UP 0x8000
409 #define DP83TG720_LSR_LINK_DOWN 0x4000
410 #define DP83TG720_LSR_PHY_CTRL_SEND_DATA 0x2000
411 #define DP83TG720_LSR_LINK_STATUS 0x1000
412 #define DP83TG720_LSR_DESCR_SYNC 0x0004
413 #define DP83TG720_LSR_LOC_RCVR_STATUS 0x0002
414 #define DP83TG720_LSR_REM_RCVR_STATUS 0x0001
417 #define DP83TG720_LPS_CFG2_ED_EN 0x0100
418 #define DP83TG720_LPS_CFG2_SLEEP_EN 0x0080
419 #define DP83TG720_LPS_CFG2_CFG_AUTO_MODE_EN_STRAP 0x0040
420 #define DP83TG720_LPS_CFG2_CFG_LPS_MON_EN_STRAP 0x0020
421 #define DP83TG720_LPS_CFG2_CFG_LPS_SLEEP_AUTO 0x0010
422 #define DP83TG720_LPS_CFG2_CFG_LPS_SLP_CONFIRM 0x0008
423 #define DP83TG720_LPS_CFG2_CFG_LPS_AUTO_PWRDN 0x0004
424 #define DP83TG720_LPS_CFG2_CFG_LPS_SLEEP_EN 0x0002
425 #define DP83TG720_LPS_CFG2_CFG_LPS_SM_EN 0x0001
428 #define DP83TG720_LPS_CFG3_CFG_LPS_PWR_MODE_7 0x0080
429 #define DP83TG720_LPS_CFG3_CFG_LPS_PWR_MODE_6 0x0040
430 #define DP83TG720_LPS_CFG3_CFG_LPS_PWR_MODE_5 0x0020
431 #define DP83TG720_LPS_CFG3_CFG_LPS_PWR_MODE_4 0x0010
432 #define DP83TG720_LPS_CFG3_CFG_LPS_PWR_MODE_3 0x0008
433 #define DP83TG720_LPS_CFG3_CFG_LPS_PWR_MODE_2 0x0004
434 #define DP83TG720_LPS_CFG3_CFG_LPS_PWR_MODE_1 0x0002
435 #define DP83TG720_LPS_CFG3_CFG_LPS_PWR_MODE_0 0x0001
438 #define DP83TG720_TDR_STATUS0_PEAK1_LOC 0xFF00
439 #define DP83TG720_TDR_STATUS0_PEAK0_LOC 0x00FF
442 #define DP83TG720_TDR_STATUS1_PEAK3_LOC 0xFF00
443 #define DP83TG720_TDR_STATUS1_PEAK2_LOC 0x00FF
446 #define DP83TG720_TDR_STATUS2_PEAK0_AMP 0xFF00
447 #define DP83TG720_TDR_STATUS2_PEAK4_LOC 0x00FF
450 #define DP83TG720_TDR_STATUS5_PEAK4_SIGN 0x0010
451 #define DP83TG720_TDR_STATUS5_PEAK3_SIGN 0x0008
452 #define DP83TG720_TDR_STATUS5_PEAK2_SIGN 0x0004
453 #define DP83TG720_TDR_STATUS5_PEAK1_SIGN 0x0002
454 #define DP83TG720_TDR_STATUS5_PEAK0_SIGN 0x0001
457 #define DP83TG720_TDR_TC12_FAULT_LOC 0x3F00
458 #define DP83TG720_TDR_TC12_TDR_STATE 0x00F0
459 #define DP83TG720_TDR_TC12_TDR_ACTIVATION 0x0003
462 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL 0xFC00
463 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_400_MV 0x2800
464 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_440_MV 0x2C00
465 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_480_MV 0x3000
466 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_520_MV 0x3400
467 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_560_MV 0x3800
468 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_600_MV 0x3C00
469 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_640_MV 0x4000
470 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_680_MV 0x4400
471 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_720_MV 0x4800
472 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_760_MV 0x4C00
473 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_800_MV 0x5000
474 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_840_MV 0x5400
475 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_880_MV 0x5800
476 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_920_MV 0x5C00
477 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_960_MV 0x6000
478 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_1000_MV 0x6400
479 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_1040_MV 0x6800
480 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_1080_MV 0x6C00
481 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_1120_MV 0x7000
482 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_1160_MV 0x7400
483 #define DP83TG720_A2D_REG_05_LD_BIAS_1P0V_SL_1200_MV 0x7800
486 #define DP83TG720_A2D_REG_30_SPARE_IN_2_FROMDIG_SL_FORCE_EN 0x0100
491 #define DP83TG720_A2D_REG_40_SGMII_TESTMODE 0x6000
492 #define DP83TG720_A2D_REG_40_SGMII_SOP_SON_SLEW_CTRL 0x0800
495 #define DP83TG720_A2D_REG_41_SGMII_IO_LOOPBACK_EN 0x0002
498 #define DP83TG720_A2D_REG_43_SGMII_CDR_TESTMODE_1 0xFFFF
501 #define DP83TG720_A2D_REG_44_SGMII_DIG_LOOPBACK_EN 0x0010
504 #define DP83TG720_A2D_REG_46_SGMII_CALIB_WATCHDOG_DIS 0x0800
505 #define DP83TG720_A2D_REG_46_SGMII_CALIB_WATCHDOG_VAL 0x0600
506 #define DP83TG720_A2D_REG_46_SGMII_CALIB_AVG 0x0180
507 #define DP83TG720_A2D_REG_46_SGMII_DO_CALIB 0x0040
508 #define DP83TG720_A2D_REG_46_SGMII_CDR_LOCK_SL 0x0020
509 #define DP83TG720_A2D_REG_46_SGMII_MODE_FORCE_EN 0x0010
510 #define DP83TG720_A2D_REG_46_SGMII_INPUT_TERM_EN_FORCE_EN 0x0008
511 #define DP83TG720_A2D_REG_46_SGMII_OUTPUT_EN_FORCE_EN 0x0004
512 #define DP83TG720_A2D_REG_46_SGMII_COMP_OFFSET_TUNE_FORCE_EN 0x0002
513 #define DP83TG720_A2D_REG_46_SGMII_DATA_SYNC_SL 0x0001
516 #define DP83TG720_A2D_REG_47_SPARE_IN_2_FROMDIG_SL_2 0x0004
517 #define DP83TG720_A2D_REG_47_SPARE_IN_2_FROMDIG_SL_1 0x0002
518 #define DP83TG720_A2D_REG_47_SPARE_IN_2_FROMDIG_SL_0 0x0001
521 #define DP83TG720_A2D_REG_48_DLL_EN 0x1000
522 #define DP83TG720_A2D_REG_48_DLL_TX_DELAY_CTRL_SL 0x0F00
523 #define DP83TG720_A2D_REG_48_DLL_RX_DELAY_CTRL_SL 0x00F0
526 #define DP83TG720_A2D_REG_66_ESD_EVENT_COUNT 0x7E00
529 #define DP83TG720_LEDS_CFG_1_LEDS_BYPASS_STRETCHING 0x4000
530 #define DP83TG720_LEDS_CFG_1_LEDS_BLINK_RATE 0x3000
531 #define DP83TG720_LEDS_CFG_1_LEDS_BLINK_RATE_20HZ 0x0000
532 #define DP83TG720_LEDS_CFG_1_LEDS_BLINK_RATE_10HZ 0x1000
533 #define DP83TG720_LEDS_CFG_1_LEDS_BLINK_RATE_5HZ 0x2000
534 #define DP83TG720_LEDS_CFG_1_LEDS_BLINK_RATE_2HZ 0x3000
535 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION 0x0F00
536 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_LINK_OK 0x0000
537 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_TX_RX_ACT 0x0100
538 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_TX_ACT 0x0200
539 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_RX_ACT 0x0300
540 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_MASTER 0x0400
541 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_SLAVE 0x0500
542 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_TX_RX_ACT_STRETCH 0x0600
543 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_LINK_LOST 0x0900
544 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_PRBS_ERROR 0x0A00
545 #define DP83TG720_LEDS_CFG_1_LED_2_OPTION_XMII_TX_RX_ERROR 0x0B00
546 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION 0x00F0
547 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_LINK_OK 0x0000
548 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_TX_RX_ACT 0x0010
549 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_TX_ACT 0x0020
550 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_RX_ACT 0x0030
551 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_MASTER 0x0040
552 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_SLAVE 0x0050
553 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_TX_RX_ACT_STRETCH 0x0060
554 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_LINK_LOST 0x0090
555 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_PRBS_ERROR 0x00A0
556 #define DP83TG720_LEDS_CFG_1_LED_1_OPTION_XMII_TX_RX_ERROR 0x00B0
557 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION 0x000F
558 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_LINK_OK 0x0000
559 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_TX_RX_ACT 0x0001
560 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_TX_ACT 0x0002
561 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_RX_ACT 0x0003
562 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_MASTER 0x0004
563 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_SLAVE 0x0005
564 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_TX_RX_ACT_STRETCH 0x0006
565 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_LINK_LOST 0x0009
566 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_PRBS_ERROR 0x000A
567 #define DP83TG720_LEDS_CFG_1_LED_0_OPTION_XMII_TX_RX_ERROR 0x000B
570 #define DP83TG720_LEDS_CFG_2_CFG_IEEE_COMPL_SEL 0x0E00
571 #define DP83TG720_LEDS_CFG_2_CFG_IEEE_COMPL_SEL_LOC_RCVR_STATUS 0x0000
572 #define DP83TG720_LEDS_CFG_2_CFG_IEEE_COMPL_SEL_REM_RCVR_STATUS 0x0200
573 #define DP83TG720_LEDS_CFG_2_CFG_IEEE_COMPL_SEL_LOC_SNR_MARGIN 0x0400
574 #define DP83TG720_LEDS_CFG_2_CFG_IEEE_COMPL_SEL_REM_PHY_READY 0x0600
575 #define DP83TG720_LEDS_CFG_2_CFG_IEEE_COMPL_SEL_PMA_WATCHDOG_STATUS 0x0800
576 #define DP83TG720_LEDS_CFG_2_CFG_IEEE_COMPL_SEL_LINK_SYNC_LINK_CONTROL 0x0A00
577 #define DP83TG720_LEDS_CFG_2_LED_2_DRV_EN 0x0100
578 #define DP83TG720_LEDS_CFG_2_LED_2_DRV_VAL 0x0080
579 #define DP83TG720_LEDS_CFG_2_LED_2_POLARITY 0x0040
580 #define DP83TG720_LEDS_CFG_2_LED_1_DRV_EN 0x0020
581 #define DP83TG720_LEDS_CFG_2_LED_1_DRV_VAL 0x0010
582 #define DP83TG720_LEDS_CFG_2_LED_1_POLARITY 0x0008
583 #define DP83TG720_LEDS_CFG_2_LED_0_DRV_EN 0x0004
584 #define DP83TG720_LEDS_CFG_2_LED_0_DRV_VAL 0x0002
585 #define DP83TG720_LEDS_CFG_2_LED_0_POLARITY 0x0001
588 #define DP83TG720_IO_MUX_CFG_1_LED_1_GPIO_CTRL 0x0700
589 #define DP83TG720_IO_MUX_CFG_1_LED_1_GPIO_CTRL_LED_1 0x0000
590 #define DP83TG720_IO_MUX_CFG_1_LED_1_GPIO_CTRL_RGMII_DATA_MATCH 0x0200
591 #define DP83TG720_IO_MUX_CFG_1_LED_1_GPIO_CTRL_UNDER_VOLTAGE 0x0300
592 #define DP83TG720_IO_MUX_CFG_1_LED_1_GPIO_CTRL_INTERRUPT 0x0400
593 #define DP83TG720_IO_MUX_CFG_1_LED_1_GPIO_CTRL_IEEE 0x0500
594 #define DP83TG720_IO_MUX_CFG_1_LED_1_GPIO_CTRL_LOW 0x0600
595 #define DP83TG720_IO_MUX_CFG_1_LED_1_GPIO_CTRL_HIGH 0x0700
596 #define DP83TG720_IO_MUX_CFG_1_LED_0_GPIO_CTRL 0x0007
597 #define DP83TG720_IO_MUX_CFG_1_LED_0_GPIO_CTRL_LED_0 0x0000
598 #define DP83TG720_IO_MUX_CFG_1_LED_0_GPIO_CTRL_RGMII_DATA_MATCH 0x0002
599 #define DP83TG720_IO_MUX_CFG_1_LED_0_GPIO_CTRL_UNDER_VOLTAGE 0x0003
600 #define DP83TG720_IO_MUX_CFG_1_LED_0_GPIO_CTRL_INTERRUPT 0x0004
601 #define DP83TG720_IO_MUX_CFG_1_LED_0_GPIO_CTRL_IEEE 0x0005
602 #define DP83TG720_IO_MUX_CFG_1_LED_0_GPIO_CTRL_LOW 0x0006
603 #define DP83TG720_IO_MUX_CFG_1_LED_0_GPIO_CTRL_HIGH 0x0007
606 #define DP83TG720_IO_MUX_CFG_2_CLK_O_CLK_SOURCE 0x0038
607 #define DP83TG720_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_XI_OSC_25M_1P0V_DL 0x0000
608 #define DP83TG720_IO_MUX_CFG_2_CLK_O_CLK_SOURCE_125MHZ_CLK 0x0018
609 #define DP83TG720_IO_MUX_CFG_2_CLK_O_GPIO_CTRL 0x0007
610 #define DP83TG720_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_LED_2 0x0000
611 #define DP83TG720_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_RGMII_DATA_MATCH 0x0002
612 #define DP83TG720_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_UNDER_VOLTAGE 0x0003
613 #define DP83TG720_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_LOW 0x0004
614 #define DP83TG720_IO_MUX_CFG_2_CLK_O_GPIO_CTRL_HIGH 0x0007
617 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1 0xFFFF
618 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_LED_0_GPIO_0 0x0000
619 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_LED_1_GPIO_1 0x0001
620 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_CLKOUT_GPIO_2 0x0002
621 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_INT_N 0x0003
622 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_INH 0x0006
623 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_TX_CLK 0x0007
624 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_TX_CTRL 0x0008
625 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_TX_D0 0x0009
626 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_TX_D1 0x000A
627 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_TX_D2 0x000B
628 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_TX_D3 0x000C
629 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_RX_CLK 0x000D
630 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_RX_CTRL 0x000E
631 #define DP83TG720_IO_CONTROL_1_IO_CONTROL_1_RX_D0 0x000F
634 #define DP83TG720_IO_CONTROL_2_CFG_OTHER_IMPEDANCE 0x3E00
635 #define DP83TG720_IO_CONTROL_2_CFG_OTHER_IMPEDANCE_DEFAULT 0x0000
636 #define DP83TG720_IO_CONTROL_2_CFG_OTHER_IMPEDANCE_SLOWER 0x0200
637 #define DP83TG720_IO_CONTROL_2_CFG_OTHER_IMPEDANCE_FASTER 0x0400
638 #define DP83TG720_IO_CONTROL_2_PUPD_VALUE 0x0180
639 #define DP83TG720_IO_CONTROL_2_PUPD_VALUE_NO_PULL 0x0000
640 #define DP83TG720_IO_CONTROL_2_PUPD_VALUE_PULL_UP 0x0080
641 #define DP83TG720_IO_CONTROL_2_PUPD_VALUE_PULL_DOWN 0x0100
642 #define DP83TG720_IO_CONTROL_2_PUPD_VALUE_BOTH 0x0180
643 #define DP83TG720_IO_CONTROL_2_PUPD_FORCE_CNTL 0x0040
644 #define DP83TG720_IO_CONTROL_2_IO_OE_N_VALUE 0x0020
645 #define DP83TG720_IO_CONTROL_2_IO_OE_N_FORCE_CTRL 0x0010
646 #define DP83TG720_IO_CONTROL_2_IO_CONTROL_2 0x000F
647 #define DP83TG720_IO_CONTROL_2_IO_CONTROL_2_RX_D1 0x0000
648 #define DP83TG720_IO_CONTROL_2_IO_CONTROL_2_RX_D2 0x0001
649 #define DP83TG720_IO_CONTROL_2_IO_CONTROL_2_RX_D3 0x0002
650 #define DP83TG720_IO_CONTROL_2_IO_CONTROL_2_STRP_1 0x0003
653 #define DP83TG720_IO_CONTROL_3_CFG_MAC_RX_IMPEDANCE 0x03E0
654 #define DP83TG720_IO_CONTROL_3_CFG_MAC_RX_IMPEDANCE_MEDIUM 0x0140
655 #define DP83TG720_IO_CONTROL_3_CFG_MAC_RX_IMPEDANCE_SLOWEST 0x0160
656 #define DP83TG720_IO_CONTROL_3_CFG_MAC_RX_IMPEDANCE_DEFAULT 0x0100
659 #define DP83TG720_IO_STATUS_1_IO_STATUS_1 0xFFFF
660 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_LED_0_GPIO_0 0x0000
661 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_LED_1_GPIO_1 0x0001
662 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_CLKOUT_GPIO_2 0x0002
663 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_INT_N 0x0003
664 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_INH 0x0006
665 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_TX_CLK 0x0007
666 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_TX_CTRL 0x0008
667 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_TX_D0 0x0009
668 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_TX_D1 0x000A
669 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_TX_D2 0x000B
670 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_TX_D3 0x000C
671 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_RX_CLK 0x000D
672 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_RX_CTRL 0x000E
673 #define DP83TG720_IO_STATUS_1_IO_STATUS_1_RX_D0 0x000F
676 #define DP83TG720_IO_STATUS_2_IO_STATUS_2 0x000F
677 #define DP83TG720_IO_STATUS_2_IO_STATUS_2_RX_D1 0x0000
678 #define DP83TG720_IO_STATUS_2_IO_STATUS_2_RX_D2 0x0001
679 #define DP83TG720_IO_STATUS_2_IO_STATUS_2_RX_D3 0x0002
680 #define DP83TG720_IO_STATUS_2_IO_STATUS_2_STRP_1 0x0003
683 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE 0xFFFF
684 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_LED_0_GPIO_0 0x0000
685 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_LED_1_GPIO_1 0x0001
686 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_CLKOUT_GPIO_2 0x0002
687 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_INT_N 0x0003
688 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_TX_CLK 0x0004
689 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_TX_CTRL 0x0005
690 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_TX_D0 0x0006
691 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_TX_D1 0x0007
692 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_TX_D2 0x0008
693 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_TX_D3 0x0009
694 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_RX_CLK 0x000A
695 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_RX_CTRL 0x000B
696 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_RX_D0 0x000C
697 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_RX_D1 0x000D
698 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_RX_D2 0x000E
699 #define DP83TG720_IO_CONTROL_4_IO_INPUT_MODE_RX_D3 0x000F
702 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE 0xFFFF
703 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_LED_0_GPIO_0 0x0000
704 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_LED_1_GPIO_1 0x0001
705 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_CLKOUT_GPIO_2 0x0002
706 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_INT_N 0x0003
707 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_TX_CLK 0x0004
708 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_TX_CTRL 0x0005
709 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_TX_D0 0x0006
710 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_TX_D1 0x0007
711 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_TX_D2 0x0008
712 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_TX_D3 0x0009
713 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_RX_CLK 0x000A
714 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_RX_CTRL 0x000B
715 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_RX_D0 0x000C
716 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_RX_D1 0x000D
717 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_RX_D2 0x000E
718 #define DP83TG720_IO_CONTROL_5_IO_OUTPUT_MODE_RX_D3 0x000F
721 #define DP83TG720_SOR_VECTOR_1_RGMII_TX_SHIFT 0x8000
722 #define DP83TG720_SOR_VECTOR_1_RGMII_RX_SHIFT 0x4000
723 #define DP83TG720_SOR_VECTOR_1_SGMII_EN 0x2000
724 #define DP83TG720_SOR_VECTOR_1_RGMII_EN 0x1000
725 #define DP83TG720_SOR_VECTOR_1_TEST_MODE 0x0E00
726 #define DP83TG720_SOR_VECTOR_1_MAC_MODE 0x01C0
727 #define DP83TG720_SOR_VECTOR_1_MAC_MODE_SGMII 0x0000
728 #define DP83TG720_SOR_VECTOR_1_MAC_MODE_RGMII_ALIGN 0x0100
729 #define DP83TG720_SOR_VECTOR_1_MAC_MODE_RGMII_TX_SHIFT 0x0140
730 #define DP83TG720_SOR_VECTOR_1_MAC_MODE_RGMII_TX_RX_SHIFT 0x0180
731 #define DP83TG720_SOR_VECTOR_1_MAC_MODE_RGMII_RX_SHIFT 0x01C0
732 #define DP83TG720_SOR_VECTOR_1_MAS_SLV 0x0020
733 #define DP83TG720_SOR_VECTOR_1_PHY_AD 0x001F
736 #define DP83TG720_SOR_VECTOR_2_AUTO_MANAGED 0x0001
739 #define DP83TG720_MONITOR_CTRL1_CFG_DC_OFFSET_2C 0xFF00
740 #define DP83TG720_MONITOR_CTRL1_CFG_CIC_GAIN12_ARITH 0x00C0
741 #define DP83TG720_MONITOR_CTRL1_CFG_CIC_GAIN2 0x0038
742 #define DP83TG720_MONITOR_CTRL1_CFG_CIC_GAIN1 0x0007
745 #define DP83TG720_MONITOR_CTRL2_CFG_BYPASS_RESET_SENSOR_VAL 0x8000
746 #define DP83TG720_MONITOR_CTRL2_CFG_RD_DATA 0x7000
747 #define DP83TG720_MONITOR_CTRL2_CFG_DEC_FACTOR_SENSORS 0x0E00
748 #define DP83TG720_MONITOR_CTRL2_CFG_DEC_FACTOR_GAIN_CALIB 0x01C0
749 #define DP83TG720_MONITOR_CTRL2_CFG_DEC_FACTOR_DC_CALIB 0x0038
750 #define DP83TG720_MONITOR_CTRL2_CFG_BYPASS_SEL_NUM 0x0007
753 #define DP83TG720_MONITOR_CTRL4_CFG_HIST_CLR 0x0100
754 #define DP83TG720_MONITOR_CTRL4_CFG_DISCARD_SAMPLE_NUM 0x0080
755 #define DP83TG720_MONITOR_CTRL4_CFG_AVG_SAMPLE_NUM 0x0040
756 #define DP83TG720_MONITOR_CTRL4_CFG_ADC_CLK_DIV 0x0030
757 #define DP83TG720_MONITOR_CTRL4_CFG_FORCE_START 0x0008
758 #define DP83TG720_MONITOR_CTRL4_CFG_RESET 0x0004
759 #define DP83TG720_MONITOR_CTRL4_PERIODIC 0x0002
760 #define DP83TG720_MONITOR_CTRL4_START 0x0001
763 #define DP83TG720_MONITOR_STAT1_STAT_RD_DATA 0xFFFF
766 #define DP83TG720_BREAK_LINK_TIMER_CFG_FIFO_RESET_IN_BREAK_LINK 0x1000
767 #define DP83TG720_BREAK_LINK_TIMER_CFG_SLAVE_SEND_S_32_MODE 0x0800
770 #define DP83TG720_RS_DECODER_CFG_RS_DECODER_BYPASS 0x8000
773 #define DP83TG720_LPS_CONTROL_1_CFG_TX_WAKE_CG 0x0E00
774 #define DP83TG720_LPS_CONTROL_1_CFG_TX_SLEEP_CG 0x01C0
775 #define DP83TG720_LPS_CONTROL_1_CFG_RX_WAKE_CG 0x0038
776 #define DP83TG720_LPS_CONTROL_1_CFG_RX_SLEEP_CG 0x0007
779 #define DP83TG720_LPS_CONTROL_2_CFG_WAKE_CG_CNT_TH 0x7F00
780 #define DP83TG720_LPS_CONTROL_2_CFG_SLEEP_CG_CNT_TH 0x007F
783 #define DP83TG720_MAXWAIT_TIMER_CFG_MAXWAIT_TIMER_INIT 0xFFFF
786 #define DP83TG720_PHY_CTRL_1G_CFG_FORCE_LINK_STAT_VAL 0x0800
787 #define DP83TG720_PHY_CTRL_1G_CFG_FORCE_LINK_STAT 0x0400
788 #define DP83TG720_PHY_CTRL_1G_CFG_MINWAIT_TIMER_INIT 0x00FF
791 #define DP83TG720_TEST_MODE_CFG_TEST_MODE4_TX_ORDER 0x0100
792 #define DP83TG720_TEST_MODE_CFG_TEST_MODE_7_DATA 0x00FF
795 #define DP83TG720_LINK_QUAL_1_LINK_TRAINING_TIME 0x00FF
798 #define DP83TG720_LINK_QUAL_2_REMOTE_RECEIVER_TIME 0xFF00
799 #define DP83TG720_LINK_QUAL_2_LOCAL_RECEIVER_TIME 0x00FF
802 #define DP83TG720_LINK_DOWN_LATCH_STAT_CHANNEL_OK_LL 0x0020
803 #define DP83TG720_LINK_DOWN_LATCH_STAT_LINK_FAIL_INHIBIT_LH 0x0010
804 #define DP83TG720_LINK_DOWN_LATCH_STAT_SEND_S_SIGDET_LH 0x0008
805 #define DP83TG720_LINK_DOWN_LATCH_STAT_HI_RFER_LH 0x0004
806 #define DP83TG720_LINK_DOWN_LATCH_STAT_BLOCK_LOCK_LL 0x0002
807 #define DP83TG720_LINK_DOWN_LATCH_STAT_PMA_WATCHDOG_LL 0x0001
810 #define DP83TG720_LINK_QUAL_3_LINK_LOSS_CNT 0xFC00
811 #define DP83TG720_LINK_QUAL_3_LINK_FAIL_CNT 0x03FF
814 #define DP83TG720_LINK_QUAL_4_COMM_READY 0x0001
817 #define DP83TG720_RS_DECODER_FRAME_STAT_2_RS_DEC_UNCORR_FRAME_CNT 0xFFFF
820 #define DP83TG720_PMA_WATCHDOG_CFG_PMA_WATCHDOG_FORCE_VAL 0x0040
821 #define DP83TG720_PMA_WATCHDOG_CFG_PMA_WATCHDOG_FORCE_EN 0x0020
822 #define DP83TG720_PMA_WATCHDOG_CFG_IEEE_WATCHDOG_EN 0x0010
823 #define DP83TG720_PMA_WATCHDOG_CFG_WATCHDOG_CNT_CLR_TH 0x000F
826 #define DP83TG720_SYMB_POL_CFG_CFG_SLAVE_AUTO_POL_CORRECTION_EN 0x0010
827 #define DP83TG720_SYMB_POL_CFG_CFG_RX_SYMB_ORDER_INV 0x0008
828 #define DP83TG720_SYMB_POL_CFG_CFG_RX_SYMB_POL_INV 0x0004
829 #define DP83TG720_SYMB_POL_CFG_CFG_TX_SYMB_ORDER_INV 0x0002
830 #define DP83TG720_SYMB_POL_CFG_CFG_TX_SYMB_POL_INV 0x0001
833 #define DP83TG720_OAM_CFG_CFG_RX_OAM_CRC_DATA_IN_ORDER 0x0002
834 #define DP83TG720_OAM_CFG_CFG_TX_OAM_CRC_DATA_IN_ORDER 0x0001
837 #define DP83TG720_TEST_MEM_CFG_CFG_WAIT_TIME_XCORR_WEN 0x1FC0
838 #define DP83TG720_TEST_MEM_CFG_CFG_XCORR_DBG_SEL 0x0020
839 #define DP83TG720_TEST_MEM_CFG_CFG_SEND_S_INFINITE_LOOP 0x0010
840 #define DP83TG720_TEST_MEM_CFG_CFG_XCORR_DBG_TEST_MEM 0x0008
841 #define DP83TG720_TEST_MEM_CFG_CFG_ECC_EN 0x0004
842 #define DP83TG720_TEST_MEM_CFG_CFG_TEST_MEM_SIGDET_DEBUG 0x0002
843 #define DP83TG720_TEST_MEM_CFG_CFG_PCS_TEST_MEM_MODE 0x0001
846 #define DP83TG720_FORCE_CTRL1_CFG_FORCE_LINK_SYNC_STATE_EN 0x0100
847 #define DP83TG720_FORCE_CTRL1_CFG_FORCE_LINK_SYNC_STATE_VAL 0x00FF
850 #define DP83TG720_RGMII_CTRL_RGMII_RX_HALF_FULL_TH 0x0380
851 #define DP83TG720_RGMII_CTRL_RGMII_RX_HALF_FULL_TH_DEFAULT 0x0100
852 #define DP83TG720_RGMII_CTRL_RGMII_TX_HALF_FULL_TH 0x0070
853 #define DP83TG720_RGMII_CTRL_RGMII_TX_HALF_FULL_TH_DEFAULT 0x0020
854 #define DP83TG720_RGMII_CTRL_RGMII_TX_IF_EN 0x0008
855 #define DP83TG720_RGMII_CTRL_INVERT_RGMII_TXD 0x0004
856 #define DP83TG720_RGMII_CTRL_INVERT_RGMII_RXD 0x0002
857 #define DP83TG720_RGMII_CTRL_SUP_TX_ERR_FD 0x0001
860 #define DP83TG720_RGMII_FIFO_STATUS_RGMII_RX_AF_FULL_ERR 0x0008
861 #define DP83TG720_RGMII_FIFO_STATUS_RGMII_RX_AF_EMPTY_ERR 0x0004
862 #define DP83TG720_RGMII_FIFO_STATUS_RGMII_TX_AF_FULL_ERR 0x0002
863 #define DP83TG720_RGMII_FIFO_STATUS_RGMII_TX_AF_EMPTY_ERR 0x0001
866 #define DP83TG720_RGMII_DELAY_CTRL_RX_CLK_SEL 0x0002
867 #define DP83TG720_RGMII_DELAY_CTRL_TX_CLK_SEL 0x0001
870 #define DP83TG720_SGMII_CTRL_1_SGMII_TX_ERR_DIS 0x8000
871 #define DP83TG720_SGMII_CTRL_1_CFG_ALIGN_IDX_FORCE 0x4000
872 #define DP83TG720_SGMII_CTRL_1_CFG_ALIGN_IDX_VALUE 0x3C00
873 #define DP83TG720_SGMII_CTRL_1_CFG_SGMII_EN 0x0200
874 #define DP83TG720_SGMII_CTRL_1_CFG_SGMII_RX_POL_INVERT 0x0100
875 #define DP83TG720_SGMII_CTRL_1_CFG_SGMII_TX_POL_INVERT 0x0080
876 #define DP83TG720_SGMII_CTRL_1_SGMII_AUTONEG_TIMER 0x0006
877 #define DP83TG720_SGMII_CTRL_1_MR_AN_ENABLE 0x0001
880 #define DP83TG720_SGMII_STATUS_SGMII_PAGE_RECEIVED 0x1000
881 #define DP83TG720_SGMII_STATUS_LINK_STATUS_1000BX 0x0800
882 #define DP83TG720_SGMII_STATUS_MR_AN_COMPLETE 0x0400
883 #define DP83TG720_SGMII_STATUS_CFG_ALIGN_EN 0x0200
884 #define DP83TG720_SGMII_STATUS_CFG_SYNC_STATUS 0x0100
885 #define DP83TG720_SGMII_STATUS_CFG_ALIGN_IDX 0x00F0
886 #define DP83TG720_SGMII_STATUS_CFG_STATE 0x000F
889 #define DP83TG720_SGMII_CTRL_2_SGMII_SIGNAL_DETECT_FORCE_VAL 0x0100
890 #define DP83TG720_SGMII_CTRL_2_SGMII_SIGNAL_DETECT_FORCE_EN 0x0080
891 #define DP83TG720_SGMII_CTRL_2_MR_RESTART_AN 0x0040
892 #define DP83TG720_SGMII_CTRL_2_TX_HALF_FULL_TH 0x0038
893 #define DP83TG720_SGMII_CTRL_2_RX_HALF_FULL_TH 0x0007
896 #define DP83TG720_SGMII_FIFO_STATUS_SGMII_RX_AF_FULL_ERR 0x0008
897 #define DP83TG720_SGMII_FIFO_STATUS_SGMII_RX_AF_EMPTY_ERR 0x0004
898 #define DP83TG720_SGMII_FIFO_STATUS_SGMII_TX_AF_FULL_ERR 0x0002
899 #define DP83TG720_SGMII_FIFO_STATUS_SGMII_TX_AF_EMPTY_ERR 0x0001
902 #define DP83TG720_PRBS_STATUS_1_PRBS_ERR_OV_CNT 0x00FF
905 #define DP83TG720_PRBS_CTRL_1_CFG_PKT_GEN_64 0x2000
906 #define DP83TG720_PRBS_CTRL_1_SEND_PKT 0x1000
907 #define DP83TG720_PRBS_CTRL_1_CFG_PRBS_CHK_SEL 0x0700
908 #define DP83TG720_PRBS_CTRL_1_CFG_PRBS_GEN_SEL 0x0070
909 #define DP83TG720_PRBS_CTRL_1_CFG_PRBS_CNT_MODE 0x0008
910 #define DP83TG720_PRBS_CTRL_1_CFG_PRBS_CHK_ENABLE 0x0004
911 #define DP83TG720_PRBS_CTRL_1_CFG_PKT_GEN_PRBS 0x0002
912 #define DP83TG720_PRBS_CTRL_1_PKT_GEN_EN 0x0001
915 #define DP83TG720_PRBS_CTRL_2_CFG_PKT_LEN_PRBS 0xFFFF
918 #define DP83TG720_PRBS_CTRL_3_CFG_IPG_LEN 0x00FF
921 #define DP83TG720_PRBS_STATUS_2_PRBS_BYTE_CNT 0xFFFF
924 #define DP83TG720_PRBS_STATUS_3_PRBS_PKT_CNT_15_0 0xFFFF
927 #define DP83TG720_PRBS_STATUS_4_PRBS_PKT_CNT_31_16 0xFFFF
930 #define DP83TG720_PRBS_STATUS_6_PKT_DONE 0x1000
931 #define DP83TG720_PRBS_STATUS_6_PKT_GEN_BUSY 0x0800
932 #define DP83TG720_PRBS_STATUS_6_PRBS_PKT_OV 0x0400
933 #define DP83TG720_PRBS_STATUS_6_PRBS_BYTE_OV 0x0200
934 #define DP83TG720_PRBS_STATUS_6_PRBS_LOCK 0x0100
935 #define DP83TG720_PRBS_STATUS_6_PRBS_ERR_CNT 0x00FF
938 #define DP83TG720_PRBS_STATUS_8_PKT_ERR_CNT_15_0 0xFFFF
941 #define DP83TG720_PRBS_STATUS_9_PKT_ERR_CNT_31_16 0xFFFF
944 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_DATA 0xFF00
945 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_DATA_DEFAULT 0x5500
946 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_MODE 0x00C0
947 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_MODE_INCREMENTAL 0x0000
948 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_MODE_FIXED 0x0040
949 #define DP83TG720_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES 0x0038
950 #define DP83TG720_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES_0_BYTE 0x0000
951 #define DP83TG720_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES_1_BYTE 0x0008
952 #define DP83TG720_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES_2_BYTES 0x0010
953 #define DP83TG720_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES_3_BYTES 0x0018
954 #define DP83TG720_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES_4_BYTES 0x0020
955 #define DP83TG720_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES_5_BYTES 0x0028
956 #define DP83TG720_PRBS_CTRL_4_CFG_PATTERN_VLD_BYTES_6_BYTES 0x0030
957 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT 0x0007
958 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT_1_PACKET 0x0000
959 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT_10_PACKETS 0x0001
960 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT_100_PACKETS 0x0002
961 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT_1000_PACKETS 0x0003
962 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT_10000_PACKETS 0x0004
963 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT_100000_PACKETS 0x0005
964 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT_1000000_PACKETS 0x0006
965 #define DP83TG720_PRBS_CTRL_4_CFG_PKT_CNT_CONTINUOUS 0x0007
968 #define DP83TG720_PRBS_CTRL_5_PATTERN_15_0 0xFFFF
971 #define DP83TG720_PRBS_CTRL_6_PATTERN_31_16 0xFFFF
974 #define DP83TG720_PRBS_CTRL_7_PATTERN_47_32 0xFFFF
977 #define DP83TG720_PRBS_CTRL_8_PMATCH_DATA_15_0 0xFFFF
980 #define DP83TG720_PRBS_CTRL_9_PMATCH_DATA_31_16 0xFFFF
983 #define DP83TG720_PRBS_CTRL_10_PMATCH_DATA_47_32 0xFFFF
986 #define DP83TG720_CRC_STATUS_RX_BAD_CRC 0x0002
987 #define DP83TG720_CRC_STATUS_TX_BAD_CRC 0x0001
990 #define DP83TG720_PKT_STAT_1_TX_PKT_CNT_15_0 0xFFFF
993 #define DP83TG720_PKT_STAT_2_TX_PKT_CNT_31_16 0xFFFF
996 #define DP83TG720_PKT_STAT_3_TX_ERR_PKT_CNT 0xFFFF
999 #define DP83TG720_PKT_STAT_4_RX_PKT_CNT_15_0 0xFFFF
1002 #define DP83TG720_PKT_STAT_5_RX_PKT_CNT_31_16 0xFFFF
1005 #define DP83TG720_PKT_STAT_6_RX_ERR_PKT_CNT 0xFFFF
1008 #define DP83TG720_SQI_REG_1_WORST_SQI_OUT 0x00E0
1009 #define DP83TG720_SQI_REG_1_SQI_OUT 0x000E
1012 #define DP83TG720_DSP_REG_75_MSE_LOCK 0x03FF
1015 #define DP83TG720_SQI_1_CFG_HIST_1_2 0xF000
1016 #define DP83TG720_SQI_1_CFG_ACC_WINDOW_SEL 0x0C00
1017 #define DP83TG720_SQI_1_CFG_SQI_TH_1_2 0x03FF
void dp83tg720EventHandler(NetInterface *interface)
DP83TG720 event handler.
uint16_t dp83tg720ReadPhyReg(NetInterface *interface, uint8_t address)
Read PHY register.
void dp83tg720Tick(NetInterface *interface)
DP83TG720 timer handler.
void dp83tg720InitHook(NetInterface *interface)
DP83TG720 custom configuration.
void dp83tg720EnableIrq(NetInterface *interface)
Enable interrupts.
void dp83tg720DumpPhyReg(NetInterface *interface)
Dump PHY registers for debugging purpose.
void dp83tg720WritePhyReg(NetInterface *interface, uint8_t address, uint16_t data)
Write PHY register.
void dp83tg720DisableIrq(NetInterface *interface)
Disable interrupts.
Network interface controller abstraction layer.
uint16_t dp83tg720ReadMmdReg(NetInterface *interface, uint8_t devAddr, uint16_t regAddr)
Read MMD register.
error_t dp83tg720Init(NetInterface *interface)
DP83TG720 PHY transceiver initialization.
void dp83tg720WriteMmdReg(NetInterface *interface, uint8_t devAddr, uint16_t regAddr, uint16_t data)
Write MMD register.
const PhyDriver dp83tg720PhyDriver
DP83TG720 Ethernet PHY driver.