This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi, guys! I am testing the EMAC module on C6474 through the example CCS3.3\boards\evmc6474_v1\tests\emac, and there is a piece of code puzzled me:
Uint16 phy_getReg(int phynum, int regnum)
{
Uint16 value;
MDIO_USERACCESS0 = 0 // Read Phy Id 1
| ( 1 << 31 ) // [31] Go
| ( 0 << 30 ) // [30] Read
| ( 0 << 29 ) // [29] Ack
| (regnum << 21 ) // [25-21] PHY register address
| (phynum << 16 ) // [20-16] PHY address
| ( 0 << 0 ) // [15-0] Data ;
while( MDIO_USERACCESS0 & 0x80000000 ); // Wait for Results
value = MDIO_USERACCESS0;
return value;
}
I understand the purpose is to set phy register through MDIO register, but I can't find any infromation about phy register and phy address in datasheet, and information about 88e6122 is very few on the internet. Is there anyone could help me?
Hi Kaiqi,
To my best knowledge, some common parts of MII registers are defined in the section 22.2.4 Management functions of IEEE 802.3. I remember we can download it from the Internet.
Following is also helpful.
However, there are also manufactures depended registers. We need to refer device specific documentation but I don't know they provide data sheet on the Internet.
Best Regards,
Atsushi
Atsushi,
Thx for ur reply! However, the registers' information is incomplete. I'm still looking for datasheet of marvell 88e6122, but few thing could be reached.
Best Regards,
Kaiqi