ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/src/trunk/sys/dev/fe/if_fereg.h
Revision: 10107
Committed: Sun May 27 23:50:56 2018 UTC (5 years, 11 months ago) by laffer1
Content type: text/plain
File size: 5805 byte(s)
Log Message:
 sync with freebsd

File Contents

# Content
1 /* $MidnightBSD$ */
2 /*-
3 * Hardware specification of various 8696x based Ethernet cards.
4 * Contributed by M. Sekiguchi <seki@sysrap.cs.fujitsu.co.jp>
5 *
6 * All Rights Reserved, Copyright (C) Fujitsu Limited 1995
7 *
8 * This software may be used, modified, copied, distributed, and sold,
9 * in both source and binary form provided that the above copyright,
10 * these terms and the following disclaimer are retained. The name of
11 * the author and/or the contributor may not be used to endorse or
12 * promote products derived from this software without specific prior
13 * written permission.
14 *
15 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND THE CONTRIBUTOR ``AS IS'' AND
16 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
18 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR THE CONTRIBUTOR BE LIABLE
19 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
21 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
22 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
23 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
24 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
25 * SUCH DAMAGE.
26 */
27
28 /* $FreeBSD: stable/10/sys/dev/fe/if_fereg.h 142135 2005-02-20 19:33:13Z imp $ */
29
30 /*
31 * Registers on FMV-180 series' ISA bus interface ASIC.
32 * I'm not sure the following register names are appropriate.
33 * Doesn't it look silly, eh? FIXME.
34 */
35
36 #define FE_FMV0 16 /* Card status register #0 */
37 #define FE_FMV1 17 /* Card status register #1 */
38 #define FE_FMV2 18 /* Card config register #0 */
39 #define FE_FMV3 19 /* Card config register #1 */
40 #define FE_FMV4 20 /* Station address #1 */
41 #define FE_FMV5 21 /* Station address #2 */
42 #define FE_FMV6 22 /* Station address #3 */
43 #define FE_FMV7 23 /* Station address #4 */
44 #define FE_FMV8 24 /* Station address #5 */
45 #define FE_FMV9 25 /* Station address #6 */
46 #define FE_FMV10 26 /* Buffer RAM control register */
47 #define FE_FMV11 27 /* Buffer RAM data register */
48
49 /*
50 * FMV-180 series' ASIC register values.
51 */
52
53 /* FMV0: Card status register #0: Misc info? */
54 #define FE_FMV0_MEDIA 0x07 /* Supported physical media. */
55 #define FE_FMV0_PRRDY 0x10 /* ??? */
56 #define FE_FMV0_PRERR 0x20 /* ??? */
57 #define FE_FMV0_ERRDY 0x40 /* ??? */
58 #define FE_FMV0_IREQ 0x80 /* ??? */
59
60 #define FE_FMV0_MEDIUM_5 0x01 /* 10base5/Dsub */
61 #define FE_FMV0_MEDIUM_2 0x02 /* 10base2/BNC */
62 #define FE_FMV0_MEDIUM_T 0x04 /* 10baseT/RJ45 */
63
64 /* Card status register #1: Hardware revision. */
65 #define FE_FMV1_REV 0x0F /* Card revision */
66 #define FE_FMV1_UPPER 0xF0 /* Usage unknown */
67
68 /* Card config register #0: I/O port address assignment. */
69 #define FE_FMV2_IOS 0x07 /* I/O selection. */
70 #define FE_FMV2_MES 0x38 /* ??? boot ROM? */
71 #define FE_FMV2_IRS 0xC0 /* IRQ selection. */
72
73 #define FE_FMV2_IOS_SHIFT 0
74 #define FE_FMV2_MES_SHIFT 3
75 #define FE_FMV2_IRS_SHIFT 6
76
77 /* Card config register #1: IRQ enable */
78 #define FE_FMV3_IRQENB 0x80 /* IRQ enable. */
79
80
81 /*
82 * Register(?) specific to AT1700/RE2000.
83 */
84
85 #define FE_ATI_RESET 0x1F /* Write to reset the 86965. */
86
87 /* EEPROM allocation (offsets) of AT1700/RE2000. */
88 #define FE_ATI_EEP_ADDR 0x08 /* Station address. (8-13) */
89 #define FE_ATI_EEP_MEDIA 0x18 /* Media type. */
90 #define FE_ATI_EEP_MAGIC 0x19 /* XXX Magic. */
91 #define FE_ATI_EEP_MODEL 0x1e /* Hardware type. */
92 #define FE_ATI_EEP_REVISION 0x1f /* Hardware revision. */
93
94 /* Value for FE_ATI_EEP_MODEL. */
95 #define FE_ATI_MODEL_AT1700T 0x00
96 #define FE_ATI_MODEL_AT1700BT 0x01
97 #define FE_ATI_MODEL_AT1700FT 0x02
98 #define FE_ATI_MODEL_AT1700AT 0x03
99
100
101 /*
102 * Registers on MBH10302.
103 */
104
105 #define FE_MBH0 0x10 /* ??? Including interrupt. */
106 #define FE_MBH1 0x11 /* ??? */
107 #define FE_MBH10 0x1A /* Station address. (10 - 15) */
108
109 /* Values to be set in MBH0 register. */
110 #define FE_MBH0_MAGIC 0x0D /* Just a magic constant? */
111 #define FE_MBH0_INTR 0x10 /* Master interrupt control. */
112
113 #define FE_MBH0_INTR_ENABLE 0x10 /* Enable interrupts. */
114 #define FE_MBH0_INTR_DISABLE 0x00 /* Disable interrupts. */
115
116
117 /*
118 * Registers on RE1000. (*NOT* on RE1000 Plus.)
119 */
120
121 /* IRQ configuration. */
122 #define FE_RE1000_IRQCONF 0x10
123
124
125 /*
126 * Fujitsu MB86965 JLI mode support routines.
127 */
128
129 /* Datasheet for 86965 explicitly states that it only supports serial
130 * EEPROM with 16 words (32 bytes) capacity. (I.e., 93C06.) However,
131 * ones with 64 words (128 bytes) are available in the marked, namely
132 * 93C46, and are also fully compatible with 86965. It is known that
133 * some boards (e.g., ICL) actually have 93C46 on them and use extra
134 * storage to keep various config info. */
135 #define JLI_EEPROM_SIZE 128
136
137
138 /*
139 * SSi 78Q8377A support routines.
140 */
141 #define SSI_EEPROM_SIZE 512
142 #define SSI_DIN 0x01
143 #define SSI_DAT 0x01
144 #define SSI_CSL 0x02
145 #define SSI_CLK 0x04
146 #define SSI_EEP 0x10
147
148 #define FE_SSI_EEP_IRQ 9 /* Irq ??? */
149 #define FE_SSI_EEP_ADDR 16 /* Station(MAC) address */
150 #define FE_SSI_EEP_DUPLEX 25 /* Duplex mode ??? */
151
152
153 /*
154 * TDK/LANX boards support routines.
155 */
156
157 /* AX012/AX013 equips an X24C01 chip, which has 128 bytes of memory cells. */
158 #define LNX_EEPROM_SIZE 128
159
160 /* Bit assignments and command definitions for the serial EEPROM
161 interface register in LANX ASIC. */
162 #define LNX_SDA_HI 0x08 /* Drive SDA line high (logical 1.) */
163 #define LNX_SDA_LO 0x00 /* Drive SDA line low (logical 0.) */
164 #define LNX_SDA_FL 0x08 /* Float (don't drive) SDA line. */
165 #define LNX_SDA_IN 0x01 /* Mask for reading SDA line. */
166 #define LNX_CLK_HI 0x04 /* Drive clock line high (active.) */
167 #define LNX_CLK_LO 0x00 /* Drive clock line low (inactive.) */

Properties

Name Value
svn:keywords MidnightBSD=%H