123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- #ifndef ZEPHYR_INCLUDE_NET_MII_H_
- #define ZEPHYR_INCLUDE_NET_MII_H_
- #define MII_BMCR 0x0
- #define MII_BMSR 0x1
- #define MII_PHYID1R 0x2
- #define MII_PHYID2R 0x3
- #define MII_ANAR 0x4
- #define MII_ANLPAR 0x5
- #define MII_ANER 0x6
- #define MII_ANNPTR 0x7
- #define MII_ANLPRNPR 0x8
- #define MII_MMD_ACR 0xd
- #define MII_MMD_AADR 0xe
- #define MII_ESTAT 0xf
- #define MII_BMCR_RESET (1 << 15)
- #define MII_BMCR_LOOPBACK (1 << 14)
- #define MII_BMCR_SPEED_LSB (1 << 13)
- #define MII_BMCR_AUTONEG_ENABLE (1 << 12)
- #define MII_BMCR_POWER_DOWN (1 << 11)
- #define MII_BMCR_ISOLATE (1 << 10)
- #define MII_BMCR_AUTONEG_RESTART (1 << 9)
- #define MII_BMCR_DUPLEX_MODE (1 << 8)
- #define MII_BMCR_SPEED_MSB (1 << 6)
- #define MII_BMCR_SPEED_MASK (1 << 6 | 1 << 13)
- #define MII_BMCR_SPEED_10 (0 << 6 | 0 << 13)
- #define MII_BMCR_SPEED_100 (0 << 6 | 1 << 13)
- #define MII_BMCR_SPEED_1000 (1 << 6 | 0 << 13)
- #define MII_BMSR_100BASE_T4 (1 << 15)
- #define MII_BMSR_100BASE_X_FULL (1 << 14)
- #define MII_BMSR_100BASE_X_HALF (1 << 13)
- #define MII_BMSR_10_FULL (1 << 12)
- #define MII_BMSR_10_HALF (1 << 11)
- #define MII_BMSR_100BASE_T2_FULL (1 << 10)
- #define MII_BMSR_100BASE_T2_HALF (1 << 9)
- #define MII_BMSR_EXTEND_STATUS (1 << 8)
- #define MII_BMSR_MF_PREAMB_SUPPR (1 << 6)
- #define MII_BMSR_AUTONEG_COMPLETE (1 << 5)
- #define MII_BMSR_REMOTE_FAULT (1 << 4)
- #define MII_BMSR_AUTONEG_ABILITY (1 << 3)
- #define MII_BMSR_LINK_STATUS (1 << 2)
- #define MII_BMSR_JABBER_DETECT (1 << 1)
- #define MII_BMSR_EXTEND_CAPAB (1 << 0)
- #define MII_ADVERTISE_NEXT_PAGE (1 << 15)
- #define MII_ADVERTISE_LPACK (1 << 14)
- #define MII_ADVERTISE_REMOTE_FAULT (1 << 13)
- #define MII_ADVERTISE_ASYM_PAUSE (1 << 11)
- #define MII_ADVERTISE_PAUSE (1 << 10)
- #define MII_ADVERTISE_100BASE_T4 (1 << 9)
- #define MII_ADVERTISE_100_FULL (1 << 8)
- #define MII_ADVERTISE_100_HALF (1 << 7)
- #define MII_ADVERTISE_10_FULL (1 << 6)
- #define MII_ADVERTISE_10_HALF (1 << 5)
- #define MII_ADVERTISE_SEL_MASK (0x1F << 0)
- #define MII_ADVERTISE_SEL_IEEE_802_3 0x01
- #define MII_ADVERTISE_ALL (MII_ADVERTISE_10_HALF | MII_ADVERTISE_10_FULL |\
- MII_ADVERTISE_100_HALF | MII_ADVERTISE_100_FULL |\
- MII_ADVERTISE_SEL_IEEE_802_3)
- #endif
|