mikroSDK Reference Manual
adin2111_driver.h
Go to the documentation of this file.
1
31#ifndef _ADIN2111_DRIVER_H
32#define _ADIN2111_DRIVER_H
33
34//Dependencies
35#include "core/nic.h"
36
37//TX buffer size
38#ifndef ADIN2111_ETH_TX_BUFFER_SIZE
39 #define ADIN2111_ETH_TX_BUFFER_SIZE 1536
40#elif (ADIN2111_ETH_TX_BUFFER_SIZE != 1536)
41 #error ADIN2111_ETH_TX_BUFFER_SIZE parameter is not valid
42#endif
43
44//RX buffer size
45#ifndef ADIN2111_ETH_RX_BUFFER_SIZE
46 #define ADIN2111_ETH_RX_BUFFER_SIZE 1536
47#elif (ADIN2111_ETH_RX_BUFFER_SIZE != 1536)
48 #error ADIN2111_ETH_RX_BUFFER_SIZE parameter is not valid
49#endif
50
51//Port identifiers
52#define ADIN2111_PORT1 1
53#define ADIN2111_PORT2 2
54
55//Size of the MAC address filtering table
56#define ADIN2111_ADDR_TABLE_SIZE 16
57//Frame header size
58#define ADIN2111_FRAME_HEADER_SIZE 2
59//TX frame overhead
60#define ADIN2111_TX_FRAME_OVERHEAD 4
61
62//SPI commands
63#define ADIN2111_SPI_CMD_READ 0x80
64#define ADIN2111_SPI_CMD_WRITE 0xA0
65
66//Frame header
67#define ADIN2111_FRAME_HEADER_PRIORITY 0x4000
68#define ADIN2111_FRAME_HEADER_EGRESS_CAPTURE 0x00C0
69#define ADIN2111_FRAME_HEADER_EGRESS_CAPTURE_A 0x0040
70#define ADIN2111_FRAME_HEADER_EGRESS_CAPTURE_B 0x0080
71#define ADIN2111_FRAME_HEADER_EGRESS_CAPTURE_C 0x00C0
72#define ADIN2111_FRAME_HEADER_TIME_STAMP_PARITY 0x0008
73#define ADIN2111_FRAME_HEADER_TIME_STAMP_PRESENT 0x0004
74#define ADIN2111_FRAME_HEADER_PORT1 0x0000
75#define ADIN2111_FRAME_HEADER_PORT2 0x0001
76
77//ADIN2111 MAC registers
78#define ADIN2111_IDVER 0x00
79#define ADIN2111_PHYID 0x01
80#define ADIN2111_CAPABILITY 0x02
81#define ADIN2111_RESET 0x03
82#define ADIN2111_CONFIG0 0x04
83#define ADIN2111_CONFIG2 0x06
84#define ADIN2111_STATUS0 0x08
85#define ADIN2111_STATUS1 0x09
86#define ADIN2111_BUFSTS 0x0B
87#define ADIN2111_IMASK0 0x0C
88#define ADIN2111_IMASK1 0x0D
89#define ADIN2111_TTSCAH 0x10
90#define ADIN2111_TTSCAL 0x11
91#define ADIN2111_TTSCBH 0x12
92#define ADIN2111_TTSCBL 0x13
93#define ADIN2111_TTSCCH 0x14
94#define ADIN2111_TTSCCL 0x15
95#define ADIN2111_MDIOACC0 0x20
96#define ADIN2111_MDIOACC1 0x21
97#define ADIN2111_MDIOACC2 0x22
98#define ADIN2111_MDIOACC3 0x23
99#define ADIN2111_MDIOACC4 0x24
100#define ADIN2111_MDIOACC5 0x25
101#define ADIN2111_MDIOACC6 0x26
102#define ADIN2111_MDIOACC7 0x27
103#define ADIN2111_TX_FSIZE 0x30
104#define ADIN2111_TX 0x31
105#define ADIN2111_TX_SPACE 0x32
106#define ADIN2111_TX_THRESH 0x34
107#define ADIN2111_TX_PRI 0x35
108#define ADIN2111_FIFO_CLR 0x36
109#define ADIN2111_SCRATCH0 0x37
110#define ADIN2111_SCRATCH1 0x38
111#define ADIN2111_SCRATCH2 0x39
112#define ADIN2111_SCRATCH3 0x3A
113#define ADIN2111_MAC_RST_STATUS 0x3B
114#define ADIN2111_SOFT_RST 0x3C
115#define ADIN2111_SPI_INJ_ERR 0x3D
116#define ADIN2111_FIFO_SIZE 0x3E
117#define ADIN2111_TFC 0x3F
118#define ADIN2111_TXSIZE 0x40
119#define ADIN2111_HTX_OVF_FRM_CNT 0x41
120#define ADIN2111_MECC_ERR_ADDR 0x42
121#define ADIN2111_CECC_ERR0 0x43
122#define ADIN2111_CECC_ERR1 0x44
123#define ADIN2111_CECC_ERR2 0x45
124#define ADIN2111_CECC_ERR3 0x46
125#define ADIN2111_CECC_ERR4 0x47
126#define ADIN2111_CECC_ERR5 0x48
127#define ADIN2111_CECC_ERR6 0x49
128#define ADIN2111_ADDR_FILT_UPR0 0x50
129#define ADIN2111_ADDR_FILT_LWR0 0x51
130#define ADIN2111_ADDR_FILT_UPR1 0x52
131#define ADIN2111_ADDR_FILT_LWR1 0x53
132#define ADIN2111_ADDR_FILT_UPR2 0x54
133#define ADIN2111_ADDR_FILT_LWR2 0x55
134#define ADIN2111_ADDR_FILT_UPR3 0x56
135#define ADIN2111_ADDR_FILT_LWR3 0x57
136#define ADIN2111_ADDR_FILT_UPR4 0x58
137#define ADIN2111_ADDR_FILT_LWR4 0x59
138#define ADIN2111_ADDR_FILT_UPR5 0x5A
139#define ADIN2111_ADDR_FILT_LWR5 0x5B
140#define ADIN2111_ADDR_FILT_UPR6 0x5C
141#define ADIN2111_ADDR_FILT_LWR6 0x5D
142#define ADIN2111_ADDR_FILT_UPR7 0x5E
143#define ADIN2111_ADDR_FILT_LWR7 0x5F
144#define ADIN2111_ADDR_FILT_UPR8 0x60
145#define ADIN2111_ADDR_FILT_LWR8 0x61
146#define ADIN2111_ADDR_FILT_UPR9 0x62
147#define ADIN2111_ADDR_FILT_LWR9 0x63
148#define ADIN2111_ADDR_FILT_UPR10 0x64
149#define ADIN2111_ADDR_FILT_LWR10 0x65
150#define ADIN2111_ADDR_FILT_UPR11 0x66
151#define ADIN2111_ADDR_FILT_LWR11 0x67
152#define ADIN2111_ADDR_FILT_UPR12 0x68
153#define ADIN2111_ADDR_FILT_LWR12 0x69
154#define ADIN2111_ADDR_FILT_UPR13 0x6A
155#define ADIN2111_ADDR_FILT_LWR13 0x6B
156#define ADIN2111_ADDR_FILT_UPR14 0x6C
157#define ADIN2111_ADDR_FILT_LWR14 0x6D
158#define ADIN2111_ADDR_FILT_UPR15 0x6E
159#define ADIN2111_ADDR_FILT_LWR15 0x6F
160#define ADIN2111_ADDR_MSK_UPR0 0x70
161#define ADIN2111_ADDR_MSK_LWR0 0x71
162#define ADIN2111_ADDR_MSK_UPR1 0x72
163#define ADIN2111_ADDR_MSK_LWR1 0x73
164#define ADIN2111_TS_ADDEND 0x80
165#define ADIN2111_TS_1SEC_CMP 0x81
166#define ADIN2111_TS_SEC_CNT 0x82
167#define ADIN2111_TS_NS_CNT 0x83
168#define ADIN2111_TS_CFG 0x84
169#define ADIN2111_TS_TIMER_HI 0x85
170#define ADIN2111_TS_TIMER_LO 0x86
171#define ADIN2111_TS_TIMER_QE_CORR 0x87
172#define ADIN2111_TS_TIMER_START 0x88
173#define ADIN2111_TS_EXT_CAPT0 0x89
174#define ADIN2111_TS_EXT_CAPT1 0x8A
175#define ADIN2111_TS_FREECNT_CAPT 0x8B
176#define ADIN2111_P1_RX_FSIZE 0x90
177#define ADIN2111_P1_RX 0x91
178#define ADIN2111_P1_RX_FRM_CNT 0xA0
179#define ADIN2111_P1_RX_BCAST_CNT 0xA1
180#define ADIN2111_P1_RX_MCAST_CNT 0xA2
181#define ADIN2111_P1_RX_UCAST_CNT 0xA3
182#define ADIN2111_P1_RX_CRC_ERR_CNT 0xA4
183#define ADIN2111_P1_RX_ALGN_ERR_CNT 0xA5
184#define ADIN2111_P1_RX_LS_ERR_CNT 0xA6
185#define ADIN2111_P1_RX_PHY_ERR_CNT 0xA7
186#define ADIN2111_P1_TX_FRM_CNT 0xA8
187#define ADIN2111_P1_TX_BCAST_CNT 0xA9
188#define ADIN2111_P1_TX_MCAST_CNT 0xAA
189#define ADIN2111_P1_TX_UCAST_CNT 0xAB
190#define ADIN2111_P1_RX_DROP_FULL_CNT 0xAC
191#define ADIN2111_P1_RX_DROP_FILT_CNT 0xAD
192#define ADIN2111_P1_RX_IFG_ERR_CNT 0xAE
193#define ADIN2111_P1_TX_IFG 0xB0
194#define ADIN2111_P1_LOOP 0xB3
195#define ADIN2111_P1_RX_CRC_EN 0xB4
196#define ADIN2111_P1_RX_IFG 0xB5
197#define ADIN2111_P1_RX_MAX_LEN 0xB6
198#define ADIN2111_P1_RX_MIN_LEN 0xB7
199#define ADIN2111_P1_LO_RFC 0xB8
200#define ADIN2111_P1_HI_RFC 0xB9
201#define ADIN2111_P1_LO_RXSIZE 0xBA
202#define ADIN2111_P1_HI_RXSIZE 0xBB
203#define ADIN2111_P1TOP2_TXSIZE 0xBC
204#define ADIN2111_P2_RX_FSIZE 0xC0
205#define ADIN2111_P2_RX 0xC1
206#define ADIN2111_P2_RX_FRM_CNT 0xD0
207#define ADIN2111_P2_RX_BCAST_CNT 0xD1
208#define ADIN2111_P2_RX_MCAST_CNT 0xD2
209#define ADIN2111_P2_RX_UCAST_CNT 0xD3
210#define ADIN2111_P2_RX_CRC_ERR_CNT 0xD4
211#define ADIN2111_P2_RX_ALGN_ERR_CNT 0xD5
212#define ADIN2111_P2_RX_LS_ERR_CNT 0xD6
213#define ADIN2111_P2_RX_PHY_ERR_CNT 0xD7
214#define ADIN2111_P2_TX_FRM_CNT 0xD8
215#define ADIN2111_P2_TX_BCAST_CNT 0xD9
216#define ADIN2111_P2_TX_MCAST_CNT 0xDA
217#define ADIN2111_P2_TX_UCAST_CNT 0xDB
218#define ADIN2111_P2_RX_DROP_FULL_CNT 0xDC
219#define ADIN2111_P2_RX_DROP_FILT_CNT 0xDD
220#define ADIN2111_P2_RX_IFG_ERR_CNT 0xDE
221#define ADIN2111_P2_TX_IFG 0xE0
222#define ADIN2111_P2_LOOP 0xE3
223#define ADIN2111_P2_RX_CRC_EN 0xE4
224#define ADIN2111_P2_RX_IFG 0xE5
225#define ADIN2111_P2_RX_MAX_LEN 0xE6
226#define ADIN2111_P2_RX_MIN_LEN 0xE7
227#define ADIN2111_P2_LO_RFC 0xE8
228#define ADIN2111_P2_HI_RFC 0xE9
229#define ADIN2111_P2_LO_RXSIZE 0xEA
230#define ADIN2111_P2_HI_RXSIZE 0xEB
231#define ADIN2111_P2TOP1_TXSIZE 0xEC
232#define ADIN2111_P2_TTSCAH 0xF0
233#define ADIN2111_P2_TTSCAL 0xF1
234#define ADIN2111_P2_TTSCBH 0xF2
235#define ADIN2111_P2_TTSCBL 0xF3
236#define ADIN2111_P2_TTSCCH 0xF4
237#define ADIN2111_P2_TTSCCL 0xF5
238
239//ADIN2111 PHY registers
240#define ADIN2111_MI_CONTROL 0x00
241#define ADIN2111_MI_STATUS 0x01
242#define ADIN2111_MI_PHY_ID1 0x02
243#define ADIN2111_MI_PHY_ID2 0x03
244#define ADIN2111_MMD_ACCESS_CNTRL 0x0D
245#define ADIN2111_MMD_ACCESS 0x0E
246
247//ADIN2111 MMD registers
248#define ADIN2111_PMA_PMD_CNTRL1 0x01, 0x0000
249#define ADIN2111_PMA_PMD_STAT1 0x01, 0x0001
250#define ADIN2111_PMA_PMD_DEVS_IN_PKG1 0x01, 0x0005
251#define ADIN2111_PMA_PMD_DEVS_IN_PKG2 0x01, 0x0006
252#define ADIN2111_PMA_PMD_CNTRL2 0x01, 0x0007
253#define ADIN2111_PMA_PMD_STAT2 0x01, 0x0008
254#define ADIN2111_PMA_PMD_TX_DIS 0x01, 0x0009
255#define ADIN2111_PMA_PMD_EXT_ABILITY 0x01, 0x000B
256#define ADIN2111_PMA_PMD_BT1_ABILITY 0x01, 0x0012
257#define ADIN2111_PMA_PMD_BT1_CONTROL 0x01, 0x0834
258#define ADIN2111_B10L_PMA_CNTRL 0x01, 0x08F6
259#define ADIN2111_B10L_PMA_STAT 0x01, 0x08F7
260#define ADIN2111_B10L_TEST_MODE_CNTRL 0x01, 0x08F8
261#define ADIN2111_B10L_PMA_LINK_STAT 0x01, 0x8302
262#define ADIN2111_MSE_VAL 0x01, 0x830B
263#define ADIN2111_PCS_CNTRL1 0x03, 0x0000
264#define ADIN2111_PCS_STAT1 0x03, 0x0001
265#define ADIN2111_PCS_DEVS_IN_PKG1 0x03, 0x0005
266#define ADIN2111_PCS_DEVS_IN_PKG2 0x03, 0x0006
267#define ADIN2111_PCS_STAT2 0x03, 0x0008
268#define ADIN2111_B10L_PCS_CNTRL 0x03, 0x08E6
269#define ADIN2111_B10L_PCS_STAT 0x03, 0x08E7
270#define ADIN2111_AN_DEVS_IN_PKG1 0x07, 0x0005
271#define ADIN2111_AN_DEVS_IN_PKG2 0x07, 0x0006
272#define ADIN2111_AN_CONTROL 0x07, 0x0200
273#define ADIN2111_AN_STATUS 0x07, 0x0201
274#define ADIN2111_AN_ADV_ABILITY_L 0x07, 0x0202
275#define ADIN2111_AN_ADV_ABILITY_M 0x07, 0x0203
276#define ADIN2111_AN_ADV_ABILITY_H 0x07, 0x0204
277#define ADIN2111_AN_LP_ADV_ABILITY_L 0x07, 0x0205
278#define ADIN2111_AN_LP_ADV_ABILITY_M 0x07, 0x0206
279#define ADIN2111_AN_LP_ADV_ABILITY_H 0x07, 0x0207
280#define ADIN2111_AN_NEXT_PAGE_L 0x07, 0x0208
281#define ADIN2111_AN_NEXT_PAGE_M 0x07, 0x0209
282#define ADIN2111_AN_NEXT_PAGE_H 0x07, 0x020A
283#define ADIN2111_AN_LP_NEXT_PAGE_L 0x07, 0x020B
284#define ADIN2111_AN_LP_NEXT_PAGE_M 0x07, 0x020C
285#define ADIN2111_AN_LP_NEXT_PAGE_H 0x07, 0x020D
286#define ADIN2111_AN_B10_ADV_ABILITY 0x07, 0x020E
287#define ADIN2111_AN_B10_LP_ADV_ABILITY 0x07, 0x020F
288#define ADIN2111_AN_FRC_MODE_EN 0x07, 0x8000
289#define ADIN2111_AN_STATUS_EXTRA 0x07, 0x8001
290#define ADIN2111_AN_PHY_INST_STATUS 0x07, 0x8030
291#define ADIN2111_MMD1_DEV_ID1 0x1E, 0x0002
292#define ADIN2111_MMD1_DEV_ID2 0x1E, 0x0003
293#define ADIN2111_MMD1_DEVS_IN_PKG1 0x1E, 0x0005
294#define ADIN2111_MMD1_DEVS_IN_PKG2 0x1E, 0x0006
295#define ADIN2111_MMD1_STATUS 0x1E, 0x0008
296#define ADIN2111_CRSM_IRQ_STATUS 0x1E, 0x0010
297#define ADIN2111_CRSM_IRQ_MASK 0x1E, 0x0020
298#define ADIN2111_CRSM_SFT_RST 0x1E, 0x8810
299#define ADIN2111_CRSM_SFT_PD_CNTRL 0x1E, 0x8812
300#define ADIN2111_CRSM_PHY_SUBSYS_RST 0x1E, 0x8814
301#define ADIN2111_CRSM_MAC_IF_RST 0x1E, 0x8815
302#define ADIN2111_CRSM_STAT 0x1E, 0x8818
303#define ADIN2111_CRSM_PMG_CNTRL 0x1E, 0x8819
304#define ADIN2111_CRSM_DIAG_CLK_CTRL 0x1E, 0x882C
305#define ADIN2111_MGMT_PRT_PKG 0x1E, 0x8C22
306#define ADIN2111_MGMT_MDIO_CNTRL 0x1E, 0x8C30
307#define ADIN2111_DIGIO_PINMUX 0x1E, 0x8C56
308#define ADIN2111_LED0_BLINK_TIME_CNTRL 0x1E, 0x8C80
309#define ADIN2111_LED1_BLINK_TIME_CNTRL 0x1E, 0x8C81
310#define ADIN2111_LED_CNTRL 0x1E, 0x8C82
311#define ADIN2111_LED_POLARITY 0x1E, 0x8C83
312#define ADIN2111_MMD2_DEV_ID1 0x1F, 0x0002
313#define ADIN2111_MMD2_DEV_ID2 0x1F, 0x0003
314#define ADIN2111_MMD2_DEVS_IN_PKG1 0x1F, 0x0005
315#define ADIN2111_MMD2_DEVS_IN_PKG2 0x1F, 0x0006
316#define ADIN2111_MMD2_STATUS 0x1F, 0x0008
317#define ADIN2111_PHY_SUBSYS_IRQ_STATUS 0x1F, 0x0011
318#define ADIN2111_PHY_SUBSYS_IRQ_MASK 0x1F, 0x0021
319#define ADIN2111_FC_EN 0x1F, 0x8001
320#define ADIN2111_FC_IRQ_EN 0x1F, 0x8004
321#define ADIN2111_FC_TX_SEL 0x1F, 0x8005
322#define ADIN2111_RX_ERR_CNT 0x1F, 0x8008
323#define ADIN2111_FC_FRM_CNT_H 0x1F, 0x8009
324#define ADIN2111_FC_FRM_CNT_L 0x1F, 0x800A
325#define ADIN2111_FC_LEN_ERR_CNT 0x1F, 0x800B
326#define ADIN2111_FC_ALGN_ERR_CNT 0x1F, 0x800C
327#define ADIN2111_FC_SYMB_ERR_CNT 0x1F, 0x800D
328#define ADIN2111_FC_OSZ_CNT 0x1F, 0x800E
329#define ADIN2111_FC_USZ_CNT 0x1F, 0x800F
330#define ADIN2111_FC_ODD_CNT 0x1F, 0x8010
331#define ADIN2111_FC_ODD_PRE_CNT 0x1F, 0x8011
332#define ADIN2111_FC_FALSE_CARRIER_CNT 0x1F, 0x8013
333#define ADIN2111_FG_EN 0x1F, 0x8020
334#define ADIN2111_FG_CNTRL_RSTRT 0x1F, 0x8021
335#define ADIN2111_FG_CONT_MODE_EN 0x1F, 0x8022
336#define ADIN2111_FG_IRQ_EN 0x1F, 0x8023
337#define ADIN2111_FG_FRM_LEN 0x1F, 0x8025
338#define ADIN2111_FG_IFG_LEN 0x1F, 0x8026
339#define ADIN2111_FG_NFRM_H 0x1F, 0x8027
340#define ADIN2111_FG_NFRM_L 0x1F, 0x8028
341#define ADIN2111_FG_DONE 0x1F, 0x8029
342#define ADIN2111_MAC_IF_LOOPBACK 0x1F, 0x8055
343#define ADIN2111_MAC_IF_SOP_CNTRL 0x1F, 0x805A
344
345//Identification Version register
346#define ADIN2111_IDVER_MINVER 0x0000000F
347
348//PHY Identification register
349#define ADIN2111_PHYID_OUI 0xFFFFFC00
350#define ADIN2111_PHYID_OUI_DEFAULT 0x0283BC00
351#define ADIN2111_PHYID_MODEL 0x000003F0
352#define ADIN2111_PHYID_MODEL_DEFAULT 0x000000A0
353#define ADIN2111_PHYID_REVISION 0x0000000F
354#define ADIN2111_PHYID_REVISION_DEFAULT 0x00000001
355
356//Supported Capabilities register
357#define ADIN2111_CAPABILITY_TXFCSVC 0x00000400
358#define ADIN2111_CAPABILITY_IPRAC 0x00000200
359#define ADIN2111_CAPABILITY_DPRAC 0x00000100
360#define ADIN2111_CAPABILITY_CTC 0x00000080
361#define ADIN2111_CAPABILITY_FTSC 0x00000040
362#define ADIN2111_CAPABILITY_AIDC 0x00000020
363#define ADIN2111_CAPABILITY_SEQC 0x00000010
364#define ADIN2111_CAPABILITY_MINCPS 0x00000007
365#define ADIN2111_CAPABILITY_MINCPS_8B 0x00000003
366#define ADIN2111_CAPABILITY_MINCPS_16B 0x00000004
367#define ADIN2111_CAPABILITY_MINCPS_32B 0x00000005
368#define ADIN2111_CAPABILITY_MINCPS_64B 0x00000006
369
370//Reset Control and Status register
371#define ADIN2111_RESET_SWRESET 0x00000001
372
373//Configuration 0 register
374#define ADIN2111_CONFIG0_SYNC 0x00008000
375#define ADIN2111_CONFIG0_TXFCSVE 0x00004000
376#define ADIN2111_CONFIG0_CSARFE 0x00002000
377#define ADIN2111_CONFIG0_ZARFE 0x00001000
378#define ADIN2111_CONFIG0_TXCTHRESH 0x00000C00
379#define ADIN2111_CONFIG0_TXCTHRESH_1_CREDIT 0x00000000
380#define ADIN2111_CONFIG0_TXCTHRESH_4_CREDITS 0x00000400
381#define ADIN2111_CONFIG0_TXCTHRESH_8_CREDITS 0x00000800
382#define ADIN2111_CONFIG0_TXCTHRESH_16_CREDITS 0x00000C00
383#define ADIN2111_CONFIG0_TXCTE 0x00000200
384#define ADIN2111_CONFIG0_RXCTE 0x00000100
385#define ADIN2111_CONFIG0_FTSE 0x00000080
386#define ADIN2111_CONFIG0_FTSS 0x00000040
387#define ADIN2111_CONFIG0_PROTE 0x00000020
388#define ADIN2111_CONFIG0_SEQE 0x00000010
389#define ADIN2111_CONFIG0_CPS 0x00000007
390#define ADIN2111_CONFIG0_CPS_8B 0x00000003
391#define ADIN2111_CONFIG0_CPS_16B 0x00000004
392#define ADIN2111_CONFIG0_CPS_32B 0x00000005
393#define ADIN2111_CONFIG0_CPS_64B 0x00000006
394
395//Configuration 2 register
396#define ADIN2111_CONFIG2_P2_RCV_IFG_ERR_FRM 0x00010000
397#define ADIN2111_CONFIG2_RX_RD_ORDER 0x00008000
398#define ADIN2111_CONFIG2_P2_FWD_UNK2P1 0x00004000
399#define ADIN2111_CONFIG2_P1_FWD_UNK2P2 0x00002000
400#define ADIN2111_CONFIG2_P2_FWD_UNK2HOST 0x00001000
401#define ADIN2111_CONFIG2_PORT_CUT_THRU_EN 0x00000800
402#define ADIN2111_CONFIG2_TX_RDY_ON_EMPTY 0x00000100
403#define ADIN2111_CONFIG2_SFD_DETECT_SRC 0x00000080
404#define ADIN2111_CONFIG2_STATS_CLR_ON_RD 0x00000040
405#define ADIN2111_CONFIG2_CRC_APPEND 0x00000020
406#define ADIN2111_CONFIG2_P1_RCV_IFG_ERR_FRM 0x00000010
407#define ADIN2111_CONFIG2_P1_FWD_UNK2HOST 0x00000004
408#define ADIN2111_CONFIG2_MSPEED 0x00000003
409#define ADIN2111_CONFIG2_MSPEED_2_5_MHZ 0x00000000
410#define ADIN2111_CONFIG2_MSPEED_4_166_MHZ 0x00000001
411
412//Status 0 register
413#define ADIN2111_STATUS0_CDPE 0x00001000
414#define ADIN2111_STATUS0_TXFCSE 0x00000800
415#define ADIN2111_STATUS0_TTSCAC 0x00000400
416#define ADIN2111_STATUS0_TTSCAB 0x00000200
417#define ADIN2111_STATUS0_TTSCAA 0x00000100
418#define ADIN2111_STATUS0_PHYINT 0x00000080
419#define ADIN2111_STATUS0_RESETC 0x00000040
420#define ADIN2111_STATUS0_HDRE 0x00000020
421#define ADIN2111_STATUS0_LOFE 0x00000010
422#define ADIN2111_STATUS0_RXBOE 0x00000008
423#define ADIN2111_STATUS0_TXBUE 0x00000004
424#define ADIN2111_STATUS0_TXBOE 0x00000002
425#define ADIN2111_STATUS0_TXPE 0x00000001
426
427//Status 1 register
428#define ADIN2111_STATUS1_P2_TXFCSE 0x01000000
429#define ADIN2111_STATUS1_P2_RX_IFG_ERR 0x00800000
430#define ADIN2111_STATUS1_P2_TTSCAC 0x00400000
431#define ADIN2111_STATUS1_P2_TTSCAB 0x00200000
432#define ADIN2111_STATUS1_P2_TTSCAA 0x00100000
433#define ADIN2111_STATUS1_P2_PHYINT 0x00080000
434#define ADIN2111_STATUS1_P2_RX_RDY_HI 0x00040000
435#define ADIN2111_STATUS1_P2_RX_RDY 0x00020000
436#define ADIN2111_STATUS1_TX_ECC_ERR 0x00001000
437#define ADIN2111_STATUS1_RX_ECC_ERR 0x00000800
438#define ADIN2111_STATUS1_SPI_ERR 0x00000400
439#define ADIN2111_STATUS1_P1_RX_IFG_ERR 0x00000100
440#define ADIN2111_STATUS1_P1_RX_RDY_HI 0x00000020
441#define ADIN2111_STATUS1_P1_RX_RDY 0x00000010
442#define ADIN2111_STATUS1_TX_RDY 0x00000008
443
444//Buffer Status register
445#define ADIN2111_BUFSTS_TXC 0x0000FF00
446#define ADIN2111_BUFSTS_RCA 0x000000FF
447
448//Interrupt Mask 0 register
449#define ADIN2111_IMASK0_CDPEM 0x00001000
450#define ADIN2111_IMASK0_TXFCSEM 0x00000800
451#define ADIN2111_IMASK0_TTSCACM 0x00000400
452#define ADIN2111_IMASK0_TTSCABM 0x00000200
453#define ADIN2111_IMASK0_TTSCAAM 0x00000100
454#define ADIN2111_IMASK0_PHYINTM 0x00000080
455#define ADIN2111_IMASK0_RESETCM 0x00000040
456#define ADIN2111_IMASK0_HDREM 0x00000020
457#define ADIN2111_IMASK0_LOFEM 0x00000010
458#define ADIN2111_IMASK0_RXBOEM 0x00000008
459#define ADIN2111_IMASK0_TXBUEM 0x00000004
460#define ADIN2111_IMASK0_TXBOEM 0x00000002
461#define ADIN2111_IMASK0_TXPEM 0x00000001
462
463//Mask Bits for Driving the Interrupt Pin register
464#define ADIN2111_IMASK1_P2_TXFCSEM 0x01000000
465#define ADIN2111_IMASK1_P2_RX_IFG_ERR_MASK 0x00800000
466#define ADIN2111_IMASK1_P2_TTSCACM 0x00400000
467#define ADIN2111_IMASK1_P2_TTSCABM 0x00200000
468#define ADIN2111_IMASK1_P2_TTSCAAM 0x00100000
469#define ADIN2111_IMASK1_P2_PHYINT_MASK 0x00080000
470#define ADIN2111_IMASK1_P2_RX_RDY_MASK 0x00020000
471#define ADIN2111_IMASK1_TX_ECC_ERR_MASK 0x00001000
472#define ADIN2111_IMASK1_RX_ECC_ERR_MASK 0x00000800
473#define ADIN2111_IMASK1_SPI_ERR_MASK 0x00000400
474#define ADIN2111_IMASK1_P1_RX_IFG_ERR_MASK 0x00000100
475#define ADIN2111_IMASK1_P1_RX_RDY_MASK 0x00000010
476#define ADIN2111_IMASK1_TX_RDY_MASK 0x00000008
477#define ADIN2111_IMASK1_LINK_CHANGE_MASK 0x00000002
478
479//MDIO Access register
480#define ADIN2111_MDIOACC_MDIO_TRDONE 0x80000000
481#define ADIN2111_MDIOACC_MDIO_TAERR 0x40000000
482#define ADIN2111_MDIOACC_MDIO_ST 0x30000000
483#define ADIN2111_MDIOACC_MDIO_ST_CLAUSE_45 0x00000000
484#define ADIN2111_MDIOACC_MDIO_ST_CLAUSE_22 0x10000000
485#define ADIN2111_MDIOACC_MDIO_OP 0x0C000000
486#define ADIN2111_MDIOACC_MDIO_OP_ADDR 0x00000000
487#define ADIN2111_MDIOACC_MDIO_OP_WRITE 0x04000000
488#define ADIN2111_MDIOACC_MDIO_OP_INC_READ 0x08000000
489#define ADIN2111_MDIOACC_MDIO_OP_READ 0x0C000000
490#define ADIN2111_MDIOACC_MDIO_PRTAD 0x03E00000
491#define ADIN2111_MDIOACC_MDIO_PRTAD_PHY1 0x00200000
492#define ADIN2111_MDIOACC_MDIO_PRTAD_PHY2 0x00400000
493#define ADIN2111_MDIOACC_MDIO_DEVAD 0x001F0000
494#define ADIN2111_MDIOACC_MDIO_DATA 0x0000FFFF
495
496//MAC Tx Frame Size register
497#define ADIN2111_TX_FSIZE_TX_FRM_SIZE 0x000007FF
498
499//MAC Transmit register
500#define ADIN2111_TX_TDR 0xFFFFFFFF
501
502//Tx FIFO Space register
503#define ADIN2111_TX_SPACE_TX_SPACE 0x00003FFF
504
505//Transmit Threshold register
506#define ADIN2111_TX_THRESH_P2P_TX_THRESH 0x00000FC0
507#define ADIN2111_TX_THRESH_HOST_TX_THRESH 0x0000003F
508
509//LES Tx Priority register
510#define ADIN2111_TX_PRI_TX_HOST_PRI 0x00000007
511#define ADIN2111_TX_PRI_TX_HOST_PRI_H50_P50 0x00000000
512#define ADIN2111_TX_PRI_TX_HOST_PRI_H100_P0 0x00000005
513#define ADIN2111_TX_PRI_TX_HOST_PRI_H0_P100 0x00000006
514
515//MAC FIFO Clear register
516#define ADIN2111_FIFO_CLR_LES_P2P_FIFOS_CLR 0x00000008
517#define ADIN2111_FIFO_CLR_LES_FIFOS_CLR 0x00000004
518#define ADIN2111_FIFO_CLR_MAC_RXF_CLR 0x00000001
519
520//Scratch register
521#define ADIN2111_SCRATCH_SCRATCH_DATA 0xFFFFFFFF
522
523//MAC Reset Status register
524#define ADIN2111_MAC_RST_STATUS_MAC_CRYSL_CLK_RDY 0x00000002
525#define ADIN2111_MAC_RST_STATUS_MAC_OSC_CLK_RDY 0x00000001
526
527//Software Reset register
528#define ADIN2111_SOFT_RST_RST_KEY 0x0000FFFF
529#define ADIN2111_SOFT_RST_RST_KEY_1_RESET 0x00004F1C
530#define ADIN2111_SOFT_RST_RST_KEY_2_RESET 0x0000C1F4
531#define ADIN2111_SOFT_RST_RST_KEY_1_RELEASE 0x00006F1A
532#define ADIN2111_SOFT_RST_RST_KEY_2_RELEASE 0x0000A1F6
533
534//Inject an Error on MISO from the DUT register
535#define ADIN2111_SPI_INJ_ERR_TEST_SPI_INJ_ERR 0x00000001
536
537//FIFO Sizes register
538#define ADIN2111_FIFO_SIZE_P2_TX_SIZE 0x0F000000
539#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_0KB 0x00000000
540#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_2KB 0x01000000
541#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_4KB 0x02000000
542#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_6KB 0x03000000
543#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_8KB 0x04000000
544#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_10KB 0x05000000
545#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_12KB 0x06000000
546#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_14KB 0x07000000
547#define ADIN2111_FIFO_SIZE_P2_TX_SIZE_16KB 0x08000000
548#define ADIN2111_FIFO_SIZE_P1_TX_SIZE 0x00F00000
549#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_0KB 0x00000000
550#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_2KB 0x00100000
551#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_4KB 0x00200000
552#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_6KB 0x00300000
553#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_8KB 0x00400000
554#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_10KB 0x00500000
555#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_12KB 0x00600000
556#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_14KB 0x00700000
557#define ADIN2111_FIFO_SIZE_P1_TX_SIZE_16KB 0x00800000
558#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE 0x000F0000
559#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_0KB 0x00000000
560#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_2KB 0x00010000
561#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_4KB 0x00020000
562#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_6KB 0x00030000
563#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_8KB 0x00040000
564#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_10KB 0x00050000
565#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_12KB 0x00060000
566#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_14KB 0x00070000
567#define ADIN2111_FIFO_SIZE_P2_RX_HI_SIZE_16KB 0x00080000
568#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE 0x0000F000
569#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_0KB 0x00000000
570#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_2KB 0x00001000
571#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_4KB 0x00002000
572#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_6KB 0x00003000
573#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_8KB 0x00004000
574#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_10KB 0x00005000
575#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_12KB 0x00006000
576#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_14KB 0x00007000
577#define ADIN2111_FIFO_SIZE_P2_RX_LO_SIZE_16KB 0x00008000
578#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE 0x00000F00
579#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_0KB 0x00000000
580#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_2KB 0x00000100
581#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_4KB 0x00000200
582#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_6KB 0x00000300
583#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_8KB 0x00000400
584#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_10KB 0x00000500
585#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_12KB 0x00000600
586#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_14KB 0x00000700
587#define ADIN2111_FIFO_SIZE_P1_RX_HI_SIZE_16KB 0x00000800
588#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE 0x000000F0
589#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_0KB 0x00000000
590#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_2KB 0x00000010
591#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_4KB 0x00000020
592#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_6KB 0x00000030
593#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_8KB 0x00000040
594#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_10KB 0x00000050
595#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_12KB 0x00000060
596#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_14KB 0x00000070
597#define ADIN2111_FIFO_SIZE_P1_RX_LO_SIZE_16KB 0x00000080
598#define ADIN2111_FIFO_SIZE_HTX_SIZE 0x0000000F
599#define ADIN2111_FIFO_SIZE_HTX_SIZE_0KB 0x00000000
600#define ADIN2111_FIFO_SIZE_HTX_SIZE_2KB 0x00000001
601#define ADIN2111_FIFO_SIZE_HTX_SIZE_4KB 0x00000002
602#define ADIN2111_FIFO_SIZE_HTX_SIZE_6KB 0x00000003
603#define ADIN2111_FIFO_SIZE_HTX_SIZE_8KB 0x00000004
604#define ADIN2111_FIFO_SIZE_HTX_SIZE_10KB 0x00000005
605#define ADIN2111_FIFO_SIZE_HTX_SIZE_12KB 0x00000006
606#define ADIN2111_FIFO_SIZE_HTX_SIZE_14KB 0x00000007
607#define ADIN2111_FIFO_SIZE_HTX_SIZE_16KB 0x00000008
608
609//Tx FIFO Frame Count register
610#define ADIN2111_TFC_TFC 0x000001FF
611
612//Tx FIFO Valid Half Words register
613#define ADIN2111_TXSIZE_TX_SIZE 0x00003FFF
614
615//Address of a Detected ECC Error in Memory register
616#define ADIN2111_MECC_ERR_ADDR_MECC_ERR_ADDR 0x00003FFF
617
618//Corrected ECC Error Counter register
619#define ADIN2111_CECC_ERR_CECC_ERR_CNT 0x000003FF
620
621//MAC Address Rule and DA Filter Upper 16 Bits register
622#define ADIN2111_ADDR_FILT_UPR_APPLY2PORT2 0x80000000
623#define ADIN2111_ADDR_FILT_UPR_APPLY2PORT1 0x40000000
624#define ADIN2111_ADDR_FILT_UPR_HOST_PRI 0x00080000
625#define ADIN2111_ADDR_FILT_UPR_TO_OTHER_PORT 0x00020000
626#define ADIN2111_ADDR_FILT_UPR_TO_HOST 0x00010000
627#define ADIN2111_ADDR_FILT_UPR_MAC_ADDR_47_32 0x0000FFFF
628
629//MAC Address DA Filter Lower 32 Bits register
630#define ADIN2111_ADDR_FILT_LWR_MAC_ADDR_31_0 0xFFFFFFFF
631
632//Upper 16 Bits of the MAC Address Mask register
633#define ADIN2111_ADDR_MSK_UPR_MAC_ADDR_MASK_47_32 0x0000FFFF
634
635//Lower 32 Bits of the MAC Address Mask register
636#define ADIN2111_ADDR_MSK_LWR_MAC_ADDR_MASK_31_0 0xFFFFFFFF
637
638//Timer Configuration register
639#define ADIN2111_TS_CFG_TS_CAPT_FREE_CNT 0x00000010
640#define ADIN2111_TS_CFG_TS_TIMER_STOP 0x00000008
641#define ADIN2111_TS_CFG_TS_TIMER_DEF 0x00000004
642#define ADIN2111_TS_CFG_TS_CLR 0x00000002
643#define ADIN2111_TS_CFG_TS_EN 0x00000001
644
645//Quantization Error Correction register
646#define ADIN2111_TS_TIMER_QE_CORR_TS_TIMER_QE_CORR 0x000000FF
647
648//P1 MAC Rx Frame Size register
649#define ADIN2111_P1_RX_FSIZE_P1_RX_FRM_SIZE 0x000007FF
650
651//P1 MAC Receive register
652#define ADIN2111_P1_RX_P1_RDR 0xFFFFFFFF
653
654//P1 Transmit Interframe Gap register
655#define ADIN2111_P1_TX_IFG_P1_TX_IFG 0x000000FF
656
657//P1 MAC Loopback Enable register
658#define ADIN2111_P1_LOOP_P1_LOOPBACK_EN 0x00000001
659
660//P1 CRC Check Enable on Receive register
661#define ADIN2111_P1_RX_CRC_EN_P1_CRC_CHK_EN 0x00000001
662
663//P1 Receive Interframe Gap register
664#define ADIN2111_P1_RX_IFG_P1_RX_IFG 0x0000003F
665
666//P1 Maximum Receive Frame Length register
667#define ADIN2111_P1_RX_MAX_LEN_P1_MAX_FRM_LEN 0x0000FFFF
668
669//P1 Minimum Receive Frame Length register
670#define ADIN2111_P1_RX_MIN_LEN_P1_MIN_FRM_LEN 0x0000FFFF
671
672//P1 Rx Low Priority FIFO Frame Count register
673#define ADIN2111_P1_LO_RFC_P1_LO_RFC 0x000001FF
674
675//P1 Rx High Priority FIFO Frame Count register
676#define ADIN2111_P1_HI_RFC_P1_HI_RFC 0x000001FF
677
678//P1 Low Priority Rx FIFO Valid Half Words register
679#define ADIN2111_P1_LO_RXSIZE_P1_LO_RXSIZE 0x00003FFF
680
681//P1 High Priority Rx FIFO Valid Half Words register
682#define ADIN2111_P1_HI_RXSIZE_P1_HI_RXSIZE 0x00003FFF
683
684//P1 to P2 Tx Size register
685#define ADIN2111_P1TOP2_TXSIZE_P1TOP2_TXSIZE 0x00003FFF
686
687//P2 MAC Rx Frame Size register
688#define ADIN2111_P2_RX_FSIZE_P2_RX_FRM_SIZE 0x000007FF
689
690//P2 MAC Receive register
691#define ADIN2111_P2_RX_P2_RDR 0xFFFFFFFF
692
693//P2 Transmit Interframe Gap register
694#define ADIN2111_P2_TX_IFG_P2_TX_IFG 0x000000FF
695
696//P2 MAC Loopback Enable register
697#define ADIN2111_P2_LOOP_P2_LOOPBACK_EN 0x00000001
698
699//P2 CRC Check Enable on Receive register
700#define ADIN2111_P2_RX_CRC_EN_P2_CRC_CHK_EN 0x00000001
701
702//P2 Receive Interframe Gap register
703#define ADIN2111_P2_RX_IFG_P2_RX_IFG 0x0000FFFF
704
705//P2 Maximum Receive Frame Length register
706#define ADIN2111_P2_RX_MAX_LEN_P2_MAX_FRM_LEN 0x0000FFFF
707
708//P2 Minimum Receive Frame Length register
709#define ADIN2111_P2_RX_MIN_LEN_P2_MIN_FRM_LEN 0x0000FFFF
710
711//P2 Rx Low Priority FIFO Frame Count register
712#define ADIN2111_P2_LO_RFC_P2_LO_RFC 0x000001FF
713
714//P2 Rx High Priority FIFO Frame Count register
715#define ADIN2111_P2_HI_RFC_P2_HI_RFC 0x000001FF
716
717//P2 Low Priority Rx FIFO Valid Half Words register
718#define ADIN2111_P2_LO_RXSIZE_P2_LO_RXSIZE 0x00003FFF
719
720//P2 High Priority Rx FIFO Valid Half Words register
721#define ADIN2111_P2_HI_RXSIZE_P2_HI_RXSIZE 0x00003FFF
722
723//P2 to P1 Tx Size register
724#define ADIN2111_P2TOP1_TXSIZE_P2TOP1_TXSIZE 0x00003FFF
725
726//MII Control register
727#define ADIN2111_MI_CONTROL_MI_SFT_RST 0x8000
728#define ADIN2111_MI_CONTROL_MI_LOOPBACK 0x4000
729#define ADIN2111_MI_CONTROL_MI_SPEED_SEL_LSB 0x2000
730#define ADIN2111_MI_CONTROL_MI_AN_EN 0x1000
731#define ADIN2111_MI_CONTROL_MI_SFT_PD 0x0800
732#define ADIN2111_MI_CONTROL_MI_ISOLATE 0x0400
733#define ADIN2111_MI_CONTROL_MI_FULL_DUPLEX 0x0100
734#define ADIN2111_MI_CONTROL_MI_COLTEST 0x0080
735#define ADIN2111_MI_CONTROL_MI_SPEED_SEL_MSB 0x0040
736#define ADIN2111_MI_CONTROL_MI_UNIDIR_EN 0x0020
737
738//MII Status register
739#define ADIN2111_MI_STATUS_MI_T4_SPRT 0x8000
740#define ADIN2111_MI_STATUS_MI_FD100_SPRT 0x4000
741#define ADIN2111_MI_STATUS_MI_HD100_SPRT 0x2000
742#define ADIN2111_MI_STATUS_MI_FD10_SPRT 0x1000
743#define ADIN2111_MI_STATUS_MI_HD10_SPRT 0x0800
744#define ADIN2111_MI_STATUS_MI_FD_T2_SPRT 0x0400
745#define ADIN2111_MI_STATUS_MI_HD_T2_SPRT 0x0200
746#define ADIN2111_MI_STATUS_MI_EXT_STAT_SPRT 0x0100
747#define ADIN2111_MI_STATUS_MI_UNIDIR_ABLE 0x0080
748#define ADIN2111_MI_STATUS_MI_MF_PREAM_SUP_ABLE 0x0040
749#define ADIN2111_MI_STATUS_MI_AN_COMPLETE 0x0020
750#define ADIN2111_MI_STATUS_MI_REM_FLT 0x0010
751#define ADIN2111_MI_STATUS_MI_AN_ABLE 0x0008
752#define ADIN2111_MI_STATUS_MI_LINK_STAT_LAT 0x0004
753#define ADIN2111_MI_STATUS_MI_JABBER_DET 0x0002
754#define ADIN2111_MI_STATUS_MI_EXT_CAPABLE 0x0001
755
756//PHY Identifier 1 register
757#define ADIN2111_MI_PHY_ID1_MI_PHY_ID1 0xFFFF
758#define ADIN2111_MI_PHY_ID1_MI_PHY_ID1_DEFAULT 0x0283
759
760//PHY Identifier 2 register
761#define ADIN2111_MI_PHY_ID2_MI_PHY_ID2_OUI 0xFC00
762#define ADIN2111_MI_PHY_ID2_MI_PHY_ID2_OUI_DEFAULT 0xBC00
763#define ADIN2111_MI_PHY_ID2_MI_MODEL_NUM 0x03F0
764#define ADIN2111_MI_PHY_ID2_MI_REV_NUM 0x000F
765#define ADIN2111_MI_PHY_ID2_MI_REV_NUM_DEFAULT 0x0001
766
767//MMD Access Control register
768#define ADIN2111_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION 0xC000
769#define ADIN2111_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION_ADDR 0x0000
770#define ADIN2111_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION_DATA_NO_POST_INC 0x4000
771#define ADIN2111_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION_DATA_POST_INC_RW 0x8000
772#define ADIN2111_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION_DATA_POST_INC_W 0xC000
773#define ADIN2111_MMD_ACCESS_CNTRL_MMD_ACR_DEVAD 0x001F
774
775//PMA/PMD Control 1 register
776#define ADIN2111_PMA_PMD_CNTRL1_PMA_SFT_RST 0x8000
777#define ADIN2111_PMA_PMD_CNTRL1_PMA_SFT_PD 0x0800
778#define ADIN2111_PMA_PMD_CNTRL1_LB_PMA_LOC_EN 0x0001
779
780//PMA/PMD Status 1 register
781#define ADIN2111_PMA_PMD_STAT1_PMA_LINK_STAT_OK_LL 0x0004
782#define ADIN2111_PMA_PMD_STAT1_PMA_SFT_PD_ABLE 0x0002
783
784//PMA/PMD Control 2 register
785#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL 0x007F
786#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_CX4 0x0000
787#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_EW 0x0001
788#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_LW 0x0002
789#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_SW 0x0003
790#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_LX4 0x0004
791#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_ER 0x0005
792#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_LR 0x0006
793#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_SR 0x0007
794#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_LRM 0x0008
795#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_T 0x0009
796#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_KX4 0x000A
797#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_KR 0x000B
798#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_1000BASE_T 0x000C
799#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_1000BASE_KX 0x000D
800#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100BASE_TX 0x000E
801#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10BASE_T 0x000F
802#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_D1 0x0010
803#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_D2 0x0011
804#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_D3 0x0012
805#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_D1 0x0013
806#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_D2 0x0014
807#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_D3 0x0015
808#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_U1 0x0016
809#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_U2 0x0017
810#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_U3 0x0018
811#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_U1 0x0019
812#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_U3 0x001A
813#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_RESERVED 0x001B
814#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_D4 0x001C
815#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_D4 0x001D
816#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_U4 0x001E
817#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_U4 0x001F
818#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_KR4 0x0020
819#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_CR4 0x0021
820#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_SR4 0x0022
821#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_LR4 0x0023
822#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_FR 0x0024
823#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_ER4 0x0025
824#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_T 0x0026
825#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_CR10 0x0028
826#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_SR10 0x0029
827#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_LR4 0x002A
828#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_ER4 0x002B
829#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_KP4 0x002C
830#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_KR4 0x002D
831#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_CR4 0x002E
832#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_SR4 0x002F
833#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_2_5GBASE_T 0x0030
834#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_5GBASE_T 0x0031
835#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GPASS_XR_D 0x0032
836#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GPASS_XR_U 0x0033
837#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_BASE_H 0x0034
838#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_LR 0x0035
839#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_ER 0x0036
840#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_T 0x0037
841#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_CR 0x0038
842#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_KR 0x0039
843#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_SR 0x003A
844#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_BASE_T1 0x003D
845#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_200GBASE_DR4 0x0053
846#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_200GBASE_FR4 0x0054
847#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_200GBASE_LR4 0x0055
848#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_400GBASE_SR16 0x0059
849#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_400GBASE_DR4 0x005A
850#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_400GBASE_FR8 0x005B
851#define ADIN2111_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_400GBASE_LR8 0x005C
852
853//PMA/PMD Status 2 register
854#define ADIN2111_PMA_PMD_STAT2_PMA_PMD_PRESENT 0xC000
855#define ADIN2111_PMA_PMD_STAT2_PMA_PMD_EXT_ABLE 0x0200
856#define ADIN2111_PMA_PMD_STAT2_PMA_PMD_TX_DIS_ABLE 0x0100
857#define ADIN2111_PMA_PMD_STAT2_LB_PMA_LOC_ABLE 0x0001
858
859//PMA/PMD Transmit Disable register
860#define ADIN2111_PMA_PMD_TX_DIS_PMA_TX_DIS 0x0001
861
862//PMA/PMD Extended Abilities register
863#define ADIN2111_PMA_PMD_EXT_ABILITY_PMA_PMD_BT1_ABLE 0x0800
864
865//BASE-T1 PMA/PMD Extended Ability register
866#define ADIN2111_PMA_PMD_BT1_ABILITY_B10S_ABILITY 0x0008
867#define ADIN2111_PMA_PMD_BT1_ABILITY_B10L_ABILITY 0x0004
868#define ADIN2111_PMA_PMD_BT1_ABILITY_B1000_ABILITY 0x0002
869#define ADIN2111_PMA_PMD_BT1_ABILITY_B100_ABILITY 0x0001
870
871//BASE-T1 PMA/PMD Control register
872#define ADIN2111_PMA_PMD_BT1_CONTROL_CFG_MST 0x4000
873#define ADIN2111_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL 0x000F
874#define ADIN2111_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL_100BASE_T1 0x0000
875#define ADIN2111_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL_1000BASE_T1 0x0001
876#define ADIN2111_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL_10BASE_T1L 0x0002
877#define ADIN2111_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL_10BASE_T1S 0x0003
878
879//10BASE-T1L PMA Control register
880#define ADIN2111_B10L_PMA_CNTRL_B10L_TX_DIS_MODE_EN 0x4000
881#define ADIN2111_B10L_PMA_CNTRL_B10L_TX_LVL_HI 0x1000
882#define ADIN2111_B10L_PMA_CNTRL_B10L_EEE 0x0400
883#define ADIN2111_B10L_PMA_CNTRL_B10L_LB_PMA_LOC_EN 0x0001
884
885//10BASE-T1L PMA Status register
886#define ADIN2111_B10L_PMA_STAT_B10L_LB_PMA_LOC_ABLE 0x2000
887#define ADIN2111_B10L_PMA_STAT_B10L_TX_LVL_HI_ABLE 0x1000
888#define ADIN2111_B10L_PMA_STAT_B10L_PMA_SFT_PD_ABLE 0x0800
889#define ADIN2111_B10L_PMA_STAT_B10L_EEE_ABLE 0x0400
890
891//10BASE-T1L Test Mode Control register
892#define ADIN2111_B10L_TEST_MODE_CNTRL_B10L_TX_TEST_MODE 0xE000
893
894//10BASE-T1L PMA Link Status register
895#define ADIN2111_B10L_PMA_LINK_STAT_B10L_REM_RCVR_STAT_OK_LL 0x0200
896#define ADIN2111_B10L_PMA_LINK_STAT_B10L_REM_RCVR_STAT_OK 0x0100
897#define ADIN2111_B10L_PMA_LINK_STAT_B10L_LOC_RCVR_STAT_OK_LL 0x0080
898#define ADIN2111_B10L_PMA_LINK_STAT_B10L_LOC_RCVR_STAT_OK 0x0040
899#define ADIN2111_B10L_PMA_LINK_STAT_B10L_DSCR_STAT_OK_LL 0x0020
900#define ADIN2111_B10L_PMA_LINK_STAT_B10L_DSCR_STAT_OK 0x0010
901#define ADIN2111_B10L_PMA_LINK_STAT_B10L_LINK_STAT_OK_LL 0x0002
902#define ADIN2111_B10L_PMA_LINK_STAT_B10L_LINK_STAT_OK 0x0001
903
904//PCS Control 1 register
905#define ADIN2111_PCS_CNTRL1_PCS_SFT_RST 0x8000
906#define ADIN2111_PCS_CNTRL1_LB_PCS_EN 0x4000
907#define ADIN2111_PCS_CNTRL1_PCS_SFT_PD 0x0800
908
909//PCS Status 1 register
910#define ADIN2111_PCS_STAT1_PCS_SFT_PD_ABLE 0x0002
911
912//PCS Status 2 register
913#define ADIN2111_PCS_STAT2_PCS_PRESENT 0xC000
914
915//10BASE-T1L PCS Control register
916#define ADIN2111_B10L_PCS_CNTRL_B10L_LB_PCS_EN 0x4000
917
918//10BASE-T1L PCS Status register
919#define ADIN2111_B10L_PCS_STAT_B10L_PCS_DSCR_STAT_OK_LL 0x0004
920
921//BASE-T1 Autonegotiation Control register
922#define ADIN2111_AN_CONTROL_AN_EN 0x1000
923#define ADIN2111_AN_CONTROL_AN_RESTART 0x0200
924
925//BASE-T1 Autonegotiation Status register
926#define ADIN2111_AN_STATUS_AN_PAGE_RX 0x0040
927#define ADIN2111_AN_STATUS_AN_COMPLETE 0x0020
928#define ADIN2111_AN_STATUS_AN_REMOTE_FAULT 0x0010
929#define ADIN2111_AN_STATUS_AN_ABLE 0x0008
930#define ADIN2111_AN_STATUS_AN_LINK_STATUS 0x0004
931
932//BASE-T1 Autonegotiation Advertisement L register
933#define ADIN2111_AN_ADV_ABILITY_L_AN_ADV_NEXT_PAGE_REQ 0x8000
934#define ADIN2111_AN_ADV_ABILITY_L_AN_ADV_ACK 0x4000
935#define ADIN2111_AN_ADV_ABILITY_L_AN_ADV_REMOTE_FAULT 0x2000
936#define ADIN2111_AN_ADV_ABILITY_L_AN_ADV_FORCE_MS 0x1000
937#define ADIN2111_AN_ADV_ABILITY_L_AN_ADV_PAUSE 0x0C00
938#define ADIN2111_AN_ADV_ABILITY_L_AN_ADV_SELECTOR 0x001F
939#define ADIN2111_AN_ADV_ABILITY_L_AN_ADV_SELECTOR_DEFAULT 0x0001
940
941//BASE-T1 Autonegotiation Advertisement M register
942#define ADIN2111_AN_ADV_ABILITY_M_AN_ADV_B10L 0x4000
943#define ADIN2111_AN_ADV_ABILITY_M_AN_ADV_MST 0x0010
944
945//BASE-T1 Autonegotiation Advertisement H register
946#define ADIN2111_AN_ADV_ABILITY_H_AN_ADV_B10L_TX_LVL_HI_ABL 0x2000
947#define ADIN2111_AN_ADV_ABILITY_H_AN_ADV_B10L_TX_LVL_HI_REQ 0x1000
948
949//BASE-T1 Autonegotiation Link Partner Base Page Ability L register
950#define ADIN2111_AN_LP_ADV_ABILITY_L_AN_LP_ADV_NEXT_PAGE_REQ 0x8000
951#define ADIN2111_AN_LP_ADV_ABILITY_L_AN_LP_ADV_ACK 0x4000
952#define ADIN2111_AN_LP_ADV_ABILITY_L_AN_LP_ADV_REMOTE_FAULT 0x2000
953#define ADIN2111_AN_LP_ADV_ABILITY_L_AN_LP_ADV_FORCE_MS 0x1000
954#define ADIN2111_AN_LP_ADV_ABILITY_L_AN_LP_ADV_PAUSE 0x0C00
955#define ADIN2111_AN_LP_ADV_ABILITY_L_AN_LP_ADV_SELECTOR 0x001F
956
957//BASE-T1 Autonegotiation Link Partner Base Page Ability M register
958#define ADIN2111_AN_LP_ADV_ABILITY_M_AN_LP_ADV_B10L 0x4000
959#define ADIN2111_AN_LP_ADV_ABILITY_M_AN_LP_ADV_B1000 0x0080
960#define ADIN2111_AN_LP_ADV_ABILITY_M_AN_LP_ADV_B10S_FD 0x0040
961#define ADIN2111_AN_LP_ADV_ABILITY_M_AN_LP_ADV_B100 0x0020
962#define ADIN2111_AN_LP_ADV_ABILITY_M_AN_LP_ADV_MST 0x0010
963
964//BASE-T1 Autonegotiation Link Partner Base Page Ability H register
965#define ADIN2111_AN_LP_ADV_ABILITY_H_AN_LP_ADV_B10L_EEE 0x4000
966#define ADIN2111_AN_LP_ADV_ABILITY_H_AN_LP_ADV_B10L_TX_LVL_HI_ABL 0x2000
967#define ADIN2111_AN_LP_ADV_ABILITY_H_AN_LP_ADV_B10L_TX_LVL_HI_REQ 0x1000
968#define ADIN2111_AN_LP_ADV_ABILITY_H_AN_LP_ADV_B10S_HD 0x0800
969
970//BASE-T1 Autonegotiation Next Page Transmit L register
971#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_NEXT_PAGE_REQ 0x8000
972#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_ACK 0x4000
973#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_MESSAGE_PAGE 0x2000
974#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_ACK2 0x1000
975#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_TOGGLE 0x0800
976#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_MESSAGE_CODE 0x07FF
977#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_MESSAGE_CODE_NULL 0x0001
978#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_MESSAGE_CODE_OUI_TAGGED 0x0005
979#define ADIN2111_AN_NEXT_PAGE_L_AN_NP_MESSAGE_CODE_AN_DEV_ID_TAG 0x0006
980
981//BASE-T1 Autonegotiation Next Page Transmit M register
982#define ADIN2111_AN_NEXT_PAGE_M_AN_NP_UNFORMATTED1 0xFFFF
983
984//BASE-T1 Autonegotiation Next Page Transmit H register
985#define ADIN2111_AN_NEXT_PAGE_H_AN_NP_UNFORMATTED2 0xFFFF
986
987//BASE-T1 Autonegotiation Link Partner Next Page Ability L register
988#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_NEXT_PAGE_REQ 0x8000
989#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_ACK 0x4000
990#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_PAGE 0x2000
991#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_ACK2 0x1000
992#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_TOGGLE 0x0800
993#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_CODE 0x07FF
994#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_CODE_NULL 0x0001
995#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_CODE_OUI_TAGGED 0x0005
996#define ADIN2111_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_CODE_AN_DEV_ID_TAG 0x0006
997
998//BASE-T1 Autonegotiation Link Partner Next Page Ability M register
999#define ADIN2111_AN_LP_NEXT_PAGE_M_AN_LP_NP_UNFORMATTED1 0xFFFF
1000
1001//BASE-T1 Autonegotiation Link Partner Next Page Ability H register
1002#define ADIN2111_AN_LP_NEXT_PAGE_H_AN_LP_NP_UNFORMATTED2 0xFFFF
1003
1004//10BASE-T1 Autonegotiation Control register
1005#define ADIN2111_AN_B10_ADV_ABILITY_AN_B10_ADV_B10L 0x8000
1006#define ADIN2111_AN_B10_ADV_ABILITY_AN_B10_ADV_B10L_EEE 0x4000
1007#define ADIN2111_AN_B10_ADV_ABILITY_AN_B10_ADV_B10L_TX_LVL_HI_ABL 0x2000
1008#define ADIN2111_AN_B10_ADV_ABILITY_AN_B10_ADV_B10L_TX_LVL_HI_REQ 0x1000
1009
1010//10BASE-T1 Autonegotiation Status register
1011#define ADIN2111_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10L 0x8000
1012#define ADIN2111_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10L_EEE 0x4000
1013#define ADIN2111_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10L_TX_LVL_HI_ABL 0x2000
1014#define ADIN2111_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10L_TX_LVL_HI_REQ 0x1000
1015#define ADIN2111_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10S_FD 0x0080
1016#define ADIN2111_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10S_HD 0x0040
1017
1018//Autonegotiation Force Mode Enable register
1019#define ADIN2111_AN_FRC_MODE_EN_AN_FRC_MODE_EN 0x0001
1020
1021//Extra Autonegotiation Status register
1022#define ADIN2111_AN_STATUS_EXTRA_AN_LP_NP_RX 0x0400
1023#define ADIN2111_AN_STATUS_EXTRA_AN_INC_LINK 0x0200
1024#define ADIN2111_AN_STATUS_EXTRA_AN_TX_LVL_RSLTN 0x0180
1025#define ADIN2111_AN_STATUS_EXTRA_AN_TX_LVL_RSLTN_NOT_RUN 0x0000
1026#define ADIN2111_AN_STATUS_EXTRA_AN_TX_LVL_RSLTN_SUCCESS_1_0V 0x0100
1027#define ADIN2111_AN_STATUS_EXTRA_AN_TX_LVL_RSLTN_SUCCESS_2_4V 0x0180
1028#define ADIN2111_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN 0x0060
1029#define ADIN2111_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN_NOT_RUN 0x0000
1030#define ADIN2111_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN_CONFIG_FAULT 0x0020
1031#define ADIN2111_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN_SUCCESS_SLAVE 0x0040
1032#define ADIN2111_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN_SUCCESS_MASTER 0x0060
1033#define ADIN2111_AN_STATUS_EXTRA_AN_HCD_TECH 0x001E
1034#define ADIN2111_AN_STATUS_EXTRA_AN_HCD_TECH_NULL 0x0000
1035#define ADIN2111_AN_STATUS_EXTRA_AN_HCD_TECH_10BASE_T1L 0x0002
1036#define ADIN2111_AN_STATUS_EXTRA_AN_LINK_GOOD 0x0001
1037
1038//PHY Instantaneous Status register
1039#define ADIN2111_AN_PHY_INST_STATUS_IS_AN_TX_EN 0x0010
1040#define ADIN2111_AN_PHY_INST_STATUS_IS_CFG_MST 0x0008
1041#define ADIN2111_AN_PHY_INST_STATUS_IS_CFG_SLV 0x0004
1042#define ADIN2111_AN_PHY_INST_STATUS_IS_TX_LVL_HI 0x0002
1043#define ADIN2111_AN_PHY_INST_STATUS_IS_TX_LVL_LO 0x0001
1044
1045//Vendor Specific MMD 1 Device Identifier High register
1046#define ADIN2111_MMD1_DEV_ID1_MMD1_DEV_ID1 0xFFFF
1047#define ADIN2111_MMD1_DEV_ID1_MMD1_DEV_ID1_DEFAULT 0x0283
1048
1049//Vendor Specific MMD 1 Device Identifier Low register
1050#define ADIN2111_MMD1_DEV_ID2_MMD1_DEV_ID2_OUI 0xFC00
1051#define ADIN2111_MMD1_DEV_ID2_MMD1_DEV_ID2_OUI_DEFAULT 0xBC00
1052#define ADIN2111_MMD1_DEV_ID2_MMD1_MODEL_NUM 0x03F0
1053#define ADIN2111_MMD1_DEV_ID2_MMD1_MODEL_NUM_DEFAULT 0x00A0
1054#define ADIN2111_MMD1_DEV_ID2_MMD1_REV_NUM 0x000F
1055#define ADIN2111_MMD1_DEV_ID2_MMD1_REV_NUM_DEFAULT 0x0001
1056
1057//Vendor Specific MMD 1 Status register
1058#define ADIN2111_MMD1_STATUS_MMD1_STATUS 0xC000
1059#define ADIN2111_MMD1_STATUS_MMD1_STATUS_DEV_RESP 0x8000
1060
1061//System Interrupt Status register
1062#define ADIN2111_CRSM_IRQ_STATUS_CRSM_SW_IRQ_LH 0x8000
1063#define ADIN2111_CRSM_IRQ_STATUS_CRSM_HRD_RST_IRQ_LH 0x1000
1064
1065//System Interrupt Mask register
1066#define ADIN2111_CRSM_IRQ_MASK_CRSM_SW_IRQ_REQ 0x8000
1067#define ADIN2111_CRSM_IRQ_MASK_CRSM_HRD_RST_IRQ_EN 0x1000
1068
1069//Software Reset register
1070#define ADIN2111_CRSM_SFT_RST_CRSM_SFT_RST 0x0001
1071
1072//Software Power-Down Control register
1073#define ADIN2111_CRSM_SFT_PD_CNTRL_CRSM_SFT_PD 0x0001
1074
1075//PHY Subsystem Reset register
1076#define ADIN2111_CRSM_PHY_SUBSYS_RST_CRSM_PHY_SUBSYS_RST 0x0001
1077
1078//PHY MAC Interface Reset register
1079#define ADIN2111_CRSM_MAC_IF_RST_CRSM_MAC_IF_RST 0x0001
1080
1081//System Status register
1082#define ADIN2111_CRSM_STAT_CRSM_SFT_PD_RDY 0x0002
1083#define ADIN2111_CRSM_STAT_CRSM_SYS_RDY 0x0001
1084
1085//CRSM Power Management Control register
1086#define ADIN2111_CRSM_PMG_CNTRL_CRSM_FRC_OSC_EN 0x0001
1087
1088//CRSM Diagnostics Clock Control register
1089#define ADIN2111_CRSM_DIAG_CLK_CTRL_CRSM_DIAG_CLK_EN 0x0001
1090
1091//Package Configuration Values register
1092#define ADIN2111_MGMT_PRT_PKG_MGMT_PRT_PKG_VAL 0x003F
1093
1094//MDIO Control register
1095#define ADIN2111_MGMT_MDIO_CNTRL_MGMT_GRP_MDIO_EN 0x0001
1096
1097//Pin Mux Configuration 1 register
1098#define ADIN2111_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX 0x00C0
1099#define ADIN2111_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX_LED_0 0x0040
1100#define ADIN2111_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX_INT 0x0080
1101#define ADIN2111_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX_NONE 0x00C0
1102#define ADIN2111_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX 0x0030
1103#define ADIN2111_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX_LED_1 0x0010
1104#define ADIN2111_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX_TEST_1 0x0020
1105#define ADIN2111_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX_NONE 0x0030
1106#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX 0x000E
1107#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX_LED_1 0x0000
1108#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TX_ER 0x0002
1109#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TX_EN 0x0004
1110#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TX_CLK 0x0006
1111#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TXD_0 0x0008
1112#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TXD_2 0x000A
1113#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX_LINK_ST 0x000C
1114#define ADIN2111_DIGIO_PINMUX_DIGIO_LED1_PINMUX_NONE 0x000E
1115#define ADIN2111_DIGIO_PINMUX_DIGIO_LINK_ST_POLARITY 0x0001
1116#define ADIN2111_DIGIO_PINMUX_DIGIO_LINK_ST_POLARITY_ASSERT_HIGH 0x0000
1117#define ADIN2111_DIGIO_PINMUX_DIGIO_LINK_ST_POLARITY_ASSERT_LOW 0x0001
1118
1119//LED 0 On/Off Blink Time register
1120#define ADIN2111_LED0_BLINK_TIME_CNTRL_LED0_ON_N4MS 0xFF00
1121#define ADIN2111_LED0_BLINK_TIME_CNTRL_LED0_OFF_N4MS 0x00FF
1122
1123//LED 1 On/Off Blink Time register
1124#define ADIN2111_LED1_BLINK_TIME_CNTRL_LED1_ON_N4MS 0xFF00
1125#define ADIN2111_LED1_BLINK_TIME_CNTRL_LED1_OFF_N4MS 0x00FF
1126
1127//LED Control register
1128#define ADIN2111_LED_CNTRL_LED1_EN 0x8000
1129#define ADIN2111_LED_CNTRL_LED1_LINK_ST_QUALIFY 0x4000
1130#define ADIN2111_LED_CNTRL_LED1_MODE 0x2000
1131#define ADIN2111_LED_CNTRL_LED1_FUNCTION 0x1F00
1132#define ADIN2111_LED_CNTRL_LED1_FUNCTION_LINKUP_TXRX_ACTIVITY 0x0000
1133#define ADIN2111_LED_CNTRL_LED1_FUNCTION_LINKUP_TX_ACTIVITY 0x0100
1134#define ADIN2111_LED_CNTRL_LED1_FUNCTION_LINKUP_RX_ACTIVITY 0x0200
1135#define ADIN2111_LED_CNTRL_LED1_FUNCTION_LINKUP_ONLY 0x0300
1136#define ADIN2111_LED_CNTRL_LED1_FUNCTION_TXRX_ACTIVITY 0x0400
1137#define ADIN2111_LED_CNTRL_LED1_FUNCTION_TX_ACTIVITY 0x0500
1138#define ADIN2111_LED_CNTRL_LED1_FUNCTION_RX_ACTIVITY 0x0600
1139#define ADIN2111_LED_CNTRL_LED1_FUNCTION_LINKUP_RX_ER 0x0700
1140#define ADIN2111_LED_CNTRL_LED1_FUNCTION_LINKUP_RX_TX_ER 0x0800
1141#define ADIN2111_LED_CNTRL_LED1_FUNCTION_RX_ER 0x0900
1142#define ADIN2111_LED_CNTRL_LED1_FUNCTION_RX_TX_ER 0x0A00
1143#define ADIN2111_LED_CNTRL_LED1_FUNCTION_TX_SOP 0x0B00
1144#define ADIN2111_LED_CNTRL_LED1_FUNCTION_RX_SOP 0x0C00
1145#define ADIN2111_LED_CNTRL_LED1_FUNCTION_ON 0x0D00
1146#define ADIN2111_LED_CNTRL_LED1_FUNCTION_OFF 0x0E00
1147#define ADIN2111_LED_CNTRL_LED1_FUNCTION_BLINK 0x0F00
1148#define ADIN2111_LED_CNTRL_LED1_FUNCTION_TX_LEVEL_2P4 0x1000
1149#define ADIN2111_LED_CNTRL_LED1_FUNCTION_TX_LEVEL_1P0 0x1100
1150#define ADIN2111_LED_CNTRL_LED1_FUNCTION_MASTER 0x1200
1151#define ADIN2111_LED_CNTRL_LED1_FUNCTION_SLAVE 0x1300
1152#define ADIN2111_LED_CNTRL_LED1_FUNCTION_INCOMPATIBLE_LINK_CFG 0x1400
1153#define ADIN2111_LED_CNTRL_LED1_FUNCTION_AN_LINK_GOOD 0x1500
1154#define ADIN2111_LED_CNTRL_LED1_FUNCTION_AN_COMPLETE 0x1600
1155#define ADIN2111_LED_CNTRL_LED1_FUNCTION_TS_TIMER 0x1700
1156#define ADIN2111_LED_CNTRL_LED1_FUNCTION_LOC_RCVR_STATUS 0x1800
1157#define ADIN2111_LED_CNTRL_LED1_FUNCTION_REM_RCVR_STATUS 0x1900
1158#define ADIN2111_LED_CNTRL_LED1_FUNCTION_CLK25_REF 0x1A00
1159#define ADIN2111_LED_CNTRL_LED1_FUNCTION_TX_TCLK 0x1B00
1160#define ADIN2111_LED_CNTRL_LED1_FUNCTION_CLK_120MHZ 0x1C00
1161#define ADIN2111_LED_CNTRL_LED0_EN 0x0080
1162#define ADIN2111_LED_CNTRL_LED0_LINK_ST_QUALIFY 0x0040
1163#define ADIN2111_LED_CNTRL_LED0_MODE 0x0020
1164#define ADIN2111_LED_CNTRL_LED0_FUNCTION 0x001F
1165#define ADIN2111_LED_CNTRL_LED0_FUNCTION_LINKUP_TXRX_ACTIVITY 0x0000
1166#define ADIN2111_LED_CNTRL_LED0_FUNCTION_LINKUP_TX_ACTIVITY 0x0001
1167#define ADIN2111_LED_CNTRL_LED0_FUNCTION_LINKUP_RX_ACTIVITY 0x0002
1168#define ADIN2111_LED_CNTRL_LED0_FUNCTION_LINKUP_ONLY 0x0003
1169#define ADIN2111_LED_CNTRL_LED0_FUNCTION_TXRX_ACTIVITY 0x0004
1170#define ADIN2111_LED_CNTRL_LED0_FUNCTION_TX_ACTIVITY 0x0005
1171#define ADIN2111_LED_CNTRL_LED0_FUNCTION_RX_ACTIVITY 0x0006
1172#define ADIN2111_LED_CNTRL_LED0_FUNCTION_LINKUP_RX_ER 0x0007
1173#define ADIN2111_LED_CNTRL_LED0_FUNCTION_LINKUP_RX_TX_ER 0x0008
1174#define ADIN2111_LED_CNTRL_LED0_FUNCTION_RX_ER 0x0009
1175#define ADIN2111_LED_CNTRL_LED0_FUNCTION_RX_TX_ER 0x000A
1176#define ADIN2111_LED_CNTRL_LED0_FUNCTION_TX_SOP 0x000B
1177#define ADIN2111_LED_CNTRL_LED0_FUNCTION_RX_SOP 0x000C
1178#define ADIN2111_LED_CNTRL_LED0_FUNCTION_ON 0x000D
1179#define ADIN2111_LED_CNTRL_LED0_FUNCTION_OFF 0x000E
1180#define ADIN2111_LED_CNTRL_LED0_FUNCTION_BLINK 0x000F
1181#define ADIN2111_LED_CNTRL_LED0_FUNCTION_TX_LEVEL_2P4 0x0010
1182#define ADIN2111_LED_CNTRL_LED0_FUNCTION_TX_LEVEL_1P0 0x0011
1183#define ADIN2111_LED_CNTRL_LED0_FUNCTION_MASTER 0x0012
1184#define ADIN2111_LED_CNTRL_LED0_FUNCTION_SLAVE 0x0013
1185#define ADIN2111_LED_CNTRL_LED0_FUNCTION_INCOMPATIBLE_LINK_CFG 0x0014
1186#define ADIN2111_LED_CNTRL_LED0_FUNCTION_AN_LINK_GOOD 0x0015
1187#define ADIN2111_LED_CNTRL_LED0_FUNCTION_AN_COMPLETE 0x0016
1188#define ADIN2111_LED_CNTRL_LED0_FUNCTION_TS_TIMER 0x0017
1189#define ADIN2111_LED_CNTRL_LED0_FUNCTION_LOC_RCVR_STATUS 0x0018
1190#define ADIN2111_LED_CNTRL_LED0_FUNCTION_REM_RCVR_STATUS 0x0019
1191#define ADIN2111_LED_CNTRL_LED0_FUNCTION_CLK25_REF 0x001A
1192#define ADIN2111_LED_CNTRL_LED0_FUNCTION_TX_TCLK 0x001B
1193#define ADIN2111_LED_CNTRL_LED0_FUNCTION_CLK_120MHZ 0x001C
1194
1195//LED Polarity register
1196#define ADIN2111_LED_POLARITY_LED1_POLARITY 0x000C
1197#define ADIN2111_LED_POLARITY_LED1_POLARITY_AUTOSENSE 0x0000
1198#define ADIN2111_LED_POLARITY_LED1_POLARITY_ACTIVE_HIGH 0x0004
1199#define ADIN2111_LED_POLARITY_LED1_POLARITY_ACTIVE_LOW 0x0008
1200#define ADIN2111_LED_POLARITY_LED0_POLARITY 0x0003
1201#define ADIN2111_LED_POLARITY_LED0_POLARITY_AUTOSENSE 0x0000
1202#define ADIN2111_LED_POLARITY_LED0_POLARITY_ACTIVE_HIGH 0x0001
1203#define ADIN2111_LED_POLARITY_LED0_POLARITY_ACTIVE_LOW 0x0002
1204
1205//Vendor Specific MMD 2 Device Identifier High register
1206#define ADIN2111_MMD2_DEV_ID1_MMD2_DEV_ID1 0xFFFF
1207#define ADIN2111_MMD2_DEV_ID1_MMD2_DEV_ID1_DEFAULT 0x0283
1208
1209//Vendor Specific MMD 2 Device Identifier Low register
1210#define ADIN2111_MMD2_DEV_ID2_MMD2_DEV_ID2_OUI 0xFC00
1211#define ADIN2111_MMD2_DEV_ID2_MMD2_DEV_ID2_OUI_DEFAULT 0xBC00
1212#define ADIN2111_MMD2_DEV_ID2_MMD2_MODEL_NUM 0x03F0
1213#define ADIN2111_MMD2_DEV_ID2_MMD2_MODEL_NUM_DEFAULT 0x00A0
1214#define ADIN2111_MMD2_DEV_ID2_MMD2_REV_NUM 0x000F
1215#define ADIN2111_MMD2_DEV_ID2_MMD2_REV_NUM_DEFAULT 0x0001
1216
1217//Vendor Specific MMD 2 Status register
1218#define ADIN2111_MMD2_STATUS_MMD2_STATUS 0xC000
1219#define ADIN2111_MMD2_STATUS_MMD2_STATUS_DEV_RESP 0x8000
1220
1221//PHY Subsystem Interrupt Status register
1222#define ADIN2111_PHY_SUBSYS_IRQ_STATUS_MAC_IF_FC_FG_IRQ_LH 0x4000
1223#define ADIN2111_PHY_SUBSYS_IRQ_STATUS_MAC_IF_EBUF_ERR_IRQ_LH 0x2000
1224#define ADIN2111_PHY_SUBSYS_IRQ_STATUS_AN_STAT_CHNG_IRQ_LH 0x0800
1225#define ADIN2111_PHY_SUBSYS_IRQ_STATUS_LINK_STAT_CHNG_LH 0x0002
1226
1227//PHY Subsystem Interrupt Mask register
1228#define ADIN2111_PHY_SUBSYS_IRQ_MASK_MAC_IF_FC_FG_IRQ_EN 0x4000
1229#define ADIN2111_PHY_SUBSYS_IRQ_MASK_MAC_IF_EBUF_ERR_IRQ_EN 0x2000
1230#define ADIN2111_PHY_SUBSYS_IRQ_MASK_AN_STAT_CHNG_IRQ_EN 0x0800
1231#define ADIN2111_PHY_SUBSYS_IRQ_MASK_LINK_STAT_CHNG_IRQ_EN 0x0002
1232
1233//Frame Checker Enable register
1234#define ADIN2111_FC_EN_FC_EN 0x0001
1235
1236//Frame Checker Interrupt Enable register
1237#define ADIN2111_FC_IRQ_EN_FC_IRQ_EN 0x0001
1238
1239//Frame Checker Transmit Select register
1240#define ADIN2111_FC_TX_SEL_FC_TX_SEL 0x0001
1241
1242//Frame Generator Enable register
1243#define ADIN2111_FG_EN_FG_EN 0x0001
1244
1245//Frame Generator Control/Restart register
1246#define ADIN2111_FG_CNTRL_RSTRT_FG_RSTRT 0x0008
1247#define ADIN2111_FG_CNTRL_RSTRT_FG_CNTRL 0x0007
1248#define ADIN2111_FG_CNTRL_RSTRT_FG_CNTRL_NO_FRAMES 0x0000
1249#define ADIN2111_FG_CNTRL_RSTRT_FG_CNTRL_RANDOM 0x0001
1250#define ADIN2111_FG_CNTRL_RSTRT_FG_CNTRL_ALL_ZEROS 0x0002
1251#define ADIN2111_FG_CNTRL_RSTRT_FG_CNTRL_ALL_ONES 0x0003
1252#define ADIN2111_FG_CNTRL_RSTRT_FG_CNTRL_ALT 0x0004
1253#define ADIN2111_FG_CNTRL_RSTRT_FG_CNTRL_DEC 0x0005
1254
1255//Frame Generator Continuous Mode Enable register
1256#define ADIN2111_FG_CONT_MODE_EN_FG_CONT_MODE_EN 0x0001
1257
1258//Frame Generator Interrupt Enable register
1259#define ADIN2111_FG_IRQ_EN_FG_IRQ_EN 0x0001
1260
1261//Frame Generator Done register
1262#define ADIN2111_FG_DONE_FG_DONE 0x0001
1263
1264//MAC Interface Loopbacks Configuration register
1265#define ADIN2111_MAC_IF_LOOPBACK_MAC_IF_REM_LB_RX_SUP_EN 0x0008
1266#define ADIN2111_MAC_IF_LOOPBACK_MAC_IF_REM_LB_EN 0x0004
1267#define ADIN2111_MAC_IF_LOOPBACK_MAC_IF_LB_TX_SUP_EN 0x0002
1268#define ADIN2111_MAC_IF_LOOPBACK_MAC_IF_LB_EN 0x0001
1269
1270//MAC Start Of Packet (SOP) Generation Control register
1271#define ADIN2111_MAC_IF_SOP_CNTRL_MAC_IF_TX_SOP_LEN_CHK_EN 0x0020
1272#define ADIN2111_MAC_IF_SOP_CNTRL_MAC_IF_TX_SOP_SFD_EN 0x0010
1273#define ADIN2111_MAC_IF_SOP_CNTRL_MAC_IF_TX_SOP_DET_EN 0x0008
1274#define ADIN2111_MAC_IF_SOP_CNTRL_MAC_IF_RX_SOP_LEN_CHK_EN 0x0004
1275#define ADIN2111_MAC_IF_SOP_CNTRL_MAC_IF_RX_SOP_SFD_EN 0x0002
1276#define ADIN2111_MAC_IF_SOP_CNTRL_MAC_IF_RX_SOP_DET_EN 0x0001
1277
1278//MAC address filtering table
1279#define ADIN2111_ADDR_FILT_UPRn(index) (ADIN2111_ADDR_FILT_UPR0 + ((index) * 2))
1280#define ADIN2111_ADDR_FILT_LWRn(index) (ADIN2111_ADDR_FILT_LWR0 + ((index) * 2))
1281#define ADIN2111_ADDR_MSK_UPRn(index) (ADIN2111_ADDR_MSK_UPR0 + ((index) * 2))
1282#define ADIN2111_ADDR_MSK_LWRn(index) (ADIN2111_ADDR_MSK_LWR0 + ((index) * 2))
1283
1284//C++ guard
1285#ifdef __cplusplus
1286extern "C" {
1287#endif
1288
1289//ADIN2111 driver
1290extern const NicDriver adin2111Driver;
1291
1292//ADIN2111 related functions
1293error_t adin2111Init(NetInterface *interface);
1294void adin2111InitHook(NetInterface *interface);
1295
1296void adin2111Tick(NetInterface *interface);
1297
1298void adin2111EnableIrq(NetInterface *interface);
1299void adin2111DisableIrq(NetInterface *interface);
1300bool_t adin2111IrqHandler(NetInterface *interface);
1301void adin2111EventHandler(NetInterface *interface);
1302void adin2111LinkChangeEventHandler(NetInterface *interface);
1303
1304error_t adin2111SendPacket(NetInterface *interface,
1305 const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary);
1306
1307void adin2111ReceivePacket(NetInterface *interface, uint8_t port);
1308
1309error_t adin2111UpdateMacAddrFilter(NetInterface *interface);
1310
1311bool_t adin2111GetLinkState(NetInterface *interface, uint8_t port);
1312
1313void adin2111WriteReg(NetInterface *interface, uint16_t address,
1314 uint32_t data);
1315
1316uint32_t adin2111ReadReg(NetInterface *interface, uint16_t address);
1317void adin2111DumpReg(NetInterface *interface);
1318
1319void adin2111WritePhyReg(NetInterface *interface, uint8_t port,
1320 uint8_t address, uint16_t data);
1321
1322uint16_t adin2111ReadPhyReg(NetInterface *interface, uint8_t port,
1323 uint8_t address);
1324
1325void adin2111DumpPhyReg(NetInterface *interface, uint8_t port);
1326
1327void adin2111WriteMmdReg(NetInterface *interface, uint8_t port,
1328 uint8_t devAddr, uint16_t regAddr, uint16_t data);
1329
1330uint16_t adin2111ReadMmdReg(NetInterface *interface, uint8_t port,
1331 uint8_t devAddr, uint16_t regAddr);
1332
1333void adin2111WriteFifo(NetInterface *interface, uint16_t header,
1334 const uint8_t *data, size_t length);
1335
1336void adin2111ReadFifo(NetInterface *interface, uint8_t port,
1337 uint16_t *header, uint8_t *data, size_t length);
1338
1339//C++ guard
1340#ifdef __cplusplus
1341}
1342#endif
1343
1344#endif
error_t
Error codes.
Definition error.h:43
Network interface controller abstraction layer.
Structure describing a buffer that spans multiple chunks.
Definition net_mem.h:89
NIC driver.
Definition nic.h:283