if_fereg.h revision 50477
18027Swollman/* 214645Sjkh * Hardware specification of various 8696x based Ethernet cards. 314645Sjkh * Contributed by M. Sekiguchi <seki@sysrap.cs.fujitsu.co.jp> 414645Sjkh * 58027Swollman * All Rights Reserved, Copyright (C) Fujitsu Limited 1995 68027Swollman * 78027Swollman * This software may be used, modified, copied, distributed, and sold, 88027Swollman * in both source and binary form provided that the above copyright, 98027Swollman * these terms and the following disclaimer are retained. The name of 108027Swollman * the author and/or the contributor may not be used to endorse or 118027Swollman * promote products derived from this software without specific prior 128027Swollman * written permission. 138027Swollman * 148027Swollman * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND THE CONTRIBUTOR ``AS IS'' AND 158027Swollman * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 168027Swollman * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 178027Swollman * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTOR BE LIABLE 188027Swollman * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 198027Swollman * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 208027Swollman * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 218027Swollman * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 228027Swollman * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 238027Swollman * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 248027Swollman * SUCH DAMAGE. 258027Swollman */ 268027Swollman 2750477Speter/* $FreeBSD: head/sys/dev/fe/if_fereg.h 50477 1999-08-28 01:08:13Z peter $ */ 288027Swollman 298027Swollman/* 308027Swollman * Registers on FMV-180 series' ISA bus interface ASIC. 318027Swollman * I'm not sure the following register names are appropriate. 328027Swollman * Doesn't it look silly, eh? FIXME. 338027Swollman */ 348027Swollman 3514645Sjkh#define FE_FMV0 16 /* Card status register #0 */ 3614645Sjkh#define FE_FMV1 17 /* Card status register #1 */ 3714645Sjkh#define FE_FMV2 18 /* Card config register #0 */ 3814645Sjkh#define FE_FMV3 19 /* Card config register #1 */ 398027Swollman#define FE_FMV4 20 /* Station address #1 */ 408027Swollman#define FE_FMV5 21 /* Station address #2 */ 418027Swollman#define FE_FMV6 22 /* Station address #3 */ 428027Swollman#define FE_FMV7 23 /* Station address #4 */ 438027Swollman#define FE_FMV8 24 /* Station address #5 */ 448027Swollman#define FE_FMV9 25 /* Station address #6 */ 4514645Sjkh#define FE_FMV10 26 /* Buffer RAM control register */ 4614645Sjkh#define FE_FMV11 27 /* Buffer RAM data register */ 478027Swollman 488027Swollman/* 498027Swollman * FMV-180 series' ASIC register values. 508027Swollman */ 518027Swollman 5214645Sjkh/* FMV0: Card status register #0: Misc info? */ 5314645Sjkh#define FE_FMV0_MEDIA 0x07 /* Supported physical media. */ 5414645Sjkh#define FE_FMV0_PRRDY 0x10 /* ??? */ 5514645Sjkh#define FE_FMV0_PRERR 0x20 /* ??? */ 5614645Sjkh#define FE_FMV0_ERRDY 0x40 /* ??? */ 5714645Sjkh#define FE_FMV0_IREQ 0x80 /* ??? */ 588027Swollman 5914645Sjkh#define FE_FMV0_MEDIUM_5 0x01 /* 10base5/Dsub */ 6014645Sjkh#define FE_FMV0_MEDIUM_2 0x02 /* 10base2/BNC */ 6114645Sjkh#define FE_FMV0_MEDIUM_T 0x04 /* 10baseT/RJ45 */ 628027Swollman 6314645Sjkh/* Card status register #1: Hardware revision. */ 6414645Sjkh#define FE_FMV1_REV 0x0F /* Card revision */ 6514645Sjkh#define FE_FMV1_UPPER 0xF0 /* Usage unknown */ 668027Swollman 6714645Sjkh/* Card config register #0: I/O port address assignment. */ 6814645Sjkh#define FE_FMV2_IOS 0x07 /* I/O selection. */ 6914645Sjkh#define FE_FMV2_MES 0x38 /* ??? boot ROM? */ 7014645Sjkh#define FE_FMV2_IRS 0xC0 /* IRQ selection. */ 718027Swollman 7214645Sjkh#define FE_FMV2_IOS_SHIFT 0 7314645Sjkh#define FE_FMV2_MES_SHIFT 3 7414645Sjkh#define FE_FMV2_IRS_SHIFT 6 758027Swollman 7614645Sjkh/* Card config register #1: IRQ enable */ 7714645Sjkh#define FE_FMV3_IRQENB 0x80 /* IRQ enable. */ 788027Swollman 798027Swollman/* 8014645Sjkh * Register(?) specific to AT1700/RE2000. 818027Swollman */ 828027Swollman 8314645Sjkh#define FE_ATI_RESET 0x1F /* Write to reset the 86965. */ 848027Swollman 8514645Sjkh/* EEPROM allocation (offsets) of AT1700/RE2000. */ 8614645Sjkh#define FE_ATI_EEP_ADDR 0x08 /* Station address. (8-13) */ 8714645Sjkh#define FE_ATI_EEP_MEDIA 0x18 /* Media type. */ 8814645Sjkh#define FE_ATI_EEP_MAGIC 0x19 /* XXX Magic. */ 8914645Sjkh#define FE_ATI_EEP_MODEL 0x1e /* Hardware type. */ 9014645Sjkh#define FE_ATI_EEP_REVISION 0x1f /* Hardware revision. */ 9114645Sjkh 9214645Sjkh/* Value for FE_ATI_EEP_MODEL. */ 9314645Sjkh#define FE_ATI_MODEL_AT1700T 0x00 9414645Sjkh#define FE_ATI_MODEL_AT1700BT 0x01 9514645Sjkh#define FE_ATI_MODEL_AT1700FT 0x02 9614645Sjkh#define FE_ATI_MODEL_AT1700AT 0x03 9714645Sjkh 988027Swollman/* 998027Swollman * Registers on MBH10302. 1008027Swollman */ 1018027Swollman 1028027Swollman#define FE_MBH0 0x10 /* ??? Including interrupt. */ 1038027Swollman#define FE_MBH1 0x11 /* ??? */ 1048027Swollman#define FE_MBH10 0x1A /* Station address. (10 - 15) */ 1058027Swollman 1068027Swollman/* Values to be set in MBH0 register. */ 1078027Swollman#define FE_MBH0_MAGIC 0x0D /* Just a magic constant? */ 1088027Swollman#define FE_MBH0_INTR 0x10 /* Master interrupt control. */ 1098027Swollman 1108027Swollman#define FE_MBH0_INTR_ENABLE 0x10 /* Enable interrupts. */ 1118027Swollman#define FE_MBH0_INTR_DISABLE 0x00 /* Disable interrupts. */ 11214645Sjkh 11314645Sjkh/* 11414645Sjkh * Registers on RE1000. (*NOT* on RE1000 Plus.) 11514645Sjkh */ 11614645Sjkh 11714645Sjkh/* IRQ configuration. */ 11814645Sjkh#define FE_RE1000_IRQCONF 0x10 119