4.3.1 Clause 45 Register Access

The LAN8670/1/2 only supports the MDIO management frame protocol defined in IEEE Std 802.3 Clause 22. Registers mapped into IEEE Std 802.3 Clause 45 MDIO Managed Devices (MMD) are accessed indirectly through the MMD Access Control (MMDCTRL) and MMD Access Address/Data (MMDAD) registers as described in IEEE Std 802.3 Annex 22D.

MMD Register Read

The following process is used to indirectly read Clause 45 registers using the Clause 22 access mechanism.

  1. Write the MMD Access Control register with the MMD Function (FNCTN) field set to 00b and the Device Address (DEVID) field with the MDIO Management Device (MMD) address.
  2. Write the address of the desired register to be read into the MMD Access Address/Data register.
  3. Write the MMD Access Control register with the MMD Function field set to 01b, 10b, or 11b.
  4. Read the contents of the MMD’s selected register from the MMD Access Address/Data register.

Subsequent reads from the MMD Access Address/Data register will continue to reread and return the value of the selected MMD register when the MMD Function field is set to 01b or 11b. When the MMD Function field is set to 10b, the MMD register address will be incremented following every read causing subsequent reads from the MMD Access Address/Data register to return data from the next higher MMD register.

MMD Register Write

The following process is used to indirectly write Clause 45 registers using the Clause 22 access mechanism.

  1. Write the MMD Access Control register with the MMD Function (FNCTN) field set to 00b and the Device Address (DEVID) field with the MDIO Management Device (MMD) address.
  2. Write the address of the desired register to be written into the MMD Access Address/Data register.
  3. Write the MMD Access Control register with the MMD Function field set to 01b, 10b, or 11b.

Subsequent writes to the MMD Access Address/Data register will continue to write to the selected MMD register when the MMD Function field is set to 01b. When the MMD Function field is set to 10b or 11b, the MMD register address will be incremented following every write causing subsequent writes to the MMD Access Address/Data register to write data to the next higher MMD register.