1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21#ifndef MII_H
22#define MII_H
23
24
25#define MII_BMCR 0
26#define MII_BMSR 1
27#define MII_PHYID1 2
28#define MII_PHYID2 3
29#define MII_ANAR 4
30#define MII_ANLPAR 5
31#define MII_ANER 6
32#define MII_NSR 16
33#define MII_LBREMR 17
34#define MII_REC 18
35#define MII_SNRDR 19
36#define MII_TEST 25
37
38
39#define MII_BMCR_RESET (1 << 15)
40#define MII_BMCR_LOOPBACK (1 << 14)
41#define MII_BMCR_SPEED (1 << 13)
42#define MII_BMCR_AUTOEN (1 << 12)
43#define MII_BMCR_FD (1 << 8)
44
45#define MII_BMSR_100TX_FD (1 << 14)
46#define MII_BMSR_100TX_HD (1 << 13)
47#define MII_BMSR_10T_FD (1 << 12)
48#define MII_BMSR_10T_HD (1 << 11)
49#define MII_BMSR_MFPS (1 << 6)
50#define MII_BMSR_AN_COMP (1 << 5)
51#define MII_BMSR_AUTONEG (1 << 3)
52#define MII_BMSR_LINK_ST (1 << 2)
53
54#define MII_ANAR_TXFD (1 << 8)
55#define MII_ANAR_TX (1 << 7)
56#define MII_ANAR_10FD (1 << 6)
57#define MII_ANAR_10 (1 << 5)
58#define MII_ANAR_CSMACD (1 << 0)
59
60#define MII_ANLPAR_ACK (1 << 14)
61#define MII_ANLPAR_TXFD (1 << 8)
62#define MII_ANLPAR_TX (1 << 7)
63#define MII_ANLPAR_10FD (1 << 6)
64#define MII_ANLPAR_10 (1 << 5)
65#define MII_ANLPAR_CSMACD (1 << 0)
66
67
68
69#define RTL8201CP_PHYID1 0x0000
70#define RTL8201CP_PHYID2 0x8201
71
72
73#define DP83848_PHYID1 0x2000
74#define DP83848_PHYID2 0x5c90
75
76#endif
77