EasyManua.ls Logo

Broadcom BCM5722 - Page 215

Broadcom BCM5722
593 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programmer’s Guide BCM5722
10/15/07
Broadcom Corporation
Document 5722-PG101-R MDI Register Access Page 156
Traditional Bit-Bang Method
In this method, software has to toggle the MDC and MDIO pins to access physical device registers. Software is responsible
for providing the proper delay to satisfy timing requirements such as setup time, hold time, clock frequency, etc.
The MDI_Control_Register (see “MDI Control Register (Offset 0x6844)” on page 342) controls the MDC and MDIO pins as
follows:
MDI_Control_Register.MDI_Clock: is used to clock MDC pin. If this bit is set, MDC is logic high. Otherwise, it is logic
low.
MDI_Control_Register.MDI_Select: This bit is used to select either the traditional bit-bang method or auto-access
method. This bit must be set to 1 when the traditional bit-bang method is used.
MDI_Control_Register.MDI_Enable: This bit is used to control bidirectional data pin. If this bit is set to 1, then
MDI_Control_Register.MDI_Data is output. Otherwise, it is input.
MDI_Control_Register.MDI_Data: This is used to control bidirectional MDIO pin.
Auto-Access Method
The BCM5722 Ethernet controller has a built-in interface to access physical device registers without having to control MDC
and MDIO pins by software/firmware. It provides an easy way to access the physical device register.
To use this mode, MDI_Control_Register.MDI_Select has to be cleared to 0. The MI_Communication_Register (see “MI
Communication Register (Offset 0x44C)” on page 251) is used to access physical device.
For example, to read a 16-bit PHY register at offset 0x2 of a PHY device which is strapped to PHY address 1, perform the
following steps:
1. MI_Communication_Register.Register_Address is set to 0x2.
2. MI_Communication_Register.PHY_Addr is set to 1.
3. MI_Communication_Register.Command is set to 0x2.
4. MI_Communication_Register.Start_Busy is set to 1.
5. Poll Until MI_Communication_Register.Start_Busy is cleared to 0.
6. MI_Communication_Register.Transaction_Data contains 16-bit data of the PHY register.
See “Configuring the GMII/MII PHYon page 153 for example code.
Note: The auto-access method which is explained next is the recommended access method. This is because
of additional software overhead required in maintaining the MDIO bus timing when using the Traditional bit-
bang access method.
Note: Programmers must be careful to wait for the start _busy bit to clear. Writing to the MI Communication
register (see “MI Communication Register (Offset 0x44C)” on page 251) prior to the completion of a previous
MDI access will yield unpredictable MDI data. The previous access will not complete successfully.

Table of Contents