Zephyr API Documentation  2.7.0-rc2
A Scalable Open Source RTOS
Ethernet MII Support Functions

Ethernet MII (media independent interface) functions. More...

Macros

#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
 

Detailed Description

Ethernet MII (media independent interface) functions.

Macro Definition Documentation

◆ MII_ADVERTISE_100_FULL

#define MII_ADVERTISE_100_FULL   (1 << 8)

#include <include/net/mii.h>

try for 100BASE-X full duplex support

◆ MII_ADVERTISE_100_HALF

#define MII_ADVERTISE_100_HALF   (1 << 7)

#include <include/net/mii.h>

try for 100BASE-X support

◆ MII_ADVERTISE_100BASE_T4

#define MII_ADVERTISE_100BASE_T4   (1 << 9)

#include <include/net/mii.h>

try for 100BASE-T4 support

◆ MII_ADVERTISE_10_FULL

#define MII_ADVERTISE_10_FULL   (1 << 6)

#include <include/net/mii.h>

try for 10 Mb/s full duplex support

◆ MII_ADVERTISE_10_HALF

#define MII_ADVERTISE_10_HALF   (1 << 5)

#include <include/net/mii.h>

try for 10 Mb/s half duplex support

◆ MII_ADVERTISE_ALL

#define MII_ADVERTISE_ALL

#include <include/net/mii.h>

Value:
MII_ADVERTISE_100_HALF | MII_ADVERTISE_100_FULL |\
MII_ADVERTISE_SEL_IEEE_802_3)
#define MII_ADVERTISE_10_FULL
Definition: mii.h:126
#define MII_ADVERTISE_100_FULL
Definition: mii.h:122
#define MII_ADVERTISE_10_HALF
Definition: mii.h:128

◆ MII_ADVERTISE_ASYM_PAUSE

#define MII_ADVERTISE_ASYM_PAUSE   (1 << 11)

#include <include/net/mii.h>

try for asymmetric pause

◆ MII_ADVERTISE_LPACK

#define MII_ADVERTISE_LPACK   (1 << 14)

#include <include/net/mii.h>

link partner acknowledge response

◆ MII_ADVERTISE_NEXT_PAGE

#define MII_ADVERTISE_NEXT_PAGE   (1 << 15)

#include <include/net/mii.h>

next page

◆ MII_ADVERTISE_PAUSE

#define MII_ADVERTISE_PAUSE   (1 << 10)

#include <include/net/mii.h>

try for pause

◆ MII_ADVERTISE_REMOTE_FAULT

#define MII_ADVERTISE_REMOTE_FAULT   (1 << 13)

#include <include/net/mii.h>

remote fault

◆ MII_ADVERTISE_SEL_IEEE_802_3

#define MII_ADVERTISE_SEL_IEEE_802_3   0x01

#include <include/net/mii.h>

◆ MII_ADVERTISE_SEL_MASK

#define MII_ADVERTISE_SEL_MASK   (0x1F << 0)

#include <include/net/mii.h>

Selector Field

◆ MII_ANAR

#define MII_ANAR   0x4

#include <include/net/mii.h>

Auto-Negotiation Advertisement Register

◆ MII_ANER

#define MII_ANER   0x6

#include <include/net/mii.h>

Auto-Negotiation Expansion Register

◆ MII_ANLPAR

#define MII_ANLPAR   0x5

#include <include/net/mii.h>

Auto-Negotiation Link Partner Ability Reg

◆ MII_ANLPRNPR

#define MII_ANLPRNPR   0x8

#include <include/net/mii.h>

Auto-Negotiation Link Partner Received Next Page Reg

◆ MII_ANNPTR

#define MII_ANNPTR   0x7

#include <include/net/mii.h>

Auto-Negotiation Next Page Transmit Register

◆ MII_BMCR

#define MII_BMCR   0x0

#include <include/net/mii.h>

Basic Mode Control Register

◆ MII_BMCR_AUTONEG_ENABLE

#define MII_BMCR_AUTONEG_ENABLE   (1 << 12)

#include <include/net/mii.h>

Auto-Negotiation enable

◆ MII_BMCR_AUTONEG_RESTART

#define MII_BMCR_AUTONEG_RESTART   (1 << 9)

#include <include/net/mii.h>

restart auto-negotiation

◆ MII_BMCR_DUPLEX_MODE

#define MII_BMCR_DUPLEX_MODE   (1 << 8)

#include <include/net/mii.h>

full duplex mode

◆ MII_BMCR_ISOLATE

#define MII_BMCR_ISOLATE   (1 << 10)

#include <include/net/mii.h>

isolate electrically PHY from MII

◆ MII_BMCR_LOOPBACK

#define MII_BMCR_LOOPBACK   (1 << 14)

#include <include/net/mii.h>

enable loopback mode

◆ MII_BMCR_POWER_DOWN

#define MII_BMCR_POWER_DOWN   (1 << 11)

#include <include/net/mii.h>

power down mode

◆ MII_BMCR_RESET

#define MII_BMCR_RESET   (1 << 15)

#include <include/net/mii.h>

PHY reset

◆ MII_BMCR_SPEED_10

#define MII_BMCR_SPEED_10   (0 << 6 | 0 << 13)

#include <include/net/mii.h>

select speed 10 Mb/s

◆ MII_BMCR_SPEED_100

#define MII_BMCR_SPEED_100   (0 << 6 | 1 << 13)

#include <include/net/mii.h>

select speed 100 Mb/s

◆ MII_BMCR_SPEED_1000

#define MII_BMCR_SPEED_1000   (1 << 6 | 0 << 13)

#include <include/net/mii.h>

select speed 1000 Mb/s

◆ MII_BMCR_SPEED_LSB

#define MII_BMCR_SPEED_LSB   (1 << 13)

#include <include/net/mii.h>

10=1000Mbps 01=100Mbps; 00=10Mbps

◆ MII_BMCR_SPEED_MASK

#define MII_BMCR_SPEED_MASK   (1 << 6 | 1 << 13)

#include <include/net/mii.h>

Link Speed Field

◆ MII_BMCR_SPEED_MSB

#define MII_BMCR_SPEED_MSB   (1 << 6)

#include <include/net/mii.h>

10=1000Mbps 01=100Mbps; 00=10Mbps

◆ MII_BMSR

#define MII_BMSR   0x1

#include <include/net/mii.h>

Basic Mode Status Register

◆ MII_BMSR_100BASE_T2_FULL

#define MII_BMSR_100BASE_T2_FULL   (1 << 10)

#include <include/net/mii.h>

100BASE-T2 full duplex capable

◆ MII_BMSR_100BASE_T2_HALF

#define MII_BMSR_100BASE_T2_HALF   (1 << 9)

#include <include/net/mii.h>

100BASE-T2 half duplex capable

◆ MII_BMSR_100BASE_T4

#define MII_BMSR_100BASE_T4   (1 << 15)

#include <include/net/mii.h>

100BASE-T4 capable

◆ MII_BMSR_100BASE_X_FULL

#define MII_BMSR_100BASE_X_FULL   (1 << 14)

#include <include/net/mii.h>

100BASE-X full duplex capable

◆ MII_BMSR_100BASE_X_HALF

#define MII_BMSR_100BASE_X_HALF   (1 << 13)

#include <include/net/mii.h>

100BASE-X half duplex capable

◆ MII_BMSR_10_FULL

#define MII_BMSR_10_FULL   (1 << 12)

#include <include/net/mii.h>

10 Mb/s full duplex capable

◆ MII_BMSR_10_HALF

#define MII_BMSR_10_HALF   (1 << 11)

#include <include/net/mii.h>

10 Mb/s half duplex capable

◆ MII_BMSR_AUTONEG_ABILITY

#define MII_BMSR_AUTONEG_ABILITY   (1 << 3)

#include <include/net/mii.h>

PHY is able to perform Auto-Negotiation

◆ MII_BMSR_AUTONEG_COMPLETE

#define MII_BMSR_AUTONEG_COMPLETE   (1 << 5)

#include <include/net/mii.h>

Auto-negotiation process completed

◆ MII_BMSR_EXTEND_CAPAB

#define MII_BMSR_EXTEND_CAPAB   (1 << 0)

#include <include/net/mii.h>

extended register capabilities

◆ MII_BMSR_EXTEND_STATUS

#define MII_BMSR_EXTEND_STATUS   (1 << 8)

#include <include/net/mii.h>

extend status information in reg 15

◆ MII_BMSR_JABBER_DETECT

#define MII_BMSR_JABBER_DETECT   (1 << 1)

#include <include/net/mii.h>

jabber condition detected

◆ MII_BMSR_LINK_STATUS

#define MII_BMSR_LINK_STATUS   (1 << 2)

#include <include/net/mii.h>

link is up

◆ MII_BMSR_MF_PREAMB_SUPPR

#define MII_BMSR_MF_PREAMB_SUPPR   (1 << 6)

#include <include/net/mii.h>

PHY accepts management frames with preamble suppressed

◆ MII_BMSR_REMOTE_FAULT

#define MII_BMSR_REMOTE_FAULT   (1 << 4)

#include <include/net/mii.h>

remote fault detected

◆ MII_ESTAT

#define MII_ESTAT   0xf

#include <include/net/mii.h>

Extended Status Register

◆ MII_MMD_AADR

#define MII_MMD_AADR   0xe

#include <include/net/mii.h>

MMD Access Address Data Register

◆ MII_MMD_ACR

#define MII_MMD_ACR   0xd

#include <include/net/mii.h>

MMD Access Control Register

◆ MII_PHYID1R

#define MII_PHYID1R   0x2

#include <include/net/mii.h>

PHY ID 1 Register

◆ MII_PHYID2R

#define MII_PHYID2R   0x3

#include <include/net/mii.h>

PHY ID 2 Register