MDI Register Access
BCM5718 Programmer’s Guide
Broadcom
®
January 29, 2016 • 5718-PG108-R
Page 210
// Reset PHY
// Enable auto-MDIX
// Set link speed to 1000Mb
bmcr = (1 << 6) | (0 << 13);
// Select full-duplex operation
gig = (1 << 9);
// Force loopback
// Disable 10/100 autoneg advertisement
phy_write(0x04, (00001b << 0));
// Advertise full-duplex operation
phy_write(0x09, gig);
// Enable and restart autonoegotiation
phy_write(0x00, (bmcr | (1 << 12) | (1 << 9)));
MDI Register Access
Configuring physical devices and querying the status of physical devices are done via the MDIO interface (MDC
and MDIO).
There are two modes in which the internal MII Management interface signals (MDC/MDIO) can be controlled for
communication with the internal transceiver registers. These modes are as follows:
• Autopolling mode. Enabled by setting the Enable bit in the MAC Ethernet MI Mode register. The device will
poll for the link status bit in the transceiver.
• Command Control. Writing to the MI Communications register directly to either read or write the transceiver
registers.
Autopolling mode has the lower priority and it will be stalled any time there is an active operation through the MI
Communications register.
Operational Characteristics
The interface between the MAC and physical devices is with the two signals of:
• MDIO clock (MDC)
• Bidirectional serial data (MDIO)
The details of the MDIO interface can be found in the IEEE 802.3 specification.
Note:
This procedure is PHY-independent. The MAC access to the PHY is the same for the entire
NetXtreme family.