当前位置:网站首页>PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)

PHY drive commissioning --- mdio/mdc interface Clause 22 and 45 (I)

2022-07-05 06:53:00 Enlaihe

Recently, I was debugging a Phy The driver , From no clue to a little understanding, I have experienced too much pain , So I decided to write this series to record . Special thanks to countless excellent bloggers for their selfless dedication. Many excellent blogs have given me great help . In this series , I will also reprint some excellent blog posts ( A link will be attached ), And add your own understanding , If part of the content has infringement , Please contact me .

summary

management MII Interface MDIO The interface is a two-wire serial interface , Used to correct PHY Chips, etc The physical layer Information operation management .

MDIO The history of

MDIO yes Management Data Input/Output Abbreviation , There are two wires , They are bidirectional MDIO And unidirectional MDC, It is used in the upper and middle layers of Ethernet equipment The physical layer Management of . The reason why we can manage these PHY chip , It's because I can be right PHY Access and modify various registers of the chip .

MDIO The interface was originally created by IEEE RFC802.3 Medium 22 As defined in Clause No , In the original definition , A single MDIO Interface can access 32 Different PHY In the equipment 32 A register , These registers provide status and control information , for example : Connection status 、 Transmission speed capability 、 The currently selected transmission speed 、 Power down during low voltage consumption 、 Full duplex or half duplex 、 Automatic negotiation 、 Error prompt and feedback information, etc .

In order to satisfy the 10G The popularity and development of Ethernet equipment , stay IEEE 802.3ae Of 45 In Clause No MDIO The interface provides additional specifications :

  • Can pass 32 Port access 32 Different devices 65536 A register ;
  • For the visit 10G Ethernet provides additional OP Code and ST code , Thus, the register address can be accessed directly ;
  • End to end error signal ;
  • Loopback mode control ;
  • Low voltage electrical standards .

How it works

MDIO The bus has two signals : Manage data clock (MDC) And manage data entry / Output (MDIO).
MDIO There are specific terms in the interface that define the various devices on the bus . drive MDIO The device of the bus is defined as the station management entity (STA). And be MDC The managed target device is called MDIO Managed devices (MMD).
STA initialization MDIO All communications , At the same time, it is responsible for driving the clock MDC.MDC The frequency of can be as high as 2.5 MHz.

22 Clause No

22 Clause No MDIO The frame format of communication is defined as follows :
 Insert picture description here

45 Clause No

To make up for it 22 Defects as defined in Clause No ,45 Support for low voltage equipment has been added to Clause No , As low as 1.2V, At the same time, the frame format is expanded , Access to more devices and registers .

45 Number MDIO The format of communication frame is as follows :
 Insert picture description here
The first 45 The main change in Clause No. 1 is how to access registers . In the 22 in , A single frame specifies the address and data to be read or written , At the same time, these works have been completed .45 Change this paradigm , The first address frame is sent to the specified address frame MMD And registers , The second frame is then sent to perform read or write .

The advantage of adding this sequential circular access is 45 The terms are backwards compatible 22 The terms of , Allow interoperability of devices . secondly , By creating a registration address for the framework , Address space from 5 Bit increase to 16 position , This makes STA visit 65536 Two different registers .

To do this , Some changes have been made in the components of the data frame . Defined a new ST Code (00), Used to identify No 45 Data frame of clause No . The operation code is extended to the specified address frame , Write frame , Read frame , Or read and read incremental address frames . Because the register address is no longer needed , This field is replaced by the content that specifies the target device type . After expansion, it also allows STA Access in addition to PHY Other equipment than .

Reprint blog address : Understand and MDIO/MDC Interface related 22 Number 、45 Clause No

原网站

版权声明
本文为[Enlaihe]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/186/202207050627493029.html