1 /* $NetBSD: if_sipreg.h,v 1.15 2005/12/11 12:22:49 christos Exp $ */ 2 3 /*- 4 * Copyright (c) 2001 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Jason R. Thorpe. 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 3. All advertising materials mentioning features or use of this software 19 * must display the following acknowledgement: 20 * This product includes software developed by the NetBSD 21 * Foundation, Inc. and its contributors. 22 * 4. Neither the name of The NetBSD Foundation nor the names of its 23 * contributors may be used to endorse or promote products derived 24 * from this software without specific prior written permission. 25 * 26 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 27 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 28 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 29 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 30 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 31 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 32 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 33 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 34 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 35 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 36 * POSSIBILITY OF SUCH DAMAGE. 37 */ 38 39 /*- 40 * Copyright (c) 1999 Network Computer, Inc. 41 * All rights reserved. 42 * 43 * Redistribution and use in source and binary forms, with or without 44 * modification, are permitted provided that the following conditions 45 * are met: 46 * 1. Redistributions of source code must retain the above copyright 47 * notice, this list of conditions and the following disclaimer. 48 * 2. Redistributions in binary form must reproduce the above copyright 49 * notice, this list of conditions and the following disclaimer in the 50 * documentation and/or other materials provided with the distribution. 51 * 3. Neither the name of Network Computer, Inc. nor the names of its 52 * contributors may be used to endorse or promote products derived 53 * from this software without specific prior written permission. 54 * 55 * THIS SOFTWARE IS PROVIDED BY NETWORK COMPUTER, INC. AND CONTRIBUTORS 56 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 57 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 58 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 59 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 60 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 61 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 62 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 63 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 64 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 65 * POSSIBILITY OF SUCH DAMAGE. 66 */ 67 68 #ifndef _DEV_PCI_IF_SIPREG_H_ 69 #define _DEV_PCI_IF_SIPREG_H_ 70 71 /* 72 * Register description for the Silicon Integrated Systems SiS 900, 73 * SiS 7016, National Semiconductor DP83815 10/100, and National 74 * Semiconduction DP83820 10/100/1000 PCI Ethernet controller. 75 * 76 * Written by Jason R. Thorpe for Network Computer, Inc. 77 */ 78 79 /* 80 * Transmit FIFO size. Used to compute the transmit drain threshold. 81 * 82 * On the SiS 900, the transmit FIFO is arranged as a 512 32-bit memory 83 * array. 84 * 85 * On the DP83820, we have an 8KB transmit FIFO. 86 */ 87 #ifdef DP83820 88 #define SIP_TXFIFO_SIZE 8192 89 #else 90 #define SIP_TXFIFO_SIZE (512 * 4) 91 #endif 92 93 /* 94 * The SiS900 uses a single descriptor format for both transmit 95 * and receive descriptor chains. 96 * 97 * Note the DP83820 can use 64-bit DMA addresses for link and bufptr. 98 * However, we do not yet support that. 99 * 100 * For transmit, buffers need not be aligned. For receive, buffers 101 * must be aligned to 4-byte (8-byte on DP83820) boundaries. 102 */ 103 struct sip_desc { 104 #ifdef DP83820 105 u_int32_t sipd_link; /* link to next descriptor */ 106 u_int32_t sipd_bufptr; /* pointer to DMA segment */ 107 u_int32_t sipd_cmdsts; /* command/status word */ 108 u_int32_t sipd_extsts; /* extended status */ 109 #else 110 u_int32_t sipd_link; /* link to next descriptor */ 111 u_int32_t sipd_cmdsts; /* command/status word */ 112 u_int32_t sipd_bufptr; /* pointer to DMA segment */ 113 #endif /* DP83820 */ 114 }; 115 116 /* 117 * CMDSTS bits common to transmit and receive. 118 */ 119 #define CMDSTS_OWN 0x80000000 /* owned by consumer */ 120 #define CMDSTS_MORE 0x40000000 /* more descriptors */ 121 #define CMDSTS_INTR 0x20000000 /* interrupt when ownership changes */ 122 #define CMDSTS_SUPCRC 0x10000000 /* suppress CRC */ 123 #define CMDSTS_OK 0x08000000 /* packet ok */ 124 #ifdef DP83820 125 #define CMDSTS_SIZE_MASK 0x0000ffff /* packet size */ 126 #else 127 #define CMDSTS_SIZE_MASK 0x000007ff /* packet size */ 128 #endif /* DP83820 */ 129 130 #define CMDSTS_SIZE(x) ((x) & CMDSTS_SIZE_MASK) 131 132 /* 133 * CMDSTS bits for transmit. 134 */ 135 #define CMDSTS_Tx_TXA 0x04000000 /* transmit abort */ 136 #define CMDSTS_Tx_TFU 0x02000000 /* transmit FIFO underrun */ 137 #define CMDSTS_Tx_CRS 0x01000000 /* carrier sense lost */ 138 #define CMDSTS_Tx_TD 0x00800000 /* transmit deferred */ 139 #define CMDSTS_Tx_ED 0x00400000 /* excessive deferral */ 140 #define CMDSTS_Tx_OWC 0x00200000 /* out of window collision */ 141 #define CMDSTS_Tx_EC 0x00100000 /* excessive collisions */ 142 #define CMDSTS_Tx_CCNT 0x000f0000 /* collision count */ 143 144 #define CMDSTS_COLLISIONS(x) (((x) & CMDSTS_Tx_CCNT) >> 16) 145 146 /* 147 * CMDSTS bits for receive. 148 */ 149 #define CMDSTS_Rx_RXA 0x04000000 /* receive abort */ 150 #define CMDSTS_Rx_RXO 0x02000000 /* receive overrun */ 151 #define CMDSTS_Rx_DEST 0x01800000 /* destination class */ 152 #define CMDSTS_Rx_LONG 0x00400000 /* packet too long */ 153 #define CMDSTS_Rx_RUNT 0x00200000 /* runt packet */ 154 #define CMDSTS_Rx_ISE 0x00100000 /* invalid symbol error */ 155 #define CMDSTS_Rx_CRCE 0x00080000 /* CRC error */ 156 #define CMDSTS_Rx_FAE 0x00040000 /* frame alignment error */ 157 #define CMDSTS_Rx_LBP 0x00020000 /* loopback packet */ 158 #ifdef DP83820 159 #define CMDSTS_Rx_IRL 0x00010000 /* in-range length error */ 160 #else 161 #define CMDSTS_Rx_COL 0x00010000 /* collision activity */ 162 #endif /* DP83820 */ 163 164 #define CMDSTS_Rx_DEST_REJ 0x00000000 /* packet rejected */ 165 #define CMDSTS_Rx_DEST_STA 0x00800000 /* matched station address */ 166 #define CMDSTS_Rx_DEST_MUL 0x01000000 /* multicast address */ 167 #define CMDSTS_Rx_DEST_BRD 0x01800000 /* broadcast address */ 168 169 #ifdef DP83820 170 /* 171 * EXTSTS bits. 172 */ 173 #define EXTSTS_Rx_UDPERR 0x00400000 /* UDP checksum error */ 174 #define EXTSTS_UDPPKT 0x00200000 /* perform UDP checksum */ 175 #define EXTSTS_Rx_TCPERR 0x00100000 /* TCP checksum error */ 176 #define EXTSTS_TCPPKT 0x00080000 /* perform TCP checksum */ 177 #define EXTSTS_Rx_IPERR 0x00040000 /* IP header checksum error */ 178 #define EXTSTS_IPPKT 0x00020000 /* perform IP header checksum */ 179 #define EXTSTS_VPKT 0x00010000 /* insert VLAN tag */ 180 #define EXTSTS_VTCI 0x0000ffff /* VLAN tag control information */ 181 #endif /* DP83820 */ 182 183 /* 184 * PCI Configuration space registers. 185 */ 186 #define SIP_PCI_CFGIOA (PCI_MAPREG_START + 0x00) 187 188 #define SIP_PCI_CFGMA (PCI_MAPREG_START + 0x04) 189 190 #ifdef DP83820 191 #define SIP_PCI_CFGMA1 (PCI_MAPREG_START + 0x08) 192 #endif /* DP83820 */ 193 194 #define SIP_PCI_CFGEROMA 0x30 /* expansion ROM address */ 195 196 #define SIP_PCI_CFGPMC 0x40 /* power management cap. */ 197 198 #define SIP_PCI_CFGPMCSR 0x44 /* power management ctl. */ 199 200 /* 201 * MAC Operation Registers 202 */ 203 #define SIP_CR 0x00 /* command register */ 204 #ifdef DP83820 205 #define CR_RXPRI3 0x00010000 /* Rx priority queue select */ 206 #define CR_RXPRI2 0x00008000 /* Rx priority queue select */ 207 #define CR_RXPRI1 0x00004000 /* Rx priority queue select */ 208 #define CR_RXPRI0 0x00002000 /* Rx priority queue select */ 209 #define CR_TXPRI3 0x00001000 /* Tx priority queue select */ 210 #define CR_TXPRI2 0x00000800 /* Tx priority queue select */ 211 #define CR_TXPRI1 0x00000400 /* Tx priority queue select */ 212 #define CR_TXPRI0 0x00000200 /* Tx priority queue select */ 213 #endif /* DP83820 */ 214 #define CR_RLD 0x00000400 /* reload from NVRAM */ 215 #define CR_RST 0x00000100 /* software reset */ 216 #define CR_SWI 0x00000080 /* software interrupt */ 217 #define CR_RXR 0x00000020 /* receiver reset */ 218 #define CR_TXR 0x00000010 /* transmit reset */ 219 #define CR_RXD 0x00000008 /* receiver disable */ 220 #define CR_RXE 0x00000004 /* receiver enable */ 221 #define CR_TXD 0x00000002 /* transmit disable */ 222 #define CR_TXE 0x00000001 /* transmit enable */ 223 224 #define SIP_CFG 0x04 /* configuration register */ 225 #define CFG_LNKSTS 0x80000000 /* link status (83815) */ 226 #ifdef DP83820 227 #define CFG_SPEED1000 0x40000000 /* 1000Mb/s input pin */ 228 #define CFG_SPEED100 0x20000000 /* 100Mb/s input pin */ 229 #define CFG_DUPSTS 0x10000000 /* full-duplex status */ 230 #define CFG_TBI_EN 0x01000000 /* ten-bit interface enable */ 231 #define CFG_MODE_1000 0x00400000 /* 1000Mb/s mode enable */ 232 #define CFG_PINT_DUP 0x00100000 /* interrupt on PHY DUP change */ 233 #define CFG_PINT_LNK 0x00080000 /* interrupt on PHY LNK change */ 234 #define CFG_PINT_SPD 0x00040000 /* interrupt on PHY SPD change */ 235 #define CFG_TMRTEST 0x00020000 /* timer test mode */ 236 #define CFG_MRM_DIS 0x00010000 /* MRM disable */ 237 #define CFG_MWI_DIS 0x00008000 /* MWI disable */ 238 #define CFG_T64ADDR 0x00004000 /* target 64-bit addressing enable */ 239 #define CFG_PCI64_DET 0x00002000 /* 64-bit PCI bus detected */ 240 #define CFG_DATA64_EN 0x00001000 /* 64-bit data enable */ 241 #define CFG_M64ADDR 0x00000800 /* master 64-bit addressing enable */ 242 #else 243 #define CFG_SPEED100 0x40000000 /* 100Mb/s (83815) */ 244 #define CFG_FDUP 0x20000000 /* full duplex (83815) */ 245 #define CFG_POL 0x10000000 /* 10Mb/s polarity (83815) */ 246 #define CFG_ANEG_DN 0x08000000 /* autonegotiation done (83815) */ 247 #define CFG_PHY_CFG 0x00fc0000 /* PHY configuration (83815) */ 248 #define CFG_PINT_ACEN 0x00020000 /* PHY interrupt auto clear (83815) */ 249 #define CFG_PAUSE_ADV 0x00010000 /* pause advertise (83815) */ 250 #define CFG_ANEG_SEL 0x0000e000 /* autonegotiation select (83815) */ 251 #endif /* DP83820 */ 252 #define CFG_PHY_RST 0x00000400 /* PHY reset (83815) */ 253 #define CFG_PHY_DIS 0x00000200 /* PHY disable (83815) */ 254 #ifdef DP83820 255 #define CFG_EXTSTS_EN 0x00000100 /* extended status enable */ 256 #else 257 #define CFG_EUPHCOMP 0x00000100 /* 83810 descriptor compat (83815) */ 258 #endif /* DP83820 */ 259 #define CFG_EDBMASTEN 0x00002000 /* 635,900B ?? from linux driver */ 260 #define CFG_RNDCNT 0x00000400 /* 635,900B ?? from linux driver */ 261 #define CFG_FAIRBO 0x00000200 /* 635,900B ?? from linux driver */ 262 #define CFG_REQALG 0x00000080 /* PCI bus request alg. */ 263 #define CFG_SB 0x00000040 /* single backoff */ 264 #define CFG_POW 0x00000020 /* program out of window timer */ 265 #define CFG_EXD 0x00000010 /* excessive defferal timer disable */ 266 #define CFG_PESEL 0x00000008 /* parity error detection action */ 267 #ifdef DP83820 268 #define CFG_BROM_DIS 0x00000004 /* boot ROM disable */ 269 #define CFG_EXT_125 0x00000002 /* external 125MHz reference select */ 270 #endif /* DP83820 */ 271 #define CFG_BEM 0x00000001 /* big-endian mode */ 272 273 #define SIP_EROMAR 0x08 /* EEPROM access register */ 274 #ifndef DP83820 275 #define EROMAR_REQ 0x00000400 /* SiS 96x specific */ 276 #define EROMAR_DONE 0x00000200 /* SiS 96x specific */ 277 #define EROMAR_GNT 0x00000100 /* SiS 96x specific */ 278 #endif /* DP83820 */ 279 #define EROMAR_MDC 0x00000040 /* MII clock */ 280 #define EROMAR_MDDIR 0x00000020 /* MII direction (1 == MAC->PHY) */ 281 #define EROMAR_MDIO 0x00000010 /* MII data */ 282 #define EROMAR_EECS 0x00000008 /* chip select */ 283 #define EROMAR_EESK 0x00000004 /* clock */ 284 #define EROMAR_EEDO 0x00000002 /* data out */ 285 #define EROMAR_EEDI 0x00000001 /* data in */ 286 287 #define SIP_PTSCR 0x0c /* PCI test control register */ 288 #ifdef DP83820 289 #define PTSCR_RBIST_RST 0x00002000 /* SRAM BIST reset */ 290 #define PTSCR_RBIST_EN 0x00000400 /* SRAM BIST enable */ 291 #define PTSCR_RBIST_DONE 0x00000200 /* SRAM BIST done */ 292 #define PTSCR_RBIST_RX1FAIL 0x00000100 /* Rx status FIFO BIST fail */ 293 #define PTSCR_RBIST_RX0FAIL 0x00000080 /* Rx data FIFO BIST fail */ 294 #define PTSCR_RBIST_TX0FAIL 0x00000020 /* Tx data FIFO BIST fail */ 295 #define PTSCR_RBIST_HFFAIL 0x00000010 /* hash filter BIST fail */ 296 #define PTSCR_RBIST_RXFAIL 0x00000008 /* Rx filter BIST failed */ 297 #define PTSCR_EELOAD_EN 0x00000004 /* EEPROM load initiate */ 298 #define PTSCR_EEBIST_EN 0x00000002 /* EEPROM BIST enable */ 299 #define PTSCR_EEBIST_FAIL 0x00000001 /* EEPROM BIST failed */ 300 #else 301 #define PTSCR_DIS_TEST 0x40000000 /* discard timer test mode */ 302 #define PTSCR_EROM_TACC 0x0f000000 /* boot rom access time */ 303 #define PTSCR_TRRAMADR 0x001ff000 /* TX/RX RAM address */ 304 #define PTSCR_BMTEN 0x00000200 /* bus master test enable */ 305 #define PTSCR_RRTMEN 0x00000080 /* receive RAM test mode enable */ 306 #define PTSCR_TRTMEN 0x00000040 /* transmit RAM test mode enable */ 307 #define PTSCR_SRTMEN 0x00000020 /* status RAM test mode enable */ 308 #define PTSCR_SRAMADR 0x0000001f /* status RAM address */ 309 #endif /* DP83820 */ 310 311 #define SIP_ISR 0x10 /* interrupt status register */ 312 #ifdef DP83820 313 #define ISR_TXDESC3 0x40000000 /* Tx queue 3 */ 314 #define ISR_TXDESC2 0x20000000 /* Tx queue 2 */ 315 #define ISR_TXDESC1 0x10000000 /* Tx queue 1 */ 316 #define ISR_TXDESC0 0x08000000 /* Tx queue 0 */ 317 #define ISR_RXDESC3 0x04000000 /* Rx queue 3 */ 318 #define ISR_RXDESC2 0x02000000 /* Rx queue 2 */ 319 #define ISR_RXDESC1 0x01000000 /* Rx queue 1 */ 320 #define ISR_RXDESC0 0x00800000 /* Rx queue 0 */ 321 #define ISR_TXRCMP 0x00400000 /* transmit reset complete */ 322 #define ISR_RXRCMP 0x00200000 /* receive reset complete */ 323 #define ISR_DPERR 0x00100000 /* detected parity error */ 324 #define ISR_SSERR 0x00080000 /* signalled system error */ 325 #define ISR_RMABT 0x00040000 /* received master abort */ 326 #define ISR_RTABT 0x00020000 /* received target abort */ 327 #else 328 #define ISR_WAKEEVT 0x10000000 /* wake up event */ 329 #define ISR_PAUSE_END 0x08000000 /* end of transmission pause */ 330 #define ISR_PAUSE_ST 0x04000000 /* start of transmission pause */ 331 #define ISR_TXRCMP 0x02000000 /* transmit reset complete */ 332 #define ISR_RXRCMP 0x01000000 /* receive reset complete */ 333 #define ISR_DPERR 0x00800000 /* detected parity error */ 334 #define ISR_SSERR 0x00400000 /* signalled system error */ 335 #define ISR_RMABT 0x00200000 /* received master abort */ 336 #define ISR_RTABT 0x00100000 /* received target abort */ 337 #endif /* DP83820 */ 338 #define ISR_RXSOVR 0x00010000 /* Rx status FIFO overrun */ 339 #define ISR_HIBERR 0x00008000 /* high bits error set */ 340 #ifdef DP83820 341 #define ISR_PHY 0x00004000 /* PHY interrupt */ 342 #define ISR_PME 0x00002000 /* power management event */ 343 #endif /* DP83820 */ 344 #define ISR_SWI 0x00001000 /* software interrupt */ 345 #ifdef DP83820 346 #define ISR_MIB 0x00000800 /* MIB service */ 347 #endif /* DP83820 */ 348 #define ISR_TXURN 0x00000400 /* Tx underrun */ 349 #define ISR_TXIDLE 0x00000200 /* Tx idle */ 350 #define ISR_TXERR 0x00000100 /* Tx error */ 351 #define ISR_TXDESC 0x00000080 /* Tx descriptor interrupt */ 352 #define ISR_TXOK 0x00000040 /* Tx okay */ 353 #define ISR_RXORN 0x00000020 /* Rx overrun */ 354 #define ISR_RXIDLE 0x00000010 /* Rx idle */ 355 #define ISR_RXEARLY 0x00000008 /* Rx early */ 356 #define ISR_RXERR 0x00000004 /* Rx error */ 357 #define ISR_RXDESC 0x00000002 /* Rx descriptor interrupt */ 358 #define ISR_RXOK 0x00000001 /* Rx okay */ 359 360 #define SIP_IMR 0x14 /* interrupt mask register */ 361 /* See bits in SIP_ISR */ 362 363 #define SIP_IER 0x18 /* interrupt enable register */ 364 #define IER_IE 0x00000001 /* master interrupt enable */ 365 366 #ifdef DP83820 367 #define SIP_IHR 0x1c /* interrupt hold-off register */ 368 #define IHR_IHCTL 0x00000100 /* interrupt hold-off control */ 369 #define IHR_IH 0x000000ff /* interrupt hold-off timer (100us) */ 370 #else 371 #define SIP_ENPHY 0x1c /* enhanced PHY access register */ 372 #define ENPHY_PHYDATA 0xffff0000 /* PHY data */ 373 #define ENPHY_DATA_SHIFT 16 374 #define ENPHY_PHYADDR 0x0000f800 /* PHY number (7016 only) */ 375 #define ENPHY_PHYADDR_SHIFT 11 376 #define ENPHY_REGADDR 0x000007c0 /* PHY register */ 377 #define ENPHY_REGADDR_SHIFT 6 378 #define ENPHY_RWCMD 0x00000020 /* 1 == read, 0 == write */ 379 #define ENPHY_ACCESS 0x00000010 /* PHY access enable */ 380 #endif /* DP83820 */ 381 382 #define SIP_TXDP 0x20 /* transmit descriptor pointer reg */ 383 384 #ifdef DP83820 385 #define SIP_TXDP_HI 0x24 /* transmit descriptor pointer (high) reg */ 386 #endif /* DP83820 */ 387 388 #ifdef DP83820 389 #define SIP_TXCFG 0x28 /* transmit configuration register */ 390 #else 391 #define SIP_TXCFG 0x24 /* transmit configuration register */ 392 #endif /* DP83820 */ 393 #define TXCFG_CSI 0x80000000 /* carrier sense ignore */ 394 #define TXCFG_HBI 0x40000000 /* heartbeat ignore */ 395 #define TXCFG_MLB 0x20000000 /* MAC loopback */ 396 #define TXCFG_ATP 0x10000000 /* automatic transmit padding */ 397 #ifdef DP83820 398 #define TXCFG_ECRETRY 0x008000000 /* excessive collision retry enable */ 399 #define TXCFG_MXDMA 0x00700000 /* max DMA burst size */ 400 #define TXCFG_MXDMA_1024 0x00000000 /* 1024 bytes */ 401 #define TXCFG_MXDMA_8 0x00100000 /* 8 bytes */ 402 #define TXCFG_MXDMA_16 0x00200000 /* 16 bytes */ 403 #define TXCFG_MXDMA_32 0x00300000 /* 32 bytes */ 404 #define TXCFG_MXDMA_64 0x00400000 /* 64 bytes */ 405 #define TXCFG_MXDMA_128 0x00500000 /* 128 bytes */ 406 #define TXCFG_MXDMA_256 0x00600000 /* 256 bytes */ 407 #define TXCFG_MXDMA_512 0x00700000 /* 512 bytes */ 408 #define TXCFG_BRST_DIS 0x00080000 /* 1000Mb/s burst disable */ 409 #define TXCFG_FLTH 0x0000ff00 /* Fx fill threshold */ 410 #define TXCFG_FLTH_SHIFT 8 411 #define TXCFG_DRTH 0x000000ff /* Tx drain threshold */ 412 #else 413 #define TXCFG_MXDMA 0x00700000 /* max DMA burst size */ 414 #define TXCFG_MXDMA_512 0x00000000 /* 512 bytes */ 415 #define TXCFG_MXDMA_4 0x00100000 /* 4 bytes */ 416 #define TXCFG_MXDMA_8 0x00200000 /* 8 bytes */ 417 #define TXCFG_MXDMA_16 0x00300000 /* 16 bytes */ 418 #define TXCFG_MXDMA_32 0x00400000 /* 32 bytes */ 419 #define TXCFG_MXDMA_64 0x00500000 /* 64 bytes */ 420 #define TXCFG_MXDMA_128 0x00600000 /* 128 bytes */ 421 #define TXCFG_MXDMA_256 0x00700000 /* 256 bytes */ 422 #define TXCFG_FLTH 0x00003f00 /* Tx fill threshold */ 423 #define TXCFG_FLTH_SHIFT 8 424 #define TXCFG_DRTH 0x0000003f /* Tx drain threshold */ 425 #endif /* DP83820 */ 426 427 #ifdef DP83820 428 #define SIP_GPIOR 0x2c /* general purpose i/o register */ 429 #define GPIOR_GP5_IN 0x00004000 /* GP 5 in */ 430 #define GPIOR_GP4_IN 0x00002000 /* GP 4 in */ 431 #define GPIOR_GP3_IN 0x00001000 /* GP 3 in */ 432 #define GPIOR_GP2_IN 0x00000800 /* GP 2 in */ 433 #define GPIOR_GP1_IN 0x00000400 /* GP 1 in */ 434 #define GPIOR_GP5_OE 0x00000200 /* GP 5 out enable */ 435 #define GPIOR_GP4_OE 0x00000100 /* GP 4 out enable */ 436 #define GPIOR_GP3_OE 0x00000080 /* GP 3 out enable */ 437 #define GPIOR_GP2_OE 0x00000040 /* GP 2 out enable */ 438 #define GPIOR_GP1_OE 0x00000020 /* GP 1 out enable */ 439 #define GPIOR_GP5_OUT 0x00000010 /* GP 5 out */ 440 #define GPIOR_GP4_OUT 0x00000008 /* GP 4 out */ 441 #define GPIOR_GP3_OUT 0x00000004 /* GP 3 out */ 442 #define GPIOR_GP2_OUT 0x00000002 /* GP 2 out */ 443 #define GPIOR_GP1_OUT 0x00000001 /* GP 1 out */ 444 #endif /* DP83820 */ 445 446 #define SIP_RXDP 0x30 /* receive descriptor pointer reg */ 447 448 #ifdef DP83820 449 #define SIP_RXDP_HI 0x34 /* receive descriptor pointer (high) reg */ 450 #endif /* DP83820 */ 451 452 #ifdef DP83820 453 #define SIP_RXCFG 0x38 /* receive configuration register */ 454 #else 455 #define SIP_RXCFG 0x34 /* receive configuration register */ 456 #endif 457 #define RXCFG_AEP 0x80000000 /* accept error packets */ 458 #define RXCFG_ARP 0x40000000 /* accept runt packets */ 459 #ifdef DP83820 460 #define RXCFG_STRIPCRC 0x20000000 /* strip CRC */ 461 #endif /* DP83820 */ 462 #define RXCFG_ATX 0x10000000 /* accept transmit packets */ 463 #define RXCFG_ALP 0x08000000 /* accept long packets */ 464 #ifdef DP83820 465 #define RXCFG_AIRL 0x04000000 /* accept in-range length err packets */ 466 #define RXCFG_MXDMA 0x00700000 /* max DMA burst size */ 467 #define RXCFG_MXDMA_1024 0x00000000 /* 1024 bytes */ 468 #define RXCFG_MXDMA_8 0x00100000 /* 8 bytes */ 469 #define RXCFG_MXDMA_16 0x00200000 /* 16 bytes */ 470 #define RXCFG_MXDMA_32 0x00300000 /* 32 bytes */ 471 #define RXCFG_MXDMA_64 0x00400000 /* 64 bytes */ 472 #define RXCFG_MXDMA_128 0x00500000 /* 128 bytes */ 473 #define RXCFG_MXDMA_256 0x00600000 /* 256 bytes */ 474 #define RXCFG_MXDMA_512 0x00700000 /* 512 bytes */ 475 #else 476 #define RXCFG_MXDMA 0x00700000 /* max DMA burst size */ 477 #define RXCFG_MXDMA_512 0x00000000 /* 512 bytes */ 478 #define RXCFG_MXDMA_4 0x00100000 /* 4 bytes */ 479 #define RXCFG_MXDMA_8 0x00200000 /* 8 bytes */ 480 #define RXCFG_MXDMA_16 0x00300000 /* 16 bytes */ 481 #define RXCFG_MXDMA_32 0x00400000 /* 32 bytes */ 482 #define RXCFG_MXDMA_64 0x00500000 /* 64 bytes */ 483 #define RXCFG_MXDMA_128 0x00600000 /* 128 bytes */ 484 #define RXCFG_MXDMA_256 0x00700000 /* 256 bytes */ 485 #endif /* DP83820 */ 486 #define RXCFG_DRTH 0x0000003e 487 #define RXCFG_DRTH_SHIFT 1 488 489 #ifdef DP83820 490 #define SIP_PQCR 0x3c /* priority queueing control register */ 491 #define PQCR_RXPQ_4 0x0000000c /* 4 Rx queues */ 492 #define PQCR_RXPQ_3 0x00000008 /* 3 Rx queues */ 493 #define PQCR_RXPQ_2 0x00000004 /* 2 Rx queues */ 494 #define PQCR_TXFAIR 0x00000002 /* Tx fairness enable */ 495 #define PQCR_TXPQEN 0x00000001 /* Tx priority queueing enable */ 496 #else 497 #define SIP_FLOWCTL 0x38 /* flow control register */ 498 #define FLOWCTL_PAUSE 0x00000002 /* PAUSE flag */ 499 #define FLOWCTL_FLOWEN 0x00000001 /* enable flow control */ 500 501 #define SIP_NS_CCSR 0x3c /* CLKRUN control/status register (83815) */ 502 #define CCSR_PMESTS 0x00008000 /* PME status */ 503 #define CCSR_PMEEN 0x00000100 /* PME enable */ 504 #define CCSR_CLKRUN_EN 0x00000001 /* clkrun enable */ 505 #endif /* DP83820 */ 506 507 #define SIP_NS_WCSR 0x40 /* WoL control/status register (83815/83820) */ 508 509 #define SIP_NS_PCR 0x44 /* pause control/status reg (83815/83820) */ 510 #define PCR_PSEN 0x80000000 /* pause enable */ 511 #define PCR_PS_MCAST 0x40000000 /* pause on multicast */ 512 #define PCR_PS_DA 0x20000000 /* pause on DA */ 513 #define PCR_PS_ACT 0x10000000 /* pause active */ 514 #define PCR_PS_RCVD 0x08000000 /* pause packet recieved */ 515 #ifdef DP83820 516 #define PCR_PS_STHI_8 0x03000000 /* Status FIFO Hi Threshold (8packets) */ 517 #define PCR_PS_STHI_4 0x02000000 /* Status FIFO Hi Threshold (4packets) */ 518 #define PCR_PS_STHI_2 0x01000000 /* Status FIFO Hi Threshold (2packets) */ 519 #define PCR_PS_STHI_0 0x00000000 /* Status FIFO Hi Threshold (disable) */ 520 #define PCR_PS_STLO_8 0x00c00000 /* Status FIFO Lo Threshold (8packets) */ 521 #define PCR_PS_STLO_4 0x00800000 /* Status FIFO Lo Threshold (4packets) */ 522 #define PCR_PS_STLO_2 0x00400000 /* Status FIFO Lo Threshold (2packets) */ 523 #define PCR_PS_STLO_0 0x00000000 /* Status FIFO Lo Threshold (disable) */ 524 #define PCR_PS_FFHI_8 0x00300000 /* Data FIFO Hi Threshold (8Kbyte) */ 525 #define PCR_PS_FFHI_4 0x00200000 /* Data FIFO Hi Threshold (4Kbyte) */ 526 #define PCR_PS_FFHI_2 0x00100000 /* Data FIFO Hi Threshold (2Kbyte) */ 527 #define PCR_PS_FFHI_0 0x00000000 /* Data FIFO Hi Threshold (disable) */ 528 #define PCR_PS_FFLO_8 0x000c0000 /* Data FIFO Lo Threshold (8Kbyte) */ 529 #define PCR_PS_FFLO_4 0x00080000 /* Data FIFO Lo Threshold (4Kbyte) */ 530 #define PCR_PS_FFLO_2 0x00040000 /* Data FIFO Lo Threshold (2Kbyte) */ 531 #define PCR_PS_FFLO_0 0x00000000 /* Data FIFO Lo Threshold (disable) */ 532 #define PCR_PS_TX 0x00020000 /* Transmit PAUSE frame manually */ 533 #else 534 #define PCR_PSNEG 0x00200000 /* Pause Negoticated (83815) */ 535 #define PCR_MLD_EN 0x00010000 /* Manual Load Enable (83815) */ 536 #endif /* DP83820 */ 537 #define PCR_PAUSE_CNT_MASK 0x0000ffff /* pause count mask */ 538 #define PCR_PAUSE_CNT 65535 /* pause count (512bit-time) */ 539 540 #define SIP_RFCR 0x48 /* receive filter control register */ 541 #define RFCR_RFEN 0x80000000 /* Rx filter enable */ 542 #define RFCR_AAB 0x40000000 /* accept all broadcast */ 543 #define RFCR_AAM 0x20000000 /* accept all multicast */ 544 #define RFCR_AAP 0x10000000 /* accept all physical */ 545 #define RFCR_APM 0x08000000 /* accept perfect match (83815) */ 546 #define RFCR_APAT 0x07800000 /* accept pattern match (83815) */ 547 #define RFCR_AARP 0x00400000 /* accept ARP (83815) */ 548 #define RFCR_MHEN 0x00200000 /* multicast hash enable (83815) */ 549 #define RFCR_UHEN 0x00100000 /* unicast hash enable (83815) */ 550 #define RFCR_ULM 0x00080000 /* U/L bit mask (83815) */ 551 #define RFCR_NS_RFADDR 0x000003ff /* Rx filter ext reg address (83815) */ 552 #define RFCR_RFADDR 0x000f0000 /* Rx filter address */ 553 #define RFCR_RFADDR_NODE0 0x00000000 /* node address 1, 0 */ 554 #define RFCR_RFADDR_NODE2 0x00010000 /* node address 3, 2 */ 555 #define RFCR_RFADDR_NODE4 0x00020000 /* node address 5, 4 */ 556 #define RFCR_RFADDR_MC0 0x00040000 /* multicast hash word 0 */ 557 #define RFCR_RFADDR_MC1 0x00050000 /* multicast hash word 1 */ 558 #define RFCR_RFADDR_MC2 0x00060000 /* multicast hash word 2 */ 559 #define RFCR_RFADDR_MC3 0x00070000 /* multicast hash word 3 */ 560 #define RFCR_RFADDR_MC4 0x00080000 /* multicast hash word 4 */ 561 #define RFCR_RFADDR_MC5 0x00090000 /* multicast hash word 5 */ 562 #define RFCR_RFADDR_MC6 0x000a0000 /* multicast hash word 6 */ 563 #define RFCR_RFADDR_MC7 0x000b0000 /* multicast hash word 7 */ 564 /* For SiS900B and 635/735 only */ 565 #define RFCR_RFADDR_MC8 0x000c0000 /* multicast hash word 8 */ 566 #define RFCR_RFADDR_MC9 0x000d0000 /* multicast hash word 9 */ 567 #define RFCR_RFADDR_MC10 0x000e0000 /* multicast hash word 10 */ 568 #define RFCR_RFADDR_MC11 0x000f0000 /* multicast hash word 11 */ 569 #define RFCR_RFADDR_MC12 0x00100000 /* multicast hash word 12 */ 570 #define RFCR_RFADDR_MC13 0x00110000 /* multicast hash word 13 */ 571 #define RFCR_RFADDR_MC14 0x00120000 /* multicast hash word 14 */ 572 #define RFCR_RFADDR_MC15 0x00130000 /* multicast hash word 15 */ 573 574 #define RFCR_NS_RFADDR_PMATCH0 0x0000 /* perfect match octets 1-0 */ 575 #define RFCR_NS_RFADDR_PMATCH2 0x0002 /* perfect match octets 3-2 */ 576 #define RFCR_NS_RFADDR_PMATCH4 0x0004 /* perfect match octets 5-4 */ 577 #define RFCR_NS_RFADDR_PCOUNT 0x0006 /* pattern count */ 578 #ifdef DP83820 579 #define RFCR_NS_RFADDR_PCOUNT2 0x0008 /* pattern count 2, 3 */ 580 #define RFCR_NS_RFADDR_SOPAS0 0x000a /* SecureOn 0, 1 */ 581 #define RFCR_NS_RFADDR_SOPAS2 0x000c /* SecureOn 2, 3 */ 582 #define RFCR_NS_RFADDR_SOPAS4 0x000e /* SecureOn 4, 5 */ 583 #define RFCR_NS_RFADDR_FILTMEM 0x0100 /* hash memory */ 584 #define RFCR_NS_RFADDR_PATMEM 0x0200 /* pattern memory */ 585 #else 586 #define RFCR_NS_RFADDR_FILTMEM 0x0200 /* filter memory (hash/pattern) */ 587 #endif /* DP83820 */ 588 589 #define SIP_RFDR 0x4c /* receive filter data register */ 590 #define RFDR_BMASK 0x00030000 /* byte mask (83815) */ 591 #define RFDR_DATA 0x0000ffff /* data bits */ 592 593 #define SIP_NS_BRAR 0x50 /* boot rom address (83815) */ 594 #define BRAR_AUTOINC 0x80000000 /* autoincrement */ 595 #define BRAR_ADDR 0x0000ffff /* address */ 596 597 #define SIP_NS_BRDR 0x54 /* boot rom data (83815) */ 598 599 #define SIP_NS_SRR 0x58 /* silicon revision register (83815) */ 600 #ifdef DP83820 601 #define SRR_REV_B 0x00000103 602 #else 603 #define SRR_REV_A 0x00000101 604 #define SRR_REV_B_1 0x00000200 605 #define SRR_REV_B_2 0x00000201 606 #define SRR_REV_B_3 0x00000203 607 #define SRR_REV_C_1 0x00000300 608 #define SRR_REV_C_2 0x00000302 609 #endif /* DP83820 */ 610 611 #define SIP_NS_MIBC 0x5c /* mib control register (83815) */ 612 #define MIBC_MIBS 0x00000008 /* mib counter strobe */ 613 #define MIBC_ACLR 0x00000004 /* clear all counters */ 614 #define MIBC_FRZ 0x00000002 /* freeze all counters */ 615 #define MIBC_WRN 0x00000001 /* warning test indicator */ 616 617 #define SIP_NS_MIB(mibreg) /* mib data registers (83815) */ \ 618 (0x60 + (mibreg)) 619 #define MIB_RXErroredPkts 0x00 620 #define MIB_RXFCSErrors 0x04 621 #define MIB_RXMsdPktErrors 0x08 622 #define MIB_RXFAErrors 0x0c 623 #define MIB_RXSymbolErrors 0x10 624 #define MIB_RXFrameTooLong 0x14 625 #ifdef DP83820 626 #define MIB_RXIRLErrors 0x18 627 #define MIB_RXBadOpcodes 0x1c 628 #define MIB_RXPauseFrames 0x20 629 #define MIB_TXPauseFrames 0x24 630 #define MIB_TXSQEErrors 0x28 631 #else 632 #define MIB_RXTXSQEErrors 0x18 633 #endif /* DP83820 */ 634 635 #ifndef DP83820 636 #define SIP_NS_PHY(miireg) /* PHY registers (83815) */ \ 637 (0x80 + ((miireg) << 2)) 638 #endif 639 640 #ifdef DP83820 641 #define SIP_TXDP1 0xa0 /* transmit descriptor pointer (pri 1) */ 642 643 #define SIP_TXDP2 0xa4 /* transmit descriptor pointer (pri 2) */ 644 645 #define SIP_TXDP3 0xa8 /* transmit descriptor pointer (pri 3) */ 646 647 #define SIP_RXDP1 0xb0 /* receive descriptor pointer (pri 1) */ 648 649 #define SIP_RXDP2 0xb4 /* receive descriptor pointer (pri 2) */ 650 651 #define SIP_RXDP3 0xb8 /* receive descriptor pointer (pri 3) */ 652 653 #define SIP_VRCR 0xbc /* VLAN/IP receive control register */ 654 #define VRCR_RUDPE 0x00000080 /* reject UDP checksum errors */ 655 #define VRCR_RTCPE 0x00000040 /* reject TCP checksum errors */ 656 #define VRCR_RIPE 0x00000020 /* reject IP checksum errors */ 657 #define VRCR_IPEN 0x00000010 /* IP checksum enable */ 658 #define VRCR_DUTF 0x00000008 /* discard untagged frames */ 659 #define VRCR_DVTF 0x00000004 /* discard VLAN tagged frames */ 660 #define VRCR_VTREN 0x00000002 /* VLAN tag removal enable */ 661 #define VRCR_VTDEN 0x00000001 /* VLAN tag detection enable */ 662 663 #define SIP_VTCR 0xc0 /* VLAN/IP transmit control register */ 664 #define VTCR_PPCHK 0x00000008 /* per-packet checksum generation */ 665 #define VTCR_GCHK 0x00000004 /* global checksum generation */ 666 #define VTCR_VPPTI 0x00000002 /* VLAN per-packet tag insertion */ 667 #define VTCR_VGTI 0x00000001 /* VLAN global tag insertion */ 668 669 #define SIP_VDR 0xc4 /* VLAN data register */ 670 #define VDR_VTCI 0xffff0000 /* VLAN tag control information */ 671 #define VDR_VTYPE 0x0000ffff /* VLAN type field */ 672 673 #define SIP_NS_CCSR 0xcc /* CLKRUN control/status register (83815) */ 674 #define CCSR_PMESTS 0x00008000 /* PME status */ 675 #define CCSR_PMEEN 0x00000100 /* PME enable */ 676 #define CCSR_CLKRUN_EN 0x00000001 /* clkrun enable */ 677 678 #define SIP_TBICR 0xe0 /* TBI control register */ 679 #define TBICR_MR_LOOPBACK 0x00004000 /* TBI PCS loopback enable */ 680 #define TBICR_MR_AN_ENABLE 0x00001000 /* TBI autonegotiation enable */ 681 #define TBICR_MR_RESTART_AN 0x00000200 /* restart TBI autoneogtiation */ 682 683 #define SIP_TBISR 0xe4 /* TBI status register */ 684 #define TBISR_MR_LINK_STATUS 0x00000020 /* TBI link status */ 685 #define TBISR_MR_AN_COMPLETE 0x00000004 /* TBI autonegotiation complete */ 686 687 #define SIP_TANAR 0xe8 /* TBI autoneg adv. register */ 688 #define TANAR_NP 0x00008000 /* next page exchange required */ 689 #define TANAR_RF2 0x00002000 /* remote fault 2 */ 690 #define TANAR_RF1 0x00001000 /* remote fault 1 */ 691 #define TANAR_PS2 0x00000100 /* pause encoding 2 */ 692 #define TANAR_PS1 0x00000080 /* pause encoding 1 */ 693 #define TANAR_HALF_DUP 0x00000040 /* adv. half duplex */ 694 #define TANAR_FULL_DUP 0x00000020 /* adv. full duplex */ 695 696 #define SIP_TANLPAR 0xec /* TBI autoneg link partner ability register */ 697 /* See TANAR bits */ 698 699 #define SIP_TANER 0xf0 /* TBI autoneg expansion register */ 700 #define TANER_NPA 0x00000004 /* we support next page function */ 701 #define TANER_PR 0x00000002 /* page received from link partner */ 702 703 #define SIP_TESR 0xf4 /* TBI extended status register */ 704 #define TESR_1000FDX 0x00008000 /* we support 1000base FDX */ 705 #define TESR_1000HDX 0x00004000 /* we support 1000base HDX */ 706 #else 707 #define SIP_PMCTL 0xb0 /* power management control register */ 708 #define PMCTL_GATECLK 0x80000000 /* gate dual clock enable */ 709 #define PMCTL_WAKEALL 0x40000000 /* wake on all Rx OK */ 710 #define PMCTL_FRM3ACS 0x04000000 /* 3rd wake-up frame access */ 711 #define PMCTL_FRM2ACS 0x02000000 /* 2nd wake-up frame access */ 712 #define PMCTL_FRM1ACS 0x01000000 /* 1st wake-up frame access */ 713 #define PMCTL_FRM3EN 0x00400000 /* 3rd wake-up frame match enable */ 714 #define PMCTL_FRM2EN 0x00200000 /* 2nd wake-up frame match enable */ 715 #define PMCTL_FRM1EN 0x00100000 /* 1st wake-up frame match enable */ 716 #define PMCTL_ALGORITHM 0x00000800 /* Magic Packet match algorithm */ 717 #define PMCTL_MAGICPKT 0x00000400 /* Magic Packet match enable */ 718 #define PMCTL_LINKON 0x00000002 /* link on monitor enable */ 719 #define PMCTL_LINKLOSS 0x00000001 /* link loss monitor enable */ 720 721 #define SIP_PMEVT 0xb4 /* power management wake-up evnt reg */ 722 #define PMEVT_ALLFRMMAT 0x40000000 /* receive packet ok */ 723 #define PMEVT_FRM3MAT 0x04000000 /* match 3rd wake-up frame */ 724 #define PMEVT_FRM2MAT 0x02000000 /* match 2nd wake-up frame */ 725 #define PMEVT_FRM1MAT 0x01000000 /* match 1st wake-up frame */ 726 #define PMEVT_MAGICPKT 0x00000400 /* Magic Packet */ 727 #define PMEVT_ONEVT 0x00000002 /* link on event */ 728 #define PMEVT_LOSSEVT 0x00000001 /* link loss event */ 729 730 #define SIP_WAKECRC 0xbc /* wake-up frame CRC register */ 731 732 #define SIP_WAKEMASK0 0xc0 /* wake-up frame mask registers */ 733 #define SIP_WAKEMASK1 0xc4 734 #define SIP_WAKEMASK2 0xc8 735 #define SIP_WAKEMASK3 0xcc 736 #define SIP_WAKEMASK4 0xe0 737 #define SIP_WAKEMASK5 0xe4 738 #define SIP_WAKEMASK6 0xe8 739 #define SIP_WAKEMASK7 0xec 740 #endif /* DP83820 */ 741 742 /* 743 * Revision codes for the SiS 630 chipset built-in Ethernet. 744 */ 745 #define SIS_REV_900B 0x03 746 #define SIS_REV_630E 0x81 747 #define SIS_REV_630S 0x82 748 #define SIS_REV_630EA1 0x83 749 #define SIS_REV_630ET 0x84 750 #define SIS_REV_635 0x90 /* same for 735 (745?) */ 751 #define SIS_REV_960 0x91 752 753 /* 754 * MII operations for recent SiS chipsets 755 */ 756 #define SIS_MII_STARTDELIM 0x01 757 #define SIS_MII_READOP 0x02 758 #define SIS_MII_WRITEOP 0x01 759 #define SIS_MII_TURNAROUND 0x02 760 761 /* 762 * Serial EEPROM opcodes, including the start bit. 763 */ 764 #define SIP_EEPROM_OPC_ERASE 0x04 765 #define SIP_EEPROM_OPC_WRITE 0x05 766 #define SIP_EEPROM_OPC_READ 0x06 767 768 /* 769 * Serial EEPROM address map (byte address) for the SiS900. 770 */ 771 #define SIP_EEPROM_SIGNATURE 0x00 /* SiS 900 signature */ 772 #define SIP_EEPROM_MASK 0x02 /* `enable' mask */ 773 #define SIP_EEPROM_VENDOR_ID 0x04 /* PCI vendor ID */ 774 #define SIP_EEPROM_DEVICE_ID 0x06 /* PCI device ID */ 775 #define SIP_EEPROM_SUBVENDOR_ID 0x08 /* PCI subvendor ID */ 776 #define SIP_EEPROM_SUBSYSTEM_ID 0x0a /* PCI subsystem ID */ 777 #define SIP_EEPROM_PMC 0x0c /* PCI power management capabilities */ 778 #define SIP_EEPROM_reserved 0x0e /* reserved */ 779 #define SIP_EEPROM_ETHERNET_ID0 0x10 /* Ethernet address 0, 1 */ 780 #define SIP_EEPROM_ETHERNET_ID1 0x12 /* Ethernet address 2, 3 */ 781 #define SIP_EEPROM_ETHERNET_ID2 0x14 /* Ethernet address 4, 5 */ 782 #define SIP_EEPROM_CHECKSUM 0x16 /* checksum */ 783 784 /* 785 * Serial EEPROM data (byte addresses) for the DP83815. 786 */ 787 #define SIP_DP83815_EEPROM_CHECKSUM 0x16 /* checksum */ 788 #define SIP_DP83815_EEPROM_LENGTH 0x18 /* length of EEPROM data */ 789 790 /* 791 * Serial EEPROM data (byte addresses) for the DP83820. 792 */ 793 #define SIP_DP83820_EEPROM_SUBSYSTEM_ID 0x00 /* PCI subsystem ID */ 794 #define SIP_DP83820_EEPROM_SUBVENDOR_ID 0x02 /* PCI subvendor ID */ 795 #define SIP_DP83820_EEPROM_CFGINT 0x04 /* PCI INT [31:16] */ 796 #define SIP_DP83820_EEPROM_CONFIG0 0x06 /* configuration word 0 */ 797 #define SIP_DP83820_EEPROM_CONFIG1 0x08 /* configuration word 1 */ 798 #define SIP_DP83820_EEPROM_CONFIG2 0x0a /* configuration word 2 */ 799 #define SIP_DP83820_EEPROM_CONFIG3 0x0c /* configuration word 3 */ 800 #define SIP_DP83820_EEPROM_SOPAS0 0x0e /* SecureOn [47:32] */ 801 #define SIP_DP83820_EEPROM_SOPAS1 0x10 /* SecureOn [31:16] */ 802 #define SIP_DP83820_EEPROM_SOPAS2 0x12 /* SecureOn [15:0] */ 803 #define SIP_DP83820_EEPROM_PMATCH0 0x14 /* MAC [47:32] */ 804 #define SIP_DP83820_EEPROM_PMATCH1 0x16 /* MAC [31:16] */ 805 #define SIP_DP83820_EEPROM_PMATCH2 0x18 /* MAC [15:0] */ 806 #define SIP_DP83820_EEPROM_CHECKSUM 0x1a /* checksum */ 807 #define SIP_DP83820_EEPROM_LENGTH 0x1c /* length of EEPROM data */ 808 809 #define DP83820_CONFIG2_CFG_EXT_125 (1U << 0) 810 #define DP83820_CONFIG2_CFG_M64ADDR (1U << 1) 811 #define DP83820_CONFIG2_CFG_DATA64_EN (1U << 2) 812 #define DP83820_CONFIG2_CFG_T64ADDR (1U << 3) 813 #define DP83820_CONFIG2_CFG_MWI_DIS (1U << 4) 814 #define DP83820_CONFIG2_CFG_MRM_DIS (1U << 5) 815 #define DP83820_CONFIG2_CFG_MODE_1000 (1U << 7) 816 #define DP83820_CONFIG2_CFG_TBI_EN (1U << 9) 817 818 #endif /* _DEV_PCI_IF_SIPREG_H_ */ 819