RTEMS  5.1
dp83848phy.h
Go to the documentation of this file.
1 
7 /*
8  * This file contains definitions for LatticeMico32 TSMAC (Tri-Speed MAC)
9  *
10  * COPYRIGHT (c) 1989-1999.
11  * On-Line Applications Research Corporation (OAR).
12  *
13  * The license and distribution terms for this file may be
14  * found in the file LICENSE in this distribution or at
15  * http://www.rtems.org/license/LICENSE.
16  *
17  * Jukka Pietarinen <jukka.pietarinen@mrf.fi>, 2008,
18  * Micro-Research Finland Oy
19  */
20 
21 #ifndef _DP83848PHY_H
22 #define _DP83848PHY_H
23 
24 #define DEFAULT_PHY_ADDRESS (0x01)
25 
26 #define PHY_BMCR (0x00)
27 #define PHY_BMCR_RESET (1<<15)
28 #define PHY_BMCR_LOOPBACK (1<<14)
29 #define PHY_BMCR_SPEEDSEL (1<<13)
30 #define PHY_BMCR_AN_ENA (1<<12)
31 #define PHY_BMCR_PWRDWN (1<<11)
32 #define PHY_BMCR_ISOLATE (1<<10)
33 #define PHY_BMCR_RESTART_AN (1<<9)
34 #define PHY_BMCR_DUPLEX_MODE (1<<8)
35 #define PHY_BMCR_COLL_TEST (1<<7)
36 #define PHY_BMSR (0x01)
37 #define PHY_BMSR_100_T4 (1<<15)
38 #define PHY_BMSR_100_TX_FD (1<<14)
39 #define PHY_BMSR_100_TX_HD (1<<13)
40 #define PHY_BMSR_10_T_FD (1<<12)
41 #define PHY_BMSR_10_T_HD (1<<11)
42 #define PHY_BMSR_PRESUP (1<<6)
43 #define PHY_BMSR_AN_CMPL (1<<5)
44 #define PHY_BMSR_REM_FLT (1<<4)
45 #define PHY_BMSR_AN_AB (1<<3)
46 #define PHY_BMSR_LINK_STAT (1<<2)
47 #define PHY_BMSR_JABBDET (1<<1)
48 #define PHY_BMSR_EXT_CAP (1<<0)
49 #define PHY_PHYIDR1 (0x02)
50 #define DEFAULT_PHYIDR1 (0x2000)
51 #define PHY_PHYIDR2 (0x03)
52 #define DEFAULT_PHYIDR2 (0x5C90)
53 #define PHY_ANAR (0x04)
54 #define PHY_ANAR_NP (1<<15)
55 #define PHY_ANAR_RF (1<<13)
56 #define PHY_ANAR_ASM_DIR (1<<11)
57 #define PHY_ANAR_PAUSE (1<<10)
58 #define PHY_ANAR_T4 (1<<9)
59 #define PHY_ANAR_TX_FD (1<<8)
60 #define PHY_ANAR_TX (1<<7)
61 #define PHY_ANAR_10_FD (1<<6)
62 #define PHY_ANAR_10 (1<<5)
63 #define PHY_ANAR_SEL_MASK (0x0f)
64 #define PHY_ANAR_SEL_SHIFT (0)
65 #define PHY_ANAR_SEL_DEF (1)
66 #define PHY_ANLPAR (0x05)
67 #define PHY_ANLPAR_NP (1<<15)
68 #define PHY_ANLPAR_ACK (1<<14)
69 #define PHY_ANLPAR_RF (1<<13)
70 #define PHY_ANLPAR_ASM_DIR (1<<11)
71 #define PHY_ANLPAR_PAUSE (1<<10)
72 #define PHY_ANLPAR_T4 (1<<9)
73 #define PHY_ANLPAR_TX_FD (1<<8)
74 #define PHY_ANLPAR_TX (1<<7)
75 #define PHY_ANLPAR_10_FD (1<<6)
76 #define PHY_ANLPAR_10 (1<<5)
77 #define PHY_ANLPAR_SEL_MASK (0x0f)
78 #define PHY_ANLPAR_SEL_SHIFT (0)
79 #define PHY_ANLPARNP (0x05)
80 #define PHY_ANLPARNP_NP (1<<15)
81 #define PHY_ANLPARNP_ACK (1<<14)
82 #define PHY_ANLPARNP_MP (1<<13)
83 #define PHY_ANLPARNP_ACK2 (1<<12)
84 #define PHY_ANLPARNP_TOGGLE (1<<11)
85 #define PHY_ANLPARNP_CDE_MASK (0x03ff)
86 #define PHY_ANER (0x06)
87 #define PHY_ANER_PDF (1<<4)
88 #define PHY_ANER_LP_NP_ABLE (1<<3)
89 #define PHY_ANER_NP_ABLE (1<<2)
90 #define PHY_ANER_PAGE_RX (1<<1)
91 #define PHY_ANER_LP_AN_ABLE (1<<0)
92 #define PHY_ANNPTR (0x07)
93 #define PHY_ANNPTR_NP (1<<15)
94 #define PHY_ANNPTR_MP (1<<13)
95 #define PHY_ANNPTR_ACK2 (1<<12)
96 #define PHY_ANNPTR_TOG_TX (1<<11)
97 #define PHY_ANNPTR_CDE_MASK (0x03ff)
98 #define PHY_PHYSTS (0x10)
99 #define PHY_PHYSTS_MDIX_MDE (1<<14)
100 #define PHY_PHYSTS_RCV_ERRL (1<<13)
101 #define PHY_PHYSTS_POLSTAT (1<<12)
102 #define PHY_PHYSTS_FCSL (1<<11)
103 #define PHY_PHYSTS_SD (1<<10)
104 #define PHY_PHYSTS_DESCL (1<<9)
105 #define PHY_PHYSTS_PGREC (1<<8)
106 #define PHY_PHYSTS_MIIIRQ (1<<7)
107 #define PHY_PHYSTS_REM_FLT (1<<6)
108 #define PHY_PHYSTS_JABBDET (1<<5)
109 #define PHY_PHYSTS_AN_CMP (1<<4)
110 #define PHY_PHYSTS_LOOPBACK (1<<3)
111 #define PHY_PHYSTS_DUPLEX (1<<2)
112 #define PHY_PHYSTS_SPEED (1<<1)
113 #define PHY_PHYSTS_LINK (1<<0)
114 #define PHY_MICR (0x11)
115 #define PHY_MICR_TINT (1<<2)
116 #define PHY_MICR_INTEN (1<<1)
117 #define PHY_MICR_INT_OE (1<<0)
118 #define PHY_MISR (0x12)
119 #define PHY_MISR_ED_INT (1<<14)
120 #define PHY_MISR_LINK_INT (1<<13)
121 #define PHY_MISR_SPD_INT (1<<12)
122 #define PHY_MISR_DUP_INT (1<<11)
123 #define PHY_MISR_ANC_INT (1<<10)
124 #define PHY_MISR_FHF_INT (1<<9)
125 #define PHY_MISR_RHF_INT (1<<8)
126 #define PHY_MISR_ED_INT_EN (1<<6)
127 #define PHY_MISR_LINK_INT_EN (1<<5)
128 #define PHY_MISR_SPD_INT_EN (1<<4)
129 #define PHY_MISR_DUP_INT_EN (1<<3)
130 #define PHY_MISR_ANC_INT_EN (1<<2)
131 #define PHY_MISR_FHF_INT_EN (1<<1)
132 #define PHY_MISR_RHF_INT_EN (1<<0)
133 #define PHY_FCSCR (0x14)
134 #define PHY_RECR (0x15)
135 #define PHY_PCSR (0x16)
136 #define PHY_PCSR_TQ_EN (1<<10)
137 #define PHY_PCSR_SDFPMA (1<<9)
138 #define PHY_PCSR_SD_OPT (1<<8)
139 #define PHY_PCSR_DESC_TIME (1<<7)
140 #define PHY_PCSR_F_100_OK (1<<5)
141 #define PHY_PCSR_NRZI_BYPASS (1<<2)
142 #define PHY_RBR (0x17)
143 #define PHY_RBR_RMII_MODE (1<<5)
144 #define PHY_RBR_RMII_REV1_0 (1<<4)
145 #define PHY_RBR_RX_OVF_STS (1<<3)
146 #define PHY_RBR_RX_UNF_STS (1<<2)
147 #define PHY_RBR_ELAST_BUF1 (1<<1)
148 #define PHY_RBR_ELAST_BUF0 (1<<0)
149 #define PHY_LEDCR (0x18)
150 #define PHY_LEDCR_DRV_SPDLED (1<<5)
151 #define PHY_LEDCR_DRV_LNKLED (1<<4)
152 #define PHY_LEDCR_DRV_ACTLED (1<<3)
153 #define PHY_LEDCR_SPDLED (1<<2)
154 #define PHY_LEDCR_LNKLED (1<<1)
155 #define PHY_LEDCR_ACTLED (1<<0)
156 #define PHY_PHYCR (0x19)
157 #define PHY_PHYCR_MDIX_EN (1<<15)
158 #define PHY_PHYCR_FORCE_MDIX (1<<14)
159 #define PHY_PHYCR_PAUSE_RX (1<<13)
160 #define PHY_PHYCR_PAUSE_TX (1<<12)
161 #define PHY_PHYCR_BIST_FE (1<<11)
162 #define PHY_PHYCR_PSR_15 (1<<10)
163 #define PHY_PHYCR_BIST_STATUS (1<<9)
164 #define PHY_PHYCR_BIST_START (1<<8)
165 #define PHY_PHYCR_BP_STRETCH (1<<7)
166 #define PHY_PHYCR_LED_CNFG1 (1<<6)
167 #define PHY_PHYCR_LED_CNFG0 (1<<5)
168 #define PHY_PHYCR_ADDR4 (1<<4)
169 #define PHY_PHYCR_ADDR3 (1<<3)
170 #define PHY_PHYCR_ADDR2 (1<<2)
171 #define PHY_PHYCR_ADDR1 (1<<1)
172 #define PHY_PHYCR_ADDR0 (1<<0)
173 #define PHY_10BTSCR (0x1A)
174 #define PHY_10BTSCR_SERIAL (1<<15)
175 #define PHY_10BTSCR_SQ_MASK (0x07)
176 #define PHY_10BTSCR_SQ_SHIFT (9)
177 #define PHY_10BTSCR_LP_10_DIS (1<<8)
178 #define PHY_10BTSCR_LP_DIS (1<<7)
179 #define PHY_10BTSCR_FLINK_10 (1<<1)
180 #define PHY_10BTSCR_POL (1<<4)
181 #define PHY_10BTSCR_HB_DIS (1<<1)
182 #define PHY_10BTSCR_JAB_DIS (1<<0)
183 #define PHY_CDCTRL1 (0x1B)
184 #define PHY_EDCR (0x1D)
185 
186 #endif /* _DP83848PHY_H */