modules: correct dependencies / version declarations
[dragonfly.git] / sys / dev / netif / mii_layer / lxtphyreg.h
blob206efa7f7e9f29cb9185a92c6c807268b308b20b
1 /* OpenBSD: lxtphyreg.h,v 1.1 1998/11/11 19:34:47 jason Exp */
2 /* NetBSD: lxtphyreg.h,v 1.1 1998/10/24 00:33:17 thorpej Exp */
3 /* $FreeBSD: src/sys/dev/mii/lxtphyreg.h,v 1.1.2.1 2001/06/08 19:58:33 semenu Exp $ */
4 /* $DragonFly: src/sys/dev/netif/mii_layer/lxtphyreg.h,v 1.2 2003/06/17 04:28:28 dillon Exp $ */
6 /*-
7 * Copyright (c) 1998 The NetBSD Foundation, Inc.
8 * All rights reserved.
10 * This code is derived from software contributed to The NetBSD Foundation
11 * by Jason R. Thorpe of the Numerical Aerospace Simulation Facility,
12 * NASA Ames Research Center.
14 * Redistribution and use in source and binary forms, with or without
15 * modification, are permitted provided that the following conditions
16 * are met:
17 * 1. Redistributions of source code must retain the above copyright
18 * notice, this list of conditions and the following disclaimer.
19 * 2. Redistributions in binary form must reproduce the above copyright
20 * notice, this list of conditions and the following disclaimer in the
21 * documentation and/or other materials provided with the distribution.
22 * 3. All advertising materials mentioning features or use of this software
23 * must display the following acknowledgement:
24 * This product includes software developed by the NetBSD
25 * Foundation, Inc. and its contributors.
26 * 4. Neither the name of The NetBSD Foundation nor the names of its
27 * contributors may be used to endorse or promote products derived
28 * from this software without specific prior written permission.
30 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
31 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
32 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
33 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
34 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
35 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
36 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
37 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
38 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
39 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
40 * POSSIBILITY OF SUCH DAMAGE.
43 #ifndef _DEV_MII_LXTPHYREG_H_
44 #define _DEV_MII_LXTPHYREG_H_
47 * LXT970 registers.
50 #define MII_LXTPHY_MIRROR 0x10 /* Mirror register */
51 /* All bits user-defined */
53 #define MII_LXTPHY_IER 0x11 /* Interrupt Enable Register */
54 #define IER_MIIDRVLVL 0x0008 /* Rediced MII driver levels */
55 #define IER_LNK_CRITERIA 0x0004 /* Enhanced Link Loss Criteria */
56 #define IER_INTEN 0x0002 /* Interrupt Enable */
57 #define IER_TINT 0x0001 /* Force Interrupt */
59 #define MII_LXTPHY_ISR 0x12 /* Interrupt Status Register */
60 #define ISR_MINT 0x8000 /* MII Interrupt Pending */
61 #define ISR_XTALOK 0x4000 /* Clocks OK */
63 #define MII_LXTPHY_CONFIG 0x13 /* Configuration Register */
64 #define CONFIG_TXMIT_TEST 0x4000 /* 100base-T Transmit Test */
65 #define CONFIG_REPEATER 0x2000 /* Repeater Mode */
66 #define CONFIG_MDIO_INT 0x1000 /* Enable intr signalling on MDIO */
67 #define CONFIG_TPLOOP 0x0800 /* Disable 10base-T Loopback */
68 #define CONFIG_SQE 0x0400 /* Enable SQE */
69 #define CONFIG_DISJABBER 0x0200 /* Disable Jabber */
70 #define CONFIG_DISLINKTEST 0x0100 /* Disable Link Test */
71 #define CONFIG_LEDC1 0x0080 /* LEDC configuration */
72 #define CONFIG_LEDC0 0x0040 /* ... */
73 /* 0 0 LEDC indicates collision */
74 /* 0 1 LEDC is off */
75 /* 1 0 LEDC indicates activity */
76 /* 1 1 LEDC is on */
77 #define CONFIG_ADVTXCLK 0x0020 /* Advance TX clock */
78 #define CONFIG_5BSYMBOL 0x0010 /* 5-bit Symbol mode */
79 #define CONFIG_SCRAMBLER 0x0008 /* Bypass scrambler */
80 #define CONFIG_100BASEFX 0x0004 /* 100base-FX */
81 #define CONFIG_TXDISCON 0x0001 /* Disconnect TP transmitter */
83 #define MII_LXTPHY_CSR 0x14 /* Chip Status Register */
84 #define CSR_LINK 0x2000 /* Link is up */
85 #define CSR_DUPLEX 0x1000 /* Full-duplex */
86 #define CSR_SPEED 0x0800 /* 100Mbps */
87 #define CSR_ACOMP 0x0400 /* Autonegotiation complete */
88 #define CSR_PAGERCVD 0x0200 /* Link page received */
89 #define CSR_LOWVCC 0x0004 /* Low Voltage Fault */
91 #endif /* _DEV_MII_LXTPHYREG_H_ */