]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - sys/dev/mii/tdkphyreg.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / sys / dev / mii / tdkphyreg.h
1 /*-
2  * Copyright (c) 2000,2001 Jonathan Chen.
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  * 1. Redistributions of source code must retain the above copyright
9  *    notice, this list of conditions, and the following disclaimer,
10  *    without modification, immediately at the beginning of the file.
11  * 2. Redistributions in binary form must reproduce the above copyright
12  *    notice, this list of conditions and the following disclaimer in
13  *    the documentation and/or other materials provided with the
14  *    distribution.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR
20  * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26  * SUCH DAMAGE.
27  *
28  * $FreeBSD$
29  */
30
31 /*
32  * Register definitions for TDK 78Q2120
33  */
34
35 #ifndef _DEV_MII_TDKPHYREG_H_
36 #define _DEV_MII_TDKPHYREG_H_
37
38 #define MII_VENDOR      16
39 #define VENDOR_RXCC     0x0001
40 #define VENDOR_PCSBP    0x0002
41 #define VENDOR_RVSPOL   0x0010
42 #define VENDOR_NOAPOL   0x0020
43 #define VENDOR_GPIO0DIR 0x0040
44 #define VENDOR_GPIO0DAT 0x0080
45 #define VENDOR_GPIO1DIR 0x0100
46 #define VENDOR_GPIO1DAT 0x0200
47 #define VENDOR_10BTLOOP 0x0400
48 #define VENDOR_NOSQE    0x0800
49 #define VENDOR_TXHIM    0x1000
50 #define VENDOR_INTLVL   0x4000
51 #define VENDOR_RPTR     0x8000
52
53 #define MII_INT         17
54 #define INT_STAT_MASK   0x00ff
55 #define INT_STAT_ACOMP  0x0001
56 #define INT_STAT_RFAULT 0x0002
57 #define INT_STAT_LSCHG  0x0004
58 #define INT_STAT_LPACK  0x0008
59 #define INT_STAT_PDF    0x0010
60 #define INT_STAT_PRX    0x0020
61 #define INT_STAT_RXERR  0x0040
62 #define INT_STAT_JABBER 0x0080
63 #define INT_CTRL_MASK   0xff00
64 #define INT_CTRL_ACOMP  0x0100
65 #define INT_CTRL_RFAULT 0x0200
66 #define INT_CTRL_LSCHG  0x0400
67 #define INT_CTRL_LPACK  0x0800
68 #define INT_CTRL_PDF    0x1000
69 #define INT_CTRL_PRX    0x2000
70 #define INT_CTRL_RXERR  0x4000
71 #define INT_CTRL_JABBER 0x8000
72
73
74 #define MII_DIAG        18
75 #define DIAG_RLOCK      0x0100
76 #define DIAG_RPASS      0x0200
77 #define DIAG_RATE_100   0x0400
78 #define DIAG_DUPLEX     0x0800
79 #define DIAG_NEGFAIL    0x1000
80
81
82 #endif