MDIO
Encyclopedia
Management Data Input/Output (MDIO), or also Media Independent Interface Management (MIIM), is a serial bus defined for the Ethernet
Ethernet
Ethernet is a family of computer networking technologies for local area networks commercially introduced in 1980. Standardized in IEEE 802.3, Ethernet has largely replaced competing wired LAN technologies....

 family of IEEE 802.3
IEEE 802.3
IEEE 802.3 is a working group and a collection of IEEE standards produced by the working group defining the physical layer and data link layer's media access control of wired Ethernet. This is generally a local area network technology with some wide area network applications...

 standards for Media Independent Interface
Media Independent Interface
The Media Independent Interface was originally defined as a standard interface used to connect a Fast Ethernet MAC-block to a PHY chip.The MII design has been extended to support reduced signals and increases speeds...

, or MII.
The MII connects Media Access Control
Media Access Control
The media access control data communication protocol sub-layer, also known as the medium access control, is a sublayer of the data link layer specified in the seven-layer OSI model , and in the four-layer TCP/IP model...

 (MAC) devices with Ethernet physical layer
Ethernet physical layer
The Ethernet physical layer is the physical layer component of the Ethernet family of computer network standards.The Ethernet physical layer evolved over a considerable time span and encompasses quite a few physical media interfaces and several magnitudes of speed...

 (PHY) circuits.

The MII has two interfaces:
  • a data interface to the Ethernet MAC, for sending and receiving Ethernet frames, and
  • a management interface, referred as MDIO or as Media Independent Interface Management (MIIM), used for accessing the control and status registers of the PHY.


The MDIO bus provides access to the configuration and status registers of each PHY. These registers are used to initially configure each PHY and also to monitor status during operation.

The MAC device controlling the MIIM is also called Station Management Entity (STA).

Electrical specification

The MDIO interface is implemented by two lines:
  • a MDC clock line and
  • an MDIO data line

The clock line is driven by the MAC device.
The data line is bidirectional: the PHY drives it to provide register data at the end of a read operation.

The bus has a single MAC master, but can have up to 31 PHY slaves.

The MDC clock can be a periodic, with a minimum period of 400 ns, which corresponds to a maximal frequency of 2.5 MHz. Newer chips, however, allow faster accesses.

The MDIO data line has a pull-up of 1.5 kOhm in the PHY, allowing the MAC to determine if one or more PHYs are attached. The MAC should have a 2 kOhm pull-down on that same line.

Bus timing

Before a register access, PHY devices generally require a preamble of 32 ones on the MDIO line.

The accesses are made out of 16 control bits followed by 16 data bits. The control bits specify the access type (read or write), the PHY address and the register address.

During a write command, the MAC provides control and data. In the case of a read command, the PHY takes over the bus at the end of the address cycle and supplies the MAC with the data.

When the MAC drives the MDIO line, it has to guarantee a stable value 10 ns before the rising edge of the clock MDC.
Further, MDIO has to remain stable 10 ns after the rising edge of MDC.
However, when the PHY drives the MDIO line, its output changes after the rising edge of MDC and is stable before the arrival of the next rising edge.

Registers

The "Clause 22" MDIO interface specifies 5 PHY address bits which allows for up to 32 PHY devices on a single MDIO data line, and 5 register address bits which allows up to 32 registers per PHY.

The function of the registers is left free for the manufacturer to specify.

The 802.3ae "Clause 45" interface can access up to 65536 registers in 32 different devices. These features were added for 10 Gigabit Ethernet
10 Gigabit Ethernet
The 10 gigabit Ethernet computer networking standard was first published in 2002. It defines a version of Ethernet with a nominal data rate of 10 Gbit/s , ten times faster than gigabit Ethernet.10 gigabit Ethernet defines only full duplex point to point links which are generally connected by...

and use different opcodes and start sequences.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK