MDIO命令格式:
mdio - MDIO utility commands
Usage:
mdio list - List MDIO buses
mdio read <phydev> [<devad>.]<reg> - read PHY\'s register at <devad>.<reg>
mdio write <phydev> [<devad>.]<reg> <data> - write PHY\'s register at <devad>.<reg>
mdio rx <phydev> [<devad>.]<reg> - read PHY\'s extended register at <devad>.<reg>
mdio wx <phydev> [<devad>.]<reg> <data> - write PHY\'s extended register at <devad>.<reg>
<phydev> may be:
<busname> <addr>
<addr>
<eth name>
<addr> <devad>, and <reg> may be ranges, e.g. 1-5.4-0x1f.
=>
=> mdio list
FSL_MDIO0:
1 - AR8031/AR8033 <--> FM1@DTSEC3
2 - AR8031/AR8033 <--> FM1@DTSEC4
8 - Generic PHY <--> FM1@DTSEC1
9 - Generic PHY <--> FM1@DTSEC2
a - Generic PHY <--> FM1@DTSEC5
b - Generic PHY <--> FM1@DTSEC6
FM_TGEC_MDIO:
0 - Aquantia AQR107 <--> FM1@TGEC1
=>
MII registers访问:
=> mdio read FM1@DTSEC3 2
Reading from bus FSL_MDIO0
PHY at address 1:
2 - 0x4d
=> 正确读出,符合要求
=> mdio read FM1@DTSEC3 3
Reading from bus FSL_MDIO0
PHY at address 1:
3 – 0xd074
正确读出,符合要求
Debug registers访问:
=> mdio write FM1@DTSEC3 1d 1f
=> mdio write FM1@DTSEC3 1e 8
=> mdio read FM1@DTSEC3 1e
Reading from bus FSL_MDIO0
PHY at address 1:
30 - 0x7c08
=>正确读出,符合要求
MDIO interface registers访问
=> mdio read FM1@DTSEC3 7.8005
Reading from bus FSL_MDIO0
PHY at address 1:
7.32773 – 0xa0c6
正确读出,符合要求