Phy Configuration Auto-Negotiation (10/100/1000 Speed With Half And Full Duplex Support) - Broadcom NetXtreme/NetLink BCM5718 Series Programmer's Manual

Table of Contents

Advertisement

BCM5718 Programmer's Guide
100Base-TX
- Write 0x6100 to PHY register 00h
- Write 0x1000 to PHY register 1Eh
- Set MAC register 0x400[3:2] = 01b // Set MII
- Set MAC register 0x400[1]
1000Base-T
- Write 0x4140 to PHY register 00h
- Write 0x1000 to PHY register 1Eh
- Set MAC register 0x400[3:2] = 10b // Set GMII
- Set MAC register 0x400[1] = 0
PHY Configuration Auto-Negotiation (10/100/1000 Speed with Half and Full
Duplex Support)
Basic PHY pseudo-code:
Enable 10/100/1000 PHY loopback mode
Enable/disable Auto-MDI crossover
Enable auto-negotiation
Forced 10/100/1000 link speeds
-------------------
PHY Reset Procedure
-------------------
uint16_t val16;
// Initiate PHY reset by setting 0x00[15] = 1
phy_write(0x00, 0x8000);
// Wait up to 100ms for 0x00[15] = 0
for (int i = 0; i < 100; i++) {
val16 = phy_read(0x00);
if ((val16 & 0x8000) == 0)
break;
// Delay for 1ms
delay_us(1000);
}
----------------------
PHY Loopback Procedure
----------------------
// Force link down by enabling loopback
phy_write(0x00, (1 << 14));
// Wait up to 15ms for link to drop
for (int i = 0; i < 15000; i++) {
if ((phy_read(0x01) & (1 << 4) == 0)
break;
// Wait 10us
delay_us(10);
}
Broadcom
®
January 29, 2016 • 5718-PG108-R
// Force 100Base-TX, full duplex, internal loopback
// Force link (required for 100Base-TX)
= 0
// Force full-duplex operation
// Force 1000Base-T, full duplex, internal loopback
// Force link (optional for 1000Base-T)
// Force full-duplex operation
GMII/MII
Page 206

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the NetXtreme/NetLink BCM5718 Series and is the answer not in the manual?

Questions and answers

This manual is also suitable for:

Netxtreme/netlink bcm5717Netxtreme/netlink bcm5718Netxtreme/netlink bcm5719Netxtreme/netlink bcm5720

Table of Contents