Go to the documentation of this file.
31 #ifndef _LAN9355_DRIVER_H
32 #define _LAN9355_DRIVER_H
38 #define LAN9355_PORT0 3
39 #define LAN9355_PORT1 1
40 #define LAN9355_PORT2 2
43 #define LAN9355_PORT_MASK 0x07
44 #define LAN9355_PORT0_MASK 0x04
45 #define LAN9355_PORT1_MASK 0x01
46 #define LAN9355_PORT2_MASK 0x02
47 #define LAN9355_PORT0_1_MASK 0x05
48 #define LAN9355_PORT0_2_MASK 0x06
49 #define LAN9355_PORT1_2_MASK 0x03
50 #define LAN9355_PORT0_1_2_MASK 0x07
53 #define LAN9355_ALR_TABLE_SIZE 512
56 #define LAN9355_VID_VLAN_RULES 0x0040
57 #define LAN9355_VID_CALC_PRIORITY 0x0020
58 #define LAN9355_VID_STP_OVERRIDE 0x0010
59 #define LAN9355_VID_ALR_LOOKUP 0x0008
60 #define LAN9355_VID_BROADCAST 0x0003
61 #define LAN9355_VID_DEST_PORT2 0x0002
62 #define LAN9355_VID_DEST_PORT1 0x0001
63 #define LAN9355_VID_DEST_PORT0 0x0000
66 #define LAN9355_VID_PRIORITY 0x0380
67 #define LAN9355_VID_PRIORITY_EN 0x0040
68 #define LAN9355_VID_STATIC 0x0020
69 #define LAN9355_VID_STP_OVERRIDE 0x0010
70 #define LAN9355_VID_IGMP_PACKET 0x0008
71 #define LAN9355_VID_SRC_PORT 0x0003
74 #define LAN9355_BMCR 0x00
75 #define LAN9355_BMSR 0x01
76 #define LAN9355_PHYID1 0x02
77 #define LAN9355_PHYID2 0x03
78 #define LAN9355_ANAR 0x04
79 #define LAN9355_ANLPAR 0x05
80 #define LAN9355_ANER 0x06
81 #define LAN9355_PMCSR 0x11
82 #define LAN9355_PSMR 0x12
83 #define LAN9355_PSCSIR 0x1B
84 #define LAN9355_PISR 0x1D
85 #define LAN9355_PIMR 0x1E
86 #define LAN9355_PSCSR 0x1F
89 #define LAN9355_ID_REV 0x0050
90 #define LAN9355_IRQ_CFG 0x0054
91 #define LAN9355_INT_STS 0x0058
92 #define LAN9355_INT_EN 0x005C
93 #define LAN9355_BYTE_TEST 0x0064
94 #define LAN9355_HW_CFG 0x0074
95 #define LAN9355_PMT_CTRL 0x0084
96 #define LAN9355_GPT_CFG 0x008C
97 #define LAN9355_GPT_CNT 0x0090
98 #define LAN9355_FREE_RUN 0x009C
99 #define LAN9355_PMI_DATA 0x00A4
100 #define LAN9355_PMI_ACCESS 0x00A8
101 #define LAN9355_VPHY_BASIC_CTRL_1 0x00C0
102 #define LAN9355_VPHY_BASIC_STATUS_1 0x00C4
103 #define LAN9355_VPHY_ID_MSB_1 0x00C8
104 #define LAN9355_VPHY_ID_LSB_1 0x00CC
105 #define LAN9355_VPHY_AN_ADV_1 0x00D0
106 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1 0x00D4
107 #define LAN9355_VPHY_AN_EXP_1 0x00D8
108 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1 0x00DC
109 #define LAN9355_1588_CMD_CTL 0x0100
110 #define LAN9355_1588_GENERAL_CONFIG 0x0104
111 #define LAN9355_1588_INT_STS 0x0108
112 #define LAN9355_1588_INT_EN 0x010C
113 #define LAN9355_1588_CLOCK_SEC 0x0110
114 #define LAN9355_1588_CLOCK_NS 0x0114
115 #define LAN9355_1588_CLOCK_SUBNS 0x0118
116 #define LAN9355_1588_CLOCK_RATE_ADJ 0x011C
117 #define LAN9355_1588_CLOCK_TEMP_RATE_ADJ 0x0120
118 #define LAN9355_1588_CLOCK_TEMP_RATE_DURATION 0x0124
119 #define LAN9355_1588_CLOCK_STEP_ADJ 0x0128
120 #define LAN9355_1588_CLOCK_TARGET_SEC_A 0x012C
121 #define LAN9355_1588_CLOCK_TARGET_NS_A 0x0130
122 #define LAN9355_1588_CLOCK_TARGET_RELOAD_SEC_A 0x0134
123 #define LAN9355_1588_CLOCK_TARGET_RELOAD_NS_A 0x0138
124 #define LAN9355_1588_CLOCK_TARGET_SEC_B 0x013C
125 #define LAN9355_1588_CLOCK_TARGET_NS_B 0x0140
126 #define LAN9355_1588_CLOCK_TARGET_RELOAD_SEC_B 0x0144
127 #define LAN9355_1588_CLOCK_TARGET_RELOAD_NS_B 0x0148
128 #define LAN9355_1588_USER_MAC_HI 0x014C
129 #define LAN9355_1588_USER_MAC_LO 0x0150
130 #define LAN9355_1588_BANK_PORT_GPIO_SEL 0x0154
131 #define LAN9355_1588_LATENCY 0x0158
132 #define LAN9355_1588_RX_PARSE_CONFIG 0x0158
133 #define LAN9355_1588_TX_PARSE_CONFIG 0x0158
134 #define LAN9355_1588_ASYM_PEERDLY 0x015C
135 #define LAN9355_1588_RX_TIMESTAMP_CONFIG 0x015C
136 #define LAN9355_1588_TX_TIMESTAMP_CONFIG 0x015C
137 #define LAN9355_1588_GPIO_CAP_CONFIG 0x015C
138 #define LAN9355_1588_CAP_INFO 0x0160
139 #define LAN9355_1588_RX_TS_INSERT_CONFIG 0x0160
140 #define LAN9355_1588_RX_CF_MOD 0x0164
141 #define LAN9355_1588_TX_MOD 0x0164
142 #define LAN9355_1588_RX_FILTER_CONFIG 0x0168
143 #define LAN9355_1588_TX_MOD2 0x0168
144 #define LAN9355_1588_RX_INGRESS_SEC 0x016C
145 #define LAN9355_1588_TX_EGRESS_SEC 0x016C
146 #define LAN9355_1588_GPIO_RE_CLOCK_SEC_CAP 0x016C
147 #define LAN9355_1588_RX_INGRESS_NS 0x0170
148 #define LAN9355_1588_TX_EGRESS_NS 0x0170
149 #define LAN9355_1588_GPIO_RE_CLOCK_NS_CAP 0x0170
150 #define LAN9355_1588_RX_MSG_HEADER 0x0174
151 #define LAN9355_1588_TX_MSG_HEADER 0x0174
152 #define LAN9355_1588_RX_PDREQ_SEC 0x0178
153 #define LAN9355_1588_TX_DREQ_SEC 0x0178
154 #define LAN9355_1588_GPIO_FE_CLOCK_SEC_CAP 0x0178
155 #define LAN9355_1588_RX_PDREQ_NS 0x017C
156 #define LAN9355_1588_TX_DREQ_NS 0x017C
157 #define LAN9355_1588_GPIO_FE_CLOCK_NS_CAP 0x017C
158 #define LAN9355_1588_RX_PDREQ_CF_HI 0x0180
159 #define LAN9355_1588_TX_ONE_STEP_SYNC_SEC 0x0180
160 #define LAN9355_1588_RX_PDREQ_CF_LOW 0x0184
161 #define LAN9355_1588_RX_CHKSUM_DROPPED_CNT 0x0188
162 #define LAN9355_1588_RX_FILTERED_CNT 0x018C
163 #define LAN9355_MANUAL_FC_1 0x01A0
164 #define LAN9355_MANUAL_FC_2 0x01A4
165 #define LAN9355_MANUAL_FC_0 0x01A8
166 #define LAN9355_SWITCH_CSR_DATA 0x01AC
167 #define LAN9355_SWITCH_CSR_CMD 0x01B0
168 #define LAN9355_E2P_CMD 0x01B4
169 #define LAN9355_E2P_DATA 0x01B8
170 #define LAN9355_LED_CFG 0x01BC
171 #define LAN9355_VPHY_BASIC_CTRL_0 0x01C0
172 #define LAN9355_VPHY_BASIC_STATUS_0 0x01C4
173 #define LAN9355_VPHY_ID_MSB_0 0x01C8
174 #define LAN9355_VPHY_ID_LSB_0 0x01CC
175 #define LAN9355_VPHY_AN_ADV_0 0x01D0
176 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0 0x01D4
177 #define LAN9355_VPHY_AN_EXP_0 0x01D8
178 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0 0x01DC
179 #define LAN9355_GPIO_CFG 0x01E0
180 #define LAN9355_GPIO_DATA_DIR 0x01E4
181 #define LAN9355_GPIO_INT_STS_EN 0x01E8
182 #define LAN9355_SWITCH_MAC_ADDRH 0x01F0
183 #define LAN9355_SWITCH_MAC_ADDRL 0x01F4
184 #define LAN9355_RESET_CTL 0x01F8
185 #define LAN9355_SWITCH_CSR_DIRECT_DATA 0x0200
188 #define LAN9355_SW_DEV_ID 0x0000
189 #define LAN9355_SW_RESET 0x0001
190 #define LAN9355_SW_IMR 0x0004
191 #define LAN9355_SW_IPR 0x0005
192 #define LAN9355_MAC_VER_ID_0 0x0400
193 #define LAN9355_MAC_RX_CFG_0 0x0401
194 #define LAN9355_MAC_RX_UNDSZE_CNT_0 0x0410
195 #define LAN9355_MAC_RX_64_CNT_0 0x0411
196 #define LAN9355_MAC_RX_65_TO_127_CNT_0 0x0412
197 #define LAN9355_MAC_RX_128_TO_255_CNT_0 0x0413
198 #define LAN9355_MAC_RX_256_TO_511_CNT_0 0x0414
199 #define LAN9355_MAC_RX_512_TO_1023_CNT_0 0x0415
200 #define LAN9355_MAC_RX_1024_TO_MAX_CNT_0 0x0416
201 #define LAN9355_MAC_RX_OVRSZE_CNT_0 0x0417
202 #define LAN9355_MAC_RX_PKTOK_CNT_0 0x0418
203 #define LAN9355_MAC_RX_CRCERR_CNT_0 0x0419
204 #define LAN9355_MAC_RX_MULCST_CNT_0 0x041A
205 #define LAN9355_MAC_RX_BRDCST_CNT_0 0x041B
206 #define LAN9355_MAC_RX_PAUSE_CNT_0 0x041C
207 #define LAN9355_MAC_RX_FRAG_CNT_0 0x041D
208 #define LAN9355_MAC_RX_JABB_CNT_0 0x041E
209 #define LAN9355_MAC_RX_ALIGN_CNT_0 0x041F
210 #define LAN9355_MAC_RX_PKTLEN_CNT_0 0x0420
211 #define LAN9355_MAC_RX_GOODPKTLEN_CNT_0 0x0421
212 #define LAN9355_MAC_RX_SYMBOL_CNT_0 0x0422
213 #define LAN9355_MAC_RX_CTLFRM_CNT_0 0x0423
214 #define LAN9355_RX_LPI_TRANSITION_0 0x0424
215 #define LAN9355_RX_LPI_TIME_0 0x0425
216 #define LAN9355_MAC_TX_CFG_0 0x0440
217 #define LAN9355_MAC_TX_FC_SETTINGS_0 0x0441
218 #define LAN9355_EEE_TW_TX_SYS_0 0x0442
219 #define LAN9355_EEE_TX_LPI_REQ_DELAY_0 0x0443
220 #define LAN9355_MAC_TX_DEFER_CNT_0 0x0451
221 #define LAN9355_MAC_TX_PAUSE_CNT_0 0x0452
222 #define LAN9355_MAC_TX_PKTOK_CNT_0 0x0453
223 #define LAN9355_MAC_TX_64_CNT_0 0x0454
224 #define LAN9355_MAC_TX_65_TO_127_CNT_0 0x0455
225 #define LAN9355_MAC_TX_128_TO_255_CNT_0 0x0456
226 #define LAN9355_MAC_TX_256_TO_511_CNT_0 0x0457
227 #define LAN9355_MAC_TX_512_TO_1023_CNT_0 0x0458
228 #define LAN9355_MAC_TX_1024_TO_MAX_CNT_0 0x0459
229 #define LAN9355_MAC_TX_UNDSZE_CNT_0 0x045A
230 #define LAN9355_MAC_TX_PKTLEN_CNT_0 0x045C
231 #define LAN9355_MAC_TX_BRDCST_CNT_0 0x045D
232 #define LAN9355_MAC_TX_MULCST_CNT_0 0x045E
233 #define LAN9355_MAC_TX_LATECOL_CNT_0 0x045F
234 #define LAN9355_MAC_TX_EXCCOL_CNT_0 0x0460
235 #define LAN9355_MAC_TX_SNGLECOL_CNT_0 0x0461
236 #define LAN9355_MAC_TX_MULTICOL_CNT_0 0x0462
237 #define LAN9355_MAC_TX_TOTALCOL_CNT_0 0x0463
238 #define LAN9355_TX_LPI_TRANSITION_0 0x0464
239 #define LAN9355_TX_LPI_TIME_0 0x0465
240 #define LAN9355_MAC_IMR_0 0x0480
241 #define LAN9355_MAC_IPR_0 0x0481
242 #define LAN9355_MAC_VER_ID_1 0x0800
243 #define LAN9355_MAC_RX_CFG_1 0x0801
244 #define LAN9355_MAC_RX_UNDSZE_CNT_1 0x0810
245 #define LAN9355_MAC_RX_64_CNT_1 0x0811
246 #define LAN9355_MAC_RX_65_TO_127_CNT_1 0x0812
247 #define LAN9355_MAC_RX_128_TO_255_CNT_1 0x0813
248 #define LAN9355_MAC_RX_256_TO_511_CNT_1 0x0814
249 #define LAN9355_MAC_RX_512_TO_1023_CNT_1 0x0815
250 #define LAN9355_MAC_RX_1024_TO_MAX_CNT_1 0x0816
251 #define LAN9355_MAC_RX_OVRSZE_CNT_1 0x0817
252 #define LAN9355_MAC_RX_PKTOK_CNT_1 0x0818
253 #define LAN9355_MAC_RX_CRCERR_CNT_1 0x0819
254 #define LAN9355_MAC_RX_MULCST_CNT_1 0x081A
255 #define LAN9355_MAC_RX_BRDCST_CNT_1 0x081B
256 #define LAN9355_MAC_RX_PAUSE_CNT_1 0x081C
257 #define LAN9355_MAC_RX_FRAG_CNT_1 0x081D
258 #define LAN9355_MAC_RX_JABB_CNT_1 0x081E
259 #define LAN9355_MAC_RX_ALIGN_CNT_1 0x081F
260 #define LAN9355_MAC_RX_PKTLEN_CNT_1 0x0820
261 #define LAN9355_MAC_RX_GOODPKTLEN_CNT_1 0x0821
262 #define LAN9355_MAC_RX_SYMBOL_CNT_1 0x0822
263 #define LAN9355_MAC_RX_CTLFRM_CNT_1 0x0823
264 #define LAN9355_RX_LPI_TRANSITION_1 0x0824
265 #define LAN9355_RX_LPI_TIME_1 0x0825
266 #define LAN9355_MAC_TX_CFG_1 0x0840
267 #define LAN9355_MAC_TX_FC_SETTINGS_1 0x0841
268 #define LAN9355_EEE_TW_TX_SYS_1 0x0842
269 #define LAN9355_EEE_TX_LPI_REQ_DELAY_1 0x0843
270 #define LAN9355_MAC_TX_DEFER_CNT_1 0x0851
271 #define LAN9355_MAC_TX_PAUSE_CNT_1 0x0852
272 #define LAN9355_MAC_TX_PKTOK_CNT_1 0x0853
273 #define LAN9355_MAC_TX_64_CNT_1 0x0854
274 #define LAN9355_MAC_TX_65_TO_127_CNT_1 0x0855
275 #define LAN9355_MAC_TX_128_TO_255_CNT_1 0x0856
276 #define LAN9355_MAC_TX_256_TO_511_CNT_1 0x0857
277 #define LAN9355_MAC_TX_512_TO_1023_CNT_1 0x0858
278 #define LAN9355_MAC_TX_1024_TO_MAX_CNT_1 0x0859
279 #define LAN9355_MAC_TX_UNDSZE_CNT_1 0x085A
280 #define LAN9355_MAC_TX_PKTLEN_CNT_1 0x085C
281 #define LAN9355_MAC_TX_BRDCST_CNT_1 0x085D
282 #define LAN9355_MAC_TX_MULCST_CNT_1 0x085E
283 #define LAN9355_MAC_TX_LATECOL_CNT_1 0x085F
284 #define LAN9355_MAC_TX_EXCCOL_CNT_1 0x0860
285 #define LAN9355_MAC_TX_SNGLECOL_CNT_1 0x0861
286 #define LAN9355_MAC_TX_MULTICOL_CNT_1 0x0862
287 #define LAN9355_MAC_TX_TOTALCOL_CNT_1 0x0863
288 #define LAN9355_TX_LPI_TRANSITION_1 0x0864
289 #define LAN9355_TX_LPI_TIME_1 0x0865
290 #define LAN9355_MAC_IMR_1 0x0880
291 #define LAN9355_MAC_IPR_1 0x0881
292 #define LAN9355_MAC_VER_ID_2 0x0C00
293 #define LAN9355_MAC_RX_CFG_2 0x0C01
294 #define LAN9355_MAC_RX_UNDSZE_CNT_2 0x0C10
295 #define LAN9355_MAC_RX_64_CNT_2 0x0C11
296 #define LAN9355_MAC_RX_65_TO_127_CNT_2 0x0C12
297 #define LAN9355_MAC_RX_128_TO_255_CNT_2 0x0C13
298 #define LAN9355_MAC_RX_256_TO_511_CNT_2 0x0C14
299 #define LAN9355_MAC_RX_512_TO_1023_CNT_2 0x0C15
300 #define LAN9355_MAC_RX_1024_TO_MAX_CNT_2 0x0C16
301 #define LAN9355_MAC_RX_OVRSZE_CNT_2 0x0C17
302 #define LAN9355_MAC_RX_PKTOK_CNT_2 0x0C18
303 #define LAN9355_MAC_RX_CRCERR_CNT_2 0x0C19
304 #define LAN9355_MAC_RX_MULCST_CNT_2 0x0C1A
305 #define LAN9355_MAC_RX_BRDCST_CNT_2 0x0C1B
306 #define LAN9355_MAC_RX_PAUSE_CNT_2 0x0C1C
307 #define LAN9355_MAC_RX_FRAG_CNT_2 0x0C1D
308 #define LAN9355_MAC_RX_JABB_CNT_2 0x0C1E
309 #define LAN9355_MAC_RX_ALIGN_CNT_2 0x0C1F
310 #define LAN9355_MAC_RX_PKTLEN_CNT_2 0x0C20
311 #define LAN9355_MAC_RX_GOODPKTLEN_CNT_2 0x0C21
312 #define LAN9355_MAC_RX_SYMBOL_CNT_2 0x0C22
313 #define LAN9355_MAC_RX_CTLFRM_CNT_2 0x0C23
314 #define LAN9355_RX_LPI_TRANSITION_2 0x0C24
315 #define LAN9355_RX_LPI_TIME_2 0x0C25
316 #define LAN9355_MAC_TX_CFG_2 0x0C40
317 #define LAN9355_MAC_TX_FC_SETTINGS_2 0x0C41
318 #define LAN9355_EEE_TW_TX_SYS_2 0x0C42
319 #define LAN9355_EEE_TX_LPI_REQ_DELAY_2 0x0C43
320 #define LAN9355_MAC_TX_DEFER_CNT_2 0x0C51
321 #define LAN9355_MAC_TX_PAUSE_CNT_2 0x0C52
322 #define LAN9355_MAC_TX_PKTOK_CNT_2 0x0C53
323 #define LAN9355_MAC_TX_64_CNT_2 0x0C54
324 #define LAN9355_MAC_TX_65_TO_127_CNT_2 0x0C55
325 #define LAN9355_MAC_TX_128_TO_255_CNT_2 0x0C56
326 #define LAN9355_MAC_TX_256_TO_511_CNT_2 0x0C57
327 #define LAN9355_MAC_TX_512_TO_1023_CNT_2 0x0C58
328 #define LAN9355_MAC_TX_1024_TO_MAX_CNT_2 0x0C59
329 #define LAN9355_MAC_TX_UNDSZE_CNT_2 0x0C5A
330 #define LAN9355_MAC_TX_PKTLEN_CNT_2 0x0C5C
331 #define LAN9355_MAC_TX_BRDCST_CNT_2 0x0C5D
332 #define LAN9355_MAC_TX_MULCST_CNT_2 0x0C5E
333 #define LAN9355_MAC_TX_LATECOL_CNT_2 0x0C5F
334 #define LAN9355_MAC_TX_EXCCOL_CNT_2 0x0C60
335 #define LAN9355_MAC_TX_SNGLECOL_CNT_2 0x0C61
336 #define LAN9355_MAC_TX_MULTICOL_CNT_2 0x0C62
337 #define LAN9355_MAC_TX_TOTALCOL_CNT_2 0x0C63
338 #define LAN9355_TX_LPI_TRANSITION_2 0x0C64
339 #define LAN9355_TX_LPI_TIME_2 0x0C65
340 #define LAN9355_MAC_IMR_2 0x0C80
341 #define LAN9355_MAC_IPR_2 0x0C81
342 #define LAN9355_SWE_ALR_CMD 0x1800
343 #define LAN9355_SWE_ALR_WR_DAT_0 0x1801
344 #define LAN9355_SWE_ALR_WR_DAT_1 0x1802
345 #define LAN9355_SWE_ALR_RD_DAT_0 0x1805
346 #define LAN9355_SWE_ALR_RD_DAT_1 0x1806
347 #define LAN9355_SWE_ALR_CMD_STS 0x1808
348 #define LAN9355_SWE_ALR_CFG 0x1809
349 #define LAN9355_SWE_ALR_OVERRIDE 0x180A
350 #define LAN9355_SWE_VLAN_CMD 0x180B
351 #define LAN9355_SWE_VLAN_WR_DATA 0x180C
352 #define LAN9355_SWE_VLAN_RD_DATA 0x180E
353 #define LAN9355_SWE_VLAN_CMD_STS 0x1810
354 #define LAN9355_SWE_DIFFSERV_TBL_CFG 0x1811
355 #define LAN9355_SWE_DIFFSERV_TBL_WR_DATA 0x1812
356 #define LAN9355_SWE_DIFFSERV_TBL_RD_DATA 0x1813
357 #define LAN9355_SWE_DIFFSERV_TBL_CMD_STS 0x1814
358 #define LAN9355_SWE_GLOBAL_INGRSS_CFG 0x1840
359 #define LAN9355_SWE_PORT_INGRSS_CFG 0x1841
360 #define LAN9355_SWE_ADMT_ONLY_VLAN 0x1842
361 #define LAN9355_SWE_PORT_STATE 0x1843
362 #define LAN9355_SWE_PRI_TO_QUE 0x1845
363 #define LAN9355_SWE_PORT_MIRROR 0x1846
364 #define LAN9355_SWE_INGRSS_PORT_TYP 0x1847
365 #define LAN9355_SWE_BCST_THROT 0x1848
366 #define LAN9355_SWE_ADMT_N_MEMBER 0x1849
367 #define LAN9355_SWE_INGRSS_RATE_CFG 0x184A
368 #define LAN9355_SWE_INGRSS_RATE_CMD 0x184B
369 #define LAN9355_SWE_INGRSS_RATE_CMD_STS 0x184C
370 #define LAN9355_SWE_INGRSS_RATE_WR_DATA 0x184D
371 #define LAN9355_SWE_INGRSS_RATE_RD_DATA 0x184E
372 #define LAN9355_SWE_FILTERED_CNT_0 0x1850
373 #define LAN9355_SWE_FILTERED_CNT_1 0x1851
374 #define LAN9355_SWE_FILTERED_CNT_2 0x1852
375 #define LAN9355_SWE_INGRSS_REGEN_TBL_0 0x1855
376 #define LAN9355_SWE_INGRSS_REGEN_TBL_1 0x1856
377 #define LAN9355_SWE_INGRSS_REGEN_TBL_2 0x1857
378 #define LAN9355_SWE_LRN_DISCRD_CNT_0 0x1858
379 #define LAN9355_SWE_LRN_DISCRD_CNT_1 0x1859
380 #define LAN9355_SWE_LRN_DISCRD_CNT_2 0x185A
381 #define LAN9355_SWE_IMR 0x1880
382 #define LAN9355_SWE_IPR 0x1881
383 #define LAN9355_BM_CFG 0x1C00
384 #define LAN9355_BM_DROP_LVL 0x1C01
385 #define LAN9355_BM_FC_PAUSE_LVL 0x1C02
386 #define LAN9355_BM_FC_RESUME_LVL 0x1C03
387 #define LAN9355_BM_BCST_LVL 0x1C04
388 #define LAN9355_BM_DRP_CNT_SRC_0 0x1C05
389 #define LAN9355_BM_DRP_CNT_SRC_1 0x1C06
390 #define LAN9355_BM_DRP_CNT_SRC_2 0x1C07
391 #define LAN9355_BM_RST_STS 0x1C08
392 #define LAN9355_BM_RNDM_DSCRD_TBL_CMD 0x1C09
393 #define LAN9355_BM_RNDM_DSCRD_TBL_WDATA 0x1C0A
394 #define LAN9355_BM_RNDM_DSCRD_TBL_RDATA 0x1C0B
395 #define LAN9355_BM_EGRSS_PORT_TYPE 0x1C0C
396 #define LAN9355_BM_EGRSS_RATE_00_01 0x1C0D
397 #define LAN9355_BM_EGRSS_RATE_02_03 0x1C0E
398 #define LAN9355_BM_EGRSS_RATE_10_11 0x1C0F
399 #define LAN9355_BM_EGRSS_RATE_12_13 0x1C10
400 #define LAN9355_BM_EGRSS_RATE_20_21 0x1C11
401 #define LAN9355_BM_EGRSS_RATE_22_23 0x1C12
402 #define LAN9355_BM_VLAN_0 0x1C13
403 #define LAN9355_BM_VLAN_1 0x1C14
404 #define LAN9355_BM_VLAN_2 0x1C15
405 #define LAN9355_BM_RATE_DRP_CNT_SRC_0 0x1C16
406 #define LAN9355_BM_RATE_DRP_CNT_SRC_1 0x1C17
407 #define LAN9355_BM_RATE_DRP_CNT_SRC_2 0x1C18
408 #define LAN9355_BM_IMR 0x1C20
409 #define LAN9355_BM_IPR 0x1C21
412 #define LAN9355_MAC_VER_ID(port) (0x0400 + ((port) * 0x0400))
413 #define LAN9355_MAC_RX_CFG(port) (0x0401 + ((port) * 0x0400))
414 #define LAN9355_MAC_RX_UNDSZE_CNT(port) (0x0410 + ((port) * 0x0400))
415 #define LAN9355_MAC_RX_64_CNT(port) (0x0411 + ((port) * 0x0400))
416 #define LAN9355_MAC_RX_65_TO_127_CNT(port) (0x0412 + ((port) * 0x0400))
417 #define LAN9355_MAC_RX_128_TO_255_CNT(port) (0x0413 + ((port) * 0x0400))
418 #define LAN9355_MAC_RX_256_TO_511_CNT(port) (0x0414 + ((port) * 0x0400))
419 #define LAN9355_MAC_RX_512_TO_1023_CNT(port) (0x0415 + ((port) * 0x0400))
420 #define LAN9355_MAC_RX_1024_TO_MAX_CNT(port) (0x0416 + ((port) * 0x0400))
421 #define LAN9355_MAC_RX_OVRSZE_CNT(port) (0x0417 + ((port) * 0x0400))
422 #define LAN9355_MAC_RX_PKTOK_CNT(port) (0x0418 + ((port) * 0x0400))
423 #define LAN9355_MAC_RX_CRCERR_CNT(port) (0x0419 + ((port) * 0x0400))
424 #define LAN9355_MAC_RX_MULCST_CNT(port) (0x041A + ((port) * 0x0400))
425 #define LAN9355_MAC_RX_BRDCST_CNT(port) (0x041B + ((port) * 0x0400))
426 #define LAN9355_MAC_RX_PAUSE_CNT(port) (0x041C + ((port) * 0x0400))
427 #define LAN9355_MAC_RX_FRAG_CNT(port) (0x041D + ((port) * 0x0400))
428 #define LAN9355_MAC_RX_JABB_CNT(port) (0x041E + ((port) * 0x0400))
429 #define LAN9355_MAC_RX_ALIGN_CNT(port) (0x041F + ((port) * 0x0400))
430 #define LAN9355_MAC_RX_PKTLEN_CNT(port) (0x0420 + ((port) * 0x0400))
431 #define LAN9355_MAC_RX_GOODPKTLEN_CNT(port) (0x0421 + ((port) * 0x0400))
432 #define LAN9355_MAC_RX_SYMBOL_CNT(port) (0x0422 + ((port) * 0x0400))
433 #define LAN9355_MAC_RX_CTLFRM_CNT(port) (0x0423 + ((port) * 0x0400))
434 #define LAN9355_RX_LPI_TRANSITION(port) (0x0424 + ((port) * 0x0400))
435 #define LAN9355_RX_LPI_TIME(port) (0x0425 + ((port) * 0x0400))
436 #define LAN9355_MAC_TX_CFG(port) (0x0440 + ((port) * 0x0400))
437 #define LAN9355_MAC_TX_FC_SETTINGS(port) (0x0441 + ((port) * 0x0400))
438 #define LAN9355_EEE_TW_TX_SYS(port) (0x0442 + ((port) * 0x0400))
439 #define LAN9355_EEE_TX_LPI_REQ_DELAY(port) (0x0443 + ((port) * 0x0400))
440 #define LAN9355_MAC_TX_DEFER_CNT(port) (0x0451 + ((port) * 0x0400))
441 #define LAN9355_MAC_TX_PAUSE_CNT(port) (0x0452 + ((port) * 0x0400))
442 #define LAN9355_MAC_TX_PKTOK_CNT(port) (0x0453 + ((port) * 0x0400))
443 #define LAN9355_MAC_TX_64_CNT(port) (0x0454 + ((port) * 0x0400))
444 #define LAN9355_MAC_TX_65_TO_127_CNT(port) (0x0455 + ((port) * 0x0400))
445 #define LAN9355_MAC_TX_128_TO_255_CNT(port) (0x0456 + ((port) * 0x0400))
446 #define LAN9355_MAC_TX_256_TO_511_CNT(port) (0x0457 + ((port) * 0x0400))
447 #define LAN9355_MAC_TX_512_TO_1023_CNT(port) (0x0458 + ((port) * 0x0400))
448 #define LAN9355_MAC_TX_1024_TO_MAX_CNT(port) (0x0459 + ((port) * 0x0400))
449 #define LAN9355_MAC_TX_UNDSZE_CNT(port) (0x045A + ((port) * 0x0400))
450 #define LAN9355_MAC_TX_PKTLEN_CNT(port) (0x045C + ((port) * 0x0400))
451 #define LAN9355_MAC_TX_BRDCST_CNT(port) (0x045D + ((port) * 0x0400))
452 #define LAN9355_MAC_TX_MULCST_CNT(port) (0x045E + ((port) * 0x0400))
453 #define LAN9355_MAC_TX_LATECOL_CNT(port) (0x045F + ((port) * 0x0400))
454 #define LAN9355_MAC_TX_EXCCOL_CNT(port) (0x0460 + ((port) * 0x0400))
455 #define LAN9355_MAC_TX_SNGLECOL_CNT(port) (0x0461 + ((port) * 0x0400))
456 #define LAN9355_MAC_TX_MULTICOL_CNT(port) (0x0462 + ((port) * 0x0400))
457 #define LAN9355_MAC_TX_TOTALCOL_CNT(port) (0x0463 + ((port) * 0x0400))
458 #define LAN9355_TX_LPI_TRANSITION(port) (0x0464 + ((port) * 0x0400))
459 #define LAN9355_TX_LPI_TIME(port) (0x0465 + ((port) * 0x0400))
460 #define LAN9355_MAC_IMR(port) (0x0480 + ((port) * 0x0400))
461 #define LAN9355_MAC_IPR(port) (0x0481 + ((port) * 0x0400))
464 #define LAN9355_BMCR_RESET 0x8000
465 #define LAN9355_BMCR_LOOPBACK 0x4000
466 #define LAN9355_BMCR_SPEED_SEL 0x2000
467 #define LAN9355_BMCR_AN_EN 0x1000
468 #define LAN9355_BMCR_POWER_DOWN 0x0800
469 #define LAN9355_BMCR_RESTART_AN 0x0200
470 #define LAN9355_BMCR_DUPLEX_MODE 0x0100
471 #define LAN9355_BMCR_COL_TEST 0x0080
474 #define LAN9355_BMSR_100BT4 0x8000
475 #define LAN9355_BMSR_100BTX_FD 0x4000
476 #define LAN9355_BMSR_100BTX_HD 0x2000
477 #define LAN9355_BMSR_10BT_FD 0x1000
478 #define LAN9355_BMSR_10BT_HD 0x0800
479 #define LAN9355_BMSR_100BT2_FD 0x0400
480 #define LAN9355_BMSR_100BT2_HD 0x0200
481 #define LAN9355_BMSR_EXTENDED_STATUS 0x0100
482 #define LAN9355_BMSR_UNIDIRECTIONAL_ABLE 0x0080
483 #define LAN9355_BMSR_MF_PREAMBLE_SUPPR 0x0040
484 #define LAN9355_BMSR_AN_COMPLETE 0x0020
485 #define LAN9355_BMSR_REMOTE_FAULT 0x0010
486 #define LAN9355_BMSR_AN_CAPABLE 0x0008
487 #define LAN9355_BMSR_LINK_STATUS 0x0004
488 #define LAN9355_BMSR_JABBER_DETECT 0x0002
489 #define LAN9355_BMSR_EXTENDED_CAPABLE 0x0001
492 #define LAN9355_PHYID1_PHY_ID_MSB 0xFFFF
493 #define LAN9355_PHYID1_PHY_ID_MSB_DEFAULT 0x0007
496 #define LAN9355_PHYID2_PHY_ID_LSB 0xFC00
497 #define LAN9355_PHYID2_PHY_ID_LSB_DEFAULT 0xC000
498 #define LAN9355_PHYID2_MODEL_NUM 0x03F0
499 #define LAN9355_PHYID2_MODEL_NUM_DEFAULT 0x0140
500 #define LAN9355_PHYID2_REVISION_NUM 0x000F
503 #define LAN9355_ANAR_REMOTE_FAULT 0x2000
504 #define LAN9355_ANAR_ASYM_PAUSE 0x0800
505 #define LAN9355_ANAR_SYM_PAUSE 0x0400
506 #define LAN9355_ANAR_100BTX_FD 0x0100
507 #define LAN9355_ANAR_100BTX_HD 0x0080
508 #define LAN9355_ANAR_10BT_FD 0x0040
509 #define LAN9355_ANAR_10BT_HD 0x0020
510 #define LAN9355_ANAR_SELECTOR 0x001F
511 #define LAN9355_ANAR_SELECTOR_DEFAULT 0x0001
514 #define LAN9355_ANLPAR_NEXT_PAGE 0x8000
515 #define LAN9355_ANLPAR_ACK 0x4000
516 #define LAN9355_ANLPAR_REMOTE_FAULT 0x2000
517 #define LAN9355_ANLPAR_ASYM_PAUSE 0x0800
518 #define LAN9355_ANLPAR_SYM_PAUSE 0x0400
519 #define LAN9355_ANLPAR_100BT4 0x0200
520 #define LAN9355_ANLPAR_100BTX_FD 0x0100
521 #define LAN9355_ANLPAR_100BTX_HD 0x0080
522 #define LAN9355_ANLPAR_10BT_FD 0x0040
523 #define LAN9355_ANLPAR_10BT_HD 0x0020
524 #define LAN9355_ANLPAR_SELECTOR 0x001F
525 #define LAN9355_ANLPAR_SELECTOR_DEFAULT 0x0001
528 #define LAN9355_ANER_PAR_DETECT_FAULT 0x0010
529 #define LAN9355_ANER_LP_NEXT_PAGE_ABLE 0x0008
530 #define LAN9355_ANER_NEXT_PAGE_ABLE 0x0004
531 #define LAN9355_ANER_PAGE_RECEIVED 0x0002
532 #define LAN9355_ANER_LP_AN_ABLE 0x0001
535 #define LAN9355_PMCSR_EDPWRDOWN 0x2000
536 #define LAN9355_PMCSR_ENERGYON 0x0002
539 #define LAN9355_PSMR_MODE 0x00E0
540 #define LAN9355_PSMR_MODE_10BT_HD 0x0000
541 #define LAN9355_PSMR_MODE_10BT_FD 0x0020
542 #define LAN9355_PSMR_MODE_100BTX_HD 0x0040
543 #define LAN9355_PSMR_MODE_100BTX_FD 0x0060
544 #define LAN9355_PSMR_MODE_POWER_DOWN 0x00C0
545 #define LAN9355_PSMR_MODE_AN 0x00E0
546 #define LAN9355_PSMR_PHYAD 0x001F
549 #define LAN9355_PSCSIR_AMDIXCTRL 0x8000
550 #define LAN9355_PSCSIR_AMDIXEN 0x4000
551 #define LAN9355_PSCSIR_AMDIXSTATE 0x2000
552 #define LAN9355_PSCSIR_SQEOFF 0x0800
553 #define LAN9355_PSCSIR_VCOOFF_LP 0x0400
554 #define LAN9355_PSCSIR_XPOL 0x0010
557 #define LAN9355_PISR_ENERGYON 0x0080
558 #define LAN9355_PISR_AN_COMPLETE 0x0040
559 #define LAN9355_PISR_REMOTE_FAULT 0x0020
560 #define LAN9355_PISR_LINK_DOWN 0x0010
561 #define LAN9355_PISR_AN_LP_ACK 0x0008
562 #define LAN9355_PISR_PAR_DETECT_FAULT 0x0004
563 #define LAN9355_PISR_AN_PAGE_RECEIVED 0x0002
566 #define LAN9355_PIMR_ENERGYON 0x0080
567 #define LAN9355_PIMR_AN_COMPLETE 0x0040
568 #define LAN9355_PIMR_REMOTE_FAULT 0x0020
569 #define LAN9355_PIMR_LINK_DOWN 0x0010
570 #define LAN9355_PIMR_AN_LP_ACK 0x0008
571 #define LAN9355_PIMR_PAR_DETECT_FAULT 0x0004
572 #define LAN9355_PIMR_AN_PAGE_RECEIVED 0x0002
575 #define LAN9355_PSCSR_AUTODONE 0x1000
576 #define LAN9355_PSCSR_SPEED 0x001C
577 #define LAN9355_PSCSR_SPEED_10BT_HD 0x0004
578 #define LAN9355_PSCSR_SPEED_100BTX_HD 0x0008
579 #define LAN9355_PSCSR_SPEED_10BT_FD 0x0014
580 #define LAN9355_PSCSR_SPEED_100BTX_FD 0x0018
583 #define LAN9355_ID_REV_CHIP_ID 0xFFFF0000
584 #define LAN9355_ID_REV_CHIP_ID_DEFAULT 0x93550000
585 #define LAN9355_ID_REV_CHIP_REV 0x0000FFFF
588 #define LAN9355_IRQ_CFG_INT_DEAS 0xFF000000
589 #define LAN9355_IRQ_CFG_INT_DEAS_CLR 0x00004000
590 #define LAN9355_IRQ_CFG_INT_DEAS_STS 0x00002000
591 #define LAN9355_IRQ_CFG_IRQ_INT 0x00001000
592 #define LAN9355_IRQ_CFG_IRQ_EN 0x00000100
593 #define LAN9355_IRQ_CFG_IRQ_POL 0x00000010
594 #define LAN9355_IRQ_CFG_IRQ_CLK_SELECT 0x00000002
595 #define LAN9355_IRQ_CFG_IRQ_TYPE 0x00000001
598 #define LAN9355_INT_STS_SW_INT 0x80000000
599 #define LAN9355_INT_STS_READY 0x40000000
600 #define LAN9355_INT_STS_1588_EVNT 0x20000000
601 #define LAN9355_INT_STS_SWITCH_INT 0x10000000
602 #define LAN9355_INT_STS_PHY_INT_B 0x08000000
603 #define LAN9355_INT_STS_PHY_INT_A 0x04000000
604 #define LAN9355_INT_STS_GPT_INT 0x00080000
605 #define LAN9355_INT_STS_PME_INT 0x00020000
606 #define LAN9355_INT_STS_GPIO 0x00001000
609 #define LAN9355_INT_EN_SW_INT_EN 0x80000000
610 #define LAN9355_INT_EN_READY_EN 0x40000000
611 #define LAN9355_INT_EN_1588_EVNT_EN 0x20000000
612 #define LAN9355_INT_EN_SWITCH_INT_EN 0x10000000
613 #define LAN9355_INT_EN_PHY_INT_B_EN 0x08000000
614 #define LAN9355_INT_EN_PHY_INT_A_EN 0x04000000
615 #define LAN9355_INT_EN_GPT_INT_EN 0x00080000
616 #define LAN9355_INT_EN_GPIO_EN 0x00001000
619 #define LAN9355_BYTE_TEST_DEFAULT 0x87654321
622 #define LAN9355_HW_CFG_DEVICE_READY 0x08000000
623 #define LAN9355_HW_CFG_AMDIX_EN_STRAP_STATE_PORT_B 0x04000000
624 #define LAN9355_HW_CFG_AMDIX_EN_STRAP_STATE_PORT_A 0x02000000
627 #define LAN9355_GPT_CFG_TIMER_EN 0x20000000
628 #define LAN9355_GPT_CFG_GPT_LOAD 0x0000FFFF
631 #define LAN9355_GPT_CNT_GPT_CNT 0x0000FFFF
634 #define LAN9355_FREE_RUN_FR_CNT 0xFFFFFFFF
637 #define LAN9355_PMI_DATA_MII_DATA 0x0000FFFF
640 #define LAN9355_PMI_ACCESS_PHY_ADDR 0x0000F800
641 #define LAN9355_PMI_ACCESS_MIIRINDA 0x000007C0
642 #define LAN9355_PMI_ACCESS_MIIW_R 0x00000002
643 #define LAN9355_PMI_ACCESS_MIIBZY 0x00000001
646 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_RST 0x00008000
647 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_LOOPBACK 0x00004000
648 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_SPEED_SEL_LSB 0x00002000
649 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_AN 0x00001000
650 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_PWR_DWN 0x00000800
651 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_ISO 0x00000400
652 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_RST_AN 0x00000200
653 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_DUPLEX 0x00000100
654 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_COL_TEST 0x00000080
655 #define LAN9355_VPHY_BASIC_CTRL_1_VPHY_SPEED_SEL_MSB 0x00000040
658 #define LAN9355_VPHY_BASIC_STATUS_1_100BT4 0x00008000
659 #define LAN9355_VPHY_BASIC_STATUS_1_100BTX_FD 0x00004000
660 #define LAN9355_VPHY_BASIC_STATUS_1_100BTX_HD 0x00002000
661 #define LAN9355_VPHY_BASIC_STATUS_1_10BT_FD 0x00001000
662 #define LAN9355_VPHY_BASIC_STATUS_1_10BT_HD 0x00000800
663 #define LAN9355_VPHY_BASIC_STATUS_1_100BT2_FD 0x00000400
664 #define LAN9355_VPHY_BASIC_STATUS_1_100BT2_HD 0x00000200
665 #define LAN9355_VPHY_BASIC_STATUS_1_EXTENDED_STATUS 0x00000100
666 #define LAN9355_VPHY_BASIC_STATUS_1_MF_PREAMBLE_SUPPR 0x00000040
667 #define LAN9355_VPHY_BASIC_STATUS_1_AN_COMPLETE 0x00000020
668 #define LAN9355_VPHY_BASIC_STATUS_1_REMOTE_FAULT 0x00000010
669 #define LAN9355_VPHY_BASIC_STATUS_1_AN_CAPABLE 0x00000008
670 #define LAN9355_VPHY_BASIC_STATUS_1_LINK_STATUS 0x00000004
671 #define LAN9355_VPHY_BASIC_STATUS_1_JABBER_DETECT 0x00000002
672 #define LAN9355_VPHY_BASIC_STATUS_1_EXTENDED_CAPABLE 0x00000001
675 #define LAN9355_VPHY_ID_MSB_1_PHY_ID_MSB 0x0000FFFF
678 #define LAN9355_VPHY_ID_LSB_1_PHY_ID_LSB 0x0000FC00
679 #define LAN9355_VPHY_ID_LSB_1_MODEL_NUM 0x000003F0
680 #define LAN9355_VPHY_ID_LSB_1_REVISION_NUM 0x0000000F
683 #define LAN9355_VPHY_AN_ADV_1_NEXT_PAGE 0x00008000
684 #define LAN9355_VPHY_AN_ADV_1_REMOTE_FAULT 0x00002000
685 #define LAN9355_VPHY_AN_ADV_1_ASYM_PAUSE 0x00000800
686 #define LAN9355_VPHY_AN_ADV_1_SYM_PAUSE 0x00000400
687 #define LAN9355_VPHY_AN_ADV_1_100BTX_FD 0x00000100
688 #define LAN9355_VPHY_AN_ADV_1_100BTX_HD 0x00000080
689 #define LAN9355_VPHY_AN_ADV_1_10BT_FD 0x00000040
690 #define LAN9355_VPHY_AN_ADV_1_10BT_HD 0x00000020
691 #define LAN9355_VPHY_AN_ADV_1_SELECTOR 0x0000001F
692 #define LAN9355_VPHY_AN_ADV_1_SELECTOR_DEFAULT 0x00000001
695 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_NEXT_PAGE 0x00008000
696 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_ACK 0x00004000
697 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_REMOTE_FAULT 0x00002000
698 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_ASYM_PAUSE 0x00000800
699 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_SYM_PAUSE 0x00000400
700 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_100BT4 0x00000200
701 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_100BTX_FD 0x00000100
702 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_100BTX_HD 0x00000080
703 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_10BT_FD 0x00000040
704 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_10BT_HD 0x00000020
705 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_SELECTOR 0x0000001F
706 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_1_SELECTOR_DEFAULT 0x00000001
709 #define LAN9355_VPHY_AN_EXP_1_PAR_DETECT_FAULT 0x00000010
710 #define LAN9355_VPHY_AN_EXP_1_LP_NEXT_PAGE_ABLE 0x00000008
711 #define LAN9355_VPHY_AN_EXP_1_NEXT_PAGE_ABLE 0x00000004
712 #define LAN9355_VPHY_AN_EXP_1_PAGE_RECEIVED 0x00000002
713 #define LAN9355_VPHY_AN_EXP_1_LP_AN_ABLE 0x00000001
716 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_MODE2 0x00008000
717 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_SW_LOOPBACK 0x00004000
718 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_TURBO_MODE_EN 0x00000400
719 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_MODE 0x00000300
720 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_MODE_MII_MAC 0x00000000
721 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_MODE_MII_PHY 0x00000100
722 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_MODE_RMII_MAC 0x00000200
723 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_MODE_RMII_PHY 0x00000300
724 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_SW_COL_TEST 0x00000080
725 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_RMII_CLK_DIR 0x00000040
726 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_RMII_CLK_DIR_IN 0x00000000
727 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_RMII_CLK_DIR_OUT 0x00000040
728 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_RMII_CLK_STRENGTH 0x00000020
729 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_IND 0x0000001C
730 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_IND_10_HD 0x00000004
731 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_IND_100_200_HD 0x00000008
732 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_IND_10_FD 0x00000014
733 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_IND_100_200_FD 0x00000018
734 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_1_SQEOFF 0x00000001
737 #define LAN9355_MANUAL_FC_1_BP_EN_1 0x00000040
738 #define LAN9355_MANUAL_FC_1_CUR_DUP_1 0x00000020
739 #define LAN9355_MANUAL_FC_1_CUR_RX_FC_1 0x00000010
740 #define LAN9355_MANUAL_FC_1_CUR_TX_FC_1 0x00000008
741 #define LAN9355_MANUAL_FC_1_RX_FC_1 0x00000004
742 #define LAN9355_MANUAL_FC_1_TX_FC_1 0x00000002
743 #define LAN9355_MANUAL_FC_1_MANUAL_FC_1 0x00000001
746 #define LAN9355_MANUAL_FC_2_BP_EN_2 0x00000040
747 #define LAN9355_MANUAL_FC_2_CUR_DUP_2 0x00000020
748 #define LAN9355_MANUAL_FC_2_CUR_RX_FC_2 0x00000010
749 #define LAN9355_MANUAL_FC_2_CUR_TX_FC_2 0x00000008
750 #define LAN9355_MANUAL_FC_2_RX_FC_2 0x00000004
751 #define LAN9355_MANUAL_FC_2_TX_FC_2 0x00000002
752 #define LAN9355_MANUAL_FC_2_MANUAL_FC_2 0x00000001
755 #define LAN9355_MANUAL_FC_0_BP_EN_0 0x00000040
756 #define LAN9355_MANUAL_FC_0_CUR_DUP_0 0x00000020
757 #define LAN9355_MANUAL_FC_0_CUR_RX_FC_0 0x00000010
758 #define LAN9355_MANUAL_FC_0_CUR_TX_FC_0 0x00000008
759 #define LAN9355_MANUAL_FC_0_RX_FC_0 0x00000004
760 #define LAN9355_MANUAL_FC_0_TX_FC_0 0x00000002
761 #define LAN9355_MANUAL_FC_0_MANUAL_FC_0 0x00000001
764 #define LAN9355_SWITCH_CSR_CMD_BUSY 0x80000000
765 #define LAN9355_SWITCH_CSR_CMD_WRITE 0x00000000
766 #define LAN9355_SWITCH_CSR_CMD_READ 0x40000000
767 #define LAN9355_SWITCH_CSR_CMD_AUTO_INC 0x20000000
768 #define LAN9355_SWITCH_CSR_CMD_AUTO_DEC 0x10000000
769 #define LAN9355_SWITCH_CSR_CMD_BE 0x000F0000
770 #define LAN9355_SWITCH_CSR_CMD_BE_0 0x00010000
771 #define LAN9355_SWITCH_CSR_CMD_BE_1 0x00020000
772 #define LAN9355_SWITCH_CSR_CMD_BE_2 0x00040000
773 #define LAN9355_SWITCH_CSR_CMD_BE_3 0x00080000
774 #define LAN9355_SWITCH_CSR_CMD_ADDR 0x0000FFFF
777 #define LAN9355_E2P_CMD_EPC_BUSY 0x80000000
778 #define LAN9355_E2P_CMD_EPC_COMMAND 0x70000000
779 #define LAN9355_E2P_CMD_EPC_COMMAND_READ 0x00000000
780 #define LAN9355_E2P_CMD_EPC_COMMAND_WRITE 0x30000000
781 #define LAN9355_E2P_CMD_EPC_COMMAND_RELOAD 0x70000000
782 #define LAN9355_E2P_CMD_LOADER_OVERFLOW 0x00040000
783 #define LAN9355_E2P_CMD_EPC_TIMEOUT 0x00020000
784 #define LAN9355_E2P_CMD_CFG_LOADED 0x00010000
785 #define LAN9355_E2P_CMD_EPC_ADDR 0x0000FFFF
788 #define LAN9355_E2P_DATA_EEPROM_DATA 0x000000FF
791 #define LAN9355_LED_CFG_LED_FUN 0x00000700
792 #define LAN9355_LED_CFG_LED_FUN_0 0x00000000
793 #define LAN9355_LED_CFG_LED_FUN_1 0x00000100
794 #define LAN9355_LED_CFG_LED_FUN_2 0x00000200
795 #define LAN9355_LED_CFG_LED_FUN_3 0x00000300
796 #define LAN9355_LED_CFG_LED_FUN_4 0x00000400
797 #define LAN9355_LED_CFG_LED_FUN_5 0x00000500
798 #define LAN9355_LED_CFG_LED_FUN_RESERVED 0x00000600
799 #define LAN9355_LED_CFG_LED_FUN_7 0x00000700
800 #define LAN9355_LED_CFG_LED_EN 0x0000003F
801 #define LAN9355_LED_CFG_LED_EN_0 0x00000001
802 #define LAN9355_LED_CFG_LED_EN_1 0x00000002
803 #define LAN9355_LED_CFG_LED_EN_2 0x00000004
804 #define LAN9355_LED_CFG_LED_EN_3 0x00000008
805 #define LAN9355_LED_CFG_LED_EN_4 0x00000010
806 #define LAN9355_LED_CFG_LED_EN_5 0x00000020
809 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_RST 0x00008000
810 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_LOOPBACK 0x00004000
811 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_SPEED_SEL_LSB 0x00002000
812 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_AN 0x00001000
813 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_PWR_DWN 0x00000800
814 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_ISO 0x00000400
815 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_RST_AN 0x00000200
816 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_DUPLEX 0x00000100
817 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_COL_TEST 0x00000080
818 #define LAN9355_VPHY_BASIC_CTRL_0_VPHY_SPEED_SEL_MSB 0x00000040
821 #define LAN9355_VPHY_BASIC_STATUS_0_100BT4 0x00008000
822 #define LAN9355_VPHY_BASIC_STATUS_0_100BTX_FD 0x00004000
823 #define LAN9355_VPHY_BASIC_STATUS_0_100BTX_HD 0x00002000
824 #define LAN9355_VPHY_BASIC_STATUS_0_10BT_FD 0x00001000
825 #define LAN9355_VPHY_BASIC_STATUS_0_10BT_HD 0x00000800
826 #define LAN9355_VPHY_BASIC_STATUS_0_100BT2_FD 0x00000400
827 #define LAN9355_VPHY_BASIC_STATUS_0_100BT2_HD 0x00000200
828 #define LAN9355_VPHY_BASIC_STATUS_0_EXTENDED_STATUS 0x00000100
829 #define LAN9355_VPHY_BASIC_STATUS_0_MF_PREAMBLE_SUPPR 0x00000040
830 #define LAN9355_VPHY_BASIC_STATUS_0_AN_COMPLETE 0x00000020
831 #define LAN9355_VPHY_BASIC_STATUS_0_REMOTE_FAULT 0x00000010
832 #define LAN9355_VPHY_BASIC_STATUS_0_AN_CAPABLE 0x00000008
833 #define LAN9355_VPHY_BASIC_STATUS_0_LINK_STATUS 0x00000004
834 #define LAN9355_VPHY_BASIC_STATUS_0_JABBER_DETECT 0x00000002
835 #define LAN9355_VPHY_BASIC_STATUS_0_EXTENDED_CAPABLE 0x00000001
838 #define LAN9355_VPHY_ID_MSB_0_PHY_ID_MSB 0x0000FFFF
841 #define LAN9355_VPHY_ID_LSB_0_PHY_ID_LSB 0x0000FC00
842 #define LAN9355_VPHY_ID_LSB_0_MODEL_NUM 0x000003F0
843 #define LAN9355_VPHY_ID_LSB_0_REVISION_NUM 0x0000000F
846 #define LAN9355_VPHY_AN_ADV_0_NEXT_PAGE 0x00008000
847 #define LAN9355_VPHY_AN_ADV_0_REMOTE_FAULT 0x00002000
848 #define LAN9355_VPHY_AN_ADV_0_ASYM_PAUSE 0x00000800
849 #define LAN9355_VPHY_AN_ADV_0_SYM_PAUSE 0x00000400
850 #define LAN9355_VPHY_AN_ADV_0_100BTX_FD 0x00000100
851 #define LAN9355_VPHY_AN_ADV_0_100BTX_HD 0x00000080
852 #define LAN9355_VPHY_AN_ADV_0_10BT_FD 0x00000040
853 #define LAN9355_VPHY_AN_ADV_0_10BT_HD 0x00000020
854 #define LAN9355_VPHY_AN_ADV_0_SELECTOR 0x0000001F
855 #define LAN9355_VPHY_AN_ADV_0_SELECTOR_DEFAULT 0x00000001
858 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_NEXT_PAGE 0x00008000
859 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_ACK 0x00004000
860 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_REMOTE_FAULT 0x00002000
861 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_ASYM_PAUSE 0x00000800
862 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_SYM_PAUSE 0x00000400
863 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_100BT4 0x00000200
864 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_100BTX_FD 0x00000100
865 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_100BTX_HD 0x00000080
866 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_10BT_FD 0x00000040
867 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_10BT_HD 0x00000020
868 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_SELECTOR 0x0000001F
869 #define LAN9355_VPHY_AN_LP_BASE_ABILITY_0_SELECTOR_DEFAULT 0x00000001
872 #define LAN9355_VPHY_AN_EXP_0_PAR_DETECT_FAULT 0x00000010
873 #define LAN9355_VPHY_AN_EXP_0_LP_NEXT_PAGE_ABLE 0x00000008
874 #define LAN9355_VPHY_AN_EXP_0_NEXT_PAGE_ABLE 0x00000004
875 #define LAN9355_VPHY_AN_EXP_0_PAGE_RECEIVED 0x00000002
876 #define LAN9355_VPHY_AN_EXP_0_LP_AN_ABLE 0x00000001
879 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_MODE2 0x00008000
880 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_SW_LOOPBACK 0x00004000
881 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_TURBO_MODE_EN 0x00000400
882 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_MODE 0x00000300
883 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_MODE_MII_MAC 0x00000000
884 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_MODE_MII_PHY 0x00000100
885 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_MODE_RMII_MAC 0x00000200
886 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_MODE_RMII_PHY 0x00000300
887 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_SW_COL_TEST 0x00000080
888 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_RMII_CLK_DIR 0x00000040
889 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_RMII_CLK_DIR_IN 0x00000000
890 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_RMII_CLK_DIR_OUT 0x00000040
891 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_RMII_CLK_STRENGTH 0x00000020
892 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_IND 0x0000001C
893 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_IND_10_HD 0x00000004
894 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_IND_100_200_HD 0x00000008
895 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_IND_10_FD 0x00000014
896 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_IND_100_200_FD 0x00000018
897 #define LAN9355_VPHY_SPECIAL_CTRL_STATUS_0_SQEOFF 0x00000001
900 #define LAN9355_GPIO_CFG_GPIO_CH_SEL 0xFF000000
901 #define LAN9355_GPIO_CFG_GPIO_CH_SEL_0 0x01000000
902 #define LAN9355_GPIO_CFG_GPIO_CH_SEL_1 0x02000000
903 #define LAN9355_GPIO_CFG_GPIO_CH_SEL_2 0x04000000
904 #define LAN9355_GPIO_CFG_GPIO_CH_SEL_3 0x08000000
905 #define LAN9355_GPIO_CFG_GPIO_CH_SEL_4 0x10000000
906 #define LAN9355_GPIO_CFG_GPIO_CH_SEL_5 0x20000000
907 #define LAN9355_GPIO_CFG_GPIO_CH_SEL_6 0x40000000
908 #define LAN9355_GPIO_CFG_GPIO_CH_SEL_7 0x80000000
909 #define LAN9355_GPIO_CFG_GPIO_INT_POL 0x00FF0000
910 #define LAN9355_GPIO_CFG_GPIO_INT_POL_0 0x00010000
911 #define LAN9355_GPIO_CFG_GPIO_INT_POL_1 0x00020000
912 #define LAN9355_GPIO_CFG_GPIO_INT_POL_2 0x00040000
913 #define LAN9355_GPIO_CFG_GPIO_INT_POL_3 0x00080000
914 #define LAN9355_GPIO_CFG_GPIO_INT_POL_4 0x00100000
915 #define LAN9355_GPIO_CFG_GPIO_INT_POL_5 0x00200000
916 #define LAN9355_GPIO_CFG_GPIO_INT_POL_6 0x00400000
917 #define LAN9355_GPIO_CFG_GPIO_INT_POL_7 0x00800000
918 #define LAN9355_GPIO_CFG_1588_GPIO_OE 0x0000FF00
919 #define LAN9355_GPIO_CFG_1588_GPIO_OE_0 0x00000100
920 #define LAN9355_GPIO_CFG_1588_GPIO_OE_1 0x00000200
921 #define LAN9355_GPIO_CFG_1588_GPIO_OE_2 0x00000400
922 #define LAN9355_GPIO_CFG_1588_GPIO_OE_3 0x00000800
923 #define LAN9355_GPIO_CFG_1588_GPIO_OE_4 0x00001000
924 #define LAN9355_GPIO_CFG_1588_GPIO_OE_5 0x00002000
925 #define LAN9355_GPIO_CFG_1588_GPIO_OE_6 0x00004000
926 #define LAN9355_GPIO_CFG_1588_GPIO_OE_7 0x00008000
927 #define LAN9355_GPIO_CFG_GPIOBUF 0x000000FF
928 #define LAN9355_GPIO_CFG_GPIOBUF_0 0x00000001
929 #define LAN9355_GPIO_CFG_GPIOBUF_1 0x00000002
930 #define LAN9355_GPIO_CFG_GPIOBUF_2 0x00000004
931 #define LAN9355_GPIO_CFG_GPIOBUF_3 0x00000008
932 #define LAN9355_GPIO_CFG_GPIOBUF_4 0x00000010
933 #define LAN9355_GPIO_CFG_GPIOBUF_5 0x00000020
934 #define LAN9355_GPIO_CFG_GPIOBUF_6 0x00000040
935 #define LAN9355_GPIO_CFG_GPIOBUF_7 0x00000080
938 #define LAN9355_GPIO_DATA_DIR_GPDIR 0x00FF0000
939 #define LAN9355_GPIO_DATA_DIR_GPDIR_0 0x00010000
940 #define LAN9355_GPIO_DATA_DIR_GPDIR_1 0x00020000
941 #define LAN9355_GPIO_DATA_DIR_GPDIR_2 0x00040000
942 #define LAN9355_GPIO_DATA_DIR_GPDIR_3 0x00080000
943 #define LAN9355_GPIO_DATA_DIR_GPDIR_4 0x00100000
944 #define LAN9355_GPIO_DATA_DIR_GPDIR_5 0x00200000
945 #define LAN9355_GPIO_DATA_DIR_GPDIR_6 0x00400000
946 #define LAN9355_GPIO_DATA_DIR_GPDIR_7 0x00800000
947 #define LAN9355_GPIO_DATA_DIR_GPIOD 0x000000FF
948 #define LAN9355_GPIO_DATA_DIR_GPIOD_0 0x00000001
949 #define LAN9355_GPIO_DATA_DIR_GPIOD_1 0x00000002
950 #define LAN9355_GPIO_DATA_DIR_GPIOD_2 0x00000004
951 #define LAN9355_GPIO_DATA_DIR_GPIOD_3 0x00000008
952 #define LAN9355_GPIO_DATA_DIR_GPIOD_4 0x00000010
953 #define LAN9355_GPIO_DATA_DIR_GPIOD_5 0x00000020
954 #define LAN9355_GPIO_DATA_DIR_GPIOD_6 0x00000040
955 #define LAN9355_GPIO_DATA_DIR_GPIOD_7 0x00000080
958 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN 0x00FF0000
959 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN_0 0x00010000
960 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN_1 0x00020000
961 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN_2 0x00040000
962 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN_3 0x00080000
963 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN_4 0x00100000
964 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN_5 0x00200000
965 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN_6 0x00400000
966 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_EN_7 0x00800000
967 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT 0x000000FF
968 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_0 0x00000001
969 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_1 0x00000002
970 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_2 0x00000004
971 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_3 0x00000008
972 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_4 0x00000010
973 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_5 0x00000020
974 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_6 0x00000040
975 #define LAN9355_GPIO_INT_STS_EN_GPIO_INT_7 0x00000080
978 #define LAN9355_SWITCH_MAC_ADDRH_DIFF_PAUSE_ADDR 0x00400000
979 #define LAN9355_SWITCH_MAC_ADDRH_PORT2_PHY_ADDR_41_40 0x00300000
980 #define LAN9355_SWITCH_MAC_ADDRH_PORT1_PHY_ADDR_41_40 0x000C0000
981 #define LAN9355_SWITCH_MAC_ADDRH_PORT0_PHY_ADDR_41_40 0x00030000
982 #define LAN9355_SWITCH_MAC_ADDRH_PHY_ADDR_47_32 0x0000FFFF
985 #define LAN9355_SWITCH_MAC_ADDRL_PHY_ADDR_31_0 0xFFFFFFFF
988 #define LAN9355_RESET_CTL_VPHY_1_RST 0x00000010
989 #define LAN9355_RESET_CTL_VPHY_0_RST 0x00000008
990 #define LAN9355_RESET_CTL_PHY_B_RST 0x00000004
991 #define LAN9355_RESET_CTL_PHY_A_RST 0x00000002
992 #define LAN9355_RESET_CTL_DIGITAL_RST 0x00000001
995 #define LAN9355_SW_DEV_ID_DEVICE_TYPE 0x00FF0000
996 #define LAN9355_SW_DEV_ID_DEVICE_TYPE_DEFAULT 0x00030000
997 #define LAN9355_SW_DEV_ID_CHIP_VERSION 0x0000FF00
998 #define LAN9355_SW_DEV_ID_CHIP_VERSION_DEFAULT 0x00000600
999 #define LAN9355_SW_DEV_ID_REVISION 0x000000FF
1000 #define LAN9355_SW_DEV_ID_REVISION_DEFAULT 0x00000007
1003 #define LAN9355_SW_RESET_SW_RESET 0x00000001
1006 #define LAN9355_SW_IMR_BM 0x00000040
1007 #define LAN9355_SW_IMR_SWE 0x00000020
1008 #define LAN9355_SW_IMR_MAC2 0x00000004
1009 #define LAN9355_SW_IMR_MAC1 0x00000002
1010 #define LAN9355_SW_IMR_MAC0 0x00000001
1013 #define LAN9355_SW_IPR_BM 0x00000040
1014 #define LAN9355_SW_IPR_SWE 0x00000020
1015 #define LAN9355_SW_IPR_MAC2 0x00000004
1016 #define LAN9355_SW_IPR_MAC1 0x00000002
1017 #define LAN9355_SW_IPR_MAC0 0x00000001
1020 #define LAN9355_MAC_VER_ID_DEVICE_TYPE 0x00000F00
1021 #define LAN9355_MAC_VER_ID_DEVICE_TYPE_DEFAULT 0x00000500
1022 #define LAN9355_MAC_VER_ID_CHIP_VERSION 0x000000F0
1023 #define LAN9355_MAC_VER_ID_CHIP_VERSION_DEFAULT 0x00000090
1024 #define LAN9355_MAC_VER_ID_REVISION 0x0000000F
1025 #define LAN9355_MAC_VER_ID_REVISION_DEFAULT 0x00000003
1028 #define LAN9355_MAC_RX_CFG_RECEIVE_OWN_TRANSMIT_EN 0x00000020
1029 #define LAN9355_MAC_RX_CFG_JUMBO_2K 0x00000008
1030 #define LAN9355_MAC_RX_CFG_REJECT_MAC_TYPES 0x00000002
1031 #define LAN9355_MAC_RX_CFG_RX_EN 0x00000001
1034 #define LAN9355_MAC_TX_CFG_EEE_EN 0x00000100
1035 #define LAN9355_MAC_TX_CFG_MAC_COUNTER_TEST 0x00000080
1036 #define LAN9355_MAC_TX_CFG_IFG_CONFIG 0x0000007C
1037 #define LAN9355_MAC_TX_CFG_IFG_CONFIG_DEFAULT 0x00000054
1038 #define LAN9355_MAC_TX_CFG_TX_PAD_EN 0x00000002
1039 #define LAN9355_MAC_TX_CFG_TX_EN 0x00000001
1042 #define LAN9355_SWE_ALR_CMD_MAKE_ENTRY 0x00000004
1043 #define LAN9355_SWE_ALR_CMD_GET_FIRST_ENTRY 0x00000002
1044 #define LAN9355_SWE_ALR_CMD_GET_NEXT_ENTRY 0x00000001
1047 #define LAN9355_SWE_ALR_WR_DAT_0_MAC_ADDR 0xFFFFFFFF
1050 #define LAN9355_SWE_ALR_WR_DAT_1_VALID 0x04000000
1051 #define LAN9355_SWE_ALR_WR_DAT_1_AGE1_OVERRIDE 0x02000000
1052 #define LAN9355_SWE_ALR_WR_DAT_1_STATIC 0x01000000
1053 #define LAN9355_SWE_ALR_WR_DAT_1_AGE0_FILTER 0x00800000
1054 #define LAN9355_SWE_ALR_WR_DAT_1_PRIORITY_EN 0x00400000
1055 #define LAN9355_SWE_ALR_WR_DAT_1_PRIORITY 0x00380000
1056 #define LAN9355_SWE_ALR_WR_DAT_1_PORT 0x00070000
1057 #define LAN9355_SWE_ALR_WR_DAT_1_PORT_0 0x00000000
1058 #define LAN9355_SWE_ALR_WR_DAT_1_PORT_1 0x00010000
1059 #define LAN9355_SWE_ALR_WR_DAT_1_PORT_2 0x00020000
1060 #define LAN9355_SWE_ALR_WR_DAT_1_PORT_RESERVED 0x00030000
1061 #define LAN9355_SWE_ALR_WR_DAT_1_PORT_0_1 0x00040000
1062 #define LAN9355_SWE_ALR_WR_DAT_1_PORT_0_2 0x00050000
1063 #define LAN9355_SWE_ALR_WR_DAT_1_PORT_1_2 0x00060000
1064 #define LAN9355_SWE_ALR_WR_DAT_1_PORT_0_1_2 0x00070000
1065 #define LAN9355_SWE_ALR_WR_DAT_1_MAC_ADDR 0x0000FFFF
1068 #define LAN9355_SWE_ALR_RD_DAT_0_MAC_ADDR 0xFFFFFFFF
1071 #define LAN9355_SWE_ALR_RD_DAT_1_END_OF_TABLE 0x08000000
1072 #define LAN9355_SWE_ALR_RD_DAT_1_VALID 0x04000000
1073 #define LAN9355_SWE_ALR_RD_DAT_1_AGE1_OVERRIDE 0x02000000
1074 #define LAN9355_SWE_ALR_RD_DAT_1_STATIC 0x01000000
1075 #define LAN9355_SWE_ALR_RD_DAT_1_AGE0_FILTER 0x00800000
1076 #define LAN9355_SWE_ALR_RD_DAT_1_PRIORITY_EN 0x00400000
1077 #define LAN9355_SWE_ALR_RD_DAT_1_PRIORITY 0x00380000
1078 #define LAN9355_SWE_ALR_RD_DAT_1_PORT 0x00070000
1079 #define LAN9355_SWE_ALR_RD_DAT_1_PORT_0 0x00000000
1080 #define LAN9355_SWE_ALR_RD_DAT_1_PORT_1 0x00010000
1081 #define LAN9355_SWE_ALR_RD_DAT_1_PORT_2 0x00020000
1082 #define LAN9355_SWE_ALR_RD_DAT_1_PORT_RESERVED 0x00030000
1083 #define LAN9355_SWE_ALR_RD_DAT_1_PORT_0_1 0x00040000
1084 #define LAN9355_SWE_ALR_RD_DAT_1_PORT_0_2 0x00050000
1085 #define LAN9355_SWE_ALR_RD_DAT_1_PORT_1_2 0x00060000
1086 #define LAN9355_SWE_ALR_RD_DAT_1_PORT_0_1_2 0x00070000
1087 #define LAN9355_SWE_ALR_RD_DAT_1_MAC_ADDR 0x0000FFFF
1090 #define LAN9355_SWE_ALR_CMD_STS_ALR_INIT_DONE 0x00000002
1091 #define LAN9355_SWE_ALR_CMD_STS_OPERATION_PENDING 0x00000001
1094 #define LAN9355_SWE_ALR_CFG_AGING_TIME 0x0FFF0000
1095 #define LAN9355_SWE_ALR_CFG_AGING_TIME_DEFAULT 0x01290000
1096 #define LAN9355_SWE_ALR_CFG_ALLOW_BROADCAST 0x00000004
1097 #define LAN9355_SWE_ALR_CFG_ALR_AGE_EN 0x00000002
1098 #define LAN9355_SWE_ALR_CFG_ALR_AGE_TEST 0x00000001
1101 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT2 0x00000600
1102 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT2_PORT0 0x00000000
1103 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT2_PORT1 0x00000200
1104 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT2_EN 0x00000100
1105 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT1 0x00000060
1106 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT1_PORT0 0x00000000
1107 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT1_PORT2 0x00000040
1108 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT1_EN 0x00000010
1109 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT0 0x00000006
1110 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT0_PORT1 0x00000002
1111 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT0_PORT2 0x00000004
1112 #define LAN9355_SWE_ALR_OVERRIDE_ALR_OVERRIDE_PORT0_EN 0x00000001
1115 #define LAN9355_SWE_VLAN_CMD_WRITE 0x00000000
1116 #define LAN9355_SWE_VLAN_CMD_READ 0x00000020
1117 #define LAN9355_SWE_VLAN_CMD_VLAN 0x00000000
1118 #define LAN9355_SWE_VLAN_CMD_PVID 0x00000010
1119 #define LAN9355_SWE_VLAN_CMD_VLAN_PORT 0x0000000F
1122 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_OTHER_MLD_NEXT_HDR_EN 0x00020000
1123 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_ANY_HOP_BY_HOP_NEXT_HDR 0x00010000
1124 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_802_1Q_VLAN_DIS 0x00008000
1125 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_USE_TAG 0x00004000
1126 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_ALLOW_MONITOR_ECHO 0x00002000
1127 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_MLD_IGMP_MONITOR_PORT 0x00001C00
1128 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_MLD_IGMP_MONITOR_PORT_0 0x00000400
1129 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_MLD_IGMP_MONITOR_PORT_1 0x00000800
1130 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_MLD_IGMP_MONITOR_PORT_2 0x00001000
1131 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_USE_IP 0x00000200
1132 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_MLD_MONITORING_EN 0x00000100
1133 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_IGMP_MONITORING_EN 0x00000080
1134 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_SWE_COUNTER_TEST 0x00000040
1135 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_DA_HIGHEST_PRIORITY 0x00000020
1136 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_FILTER_MULTICAST 0x00000010
1137 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_DROP_UNKNOWN 0x00000008
1138 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_USE_PRECEDENCE 0x00000004
1139 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_VL_HIGHER_PRIORITY 0x00000002
1140 #define LAN9355_SWE_GLOBAL_INGRSS_CFG_VLAN_EN 0x00000001
1143 #define LAN9355_SWE_PORT_INGRSS_CFG_LEARN_ON_INGRESS 0x00000038
1144 #define LAN9355_SWE_PORT_INGRSS_CFG_LEARN_ON_INGRESS_PORT0 0x00000000
1145 #define LAN9355_SWE_PORT_INGRSS_CFG_LEARN_ON_INGRESS_PORT1 0x00000008
1146 #define LAN9355_SWE_PORT_INGRSS_CFG_LEARN_ON_INGRESS_PORT2 0x00000010
1147 #define LAN9355_SWE_PORT_INGRSS_CFG_MEMBERSHIP_CHECK 0x00000007
1148 #define LAN9355_SWE_PORT_INGRSS_CFG_MEMBERSHIP_CHECK_PORT0 0x00000000
1149 #define LAN9355_SWE_PORT_INGRSS_CFG_MEMBERSHIP_CHECK_PORT1 0x00000001
1150 #define LAN9355_SWE_PORT_INGRSS_CFG_MEMBERSHIP_CHECK_PORT2 0x00000002
1153 #define LAN9355_SWE_ADMT_ONLY_VLAN_ADMIT_ONLY_VLAN 0x00000007
1154 #define LAN9355_SWE_ADMT_ONLY_VLAN_ADMIT_ONLY_VLAN_PORT0 0x00000001
1155 #define LAN9355_SWE_ADMT_ONLY_VLAN_ADMIT_ONLY_VLAN_PORT1 0x00000002
1156 #define LAN9355_SWE_ADMT_ONLY_VLAN_ADMIT_ONLY_VLAN_PORT2 0x00000004
1159 #define LAN9355_SWE_PORT_STATE_PORT2 0x00000030
1160 #define LAN9355_SWE_PORT_STATE_PORT2_FORWARDING 0x00000000
1161 #define LAN9355_SWE_PORT_STATE_PORT2_LISTENING 0x00000010
1162 #define LAN9355_SWE_PORT_STATE_PORT2_LEARNING 0x00000020
1163 #define LAN9355_SWE_PORT_STATE_PORT2_DISABLED 0x00000030
1164 #define LAN9355_SWE_PORT_STATE_PORT1 0x0000000C
1165 #define LAN9355_SWE_PORT_STATE_PORT1_FORWARDING 0x00000000
1166 #define LAN9355_SWE_PORT_STATE_PORT1_LISTENING 0x00000004
1167 #define LAN9355_SWE_PORT_STATE_PORT1_LEARNING 0x00000008
1168 #define LAN9355_SWE_PORT_STATE_PORT1_DISABLED 0x0000000C
1169 #define LAN9355_SWE_PORT_STATE_PORT0 0x00000003
1170 #define LAN9355_SWE_PORT_STATE_PORT0_FORWARDING 0x00000000
1171 #define LAN9355_SWE_PORT_STATE_PORT0_LISTENING 0x00000001
1172 #define LAN9355_SWE_PORT_STATE_PORT0_LEARNING 0x00000002
1173 #define LAN9355_SWE_PORT_STATE_PORT0_DISABLED 0x00000003
1176 #define LAN9355_SWE_PRI_TO_QUE_PRIO_7_TRAFFIC_CLASS 0x0000C000
1177 #define LAN9355_SWE_PRI_TO_QUE_PRIO_6_TRAFFIC_CLASS 0x00003000
1178 #define LAN9355_SWE_PRI_TO_QUE_PRIO_5_TRAFFIC_CLASS 0x00000C00
1179 #define LAN9355_SWE_PRI_TO_QUE_PRIO_4_TRAFFIC_CLASS 0x00000300
1180 #define LAN9355_SWE_PRI_TO_QUE_PRIO_3_TRAFFIC_CLASS 0x000000C0
1181 #define LAN9355_SWE_PRI_TO_QUE_PRIO_2_TRAFFIC_CLASS 0x00000030
1182 #define LAN9355_SWE_PRI_TO_QUE_PRIO_1_TRAFFIC_CLASS 0x0000000C
1183 #define LAN9355_SWE_PRI_TO_QUE_PRIO_0_TRAFFIC_CLASS 0x00000003
1186 #define LAN9355_SWE_PORT_MIRROR_RX_MIRRORING_FILT_EN 0x00000100
1187 #define LAN9355_SWE_PORT_MIRROR_SNIFFER_PORT 0x000000E0
1188 #define LAN9355_SWE_PORT_MIRROR_SNIFFER_PORT_0 0x00000020
1189 #define LAN9355_SWE_PORT_MIRROR_SNIFFER_PORT_1 0x00000040
1190 #define LAN9355_SWE_PORT_MIRROR_SNIFFER_PORT_2 0x00000080
1191 #define LAN9355_SWE_PORT_MIRROR_MIRRORED_PORT 0x0000001C
1192 #define LAN9355_SWE_PORT_MIRROR_MIRRORED_PORT_0 0x00000004
1193 #define LAN9355_SWE_PORT_MIRROR_MIRRORED_PORT_1 0x00000008
1194 #define LAN9355_SWE_PORT_MIRROR_MIRRORED_PORT_2 0x00000010
1195 #define LAN9355_SWE_PORT_MIRROR_RX_MIRRORING_EN 0x00000002
1196 #define LAN9355_SWE_PORT_MIRROR_TX_MIRRORING_EN 0x00000001
1199 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT2 0x00000030
1200 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT2_DIS 0x00000000
1201 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT2_EN 0x00000030
1202 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT1 0x0000000C
1203 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT1_DIS 0x00000000
1204 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT1_EN 0x0000000C
1205 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT0 0x00000003
1206 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT0_DIS 0x00000000
1207 #define LAN9355_SWE_INGRSS_PORT_TYP_PORT0_EN 0x00000003
1210 #define LAN9355_BM_EGRSS_PORT_TYPE_VID_SEL_PORT2 0x00400000
1211 #define LAN9355_BM_EGRSS_PORT_TYPE_INSERT_TAG_PORT2 0x00200000
1212 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_VID_PORT2 0x00100000
1213 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_PRIO_PORT2 0x00080000
1214 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_TAG_PORT2 0x00040000
1215 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT2_TYPE 0x00030000
1216 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT2_TYPE_DUMB 0x00000000
1217 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT2_TYPE_ACCESS 0x00010000
1218 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT2_TYPE_HYBRID 0x00020000
1219 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT2_TYPE_CPU 0x00030000
1220 #define LAN9355_BM_EGRSS_PORT_TYPE_VID_SEL_PORT1 0x00004000
1221 #define LAN9355_BM_EGRSS_PORT_TYPE_INSERT_TAG_PORT1 0x00002000
1222 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_VID_PORT1 0x00001000
1223 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_PRIO_PORT1 0x00000800
1224 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_TAG_PORT1 0x00000400
1225 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT1_TYPE 0x00000300
1226 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT1_TYPE_DUMB 0x00000000
1227 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT1_TYPE_ACCESS 0x00000100
1228 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT1_TYPE_HYBRID 0x00000200
1229 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT1_TYPE_CPU 0x00000300
1230 #define LAN9355_BM_EGRSS_PORT_TYPE_VID_SEL_PORT0 0x00000040
1231 #define LAN9355_BM_EGRSS_PORT_TYPE_INSERT_TAG_PORT0 0x00000020
1232 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_VID_PORT0 0x00000010
1233 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_PRIO_PORT0 0x00000008
1234 #define LAN9355_BM_EGRSS_PORT_TYPE_CHANGE_TAG_PORT0 0x00000004
1235 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT0_TYPE 0x00000003
1236 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT0_TYPE_DUMB 0x00000000
1237 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT0_TYPE_ACCESS 0x00000001
1238 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT0_TYPE_HYBRID 0x00000002
1239 #define LAN9355_BM_EGRSS_PORT_TYPE_PORT0_TYPE_CPU 0x00000003
1298 bool_t enable, uint32_t forwardPorts);
error_t lan9355GetDynamicFdbEntry(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Read an entry from the dynamic MAC table.
void lan9355EnableMldSnooping(NetInterface *interface, bool_t enable)
Enable MLD snooping.
error_t lan9355DeleteStaticFdbEntry(NetInterface *interface, const SwitchFdbEntry *entry)
Remove an entry from the static MAC table.
void lan9355DumpPhyReg(NetInterface *interface, uint8_t port)
Dump PHY registers for debugging purpose.
void lan9355DisableIrq(NetInterface *interface)
Disable interrupts.
void lan9355FlushDynamicFdbTable(NetInterface *interface, uint8_t port)
Flush dynamic MAC table.
bool_t lan9355GetLinkState(NetInterface *interface, uint8_t port)
Get link state.
Structure describing a buffer that spans multiple chunks.
void lan9355Tick(NetInterface *interface)
LAN9355 timer handler.
uint32_t lan9355ReadSysReg(NetInterface *interface, uint16_t address)
Read system CSR register.
void lan9355WritePhyReg(NetInterface *interface, uint8_t port, uint8_t address, uint16_t data)
Write PHY register.
void lan9355EnableIrq(NetInterface *interface)
Enable interrupts.
error_t lan9355GetStaticFdbEntry(NetInterface *interface, uint_t index, SwitchFdbEntry *entry)
Read an entry from the static MAC table.
void lan9355InitHook(NetInterface *interface)
LAN9355 custom configuration.
void lan9355EnableRsvdMcastTable(NetInterface *interface, bool_t enable)
Enable reserved multicast table.
error_t lan9355AddStaticFdbEntry(NetInterface *interface, const SwitchFdbEntry *entry)
Add a new entry to the static MAC table.
const SwitchDriver lan9355SwitchDriver
LAN9355 Ethernet switch driver.
uint32_t lan9355GetLinkSpeed(NetInterface *interface, uint8_t port)
Get link speed.
SwitchPortState
Switch port state.
SwitchPortState lan9355GetPortState(NetInterface *interface, uint8_t port)
Get port state.
void lan9355SetPortState(NetInterface *interface, uint8_t port, SwitchPortState state)
Set port state.
void lan9355EnableIgmpSnooping(NetInterface *interface, bool_t enable)
Enable IGMP snooping.
error_t lan9355Init(NetInterface *interface)
LAN9355 Ethernet switch initialization.
void lan9355EventHandler(NetInterface *interface)
LAN9355 event handler.
NicDuplexMode
Duplex mode.
void lan9355DumpSysReg(NetInterface *interface)
Dump system CSR registers for debugging purpose.
Network interface controller abstraction layer.
void lan9355FlushStaticFdbTable(NetInterface *interface)
Flush static MAC table.
void lan9355WriteSwitchReg(NetInterface *interface, uint16_t address, uint32_t data)
Write switch fabric CSR register.
NicDuplexMode lan9355GetDuplexMode(NetInterface *interface, uint8_t port)
Get duplex mode.
uint32_t lan9355ReadSwitchReg(NetInterface *interface, uint16_t address)
Read switch fabric CSR register.
void lan9355SetUnknownMcastFwdPorts(NetInterface *interface, bool_t enable, uint32_t forwardPorts)
Set forward ports for unknown multicast packets.
uint16_t lan9355ReadPhyReg(NetInterface *interface, uint8_t port, uint8_t address)
Read PHY register.
void lan9355WriteSysReg(NetInterface *interface, uint16_t address, uint32_t data)
Write system CSR register.
error_t lan9355TagFrame(NetInterface *interface, NetBuffer *buffer, size_t *offset, NetTxAncillary *ancillary)
Add special VLAN tag to Ethernet frame.
Forwarding database entry.
void lan9355SetAgingTime(NetInterface *interface, uint32_t agingTime)
Set aging time for dynamic filtering entries.
error_t lan9355UntagFrame(NetInterface *interface, uint8_t **frame, size_t *length, NetRxAncillary *ancillary)
Decode special VLAN tag from incoming Ethernet frame.