lxtphyreg.h revision 1.1.146.1 1 1.1.146.1 yamt /* $NetBSD: lxtphyreg.h,v 1.1.146.1 2008/05/18 12:34:13 yamt 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 *
20 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21 1.1 thorpej * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22 1.1 thorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 1.1 thorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24 1.1 thorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25 1.1 thorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26 1.1 thorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27 1.1 thorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28 1.1 thorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29 1.1 thorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30 1.1 thorpej * POSSIBILITY OF SUCH DAMAGE.
31 1.1 thorpej */
32 1.1 thorpej
33 1.1 thorpej #ifndef _DEV_MII_LXTPHYREG_H_
34 1.1 thorpej #define _DEV_MII_LXTPHYREG_H_
35 1.1 thorpej
36 1.1 thorpej /*
37 1.1 thorpej * LXT970 registers.
38 1.1 thorpej */
39 1.1 thorpej
40 1.1 thorpej #define MII_LXTPHY_MIRROR 0x10 /* Mirror register */
41 1.1 thorpej /* All bits user-defined */
42 1.1 thorpej
43 1.1 thorpej #define MII_LXTPHY_IER 0x11 /* Interrupt Enable Register */
44 1.1 thorpej #define IER_MIIDRVLVL 0x0008 /* Rediced MII driver levels */
45 1.1 thorpej #define IER_LNK_CRITERIA 0x0004 /* Enhanced Link Loss Criteria */
46 1.1 thorpej #define IER_INTEN 0x0002 /* Interrupt Enable */
47 1.1 thorpej #define IER_TINT 0x0001 /* Force Interrupt */
48 1.1 thorpej
49 1.1 thorpej #define MII_LXTPHY_ISR 0x12 /* Interrupt Status Register */
50 1.1 thorpej #define ISR_MINT 0x8000 /* MII Interrupt Pending */
51 1.1 thorpej #define ISR_XTALOK 0x4000 /* Clocks OK */
52 1.1 thorpej
53 1.1 thorpej #define MII_LXTPHY_CONFIG 0x13 /* Configuration Register */
54 1.1 thorpej #define CONFIG_TXMIT_TEST 0x4000 /* 100base-T Transmit Test */
55 1.1 thorpej #define CONFIG_REPEATER 0x2000 /* Repeater Mode */
56 1.1 thorpej #define CONFIG_MDIO_INT 0x1000 /* Enable intr signalling on MDIO */
57 1.1 thorpej #define CONFIG_TPLOOP 0x0800 /* Disable 10base-T Loopback */
58 1.1 thorpej #define CONFIG_SQE 0x0400 /* Enable SQE */
59 1.1 thorpej #define CONFIG_DISJABBER 0x0200 /* Disable Jabber */
60 1.1 thorpej #define CONFIG_DISLINKTEST 0x0100 /* Disable Link Test */
61 1.1 thorpej #define CONFIG_LEDC1 0x0080 /* LEDC configuration */
62 1.1 thorpej #define CONFIG_LEDC0 0x0040 /* ... */
63 1.1 thorpej /* 0 0 LEDC indicates collision */
64 1.1 thorpej /* 0 1 LEDC is off */
65 1.1 thorpej /* 1 0 LEDC indicates activity */
66 1.1 thorpej /* 1 1 LEDC is on */
67 1.1 thorpej #define CONFIG_ADVTXCLK 0x0020 /* Advance TX clock */
68 1.1 thorpej #define CONFIG_5BSYMBOL 0x0010 /* 5-bit Symbol mode */
69 1.1 thorpej #define CONFIG_SCRAMBLER 0x0008 /* Bypass scrambler */
70 1.1 thorpej #define CONFIG_100BASEFX 0x0004 /* 100base-FX */
71 1.1 thorpej #define CONFIG_TXDISCON 0x0001 /* Disconnect TP transmitter */
72 1.1 thorpej
73 1.1 thorpej #define MII_LXTPHY_CSR 0x14 /* Chip Status Register */
74 1.1 thorpej #define CSR_LINK 0x2000 /* Link is up */
75 1.1 thorpej #define CSR_DUPLEX 0x1000 /* Full-duplex */
76 1.1 thorpej #define CSR_SPEED 0x0800 /* 100Mbps */
77 1.1 thorpej #define CSR_ACOMP 0x0400 /* Autonegotiation complete */
78 1.1 thorpej #define CSR_PAGERCVD 0x0200 /* Link page received */
79 1.1 thorpej #define CSR_LOWVCC 0x0004 /* Low Voltage Fault */
80 1.1 thorpej
81 1.1 thorpej #endif /* _DEV_MII_LXTPHYREG_H_ */
82