i82557reg.h revision 1.1 1 1.1 thorpej /* $NetBSD: i82557reg.h,v 1.1 1999/06/20 16:33:28 thorpej Exp $ */
2 1.1 thorpej
3 1.1 thorpej /*-
4 1.1 thorpej * Copyright (c) 1998 The NetBSD Foundation, Inc.
5 1.1 thorpej * All rights reserved.
6 1.1 thorpej *
7 1.1 thorpej * This code is derived from software contributed to The NetBSD Foundation
8 1.1 thorpej * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
9 1.1 thorpej * NASA Ames Research Center.
10 1.1 thorpej *
11 1.1 thorpej * Redistribution and use in source and binary forms, with or without
12 1.1 thorpej * modification, are permitted provided that the following conditions
13 1.1 thorpej * are met:
14 1.1 thorpej * 1. Redistributions of source code must retain the above copyright
15 1.1 thorpej * notice, this list of conditions and the following disclaimer.
16 1.1 thorpej * 2. Redistributions in binary form must reproduce the above copyright
17 1.1 thorpej * notice, this list of conditions and the following disclaimer in the
18 1.1 thorpej * documentation and/or other materials provided with the distribution.
19 1.1 thorpej * 3. All advertising materials mentioning features or use of this software
20 1.1 thorpej * must display the following acknowledgement:
21 1.1 thorpej * This product includes software developed by the NetBSD
22 1.1 thorpej * Foundation, Inc. and its contributors.
23 1.1 thorpej * 4. Neither the name of The NetBSD Foundation nor the names of its
24 1.1 thorpej * contributors may be used to endorse or promote products derived
25 1.1 thorpej * from this software without specific prior written permission.
26 1.1 thorpej *
27 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
28 1.1 thorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
29 1.1 thorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
30 1.1 thorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
31 1.1 thorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
32 1.1 thorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
33 1.1 thorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
34 1.1 thorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
35 1.1 thorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
36 1.1 thorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
37 1.1 thorpej * POSSIBILITY OF SUCH DAMAGE.
38 1.1 thorpej */
39 1.1 thorpej
40 1.1 thorpej /*
41 1.1 thorpej * Copyright (c) 1995, David Greenman
42 1.1 thorpej * All rights reserved.
43 1.1 thorpej *
44 1.1 thorpej * Redistribution and use in source and binary forms, with or without
45 1.1 thorpej * modification, are permitted provided that the following conditions
46 1.1 thorpej * are met:
47 1.1 thorpej * 1. Redistributions of source code must retain the above copyright
48 1.1 thorpej * notice unmodified, this list of conditions, and the following
49 1.1 thorpej * disclaimer.
50 1.1 thorpej * 2. Redistributions in binary form must reproduce the above copyright
51 1.1 thorpej * notice, this list of conditions and the following disclaimer in the
52 1.1 thorpej * documentation and/or other materials provided with the distribution.
53 1.1 thorpej *
54 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
55 1.1 thorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
56 1.1 thorpej * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
57 1.1 thorpej * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
58 1.1 thorpej * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
59 1.1 thorpej * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
60 1.1 thorpej * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
61 1.1 thorpej * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
62 1.1 thorpej * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
63 1.1 thorpej * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
64 1.1 thorpej * SUCH DAMAGE.
65 1.1 thorpej *
66 1.1 thorpej * Id: if_fxpreg.h,v 1.11 1997/09/29 11:27:42 davidg Exp
67 1.1 thorpej */
68 1.1 thorpej
69 1.1 thorpej #define FXP_VENDORID_INTEL 0x8086
70 1.1 thorpej #define FXP_DEVICEID_i82557 0x1229
71 1.1 thorpej
72 1.1 thorpej #define FXP_PCI_MMBA 0x10
73 1.1 thorpej #define FXP_PCI_IOBA 0x14
74 1.1 thorpej
75 1.1 thorpej /*
76 1.1 thorpej * Control/status registers.
77 1.1 thorpej */
78 1.1 thorpej #define FXP_CSR_SCB_RUSCUS 0 /* scb_rus/scb_cus (1 byte) */
79 1.1 thorpej #define FXP_CSR_SCB_STATACK 1 /* scb_statack (1 byte) */
80 1.1 thorpej #define FXP_CSR_SCB_COMMAND 2 /* scb_command (1 byte) */
81 1.1 thorpej #define FXP_CSR_SCB_INTRCNTL 3 /* scb_intrcntl (1 byte) */
82 1.1 thorpej #define FXP_CSR_SCB_GENERAL 4 /* scb_general (4 bytes) */
83 1.1 thorpej #define FXP_CSR_PORT 8 /* port (4 bytes) */
84 1.1 thorpej #define FXP_CSR_FLASHCONTROL 12 /* flash control (2 bytes) */
85 1.1 thorpej #define FXP_CSR_EEPROMCONTROL 14 /* eeprom control (2 bytes) */
86 1.1 thorpej #define FXP_CSR_MDICONTROL 16 /* mdi control (4 bytes) */
87 1.1 thorpej
88 1.1 thorpej /*
89 1.1 thorpej * FOR REFERENCE ONLY, the old definition of FXP_CSR_SCB_RUSCUS:
90 1.1 thorpej *
91 1.1 thorpej * volatile u_int8_t :2,
92 1.1 thorpej * scb_rus:4,
93 1.1 thorpej * scb_cus:2;
94 1.1 thorpej */
95 1.1 thorpej
96 1.1 thorpej #define FXP_PORT_SOFTWARE_RESET 0
97 1.1 thorpej #define FXP_PORT_SELFTEST 1
98 1.1 thorpej #define FXP_PORT_SELECTIVE_RESET 2
99 1.1 thorpej #define FXP_PORT_DUMP 3
100 1.1 thorpej
101 1.1 thorpej #define FXP_SCB_RUS_IDLE 0
102 1.1 thorpej #define FXP_SCB_RUS_SUSPENDED 1
103 1.1 thorpej #define FXP_SCB_RUS_NORESOURCES 2
104 1.1 thorpej #define FXP_SCB_RUS_READY 4
105 1.1 thorpej #define FXP_SCB_RUS_SUSP_NORBDS 9
106 1.1 thorpej #define FXP_SCB_RUS_NORES_NORBDS 10
107 1.1 thorpej #define FXP_SCB_RUS_READY_NORBDS 12
108 1.1 thorpej
109 1.1 thorpej #define FXP_SCB_CUS_IDLE 0
110 1.1 thorpej #define FXP_SCB_CUS_SUSPENDED 1
111 1.1 thorpej #define FXP_SCB_CUS_ACTIVE 2
112 1.1 thorpej
113 1.1 thorpej #define FXP_SCB_STATACK_SWI 0x04
114 1.1 thorpej #define FXP_SCB_STATACK_MDI 0x08
115 1.1 thorpej #define FXP_SCB_STATACK_RNR 0x10
116 1.1 thorpej #define FXP_SCB_STATACK_CNA 0x20
117 1.1 thorpej #define FXP_SCB_STATACK_FR 0x40
118 1.1 thorpej #define FXP_SCB_STATACK_CXTNO 0x80
119 1.1 thorpej
120 1.1 thorpej #define FXP_SCB_COMMAND_CU_NOP 0x00
121 1.1 thorpej #define FXP_SCB_COMMAND_CU_START 0x10
122 1.1 thorpej #define FXP_SCB_COMMAND_CU_RESUME 0x20
123 1.1 thorpej #define FXP_SCB_COMMAND_CU_DUMP_ADR 0x40
124 1.1 thorpej #define FXP_SCB_COMMAND_CU_DUMP 0x50
125 1.1 thorpej #define FXP_SCB_COMMAND_CU_BASE 0x60
126 1.1 thorpej #define FXP_SCB_COMMAND_CU_DUMPRESET 0x70
127 1.1 thorpej
128 1.1 thorpej #define FXP_SCB_COMMAND_RU_NOP 0
129 1.1 thorpej #define FXP_SCB_COMMAND_RU_START 1
130 1.1 thorpej #define FXP_SCB_COMMAND_RU_RESUME 2
131 1.1 thorpej #define FXP_SCB_COMMAND_RU_ABORT 4
132 1.1 thorpej #define FXP_SCB_COMMAND_RU_LOADHDS 5
133 1.1 thorpej #define FXP_SCB_COMMAND_RU_BASE 6
134 1.1 thorpej #define FXP_SCB_COMMAND_RU_RBDRESUME 7
135 1.1 thorpej
136 1.1 thorpej /*
137 1.1 thorpej * Software-use only part of the command block.
138 1.1 thorpej */
139 1.1 thorpej struct fxp_cb_soft {
140 1.1 thorpej void *next; /* pointer to next command block */
141 1.1 thorpej struct mbuf *mb_head; /* pointer to data for this command */
142 1.1 thorpej bus_dmamap_t dmamap; /* our DMA map */
143 1.1 thorpej };
144 1.1 thorpej
145 1.1 thorpej /*
146 1.1 thorpej * Command block definitions
147 1.1 thorpej */
148 1.1 thorpej struct fxp_cb_nop {
149 1.1 thorpej struct fxp_cb_soft cb_soft;
150 1.1 thorpej volatile u_int16_t cb_status;
151 1.1 thorpej volatile u_int16_t cb_command;
152 1.1 thorpej volatile u_int32_t link_addr;
153 1.1 thorpej };
154 1.1 thorpej struct fxp_cb_ias {
155 1.1 thorpej struct fxp_cb_soft cb_soft;
156 1.1 thorpej volatile u_int16_t cb_status;
157 1.1 thorpej volatile u_int16_t cb_command;
158 1.1 thorpej volatile u_int32_t link_addr;
159 1.1 thorpej volatile u_int8_t macaddr[6];
160 1.1 thorpej };
161 1.1 thorpej /* I hate bit-fields :-( */
162 1.1 thorpej struct fxp_cb_config {
163 1.1 thorpej struct fxp_cb_soft cb_soft;
164 1.1 thorpej volatile u_int16_t cb_status;
165 1.1 thorpej volatile u_int16_t cb_command;
166 1.1 thorpej volatile u_int32_t link_addr;
167 1.1 thorpej volatile u_int8_t byte_count:6,
168 1.1 thorpej :2;
169 1.1 thorpej volatile u_int8_t rx_fifo_limit:4,
170 1.1 thorpej tx_fifo_limit:3,
171 1.1 thorpej :1;
172 1.1 thorpej volatile u_int8_t adaptive_ifs;
173 1.1 thorpej volatile u_int8_t :8;
174 1.1 thorpej volatile u_int8_t rx_dma_bytecount:7,
175 1.1 thorpej :1;
176 1.1 thorpej volatile u_int8_t tx_dma_bytecount:7,
177 1.1 thorpej dma_bce:1;
178 1.1 thorpej volatile u_int8_t late_scb:1,
179 1.1 thorpej :1,
180 1.1 thorpej tno_int:1,
181 1.1 thorpej ci_int:1,
182 1.1 thorpej :3,
183 1.1 thorpej save_bf:1;
184 1.1 thorpej volatile u_int8_t disc_short_rx:1,
185 1.1 thorpej underrun_retry:2,
186 1.1 thorpej :5;
187 1.1 thorpej volatile u_int8_t mediatype:1,
188 1.1 thorpej :7;
189 1.1 thorpej volatile u_int8_t :8;
190 1.1 thorpej volatile u_int8_t :3,
191 1.1 thorpej nsai:1,
192 1.1 thorpej preamble_length:2,
193 1.1 thorpej loopback:2;
194 1.1 thorpej volatile u_int8_t linear_priority:3,
195 1.1 thorpej :5;
196 1.1 thorpej volatile u_int8_t linear_pri_mode:1,
197 1.1 thorpej :3,
198 1.1 thorpej interfrm_spacing:4;
199 1.1 thorpej volatile u_int8_t :8;
200 1.1 thorpej volatile u_int8_t :8;
201 1.1 thorpej volatile u_int8_t promiscuous:1,
202 1.1 thorpej bcast_disable:1,
203 1.1 thorpej :5,
204 1.1 thorpej crscdt:1;
205 1.1 thorpej volatile u_int8_t :8;
206 1.1 thorpej volatile u_int8_t :8;
207 1.1 thorpej volatile u_int8_t stripping:1,
208 1.1 thorpej padding:1,
209 1.1 thorpej rcv_crc_xfer:1,
210 1.1 thorpej :5;
211 1.1 thorpej volatile u_int8_t :6,
212 1.1 thorpej force_fdx:1,
213 1.1 thorpej fdx_pin_en:1;
214 1.1 thorpej volatile u_int8_t :6,
215 1.1 thorpej multi_ia:1,
216 1.1 thorpej :1;
217 1.1 thorpej volatile u_int8_t :3,
218 1.1 thorpej mc_all:1,
219 1.1 thorpej :4;
220 1.1 thorpej };
221 1.1 thorpej
222 1.1 thorpej /*
223 1.1 thorpej * Size of the hardware portion of a given transmit descriptor, including
224 1.1 thorpej * the DMA segment array.
225 1.1 thorpej */
226 1.1 thorpej #define FXP_MCSDESCSIZE \
227 1.1 thorpej (sizeof(struct fxp_cb_mcs) - offsetof(struct fxp_cb_mcs, cb_status))
228 1.1 thorpej
229 1.1 thorpej #define MAXMCADDR 80
230 1.1 thorpej struct fxp_cb_mcs {
231 1.1 thorpej struct fxp_cb_soft cb_soft;
232 1.1 thorpej volatile u_int16_t cb_status;
233 1.1 thorpej volatile u_int16_t cb_command;
234 1.1 thorpej volatile u_int32_t link_addr;
235 1.1 thorpej volatile u_int16_t mc_cnt;
236 1.1 thorpej volatile u_int8_t mc_addr[MAXMCADDR][6];
237 1.1 thorpej };
238 1.1 thorpej
239 1.1 thorpej /*
240 1.1 thorpej * Number of DMA segments in a TxCB. The TxCB must map to a
241 1.1 thorpej * contiguous region from the DMA engine's perspective. Since
242 1.1 thorpej * we allocate memory conforming to those contraints, we can
243 1.1 thorpej * arbitrarily choose the number of segments.
244 1.1 thorpej */
245 1.1 thorpej #define FXP_NTXSEG 32
246 1.1 thorpej
247 1.1 thorpej struct fxp_tbd {
248 1.1 thorpej volatile u_int32_t tb_addr;
249 1.1 thorpej volatile u_int32_t tb_size;
250 1.1 thorpej };
251 1.1 thorpej struct fxp_cb_tx {
252 1.1 thorpej struct fxp_cb_soft cb_soft;
253 1.1 thorpej volatile u_int16_t cb_status;
254 1.1 thorpej volatile u_int16_t cb_command;
255 1.1 thorpej volatile u_int32_t link_addr;
256 1.1 thorpej volatile u_int32_t tbd_array_addr;
257 1.1 thorpej volatile u_int16_t byte_count;
258 1.1 thorpej volatile u_int8_t tx_threshold;
259 1.1 thorpej volatile u_int8_t tbd_number;
260 1.1 thorpej /*
261 1.1 thorpej * The following isn't actually part of the TxCB, but we
262 1.1 thorpej * allocate it here for convenience.
263 1.1 thorpej */
264 1.1 thorpej volatile struct fxp_tbd tbd[FXP_NTXSEG];
265 1.1 thorpej };
266 1.1 thorpej
267 1.1 thorpej /*
268 1.1 thorpej * Offset of the hardware portion of a given transmit descriptor from the
269 1.1 thorpej * base of the control data DMA mapping.
270 1.1 thorpej */
271 1.1 thorpej #define FXP_TXDESCOFF(sc, txd) \
272 1.1 thorpej (FXP_CDOFF(fcd_txcbs[0]) + \
273 1.1 thorpej (((u_long)(txd)) - ((u_long)&(sc)->control_data->fcd_txcbs[0])) + \
274 1.1 thorpej offsetof(struct fxp_cb_tx, cb_status))
275 1.1 thorpej
276 1.1 thorpej /*
277 1.1 thorpej * Size of the hardware portion of a given transmit descriptor, including
278 1.1 thorpej * the DMA segment array.
279 1.1 thorpej */
280 1.1 thorpej #define FXP_TXDESCSIZE \
281 1.1 thorpej (sizeof(struct fxp_cb_tx) - offsetof(struct fxp_cb_tx, cb_status))
282 1.1 thorpej
283 1.1 thorpej /*
284 1.1 thorpej * Control Block (CB) definitions
285 1.1 thorpej */
286 1.1 thorpej
287 1.1 thorpej /* status */
288 1.1 thorpej #define FXP_CB_STATUS_OK 0x2000
289 1.1 thorpej #define FXP_CB_STATUS_C 0x8000
290 1.1 thorpej /* commands */
291 1.1 thorpej #define FXP_CB_COMMAND_NOP 0x0
292 1.1 thorpej #define FXP_CB_COMMAND_IAS 0x1
293 1.1 thorpej #define FXP_CB_COMMAND_CONFIG 0x2
294 1.1 thorpej #define FXP_CB_COMMAND_MCAS 0x3
295 1.1 thorpej #define FXP_CB_COMMAND_XMIT 0x4
296 1.1 thorpej #define FXP_CB_COMMAND_RESRV 0x5
297 1.1 thorpej #define FXP_CB_COMMAND_DUMP 0x6
298 1.1 thorpej #define FXP_CB_COMMAND_DIAG 0x7
299 1.1 thorpej /* command flags */
300 1.1 thorpej #define FXP_CB_COMMAND_SF 0x0008 /* simple/flexible mode */
301 1.1 thorpej #define FXP_CB_COMMAND_I 0x2000 /* generate interrupt on completion */
302 1.1 thorpej #define FXP_CB_COMMAND_S 0x4000 /* suspend on completion */
303 1.1 thorpej #define FXP_CB_COMMAND_EL 0x8000 /* end of list */
304 1.1 thorpej
305 1.1 thorpej /*
306 1.1 thorpej * RFA definitions
307 1.1 thorpej * NOTE! The RFA will NOT be aligned on a 4-byte boundary in the DMA
308 1.1 thorpej * area! To prevent EGCS from optimizing the copy of link_addr and
309 1.1 thorpej * rbd_addr (which would cause an unaligned access fault on RISC systems),
310 1.1 thorpej * we must make them an array of bytes!
311 1.1 thorpej */
312 1.1 thorpej
313 1.1 thorpej struct fxp_rfa {
314 1.1 thorpej volatile u_int16_t rfa_status;
315 1.1 thorpej volatile u_int16_t rfa_control;
316 1.1 thorpej volatile u_int8_t link_addr[4];
317 1.1 thorpej volatile u_int8_t rbd_addr[4];
318 1.1 thorpej volatile u_int16_t actual_size;
319 1.1 thorpej volatile u_int16_t size;
320 1.1 thorpej };
321 1.1 thorpej #define FXP_RFA_STATUS_RCOL 0x0001 /* receive collision */
322 1.1 thorpej #define FXP_RFA_STATUS_IAMATCH 0x0002 /* 0 = matches station address */
323 1.1 thorpej #define FXP_RFA_STATUS_S4 0x0010 /* receive error from PHY */
324 1.1 thorpej #define FXP_RFA_STATUS_TL 0x0020 /* type/length */
325 1.1 thorpej #define FXP_RFA_STATUS_FTS 0x0080 /* frame too short */
326 1.1 thorpej #define FXP_RFA_STATUS_OVERRUN 0x0100 /* DMA overrun */
327 1.1 thorpej #define FXP_RFA_STATUS_RNR 0x0200 /* no resources */
328 1.1 thorpej #define FXP_RFA_STATUS_ALIGN 0x0400 /* alignment error */
329 1.1 thorpej #define FXP_RFA_STATUS_CRC 0x0800 /* CRC error */
330 1.1 thorpej #define FXP_RFA_STATUS_OK 0x2000 /* packet received okay */
331 1.1 thorpej #define FXP_RFA_STATUS_C 0x8000 /* packet reception complete */
332 1.1 thorpej #define FXP_RFA_CONTROL_SF 0x08 /* simple/flexible memory mode */
333 1.1 thorpej #define FXP_RFA_CONTROL_H 0x10 /* header RFD */
334 1.1 thorpej #define FXP_RFA_CONTROL_S 0x4000 /* suspend after reception */
335 1.1 thorpej #define FXP_RFA_CONTROL_EL 0x8000 /* end of list */
336 1.1 thorpej
337 1.1 thorpej /*
338 1.1 thorpej * Statistics dump area definitions
339 1.1 thorpej */
340 1.1 thorpej struct fxp_stats {
341 1.1 thorpej volatile u_int32_t tx_good;
342 1.1 thorpej volatile u_int32_t tx_maxcols;
343 1.1 thorpej volatile u_int32_t tx_latecols;
344 1.1 thorpej volatile u_int32_t tx_underruns;
345 1.1 thorpej volatile u_int32_t tx_lostcrs;
346 1.1 thorpej volatile u_int32_t tx_deffered;
347 1.1 thorpej volatile u_int32_t tx_single_collisions;
348 1.1 thorpej volatile u_int32_t tx_multiple_collisions;
349 1.1 thorpej volatile u_int32_t tx_total_collisions;
350 1.1 thorpej volatile u_int32_t rx_good;
351 1.1 thorpej volatile u_int32_t rx_crc_errors;
352 1.1 thorpej volatile u_int32_t rx_alignment_errors;
353 1.1 thorpej volatile u_int32_t rx_rnr_errors;
354 1.1 thorpej volatile u_int32_t rx_overrun_errors;
355 1.1 thorpej volatile u_int32_t rx_cdt_errors;
356 1.1 thorpej volatile u_int32_t rx_shortframes;
357 1.1 thorpej volatile u_int32_t completion_status;
358 1.1 thorpej };
359 1.1 thorpej #define FXP_STATS_DUMP_COMPLETE 0xa005
360 1.1 thorpej #define FXP_STATS_DR_COMPLETE 0xa007
361 1.1 thorpej
362 1.1 thorpej /*
363 1.1 thorpej * Serial EEPROM control register bits
364 1.1 thorpej */
365 1.1 thorpej /* shift clock */
366 1.1 thorpej #define FXP_EEPROM_EESK 0x01
367 1.1 thorpej /* chip select */
368 1.1 thorpej #define FXP_EEPROM_EECS 0x02
369 1.1 thorpej /* data in */
370 1.1 thorpej #define FXP_EEPROM_EEDI 0x04
371 1.1 thorpej /* data out */
372 1.1 thorpej #define FXP_EEPROM_EEDO 0x08
373 1.1 thorpej
374 1.1 thorpej /*
375 1.1 thorpej * Serial EEPROM opcodes, including start bit
376 1.1 thorpej */
377 1.1 thorpej #define FXP_EEPROM_OPC_ERASE 0x4
378 1.1 thorpej #define FXP_EEPROM_OPC_WRITE 0x5
379 1.1 thorpej #define FXP_EEPROM_OPC_READ 0x6
380 1.1 thorpej
381 1.1 thorpej /*
382 1.1 thorpej * Management Data Interface opcodes
383 1.1 thorpej */
384 1.1 thorpej #define FXP_MDI_WRITE 0x1
385 1.1 thorpej #define FXP_MDI_READ 0x2
386 1.1 thorpej
387 1.1 thorpej /*
388 1.1 thorpej * PHY device types
389 1.1 thorpej */
390 1.1 thorpej #define FXP_PHY_NONE 0
391 1.1 thorpej #define FXP_PHY_82553A 1
392 1.1 thorpej #define FXP_PHY_82553C 2
393 1.1 thorpej #define FXP_PHY_82503 3
394 1.1 thorpej #define FXP_PHY_DP83840 4
395 1.1 thorpej #define FXP_PHY_80C240 5
396 1.1 thorpej #define FXP_PHY_80C24 6
397 1.1 thorpej #define FXP_PHY_82555 7
398 1.1 thorpej #define FXP_PHY_DP83840A 10
399