mikroSDK Reference Manual
adin1110_driver.h
Go to the documentation of this file.
1
31#ifndef _ADIN1110_DRIVER_H
32#define _ADIN1110_DRIVER_H
33
34//Dependencies
35#include "core/nic.h"
36
37//TX buffer size
38#ifndef ADIN1110_ETH_TX_BUFFER_SIZE
39 #define ADIN1110_ETH_TX_BUFFER_SIZE 1536
40#elif (ADIN1110_ETH_TX_BUFFER_SIZE != 1536)
41 #error ADIN1110_ETH_TX_BUFFER_SIZE parameter is not valid
42#endif
43
44//RX buffer size
45#ifndef ADIN1110_ETH_RX_BUFFER_SIZE
46 #define ADIN1110_ETH_RX_BUFFER_SIZE 1536
47#elif (ADIN1110_ETH_RX_BUFFER_SIZE != 1536)
48 #error ADIN1110_ETH_RX_BUFFER_SIZE parameter is not valid
49#endif
50
51//Size of the MAC address filtering table
52#define ADIN1110_ADDR_TABLE_SIZE 16
53//Frame header size
54#define ADIN1110_FRAME_HEADER_SIZE 2
55//TX frame overhead
56#define ADIN1110_TX_FRAME_OVERHEAD 4
57
58//SPI commands
59#define ADIN1110_SPI_CMD_READ 0x80
60#define ADIN1110_SPI_CMD_WRITE 0xA0
61
62//Frame header
63#define ADIN1110_FRAME_HEADER_PRIORITY 0x4000
64#define ADIN1110_FRAME_HEADER_EGRESS_CAPTURE 0x00C0
65#define ADIN1110_FRAME_HEADER_EGRESS_CAPTURE_A 0x0040
66#define ADIN1110_FRAME_HEADER_EGRESS_CAPTURE_B 0x0080
67#define ADIN1110_FRAME_HEADER_EGRESS_CAPTURE_C 0x00C0
68#define ADIN1110_FRAME_HEADER_TIME_STAMP_PARITY 0x0008
69#define ADIN1110_FRAME_HEADER_TIME_STAMP_PRESENT 0x0004
70
71//ADIN1110 SPI registers
72#define ADIN1110_IDVER 0x00
73#define ADIN1110_PHYID 0x01
74#define ADIN1110_CAPABILITY 0x02
75#define ADIN1110_RESET 0x03
76#define ADIN1110_CONFIG0 0x04
77#define ADIN1110_CONFIG2 0x06
78#define ADIN1110_STATUS0 0x08
79#define ADIN1110_STATUS1 0x09
80#define ADIN1110_BUFSTS 0x0B
81#define ADIN1110_IMASK0 0x0C
82#define ADIN1110_IMASK1 0x0D
83#define ADIN1110_TTSCAH 0x10
84#define ADIN1110_TTSCAL 0x11
85#define ADIN1110_TTSCBH 0x12
86#define ADIN1110_TTSCBL 0x13
87#define ADIN1110_TTSCCH 0x14
88#define ADIN1110_TTSCCL 0x15
89#define ADIN1110_MDIOACC0 0x20
90#define ADIN1110_MDIOACC1 0x21
91#define ADIN1110_MDIOACC2 0x22
92#define ADIN1110_MDIOACC3 0x23
93#define ADIN1110_MDIOACC4 0x24
94#define ADIN1110_MDIOACC5 0x25
95#define ADIN1110_MDIOACC6 0x26
96#define ADIN1110_MDIOACC7 0x27
97#define ADIN1110_TX_FSIZE 0x30
98#define ADIN1110_TX 0x31
99#define ADIN1110_TX_SPACE 0x32
100#define ADIN1110_TX_THRESH 0x34
101#define ADIN1110_FIFO_CLR 0x36
102#define ADIN1110_SCRATCH0 0x37
103#define ADIN1110_SCRATCH1 0x38
104#define ADIN1110_SCRATCH2 0x39
105#define ADIN1110_SCRATCH3 0x3A
106#define ADIN1110_MAC_RST_STATUS 0x3B
107#define ADIN1110_SOFT_RST 0x3C
108#define ADIN1110_SPI_INJ_ERR 0x3D
109#define ADIN1110_FIFO_SIZE 0x3E
110#define ADIN1110_TFC 0x3F
111#define ADIN1110_TXSIZE 0x40
112#define ADIN1110_HTX_OVF_FRM_CNT 0x41
113#define ADIN1110_MECC_ERR_ADDR 0x42
114#define ADIN1110_CECC_ERR0 0x43
115#define ADIN1110_CECC_ERR1 0x44
116#define ADIN1110_CECC_ERR2 0x45
117#define ADIN1110_CECC_ERR3 0x46
118#define ADIN1110_CECC_ERR4 0x47
119#define ADIN1110_CECC_ERR5 0x48
120#define ADIN1110_CECC_ERR6 0x49
121#define ADIN1110_ADDR_FILT_UPR0 0x50
122#define ADIN1110_ADDR_FILT_LWR0 0x51
123#define ADIN1110_ADDR_FILT_UPR1 0x52
124#define ADIN1110_ADDR_FILT_LWR1 0x53
125#define ADIN1110_ADDR_FILT_UPR2 0x54
126#define ADIN1110_ADDR_FILT_LWR2 0x55
127#define ADIN1110_ADDR_FILT_UPR3 0x56
128#define ADIN1110_ADDR_FILT_LWR3 0x57
129#define ADIN1110_ADDR_FILT_UPR4 0x58
130#define ADIN1110_ADDR_FILT_LWR4 0x59
131#define ADIN1110_ADDR_FILT_UPR5 0x5A
132#define ADIN1110_ADDR_FILT_LWR5 0x5B
133#define ADIN1110_ADDR_FILT_UPR6 0x5C
134#define ADIN1110_ADDR_FILT_LWR6 0x5D
135#define ADIN1110_ADDR_FILT_UPR7 0x5E
136#define ADIN1110_ADDR_FILT_LWR7 0x5F
137#define ADIN1110_ADDR_FILT_UPR8 0x60
138#define ADIN1110_ADDR_FILT_LWR8 0x61
139#define ADIN1110_ADDR_FILT_UPR9 0x62
140#define ADIN1110_ADDR_FILT_LWR9 0x63
141#define ADIN1110_ADDR_FILT_UPR10 0x64
142#define ADIN1110_ADDR_FILT_LWR10 0x65
143#define ADIN1110_ADDR_FILT_UPR11 0x66
144#define ADIN1110_ADDR_FILT_LWR11 0x67
145#define ADIN1110_ADDR_FILT_UPR12 0x68
146#define ADIN1110_ADDR_FILT_LWR12 0x69
147#define ADIN1110_ADDR_FILT_UPR13 0x6A
148#define ADIN1110_ADDR_FILT_LWR13 0x6B
149#define ADIN1110_ADDR_FILT_UPR14 0x6C
150#define ADIN1110_ADDR_FILT_LWR14 0x6D
151#define ADIN1110_ADDR_FILT_UPR15 0x6E
152#define ADIN1110_ADDR_FILT_LWR15 0x6F
153#define ADIN1110_ADDR_MSK_UPR0 0x70
154#define ADIN1110_ADDR_MSK_LWR0 0x71
155#define ADIN1110_ADDR_MSK_UPR1 0x72
156#define ADIN1110_ADDR_MSK_LWR1 0x73
157#define ADIN1110_TS_ADDEND 0x80
158#define ADIN1110_TS_1SEC_CMP 0x81
159#define ADIN1110_TS_SEC_CNT 0x82
160#define ADIN1110_TS_NS_CNT 0x83
161#define ADIN1110_TS_CFG 0x84
162#define ADIN1110_TS_TIMER_HI 0x85
163#define ADIN1110_TS_TIMER_LO 0x86
164#define ADIN1110_TS_TIMER_QE_CORR 0x87
165#define ADIN1110_TS_TIMER_START 0x88
166#define ADIN1110_TS_EXT_CAPT0 0x89
167#define ADIN1110_TS_EXT_CAPT1 0x8A
168#define ADIN1110_TS_FREECNT_CAPT 0x8B
169#define ADIN1110_P1_RX_FSIZE 0x90
170#define ADIN1110_P1_RX 0x91
171#define ADIN1110_P1_RX_FRM_CNT 0xA0
172#define ADIN1110_P1_RX_BCAST_CNT 0xA1
173#define ADIN1110_P1_RX_MCAST_CNT 0xA2
174#define ADIN1110_P1_RX_UCAST_CNT 0xA3
175#define ADIN1110_P1_RX_CRC_ERR_CNT 0xA4
176#define ADIN1110_P1_RX_ALGN_ERR_CNT 0xA5
177#define ADIN1110_P1_RX_LS_ERR_CNT 0xA6
178#define ADIN1110_P1_RX_PHY_ERR_CNT 0xA7
179#define ADIN1110_P1_TX_FRM_CNT 0xA8
180#define ADIN1110_P1_TX_BCAST_CNT 0xA9
181#define ADIN1110_P1_TX_MCAST_CNT 0xAA
182#define ADIN1110_P1_TX_UCAST_CNT 0xAB
183#define ADIN1110_P1_RX_DROP_FULL_CNT 0xAC
184#define ADIN1110_P1_RX_DROP_FILT_CNT 0xAD
185#define ADIN1110_P1_RX_IFG_ERR_CNT 0xAE
186#define ADIN1110_P1_TX_IFG 0xB0
187#define ADIN1110_P1_LOOP 0xB3
188#define ADIN1110_P1_RX_CRC_EN 0xB4
189#define ADIN1110_P1_RX_IFG 0xB5
190#define ADIN1110_P1_RX_MAX_LEN 0xB6
191#define ADIN1110_P1_RX_MIN_LEN 0xB7
192#define ADIN1110_P1_LO_RFC 0xB8
193#define ADIN1110_P1_HI_RFC 0xB9
194#define ADIN1110_P1_LO_RXSIZE 0xBA
195#define ADIN1110_P1_HI_RXSIZE 0xBB
196
197//ADIN1110 PHY registers
198#define ADIN1110_MI_CONTROL 0x00
199#define ADIN1110_MI_STATUS 0x01
200#define ADIN1110_MI_PHY_ID1 0x02
201#define ADIN1110_MI_PHY_ID2 0x03
202#define ADIN1110_MMD_ACCESS_CNTRL 0x0D
203#define ADIN1110_MMD_ACCESS 0x0E
204
205//ADIN1110 MMD registers
206#define ADIN1110_PMA_PMD_CNTRL1 0x01, 0x0000
207#define ADIN1110_PMA_PMD_STAT1 0x01, 0x0001
208#define ADIN1110_PMA_PMD_DEVS_IN_PKG1 0x01, 0x0005
209#define ADIN1110_PMA_PMD_DEVS_IN_PKG2 0x01, 0x0006
210#define ADIN1110_PMA_PMD_CNTRL2 0x01, 0x0007
211#define ADIN1110_PMA_PMD_STAT2 0x01, 0x0008
212#define ADIN1110_PMA_PMD_TX_DIS 0x01, 0x0009
213#define ADIN1110_PMA_PMD_EXT_ABILITY 0x01, 0x000B
214#define ADIN1110_PMA_PMD_BT1_ABILITY 0x01, 0x0012
215#define ADIN1110_PMA_PMD_BT1_CONTROL 0x01, 0x0834
216#define ADIN1110_B10L_PMA_CNTRL 0x01, 0x08F6
217#define ADIN1110_B10L_PMA_STAT 0x01, 0x08F7
218#define ADIN1110_B10L_TEST_MODE_CNTRL 0x01, 0x08F8
219#define ADIN1110_CR_STBL_CHK_FOFFS_SAT_THR 0x01, 0x8015
220#define ADIN1110_SLV_FLTR_ECHO_ACQ_CR_KP 0x01, 0x81E7
221#define ADIN1110_B10L_PMA_LINK_STAT 0x01, 0x8302
222#define ADIN1110_MSE_VAL 0x01, 0x830B
223#define ADIN1110_PCS_CNTRL1 0x03, 0x0000
224#define ADIN1110_PCS_STAT1 0x03, 0x0001
225#define ADIN1110_PCS_DEVS_IN_PKG1 0x03, 0x0005
226#define ADIN1110_PCS_DEVS_IN_PKG2 0x03, 0x0006
227#define ADIN1110_PCS_STAT2 0x03, 0x0008
228#define ADIN1110_B10L_PCS_CNTRL 0x03, 0x08E6
229#define ADIN1110_B10L_PCS_STAT 0x03, 0x08E7
230#define ADIN1110_AN_DEVS_IN_PKG1 0x07, 0x0005
231#define ADIN1110_AN_DEVS_IN_PKG2 0x07, 0x0006
232#define ADIN1110_AN_CONTROL 0x07, 0x0200
233#define ADIN1110_AN_STATUS 0x07, 0x0201
234#define ADIN1110_AN_ADV_ABILITY_L 0x07, 0x0202
235#define ADIN1110_AN_ADV_ABILITY_M 0x07, 0x0203
236#define ADIN1110_AN_ADV_ABILITY_H 0x07, 0x0204
237#define ADIN1110_AN_LP_ADV_ABILITY_L 0x07, 0x0205
238#define ADIN1110_AN_LP_ADV_ABILITY_M 0x07, 0x0206
239#define ADIN1110_AN_LP_ADV_ABILITY_H 0x07, 0x0207
240#define ADIN1110_AN_NEXT_PAGE_L 0x07, 0x0208
241#define ADIN1110_AN_NEXT_PAGE_M 0x07, 0x0209
242#define ADIN1110_AN_NEXT_PAGE_H 0x07, 0x020A
243#define ADIN1110_AN_LP_NEXT_PAGE_L 0x07, 0x020B
244#define ADIN1110_AN_LP_NEXT_PAGE_M 0x07, 0x020C
245#define ADIN1110_AN_LP_NEXT_PAGE_H 0x07, 0x020D
246#define ADIN1110_AN_B10_ADV_ABILITY 0x07, 0x020E
247#define ADIN1110_AN_B10_LP_ADV_ABILITY 0x07, 0x020F
248#define ADIN1110_AN_FRC_MODE_EN 0x07, 0x8000
249#define ADIN1110_AN_STATUS_EXTRA 0x07, 0x8001
250#define ADIN1110_AN_PHY_INST_STATUS 0x07, 0x8030
251#define ADIN1110_MMD1_DEV_ID1 0x1E, 0x0002
252#define ADIN1110_MMD1_DEV_ID2 0x1E, 0x0003
253#define ADIN1110_MMD1_DEVS_IN_PKG1 0x1E, 0x0005
254#define ADIN1110_MMD1_DEVS_IN_PKG2 0x1E, 0x0006
255#define ADIN1110_MMD1_STATUS 0x1E, 0x0008
256#define ADIN1110_CRSM_IRQ_STATUS 0x1E, 0x0010
257#define ADIN1110_CRSM_IRQ_MASK 0x1E, 0x0020
258#define ADIN1110_CRSM_SFT_RST 0x1E, 0x8810
259#define ADIN1110_CRSM_SFT_PD_CNTRL 0x1E, 0x8812
260#define ADIN1110_CRSM_PHY_SUBSYS_RST 0x1E, 0x8814
261#define ADIN1110_CRSM_MAC_IF_RST 0x1E, 0x8815
262#define ADIN1110_CRSM_STAT 0x1E, 0x8818
263#define ADIN1110_CRSM_PMG_CNTRL 0x1E, 0x8819
264#define ADIN1110_CRSM_DIAG_CLK_CTRL 0x1E, 0x882C
265#define ADIN1110_MGMT_PRT_PKG 0x1E, 0x8C22
266#define ADIN1110_MGMT_MDIO_CNTRL 0x1E, 0x8C30
267#define ADIN1110_DIGIO_PINMUX 0x1E, 0x8C56
268#define ADIN1110_LED0_BLINK_TIME_CNTRL 0x1E, 0x8C80
269#define ADIN1110_LED1_BLINK_TIME_CNTRL 0x1E, 0x8C81
270#define ADIN1110_LED_CNTRL 0x1E, 0x8C82
271#define ADIN1110_LED_POLARITY 0x1E, 0x8C83
272#define ADIN1110_MMD2_DEV_ID1 0x1F, 0x0002
273#define ADIN1110_MMD2_DEV_ID2 0x1F, 0x0003
274#define ADIN1110_MMD2_DEVS_IN_PKG1 0x1F, 0x0005
275#define ADIN1110_MMD2_DEVS_IN_PKG2 0x1F, 0x0006
276#define ADIN1110_MMD2_STATUS 0x1F, 0x0008
277#define ADIN1110_PHY_SUBSYS_IRQ_STATUS 0x1F, 0x0011
278#define ADIN1110_PHY_SUBSYS_IRQ_MASK 0x1F, 0x0021
279#define ADIN1110_FC_EN 0x1F, 0x8001
280#define ADIN1110_FC_IRQ_EN 0x1F, 0x8004
281#define ADIN1110_FC_TX_SEL 0x1F, 0x8005
282#define ADIN1110_RX_ERR_CNT 0x1F, 0x8008
283#define ADIN1110_FC_FRM_CNT_H 0x1F, 0x8009
284#define ADIN1110_FC_FRM_CNT_L 0x1F, 0x800A
285#define ADIN1110_FC_LEN_ERR_CNT 0x1F, 0x800B
286#define ADIN1110_FC_ALGN_ERR_CNT 0x1F, 0x800C
287#define ADIN1110_FC_SYMB_ERR_CNT 0x1F, 0x800D
288#define ADIN1110_FC_OSZ_CNT 0x1F, 0x800E
289#define ADIN1110_FC_USZ_CNT 0x1F, 0x800F
290#define ADIN1110_FC_ODD_CNT 0x1F, 0x8010
291#define ADIN1110_FC_ODD_PRE_CNT 0x1F, 0x8011
292#define ADIN1110_FC_FALSE_CARRIER_CNT 0x1F, 0x8013
293#define ADIN1110_FG_EN 0x1F, 0x8020
294#define ADIN1110_FG_CNTRL_RSTRT 0x1F, 0x8021
295#define ADIN1110_FG_CONT_MODE_EN 0x1F, 0x8022
296#define ADIN1110_FG_IRQ_EN 0x1F, 0x8023
297#define ADIN1110_FG_FRM_LEN 0x1F, 0x8025
298#define ADIN1110_FG_IFG_LEN 0x1F, 0x8026
299#define ADIN1110_FG_NFRM_H 0x1F, 0x8027
300#define ADIN1110_FG_NFRM_L 0x1F, 0x8028
301#define ADIN1110_FG_DONE 0x1F, 0x8029
302#define ADIN1110_MAC_IF_LOOPBACK 0x1F, 0x8055
303#define ADIN1110_MAC_IF_SOP_CNTRL 0x1F, 0x805A
304
305//Identification Version register
306#define ADIN1110_IDVER_MINVER 0x0000000F
307
308//PHY Identification register
309#define ADIN1110_PHYID_OUI 0xFFFFFC00
310#define ADIN1110_PHYID_OUI_DEFAULT 0x0283BC00
311#define ADIN1110_PHYID_MODEL 0x000003F0
312#define ADIN1110_PHYID_MODEL_DEFAULT 0x00000090
313#define ADIN1110_PHYID_REVISION 0x0000000F
314#define ADIN1110_PHYID_REVISION_DEFAULT 0x00000001
315
316//Supported Capabilities register
317#define ADIN1110_CAPABILITY_TXFCSVC 0x00000400
318#define ADIN1110_CAPABILITY_IPRAC 0x00000200
319#define ADIN1110_CAPABILITY_DPRAC 0x00000100
320#define ADIN1110_CAPABILITY_CTC 0x00000080
321#define ADIN1110_CAPABILITY_FTSC 0x00000040
322#define ADIN1110_CAPABILITY_AIDC 0x00000020
323#define ADIN1110_CAPABILITY_SEQC 0x00000010
324#define ADIN1110_CAPABILITY_MINCPS 0x00000007
325#define ADIN1110_CAPABILITY_MINCPS_8B 0x00000003
326#define ADIN1110_CAPABILITY_MINCPS_16B 0x00000004
327#define ADIN1110_CAPABILITY_MINCPS_32B 0x00000005
328#define ADIN1110_CAPABILITY_MINCPS_64B 0x00000006
329
330//Reset Control and Status register
331#define ADIN1110_RESET_SWRESET 0x00000001
332
333//Configuration 0 register
334#define ADIN1110_CONFIG0_SYNC 0x00008000
335#define ADIN1110_CONFIG0_TXFCSVE 0x00004000
336#define ADIN1110_CONFIG0_CSARFE 0x00002000
337#define ADIN1110_CONFIG0_ZARFE 0x00001000
338#define ADIN1110_CONFIG0_TXCTHRESH 0x00000C00
339#define ADIN1110_CONFIG0_TXCTHRESH_1_CREDIT 0x00000000
340#define ADIN1110_CONFIG0_TXCTHRESH_4_CREDITS 0x00000400
341#define ADIN1110_CONFIG0_TXCTHRESH_8_CREDITS 0x00000800
342#define ADIN1110_CONFIG0_TXCTHRESH_16_CREDITS 0x00000C00
343#define ADIN1110_CONFIG0_TXCTE 0x00000200
344#define ADIN1110_CONFIG0_RXCTE 0x00000100
345#define ADIN1110_CONFIG0_FTSE 0x00000080
346#define ADIN1110_CONFIG0_FTSS 0x00000040
347#define ADIN1110_CONFIG0_PROTE 0x00000020
348#define ADIN1110_CONFIG0_SEQE 0x00000010
349#define ADIN1110_CONFIG0_CPS 0x00000007
350#define ADIN1110_CONFIG0_CPS_8B 0x00000003
351#define ADIN1110_CONFIG0_CPS_16B 0x00000004
352#define ADIN1110_CONFIG0_CPS_32B 0x00000005
353#define ADIN1110_CONFIG0_CPS_64B 0x00000006
354
355//Configuration 2 register
356#define ADIN1110_CONFIG2_TX_RDY_ON_EMPTY 0x00000100
357#define ADIN1110_CONFIG2_SFD_DETECT_SRC 0x00000080
358#define ADIN1110_CONFIG2_STATS_CLR_ON_RD 0x00000040
359#define ADIN1110_CONFIG2_CRC_APPEND 0x00000020
360#define ADIN1110_CONFIG2_P1_RCV_IFG_ERR_FRM 0x00000010
361#define ADIN1110_CONFIG2_P1_FWD_UNK2HOST 0x00000004
362#define ADIN1110_CONFIG2_MSPEED 0x00000003
363#define ADIN1110_CONFIG2_MSPEED_2_5_MHZ 0x00000000
364#define ADIN1110_CONFIG2_MSPEED_4_166_MHZ 0x00000001
365
366//Status 0 register
367#define ADIN1110_STATUS0_CDPE 0x00001000
368#define ADIN1110_STATUS0_TXFCSE 0x00000800
369#define ADIN1110_STATUS0_TTSCAC 0x00000400
370#define ADIN1110_STATUS0_TTSCAB 0x00000200
371#define ADIN1110_STATUS0_TTSCAA 0x00000100
372#define ADIN1110_STATUS0_PHYINT 0x00000080
373#define ADIN1110_STATUS0_RESETC 0x00000040
374#define ADIN1110_STATUS0_HDRE 0x00000020
375#define ADIN1110_STATUS0_LOFE 0x00000010
376#define ADIN1110_STATUS0_RXBOE 0x00000008
377#define ADIN1110_STATUS0_TXBUE 0x00000004
378#define ADIN1110_STATUS0_TXBOE 0x00000002
379#define ADIN1110_STATUS0_TXPE 0x00000001
380
381//Status 1 register
382#define ADIN1110_STATUS1_TX_ECC_ERR 0x00001000
383#define ADIN1110_STATUS1_RX_ECC_ERR 0x00000800
384#define ADIN1110_STATUS1_SPI_ERR 0x00000400
385#define ADIN1110_STATUS1_P1_RX_IFG_ERR 0x00000100
386#define ADIN1110_STATUS1_P1_RX_RDY_HI 0x00000020
387#define ADIN1110_STATUS1_P1_RX_RDY 0x00000010
388#define ADIN1110_STATUS1_TX_RDY 0x00000008
389#define ADIN1110_STATUS1_LINK_CHANGE 0x00000002
390#define ADIN1110_STATUS1_P1_LINK_STATUS 0x00000001
391
392//Buffer Status register
393#define ADIN1110_BUFSTS_TXC 0x0000FF00
394#define ADIN1110_BUFSTS_RCA 0x000000FF
395
396//Interrupt Mask 0 register
397#define ADIN1110_IMASK0_CDPEM 0x00001000
398#define ADIN1110_IMASK0_TXFCSEM 0x00000800
399#define ADIN1110_IMASK0_TTSCACM 0x00000400
400#define ADIN1110_IMASK0_TTSCABM 0x00000200
401#define ADIN1110_IMASK0_TTSCAAM 0x00000100
402#define ADIN1110_IMASK0_PHYINTM 0x00000080
403#define ADIN1110_IMASK0_RESETCM 0x00000040
404#define ADIN1110_IMASK0_HDREM 0x00000020
405#define ADIN1110_IMASK0_LOFEM 0x00000010
406#define ADIN1110_IMASK0_RXBOEM 0x00000008
407#define ADIN1110_IMASK0_TXBUEM 0x00000004
408#define ADIN1110_IMASK0_TXBOEM 0x00000002
409#define ADIN1110_IMASK0_TXPEM 0x00000001
410
411//Mask Bits for Driving the Interrupt Pin register
412#define ADIN1110_IMASK1_TX_ECC_ERR_MASK 0x00001000
413#define ADIN1110_IMASK1_RX_ECC_ERR_MASK 0x00000800
414#define ADIN1110_IMASK1_SPI_ERR_MASK 0x00000400
415#define ADIN1110_IMASK1_P1_RX_IFG_ERR_MASK 0x00000100
416#define ADIN1110_IMASK1_P1_RX_RDY_MASK 0x00000010
417#define ADIN1110_IMASK1_TX_RDY_MASK 0x00000008
418#define ADIN1110_IMASK1_LINK_CHANGE_MASK 0x00000002
419
420//MDIO Access register
421#define ADIN1110_MDIOACC_MDIO_TRDONE 0x80000000
422#define ADIN1110_MDIOACC_MDIO_TAERR 0x40000000
423#define ADIN1110_MDIOACC_MDIO_ST 0x30000000
424#define ADIN1110_MDIOACC_MDIO_ST_CLAUSE_45 0x00000000
425#define ADIN1110_MDIOACC_MDIO_ST_CLAUSE_22 0x10000000
426#define ADIN1110_MDIOACC_MDIO_OP 0x0C000000
427#define ADIN1110_MDIOACC_MDIO_OP_ADDR 0x00000000
428#define ADIN1110_MDIOACC_MDIO_OP_WRITE 0x04000000
429#define ADIN1110_MDIOACC_MDIO_OP_INC_READ 0x08000000
430#define ADIN1110_MDIOACC_MDIO_OP_READ 0x0C000000
431#define ADIN1110_MDIOACC_MDIO_PRTAD 0x03E00000
432#define ADIN1110_MDIOACC_MDIO_PRTAD_DEFAULT 0x00200000
433#define ADIN1110_MDIOACC_MDIO_DEVAD 0x001F0000
434#define ADIN1110_MDIOACC_MDIO_DATA 0x0000FFFF
435
436//MAC Tx Frame Size register
437#define ADIN1110_TX_FSIZE_TX_FRM_SIZE 0x000007FF
438
439//MAC Transmit register
440#define ADIN1110_TX_TDR 0xFFFFFFFF
441
442//Tx FIFO Space register
443#define ADIN1110_TX_SPACE_TX_SPACE 0x00003FFF
444
445//Transmit Threshold register
446#define ADIN1110_TX_THRESH_HOST_TX_THRESH 0x0000003F
447
448//MAC FIFO Clear register
449#define ADIN1110_FIFO_CLR_MAC_TXF_CLR 0x00000002
450#define ADIN1110_FIFO_CLR_MAC_RXF_CLR 0x00000001
451
452//Scratch register
453#define ADIN1110_SCRATCH_SCRATCH_DATA 0xFFFFFFFF
454
455//MAC Reset Status register
456#define ADIN1110_MAC_RST_STATUS_MAC_CRYSL_CLK_RDY 0x00000002
457#define ADIN1110_MAC_RST_STATUS_MAC_OSC_CLK_RDY 0x00000001
458
459//Software Reset register
460#define ADIN1110_SOFT_RST_RST_KEY 0x0000FFFF
461#define ADIN1110_SOFT_RST_RST_KEY_1_RESET 0x00004F1C
462#define ADIN1110_SOFT_RST_RST_KEY_2_RESET 0x0000C1F4
463#define ADIN1110_SOFT_RST_RST_KEY_1_RELEASE 0x00006F1A
464#define ADIN1110_SOFT_RST_RST_KEY_2_RELEASE 0x0000A1F6
465
466//Inject an Error on MISO from the DUT register
467#define ADIN1110_SPI_INJ_ERR_TEST_SPI_INJ_ERR 0x00000001
468
469//FIFO Sizes register
470#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE 0x00000F00
471#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_0KB 0x00000000
472#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_2KB 0x00000100
473#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_4KB 0x00000200
474#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_6KB 0x00000300
475#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_8KB 0x00000400
476#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_10KB 0x00000500
477#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_12KB 0x00000600
478#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_14KB 0x00000700
479#define ADIN1110_FIFO_SIZE_P1_RX_HI_SIZE_16KB 0x00000800
480#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE 0x000000F0
481#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_0KB 0x00000000
482#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_2KB 0x00000010
483#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_4KB 0x00000020
484#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_6KB 0x00000030
485#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_8KB 0x00000040
486#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_10KB 0x00000050
487#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_12KB 0x00000060
488#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_14KB 0x00000070
489#define ADIN1110_FIFO_SIZE_P1_RX_LO_SIZE_16KB 0x00000080
490#define ADIN1110_FIFO_SIZE_HTX_SIZE 0x0000000F
491#define ADIN1110_FIFO_SIZE_HTX_SIZE_0KB 0x00000000
492#define ADIN1110_FIFO_SIZE_HTX_SIZE_2KB 0x00000001
493#define ADIN1110_FIFO_SIZE_HTX_SIZE_4KB 0x00000002
494#define ADIN1110_FIFO_SIZE_HTX_SIZE_6KB 0x00000003
495#define ADIN1110_FIFO_SIZE_HTX_SIZE_8KB 0x00000004
496#define ADIN1110_FIFO_SIZE_HTX_SIZE_10KB 0x00000005
497#define ADIN1110_FIFO_SIZE_HTX_SIZE_12KB 0x00000006
498#define ADIN1110_FIFO_SIZE_HTX_SIZE_14KB 0x00000007
499#define ADIN1110_FIFO_SIZE_HTX_SIZE_16KB 0x00000008
500
501//Tx FIFO Frame Count register
502#define ADIN1110_TFC_TFC 0x000001FF
503
504//Tx FIFO Valid Half Words register
505#define ADIN1110_TXSIZE_TX_SIZE 0x00003FFF
506
507//Address of a Detected ECC Error in Memory register
508#define ADIN1110_MECC_ERR_ADDR_MECC_ERR_ADDR 0x00003FFF
509
510//Corrected ECC Error Counter register
511#define ADIN1110_CECC_ERR_CECC_ERR_CNT 0x000003FF
512
513//MAC Address Rule and DA Filter Upper 16 Bits register
514#define ADIN1110_ADDR_FILT_UPR_APPLY2PORT1 0x40000000
515#define ADIN1110_ADDR_FILT_UPR_HOST_PRI 0x00080000
516#define ADIN1110_ADDR_FILT_UPR_TO_HOST 0x00010000
517#define ADIN1110_ADDR_FILT_UPR_MAC_ADDR_47_32 0x0000FFFF
518
519//MAC Address DA Filter Lower 32 Bits register
520#define ADIN1110_ADDR_FILT_LWR_MAC_ADDR_31_0 0xFFFFFFFF
521
522//Upper 16 Bits of the MAC Address Mask register
523#define ADIN1110_ADDR_MSK_UPR_MAC_ADDR_MASK_47_32 0x0000FFFF
524
525//Lower 32 Bits of the MAC Address Mask register
526#define ADIN1110_ADDR_MSK_LWR_MAC_ADDR_MASK_31_0 0xFFFFFFFF
527
528//Timer Configuration register
529#define ADIN1110_TS_CFG_TS_CAPT_FREE_CNT 0x00000010
530#define ADIN1110_TS_CFG_TS_TIMER_STOP 0x00000008
531#define ADIN1110_TS_CFG_TS_TIMER_DEF 0x00000004
532#define ADIN1110_TS_CFG_TS_CLR 0x00000002
533#define ADIN1110_TS_CFG_TS_EN 0x00000001
534
535//Quantization Error Correction register
536#define ADIN1110_TS_TIMER_QE_CORR_TS_TIMER_QE_CORR 0x000000FF
537
538//P1 MAC Rx Frame Size register
539#define ADIN1110_P1_RX_FSIZE_P1_RX_FRM_SIZE 0x000007FF
540
541//P1 MAC Receive register
542#define ADIN1110_P1_RX_P1_RDR 0xFFFFFFFF
543
544//P1 Transmit Inter Frame Gap register
545#define ADIN1110_P1_TX_IFG_P1_TX_IFG 0x000000FF
546
547//P1 MAC Loopback Enable register
548#define ADIN1110_P1_LOOP_P1_LOOPBACK_EN 0x00000001
549
550//P1 CRC Check Enable on Receive register
551#define ADIN1110_P1_RX_CRC_EN_P1_CRC_CHK_EN 0x00000001
552
553//P1 Receive Inter Frame Gap register
554#define ADIN1110_P1_RX_IFG_P1_RX_IFG 0x0000003F
555
556//P1 Max Receive Frame Length register
557#define ADIN1110_P1_RX_MAX_LEN_P1_MAX_FRM_LEN 0x0000FFFF
558
559//P1 Min Receive Frame Length register
560#define ADIN1110_P1_RX_MIN_LEN_P1_MIN_FRM_LEN 0x0000FFFF
561
562//P1 Rx Low Priority FIFO Frame Count register
563#define ADIN1110_P1_LO_RFC_P1_LO_RFC 0x000001FF
564
565//P1 Rx High Priority FIFO Frame Count register
566#define ADIN1110_P1_HI_RFC_P1_HI_RFC 0x000001FF
567
568//P1 Low Priority Rx FIFO Valid Half Words register
569#define ADIN1110_P1_LO_RXSIZE_P1_LO_RXSIZE 0x00003FFF
570
571//P1 High Priority Rx FIFO Valid Half Words register
572#define ADIN1110_P1_HI_RXSIZE_P1_HI_RXSIZE 0x00003FFF
573
574//MII Control register
575#define ADIN1110_MI_CONTROL_MI_SFT_RST 0x8000
576#define ADIN1110_MI_CONTROL_MI_LOOPBACK 0x4000
577#define ADIN1110_MI_CONTROL_MI_SPEED_SEL_LSB 0x2000
578#define ADIN1110_MI_CONTROL_MI_AN_EN 0x1000
579#define ADIN1110_MI_CONTROL_MI_SFT_PD 0x0800
580#define ADIN1110_MI_CONTROL_MI_ISOLATE 0x0400
581#define ADIN1110_MI_CONTROL_MI_FULL_DUPLEX 0x0100
582#define ADIN1110_MI_CONTROL_MI_COLTEST 0x0080
583#define ADIN1110_MI_CONTROL_MI_SPEED_SEL_MSB 0x0040
584#define ADIN1110_MI_CONTROL_MI_UNIDIR_EN 0x0020
585
586//MII Status register
587#define ADIN1110_MI_STATUS_MI_T4_SPRT 0x8000
588#define ADIN1110_MI_STATUS_MI_FD100_SPRT 0x4000
589#define ADIN1110_MI_STATUS_MI_HD100_SPRT 0x2000
590#define ADIN1110_MI_STATUS_MI_FD10_SPRT 0x1000
591#define ADIN1110_MI_STATUS_MI_HD10_SPRT 0x0800
592#define ADIN1110_MI_STATUS_MI_FD_T2_SPRT 0x0400
593#define ADIN1110_MI_STATUS_MI_HD_T2_SPRT 0x0200
594#define ADIN1110_MI_STATUS_MI_EXT_STAT_SPRT 0x0100
595#define ADIN1110_MI_STATUS_MI_UNIDIR_ABLE 0x0080
596#define ADIN1110_MI_STATUS_MI_MF_PREAM_SUP_ABLE 0x0040
597#define ADIN1110_MI_STATUS_MI_AN_COMPLETE 0x0020
598#define ADIN1110_MI_STATUS_MI_REM_FLT 0x0010
599#define ADIN1110_MI_STATUS_MI_AN_ABLE 0x0008
600#define ADIN1110_MI_STATUS_MI_LINK_STAT_LAT 0x0004
601#define ADIN1110_MI_STATUS_MI_JABBER_DET 0x0002
602#define ADIN1110_MI_STATUS_MI_EXT_CAPABLE 0x0001
603
604//PHY Identifier 1 register
605#define ADIN1110_MI_PHY_ID1_MI_PHY_ID1 0xFFFF
606#define ADIN1110_MI_PHY_ID1_MI_PHY_ID1_DEFAULT 0x0283
607
608//PHY Identifier 2 register
609#define ADIN1110_MI_PHY_ID2_MI_PHY_ID2_OUI 0xFC00
610#define ADIN1110_MI_PHY_ID2_MI_PHY_ID2_OUI_DEFAULT 0xBC00
611#define ADIN1110_MI_PHY_ID2_MI_MODEL_NUM 0x03F0
612#define ADIN1110_MI_PHY_ID2_MI_MODEL_NUM_DEFAULT 0x0090
613#define ADIN1110_MI_PHY_ID2_MI_REV_NUM 0x000F
614#define ADIN1110_MI_PHY_ID2_MI_REV_NUM_DEFAULT 0x0001
615
616//MMD Access Control register
617#define ADIN1110_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION 0xC000
618#define ADIN1110_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION_ADDR 0x0000
619#define ADIN1110_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION_DATA_NO_POST_INC 0x4000
620#define ADIN1110_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION_DATA_POST_INC_RW 0x8000
621#define ADIN1110_MMD_ACCESS_CNTRL_MMD_ACR_FUNCTION_DATA_POST_INC_W 0xC000
622#define ADIN1110_MMD_ACCESS_CNTRL_MMD_ACR_DEVAD 0x001F
623
624//PMA/PMD Control 1 register
625#define ADIN1110_PMA_PMD_CNTRL1_PMA_SFT_RST 0x8000
626#define ADIN1110_PMA_PMD_CNTRL1_PMA_SFT_PD 0x0800
627#define ADIN1110_PMA_PMD_CNTRL1_LB_PMA_LOC_EN 0x0001
628
629//PMA/PMD Status 1 register
630#define ADIN1110_PMA_PMD_STAT1_PMA_LINK_STAT_OK_LL 0x0004
631#define ADIN1110_PMA_PMD_STAT1_PMA_SFT_PD_ABLE 0x0002
632
633//PMA/PMD Control 2 register
634#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL 0x007F
635#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_CX4 0x0000
636#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_EW 0x0001
637#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_LW 0x0002
638#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_SW 0x0003
639#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_LX4 0x0004
640#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_ER 0x0005
641#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_LR 0x0006
642#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_SR 0x0007
643#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_LRM 0x0008
644#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_T 0x0009
645#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_KX4 0x000A
646#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_KR 0x000B
647#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_1000BASE_T 0x000C
648#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_1000BASE_KX 0x000D
649#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100BASE_TX 0x000E
650#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10BASE_T 0x000F
651#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_D1 0x0010
652#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_D2 0x0011
653#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_D3 0x0012
654#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_D1 0x0013
655#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_D2 0x0014
656#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_D3 0x0015
657#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_U1 0x0016
658#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_U2 0x0017
659#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_U3 0x0018
660#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_U1 0x0019
661#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_U3 0x001A
662#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_RESERVED 0x001B
663#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_D4 0x001C
664#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_D4 0x001D
665#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GBASE_PR_U4 0x001E
666#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10_1GBASE_PRX_U4 0x001F
667#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_KR4 0x0020
668#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_CR4 0x0021
669#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_SR4 0x0022
670#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_LR4 0x0023
671#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_FR 0x0024
672#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_ER4 0x0025
673#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_40GBASE_T 0x0026
674#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_CR10 0x0028
675#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_SR10 0x0029
676#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_LR4 0x002A
677#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_ER4 0x002B
678#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_KP4 0x002C
679#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_KR4 0x002D
680#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_CR4 0x002E
681#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_100GBASE_SR4 0x002F
682#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_2_5GBASE_T 0x0030
683#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_5GBASE_T 0x0031
684#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GPASS_XR_D 0x0032
685#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_10GPASS_XR_U 0x0033
686#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_BASE_H 0x0034
687#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_LR 0x0035
688#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_ER 0x0036
689#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_T 0x0037
690#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_CR 0x0038
691#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_KR 0x0039
692#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_25GBASE_SR 0x003A
693#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_BASE_T1 0x003D
694#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_200GBASE_DR4 0x0053
695#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_200GBASE_FR4 0x0054
696#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_200GBASE_LR4 0x0055
697#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_400GBASE_SR16 0x0059
698#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_400GBASE_DR4 0x005A
699#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_400GBASE_FR8 0x005B
700#define ADIN1110_PMA_PMD_CNTRL2_PMA_PMD_TYPE_SEL_400GBASE_LR8 0x005C
701
702//PMA/PMD Status 2 register
703#define ADIN1110_PMA_PMD_STAT2_PMA_PMD_PRESENT 0xC000
704#define ADIN1110_PMA_PMD_STAT2_PMA_PMD_EXT_ABLE 0x0200
705#define ADIN1110_PMA_PMD_STAT2_PMA_PMD_TX_DIS_ABLE 0x0100
706#define ADIN1110_PMA_PMD_STAT2_LB_PMA_LOC_ABLE 0x0001
707
708//PMA/PMD Transmit Disable register
709#define ADIN1110_PMA_PMD_TX_DIS_PMA_TX_DIS 0x0001
710
711//PMA/PMD Extended Abilities register
712#define ADIN1110_PMA_PMD_EXT_ABILITY_PMA_PMD_BT1_ABLE 0x0800
713
714//BASE-T1 PMA/PMD Extended Ability register
715#define ADIN1110_PMA_PMD_BT1_ABILITY_B10S_ABILITY 0x0008
716#define ADIN1110_PMA_PMD_BT1_ABILITY_B10L_ABILITY 0x0004
717#define ADIN1110_PMA_PMD_BT1_ABILITY_B1000_ABILITY 0x0002
718#define ADIN1110_PMA_PMD_BT1_ABILITY_B100_ABILITY 0x0001
719
720//BASE-T1 PMA/PMD Control register
721#define ADIN1110_PMA_PMD_BT1_CONTROL_CFG_MST 0x4000
722#define ADIN1110_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL 0x000F
723#define ADIN1110_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL_100BASE_T 0x0000
724#define ADIN1110_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL_1000BASE_T 0x0001
725#define ADIN1110_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL_10BASE_T1L 0x0002
726#define ADIN1110_PMA_PMD_BT1_CONTROL_BT1_TYPE_SEL_10BASE_T1S 0x0003
727
728//10BASE-T1L PMA Control register
729#define ADIN1110_B10L_PMA_CNTRL_B10L_TX_DIS_MODE_EN 0x4000
730#define ADIN1110_B10L_PMA_CNTRL_B10L_TX_LVL_HI 0x1000
731#define ADIN1110_B10L_PMA_CNTRL_B10L_EEE 0x0400
732#define ADIN1110_B10L_PMA_CNTRL_B10L_LB_PMA_LOC_EN 0x0001
733
734//10BASE-T1L PMA Status register
735#define ADIN1110_B10L_PMA_STAT_B10L_LB_PMA_LOC_ABLE 0x2000
736#define ADIN1110_B10L_PMA_STAT_B10L_TX_LVL_HI_ABLE 0x1000
737#define ADIN1110_B10L_PMA_STAT_B10L_PMA_SFT_PD_ABLE 0x0800
738#define ADIN1110_B10L_PMA_STAT_B10L_EEE_ABLE 0x0400
739
740//10BASE-T1L Test Mode Control register
741#define ADIN1110_B10L_TEST_MODE_CNTRL_B10L_TX_TEST_MODE 0xE000
742
743//Frequency Offset Saturation Threshold for CR Stability Check register
744#define ADIN1110_CR_STBL_CHK_FOFFS_SAT_THR_CR_STBL_CHK_FOFFS_SAT_THR 0x0400
745
746//10BASE-T1L PMA Link Status register
747#define ADIN1110_B10L_PMA_LINK_STAT_B10L_REM_RCVR_STAT_OK_LL 0x0200
748#define ADIN1110_B10L_PMA_LINK_STAT_B10L_REM_RCVR_STAT_OK 0x0100
749#define ADIN1110_B10L_PMA_LINK_STAT_B10L_LOC_RCVR_STAT_OK_LL 0x0080
750#define ADIN1110_B10L_PMA_LINK_STAT_B10L_LOC_RCVR_STAT_OK 0x0040
751#define ADIN1110_B10L_PMA_LINK_STAT_B10L_DSCR_STAT_OK_LL 0x0020
752#define ADIN1110_B10L_PMA_LINK_STAT_B10L_DSCR_STAT_OK 0x0010
753#define ADIN1110_B10L_PMA_LINK_STAT_B10L_LINK_STAT_OK_LL 0x0002
754#define ADIN1110_B10L_PMA_LINK_STAT_B10L_LINK_STAT_OK 0x0001
755
756//PCS Control 1 register
757#define ADIN1110_PCS_CNTRL1_PCS_SFT_RST 0x8000
758#define ADIN1110_PCS_CNTRL1_LB_PCS_EN 0x4000
759#define ADIN1110_PCS_CNTRL1_PCS_SFT_PD 0x0800
760
761//PCS Status 1 register
762#define ADIN1110_PCS_STAT1_PCS_SFT_PD_ABLE 0x0002
763
764//PCS Status 2 register
765#define ADIN1110_PCS_STAT2_PCS_PRESENT 0xC000
766
767//10BASE-T1L PCS Control register
768#define ADIN1110_B10L_PCS_CNTRL_B10L_LB_PCS_EN 0x4000
769
770//10BASE-T1L PCS Status register
771#define ADIN1110_B10L_PCS_STAT_B10L_PCS_DSCR_STAT_OK_LL 0x0004
772
773//BASE-T1 Autonegotiation Control register
774#define ADIN1110_AN_CONTROL_AN_EN 0x1000
775#define ADIN1110_AN_CONTROL_AN_RESTART 0x0200
776
777//BASE-T1 Autonegotiation Status register
778#define ADIN1110_AN_STATUS_AN_PAGE_RX 0x0040
779#define ADIN1110_AN_STATUS_AN_COMPLETE 0x0020
780#define ADIN1110_AN_STATUS_AN_REMOTE_FAULT 0x0010
781#define ADIN1110_AN_STATUS_AN_ABLE 0x0008
782#define ADIN1110_AN_STATUS_AN_LINK_STATUS 0x0004
783
784//BASE-T1 Autonegotiation Advertisement L register
785#define ADIN1110_AN_ADV_ABILITY_L_AN_ADV_NEXT_PAGE_REQ 0x8000
786#define ADIN1110_AN_ADV_ABILITY_L_AN_ADV_ACK 0x4000
787#define ADIN1110_AN_ADV_ABILITY_L_AN_ADV_REMOTE_FAULT 0x2000
788#define ADIN1110_AN_ADV_ABILITY_L_AN_ADV_FORCE_MS 0x1000
789#define ADIN1110_AN_ADV_ABILITY_L_AN_ADV_PAUSE 0x0C00
790#define ADIN1110_AN_ADV_ABILITY_L_AN_ADV_SELECTOR 0x001F
791#define ADIN1110_AN_ADV_ABILITY_L_AN_ADV_SELECTOR_DEFAULT 0x0001
792
793//BASE-T1 Autonegotiation Advertisement M register
794#define ADIN1110_AN_ADV_ABILITY_M_AN_ADV_B10L 0x4000
795#define ADIN1110_AN_ADV_ABILITY_M_AN_ADV_MST 0x0010
796
797//BASE-T1 Autonegotiation Advertisement H register
798#define ADIN1110_AN_ADV_ABILITY_H_AN_ADV_B10L_TX_LVL_HI_ABL 0x2000
799#define ADIN1110_AN_ADV_ABILITY_H_AN_ADV_B10L_TX_LVL_HI_REQ 0x1000
800
801//BASE-T1 Autonegotiation Link Partner Base Page Ability L register
802#define ADIN1110_AN_LP_ADV_ABILITY_L_AN_LP_ADV_NEXT_PAGE_REQ 0x8000
803#define ADIN1110_AN_LP_ADV_ABILITY_L_AN_LP_ADV_ACK 0x4000
804#define ADIN1110_AN_LP_ADV_ABILITY_L_AN_LP_ADV_REMOTE_FAULT 0x2000
805#define ADIN1110_AN_LP_ADV_ABILITY_L_AN_LP_ADV_FORCE_MS 0x1000
806#define ADIN1110_AN_LP_ADV_ABILITY_L_AN_LP_ADV_PAUSE 0x0C00
807#define ADIN1110_AN_LP_ADV_ABILITY_L_AN_LP_ADV_SELECTOR 0x001F
808
809//BASE-T1 Autonegotiation Link Partner Base Page Ability M register
810#define ADIN1110_AN_LP_ADV_ABILITY_M_AN_LP_ADV_B10L 0x4000
811#define ADIN1110_AN_LP_ADV_ABILITY_M_AN_LP_ADV_B1000 0x0080
812#define ADIN1110_AN_LP_ADV_ABILITY_M_AN_LP_ADV_B10S_FD 0x0040
813#define ADIN1110_AN_LP_ADV_ABILITY_M_AN_LP_ADV_B100 0x0020
814#define ADIN1110_AN_LP_ADV_ABILITY_M_AN_LP_ADV_MST 0x0010
815
816//BASE-T1 Autonegotiation Link Partner Base Page Ability H register
817#define ADIN1110_AN_LP_ADV_ABILITY_H_AN_LP_ADV_B10L_EEE 0x4000
818#define ADIN1110_AN_LP_ADV_ABILITY_H_AN_LP_ADV_B10L_TX_LVL_HI_ABL 0x2000
819#define ADIN1110_AN_LP_ADV_ABILITY_H_AN_LP_ADV_B10L_TX_LVL_HI_REQ 0x1000
820#define ADIN1110_AN_LP_ADV_ABILITY_H_AN_LP_ADV_B10S_HD 0x0800
821
822//BASE-T1 Autonegotiation Next Page Transmit L register
823#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_NEXT_PAGE_REQ 0x8000
824#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_ACK 0x4000
825#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_MESSAGE_PAGE 0x2000
826#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_ACK2 0x1000
827#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_TOGGLE 0x0800
828#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_MESSAGE_CODE 0x07FF
829#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_MESSAGE_CODE_NULL 0x0001
830#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_MESSAGE_CODE_OUI_TAGGED 0x0005
831#define ADIN1110_AN_NEXT_PAGE_L_AN_NP_MESSAGE_CODE_AN_DEV_ID_TAG 0x0006
832
833//BASE-T1 Autonegotiation Next Page Transmit M register
834#define ADIN1110_AN_NEXT_PAGE_M_AN_NP_UNFORMATTED1 0xFFFF
835
836//BASE-T1 Autonegotiation Next Page Transmit H register
837#define ADIN1110_AN_NEXT_PAGE_H_AN_NP_UNFORMATTED2 0xFFFF
838
839//BASE-T1 Autonegotiation Link Partner Next Page Ability L register
840#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_NEXT_PAGE_REQ 0x8000
841#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_ACK 0x4000
842#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_PAGE 0x2000
843#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_ACK2 0x1000
844#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_TOGGLE 0x0800
845#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_CODE 0x07FF
846#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_CODE_NULL 0x0001
847#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_CODE_OUI_TAGGED 0x0005
848#define ADIN1110_AN_LP_NEXT_PAGE_L_AN_LP_NP_MESSAGE_CODE_AN_DEV_ID_TAG 0x0006
849
850//BASE-T1 Autonegotiation Link Partner Next Page Ability M register
851#define ADIN1110_AN_LP_NEXT_PAGE_M_AN_LP_NP_UNFORMATTED1 0xFFFF
852
853//BASE-T1 Autonegotiation Link Partner Next Page Ability H register
854#define ADIN1110_AN_LP_NEXT_PAGE_H_AN_LP_NP_UNFORMATTED2 0xFFFF
855
856//10BASE-T1 Autonegotiation Control register
857#define ADIN1110_AN_B10_ADV_ABILITY_AN_B10_ADV_B10L 0x8000
858#define ADIN1110_AN_B10_ADV_ABILITY_AN_B10_ADV_B10L_EEE 0x4000
859#define ADIN1110_AN_B10_ADV_ABILITY_AN_B10_ADV_B10L_TX_LVL_HI_ABL 0x2000
860#define ADIN1110_AN_B10_ADV_ABILITY_AN_B10_ADV_B10L_TX_LVL_HI_REQ 0x1000
861
862//10BASE-T1 Autonegotiation Status register
863#define ADIN1110_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10L 0x8000
864#define ADIN1110_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10L_EEE 0x4000
865#define ADIN1110_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10L_TX_LVL_HI_ABL 0x2000
866#define ADIN1110_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10L_TX_LVL_HI_REQ 0x1000
867#define ADIN1110_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10S_FD 0x0080
868#define ADIN1110_AN_B10_LP_ADV_ABILITY_AN_B10_LP_ADV_B10S_HD 0x0040
869
870//Autonegotiation Force Mode Enable register
871#define ADIN1110_AN_FRC_MODE_EN_AN_FRC_MODE_EN 0x0001
872
873//Extra Autonegotiation Status register
874#define ADIN1110_AN_STATUS_EXTRA_AN_LP_NP_RX 0x0400
875#define ADIN1110_AN_STATUS_EXTRA_AN_INC_LINK 0x0200
876#define ADIN1110_AN_STATUS_EXTRA_AN_TX_LVL_RSLTN 0x0180
877#define ADIN1110_AN_STATUS_EXTRA_AN_TX_LVL_RSLTN_NOT_RUN 0x0000
878#define ADIN1110_AN_STATUS_EXTRA_AN_TX_LVL_RSLTN_SUCCESS_1_0V 0x0100
879#define ADIN1110_AN_STATUS_EXTRA_AN_TX_LVL_RSLTN_SUCCESS_2_4V 0x0180
880#define ADIN1110_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN 0x0060
881#define ADIN1110_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN_NOT_RUN 0x0000
882#define ADIN1110_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN_CONFIG_FAULT 0x0020
883#define ADIN1110_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN_SUCCESS_SLAVE 0x0040
884#define ADIN1110_AN_STATUS_EXTRA_AN_MS_CONFIG_RSLTN_SUCCESS_MASTER 0x0060
885#define ADIN1110_AN_STATUS_EXTRA_AN_HCD_TECH 0x001E
886#define ADIN1110_AN_STATUS_EXTRA_AN_HCD_TECH_NULL 0x0000
887#define ADIN1110_AN_STATUS_EXTRA_AN_HCD_TECH_10BASE_T1L 0x0002
888#define ADIN1110_AN_STATUS_EXTRA_AN_LINK_GOOD 0x0001
889
890//PHY Instantaneous Status register
891#define ADIN1110_AN_PHY_INST_STATUS_IS_AN_TX_EN 0x0010
892#define ADIN1110_AN_PHY_INST_STATUS_IS_CFG_MST 0x0008
893#define ADIN1110_AN_PHY_INST_STATUS_IS_CFG_SLV 0x0004
894#define ADIN1110_AN_PHY_INST_STATUS_IS_TX_LVL_HI 0x0002
895#define ADIN1110_AN_PHY_INST_STATUS_IS_TX_LVL_LO 0x0001
896
897//Vendor Specific MMD 1 Device Identifier High register
898#define ADIN1110_MMD1_DEV_ID1_MMD1_DEV_ID1 0xFFFF
899#define ADIN1110_MMD1_DEV_ID1_MMD1_DEV_ID1_DEFAULT 0x0283
900
901//Vendor Specific MMD 1 Device Identifier Low register
902#define ADIN1110_MMD1_DEV_ID2_MMD1_DEV_ID2_OUI 0xFC00
903#define ADIN1110_MMD1_DEV_ID2_MMD1_DEV_ID2_OUI_DEFAULT 0xBC00
904#define ADIN1110_MMD1_DEV_ID2_MMD1_MODEL_NUM 0x03F0
905#define ADIN1110_MMD1_DEV_ID2_MMD1_MODEL_NUM_DEFAULT 0x0090
906#define ADIN1110_MMD1_DEV_ID2_MMD1_REV_NUM 0x000F
907#define ADIN1110_MMD1_DEV_ID2_MMD1_REV_NUM_DEFAULT 0x0001
908
909//Vendor Specific MMD 1 Status register
910#define ADIN1110_MMD1_STATUS_MMD1_STATUS 0xC000
911#define ADIN1110_MMD1_STATUS_MMD1_STATUS_DEV_RESP 0x8000
912
913//System Interrupt Status register
914#define ADIN1110_CRSM_IRQ_STATUS_CRSM_SW_IRQ_LH 0x8000
915#define ADIN1110_CRSM_IRQ_STATUS_CRSM_HRD_RST_IRQ_LH 0x1000
916
917//System Interrupt Mask register
918#define ADIN1110_CRSM_IRQ_MASK_CRSM_SW_IRQ_REQ 0x8000
919#define ADIN1110_CRSM_IRQ_MASK_CRSM_HRD_RST_IRQ_EN 0x1000
920
921//Software Reset register
922#define ADIN1110_CRSM_SFT_RST_CRSM_SFT_RST 0x0001
923
924//Software Power-Down Control register
925#define ADIN1110_CRSM_SFT_PD_CNTRL_CRSM_SFT_PD 0x0001
926
927//PHY Subsystem Reset register
928#define ADIN1110_CRSM_PHY_SUBSYS_RST_CRSM_PHY_SUBSYS_RST 0x0001
929
930//PHY MAC Interface Reset register
931#define ADIN1110_CRSM_MAC_IF_RST_CRSM_MAC_IF_RST 0x0001
932
933//System Status register
934#define ADIN1110_CRSM_STAT_CRSM_SFT_PD_RDY 0x0002
935#define ADIN1110_CRSM_STAT_CRSM_SYS_RDY 0x0001
936
937//CRSM Power Management Control register
938#define ADIN1110_CRSM_PMG_CNTRL_CRSM_FRC_OSC_EN 0x0001
939
940//CRSM Diagnostics Clock Control register
941#define ADIN1110_CRSM_DIAG_CLK_CTRL_CRSM_DIAG_CLK_EN 0x0001
942
943//Package Configuration Values register
944#define ADIN1110_MGMT_PRT_PKG_MGMT_PRT_PKG_VAL 0x003F
945
946//MDIO Control register
947#define ADIN1110_MGMT_MDIO_CNTRL_MGMT_GRP_MDIO_EN 0x0001
948
949//Pin Mux Configuration 1 register
950#define ADIN1110_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX 0x00C0
951#define ADIN1110_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX_RXD_1 0x0000
952#define ADIN1110_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX_LED_0 0x0040
953#define ADIN1110_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX_INT 0x0080
954#define ADIN1110_DIGIO_PINMUX_DIGIO_TSTIMER_PINMUX_NONE 0x00C0
955#define ADIN1110_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX 0x0030
956#define ADIN1110_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX_TXD_1 0x0000
957#define ADIN1110_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX_LED_1 0x0010
958#define ADIN1110_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX_MDIO 0x0020
959#define ADIN1110_DIGIO_PINMUX_DIGIO_TSCAPT_PINMUX_NONE 0x0030
960#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX 0x000E
961#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX_LED_1 0x0000
962#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TX_ER 0x0002
963#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TX_EN 0x0004
964#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TX_CLK 0x0006
965#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TXD_0 0x0008
966#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX_TXD_2 0x000A
967#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX_LINK_ST 0x000C
968#define ADIN1110_DIGIO_PINMUX_DIGIO_LED1_PINMUX_NONE 0x000E
969#define ADIN1110_DIGIO_PINMUX_DIGIO_LINK_ST_POLARITY 0x0001
970#define ADIN1110_DIGIO_PINMUX_DIGIO_LINK_ST_POLARITY_ASSERT_HIGH 0x0000
971#define ADIN1110_DIGIO_PINMUX_DIGIO_LINK_ST_POLARITY_ASSERT_LOW 0x0001
972
973//LED 0 On/Off Blink Time register
974#define ADIN1110_LED0_BLINK_TIME_CNTRL_LED0_ON_N4MS 0xFF00
975#define ADIN1110_LED0_BLINK_TIME_CNTRL_LED0_OFF_N4MS 0x00FF
976
977//LED 1 On/Off Blink Time register
978#define ADIN1110_LED1_BLINK_TIME_CNTRL_LED1_ON_N4MS 0xFF00
979#define ADIN1110_LED1_BLINK_TIME_CNTRL_LED1_OFF_N4MS 0x00FF
980
981//LED Control register
982#define ADIN1110_LED_CNTRL_LED1_EN 0x8000
983#define ADIN1110_LED_CNTRL_LED1_LINK_ST_QUALIFY 0x4000
984#define ADIN1110_LED_CNTRL_LED1_MODE 0x2000
985#define ADIN1110_LED_CNTRL_LED1_FUNCTION 0x1F00
986#define ADIN1110_LED_CNTRL_LED1_FUNCTION_LINKUP_TXRX_ACTIVITY 0x0000
987#define ADIN1110_LED_CNTRL_LED1_FUNCTION_LINKUP_TX_ACTIVITY 0x0100
988#define ADIN1110_LED_CNTRL_LED1_FUNCTION_LINKUP_RX_ACTIVITY 0x0200
989#define ADIN1110_LED_CNTRL_LED1_FUNCTION_LINKUP_ONLY 0x0300
990#define ADIN1110_LED_CNTRL_LED1_FUNCTION_TXRX_ACTIVITY 0x0400
991#define ADIN1110_LED_CNTRL_LED1_FUNCTION_TX_ACTIVITY 0x0500
992#define ADIN1110_LED_CNTRL_LED1_FUNCTION_RX_ACTIVITY 0x0600
993#define ADIN1110_LED_CNTRL_LED1_FUNCTION_LINKUP_RX_ER 0x0700
994#define ADIN1110_LED_CNTRL_LED1_FUNCTION_LINKUP_RX_TX_ER 0x0800
995#define ADIN1110_LED_CNTRL_LED1_FUNCTION_RX_ER 0x0900
996#define ADIN1110_LED_CNTRL_LED1_FUNCTION_RX_TX_ER 0x0A00
997#define ADIN1110_LED_CNTRL_LED1_FUNCTION_TX_SOP 0x0B00
998#define ADIN1110_LED_CNTRL_LED1_FUNCTION_RX_SOP 0x0C00
999#define ADIN1110_LED_CNTRL_LED1_FUNCTION_ON 0x0D00
1000#define ADIN1110_LED_CNTRL_LED1_FUNCTION_OFF 0x0E00
1001#define ADIN1110_LED_CNTRL_LED1_FUNCTION_BLINK 0x0F00
1002#define ADIN1110_LED_CNTRL_LED1_FUNCTION_TX_LEVEL_2P4 0x1000
1003#define ADIN1110_LED_CNTRL_LED1_FUNCTION_TX_LEVEL_1P0 0x1100
1004#define ADIN1110_LED_CNTRL_LED1_FUNCTION_MASTER 0x1200
1005#define ADIN1110_LED_CNTRL_LED1_FUNCTION_SLAVE 0x1300
1006#define ADIN1110_LED_CNTRL_LED1_FUNCTION_INCOMPATIBLE_LINK_CFG 0x1400
1007#define ADIN1110_LED_CNTRL_LED1_FUNCTION_AN_LINK_GOOD 0x1500
1008#define ADIN1110_LED_CNTRL_LED1_FUNCTION_AN_COMPLETE 0x1600
1009#define ADIN1110_LED_CNTRL_LED1_FUNCTION_TS_TIMER 0x1700
1010#define ADIN1110_LED_CNTRL_LED1_FUNCTION_LOC_RCVR_STATUS 0x1800
1011#define ADIN1110_LED_CNTRL_LED1_FUNCTION_REM_RCVR_STATUS 0x1900
1012#define ADIN1110_LED_CNTRL_LED1_FUNCTION_CLK25_REF 0x1A00
1013#define ADIN1110_LED_CNTRL_LED1_FUNCTION_TX_TCLK 0x1B00
1014#define ADIN1110_LED_CNTRL_LED1_FUNCTION_CLK_120MHZ 0x1C00
1015#define ADIN1110_LED_CNTRL_LED0_EN 0x0080
1016#define ADIN1110_LED_CNTRL_LED0_LINK_ST_QUALIFY 0x0040
1017#define ADIN1110_LED_CNTRL_LED0_MODE 0x0020
1018#define ADIN1110_LED_CNTRL_LED0_FUNCTION 0x001F
1019#define ADIN1110_LED_CNTRL_LED0_FUNCTION_LINKUP_TXRX_ACTIVITY 0x0000
1020#define ADIN1110_LED_CNTRL_LED0_FUNCTION_LINKUP_TX_ACTIVITY 0x0001
1021#define ADIN1110_LED_CNTRL_LED0_FUNCTION_LINKUP_RX_ACTIVITY 0x0002
1022#define ADIN1110_LED_CNTRL_LED0_FUNCTION_LINKUP_ONLY 0x0003
1023#define ADIN1110_LED_CNTRL_LED0_FUNCTION_TXRX_ACTIVITY 0x0004
1024#define ADIN1110_LED_CNTRL_LED0_FUNCTION_TX_ACTIVITY 0x0005
1025#define ADIN1110_LED_CNTRL_LED0_FUNCTION_RX_ACTIVITY 0x0006
1026#define ADIN1110_LED_CNTRL_LED0_FUNCTION_LINKUP_RX_ER 0x0007
1027#define ADIN1110_LED_CNTRL_LED0_FUNCTION_LINKUP_RX_TX_ER 0x0008
1028#define ADIN1110_LED_CNTRL_LED0_FUNCTION_RX_ER 0x0009
1029#define ADIN1110_LED_CNTRL_LED0_FUNCTION_RX_TX_ER 0x000A
1030#define ADIN1110_LED_CNTRL_LED0_FUNCTION_TX_SOP 0x000B
1031#define ADIN1110_LED_CNTRL_LED0_FUNCTION_RX_SOP 0x000C
1032#define ADIN1110_LED_CNTRL_LED0_FUNCTION_ON 0x000D
1033#define ADIN1110_LED_CNTRL_LED0_FUNCTION_OFF 0x000E
1034#define ADIN1110_LED_CNTRL_LED0_FUNCTION_BLINK 0x000F
1035#define ADIN1110_LED_CNTRL_LED0_FUNCTION_TX_LEVEL_2P4 0x0010
1036#define ADIN1110_LED_CNTRL_LED0_FUNCTION_TX_LEVEL_1P0 0x0011
1037#define ADIN1110_LED_CNTRL_LED0_FUNCTION_MASTER 0x0012
1038#define ADIN1110_LED_CNTRL_LED0_FUNCTION_SLAVE 0x0013
1039#define ADIN1110_LED_CNTRL_LED0_FUNCTION_INCOMPATIBLE_LINK_CFG 0x0014
1040#define ADIN1110_LED_CNTRL_LED0_FUNCTION_AN_LINK_GOOD 0x0015
1041#define ADIN1110_LED_CNTRL_LED0_FUNCTION_AN_COMPLETE 0x0016
1042#define ADIN1110_LED_CNTRL_LED0_FUNCTION_TS_TIMER 0x0017
1043#define ADIN1110_LED_CNTRL_LED0_FUNCTION_LOC_RCVR_STATUS 0x0018
1044#define ADIN1110_LED_CNTRL_LED0_FUNCTION_REM_RCVR_STATUS 0x0019
1045#define ADIN1110_LED_CNTRL_LED0_FUNCTION_CLK25_REF 0x001A
1046#define ADIN1110_LED_CNTRL_LED0_FUNCTION_TX_TCLK 0x001B
1047#define ADIN1110_LED_CNTRL_LED0_FUNCTION_CLK_120MHZ 0x001C
1048
1049//LED Polarity register
1050#define ADIN1110_LED_POLARITY_LED1_POLARITY 0x000C
1051#define ADIN1110_LED_POLARITY_LED1_POLARITY_AUTOSENSE 0x0000
1052#define ADIN1110_LED_POLARITY_LED1_POLARITY_ACTIVE_HIGH 0x0004
1053#define ADIN1110_LED_POLARITY_LED1_POLARITY_ACTIVE_LOW 0x0008
1054#define ADIN1110_LED_POLARITY_LED0_POLARITY 0x0003
1055#define ADIN1110_LED_POLARITY_LED0_POLARITY_AUTOSENSE 0x0000
1056#define ADIN1110_LED_POLARITY_LED0_POLARITY_ACTIVE_HIGH 0x0001
1057#define ADIN1110_LED_POLARITY_LED0_POLARITY_ACTIVE_LOW 0x0002
1058
1059//Vendor Specific MMD 2 Device Identifier High register
1060#define ADIN1110_MMD2_DEV_ID1_MMD2_DEV_ID1 0xFFFF
1061#define ADIN1110_MMD2_DEV_ID1_MMD2_DEV_ID1_DEFAULT 0x0283
1062
1063//Vendor Specific MMD 2 Device Identifier Low register
1064#define ADIN1110_MMD2_DEV_ID2_MMD2_DEV_ID2_OUI 0xFC00
1065#define ADIN1110_MMD2_DEV_ID2_MMD2_DEV_ID2_OUI_DEFAULT 0xBC00
1066#define ADIN1110_MMD2_DEV_ID2_MMD2_MODEL_NUM 0x03F0
1067#define ADIN1110_MMD2_DEV_ID2_MMD2_MODEL_NUM_DEFAULT 0x0090
1068#define ADIN1110_MMD2_DEV_ID2_MMD2_REV_NUM 0x000F
1069#define ADIN1110_MMD2_DEV_ID2_MMD2_REV_NUM_DEFAULT 0x0001
1070
1071//Vendor Specific MMD 2 Status register
1072#define ADIN1110_MMD2_STATUS_MMD2_STATUS 0xC000
1073#define ADIN1110_MMD2_STATUS_MMD2_STATUS_DEV_RESP 0x8000
1074
1075//PHY Subsystem Interrupt Status register
1076#define ADIN1110_PHY_SUBSYS_IRQ_STATUS_MAC_IF_FC_FG_IRQ_LH 0x4000
1077#define ADIN1110_PHY_SUBSYS_IRQ_STATUS_MAC_IF_EBUF_ERR_IRQ_LH 0x2000
1078#define ADIN1110_PHY_SUBSYS_IRQ_STATUS_AN_STAT_CHNG_IRQ_LH 0x0800
1079#define ADIN1110_PHY_SUBSYS_IRQ_STATUS_LINK_STAT_CHNG_LH 0x0002
1080
1081//PHY Subsystem Interrupt Mask register
1082#define ADIN1110_PHY_SUBSYS_IRQ_MASK_MAC_IF_FC_FG_IRQ_EN 0x4000
1083#define ADIN1110_PHY_SUBSYS_IRQ_MASK_MAC_IF_EBUF_ERR_IRQ_EN 0x2000
1084#define ADIN1110_PHY_SUBSYS_IRQ_MASK_AN_STAT_CHNG_IRQ_EN 0x0800
1085#define ADIN1110_PHY_SUBSYS_IRQ_MASK_LINK_STAT_CHNG_IRQ_EN 0x0002
1086
1087//Frame Checker Enable register
1088#define ADIN1110_FC_EN_FC_EN 0x0001
1089
1090//Frame Checker Interrupt Enable register
1091#define ADIN1110_FC_IRQ_EN_FC_IRQ_EN 0x0001
1092
1093//Frame Checker Transmit Select register
1094#define ADIN1110_FC_TX_SEL_FC_TX_SEL 0x0001
1095
1096//Frame Generator Enable register
1097#define ADIN1110_FG_EN_FG_EN 0x0001
1098
1099//Frame Generator Control/Restart register
1100#define ADIN1110_FG_CNTRL_RSTRT_FG_RSTRT 0x0008
1101#define ADIN1110_FG_CNTRL_RSTRT_FG_CNTRL 0x0007
1102#define ADIN1110_FG_CNTRL_RSTRT_FG_CNTRL_NO_FRAMES 0x0000
1103#define ADIN1110_FG_CNTRL_RSTRT_FG_CNTRL_RANDOM 0x0001
1104#define ADIN1110_FG_CNTRL_RSTRT_FG_CNTRL_ALL_ZEROS 0x0002
1105#define ADIN1110_FG_CNTRL_RSTRT_FG_CNTRL_ALL_ONES 0x0003
1106#define ADIN1110_FG_CNTRL_RSTRT_FG_CNTRL_ALT 0x0004
1107#define ADIN1110_FG_CNTRL_RSTRT_FG_CNTRL_DEC 0x0005
1108
1109//Frame Generator Continuous Mode Enable register
1110#define ADIN1110_FG_CONT_MODE_EN_FG_CONT_MODE_EN 0x0001
1111
1112//Frame Generator Interrupt Enable register
1113#define ADIN1110_FG_IRQ_EN_FG_IRQ_EN 0x0001
1114
1115//Frame Generator Done register
1116#define ADIN1110_FG_DONE_FG_DONE 0x0001
1117
1118//MAC Interface Loopbacks Configuration register
1119#define ADIN1110_MAC_IF_LOOPBACK_MAC_IF_REM_LB_RX_SUP_EN 0x0008
1120#define ADIN1110_MAC_IF_LOOPBACK_MAC_IF_REM_LB_EN 0x0004
1121#define ADIN1110_MAC_IF_LOOPBACK_MAC_IF_LB_TX_SUP_EN 0x0002
1122#define ADIN1110_MAC_IF_LOOPBACK_MAC_IF_LB_EN 0x0001
1123
1124//MAC Start Of Packet (SOP) Generation Control register
1125#define ADIN1110_MAC_IF_SOP_CNTRL_MAC_IF_TX_SOP_LEN_CHK_EN 0x0020
1126#define ADIN1110_MAC_IF_SOP_CNTRL_MAC_IF_TX_SOP_SFD_EN 0x0010
1127#define ADIN1110_MAC_IF_SOP_CNTRL_MAC_IF_TX_SOP_DET_EN 0x0008
1128#define ADIN1110_MAC_IF_SOP_CNTRL_MAC_IF_RX_SOP_LEN_CHK_EN 0x0004
1129#define ADIN1110_MAC_IF_SOP_CNTRL_MAC_IF_RX_SOP_SFD_EN 0x0002
1130#define ADIN1110_MAC_IF_SOP_CNTRL_MAC_IF_RX_SOP_DET_EN 0x0001
1131
1132//MAC address filtering table
1133#define ADIN1110_ADDR_FILT_UPRn(index) (ADIN1110_ADDR_FILT_UPR0 + ((index) * 2))
1134#define ADIN1110_ADDR_FILT_LWRn(index) (ADIN1110_ADDR_FILT_LWR0 + ((index) * 2))
1135#define ADIN1110_ADDR_MSK_UPRn(index) (ADIN1110_ADDR_MSK_UPR0 + ((index) * 2))
1136#define ADIN1110_ADDR_MSK_LWRn(index) (ADIN1110_ADDR_MSK_LWR0 + ((index) * 2))
1137
1138//C++ guard
1139#ifdef __cplusplus
1140extern "C" {
1141#endif
1142
1143//ADIN1110 driver
1144extern const NicDriver adin1110Driver;
1145
1146//ADIN1110 related functions
1147error_t adin1110Init(NetInterface *interface);
1148
1149void adin1110Tick(NetInterface *interface);
1150
1151void adin1110EnableIrq(NetInterface *interface);
1152void adin1110DisableIrq(NetInterface *interface);
1153bool_t adin1110IrqHandler(NetInterface *interface);
1154void adin1110EventHandler(NetInterface *interface);
1155
1156error_t adin1110SendPacket(NetInterface *interface,
1157 const NetBuffer *buffer, size_t offset, NetTxAncillary *ancillary);
1158
1159void adin1110ReceivePacket(NetInterface *interface);
1160
1161error_t adin1110UpdateMacAddrFilter(NetInterface *interface);
1162
1163void adin1110WriteReg(NetInterface *interface, uint16_t address,
1164 uint32_t data);
1165
1166uint32_t adin1110ReadReg(NetInterface *interface, uint16_t address);
1167void adin1110DumpReg(NetInterface *interface);
1168
1169void adin1110WritePhyReg(NetInterface *interface, uint8_t address,
1170 uint16_t data);
1171
1172uint16_t adin1110ReadPhyReg(NetInterface *interface, uint8_t address);
1173void adin1110DumpPhyReg(NetInterface *interface);
1174
1175void adin1110WriteMmdReg(NetInterface *interface, uint8_t devAddr,
1176 uint16_t regAddr, uint16_t data);
1177
1178uint16_t adin1110ReadMmdReg(NetInterface *interface, uint8_t devAddr,
1179 uint16_t regAddr);
1180
1181void adin1110WriteFifo(NetInterface *interface, uint16_t header,
1182 const uint8_t *data, size_t length);
1183
1184void adin1110ReadFifo(NetInterface *interface, uint16_t *header,
1185 uint8_t *data, size_t length);
1186
1187//C++ guard
1188#ifdef __cplusplus
1189}
1190#endif
1191
1192#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