ethernet phy mdio c22 c45

ethernet phy mdio c22 c45



linux系统读写PHY寄存器工具mdio
了解与MDIO MDC接口相关的clause22、clause45
了解与MDIO MDC接口相关的22号、45号条款


https://www.ieee802.org/3/efm/public/nov02/oam/pannell_oam_1_1102.pdf




BCM89XXX系列PHY驱动代码适配



cl22 compatible c45 read and write

#read(int mmd, int reg_num)
./mdio_reg eth0 0x0d 0x0 | mmd
./mdio_reg eth0 0x0e reg_num
./mdio_reg eth0 0x0d 0x4000 | mmd
./mdio_reg eth0 0x0e

#write(int mmd, int reg_num, int reg_val)
./mdio_reg eth0 0x0d 0x0 | mmd
./mdio_reg eth0 0x0e reg_num
./mdio_reg eth0 0x0d 0x4000 | mmd
./mdio_reg eth0 0x0e reg_val


example:

bcm89881 phy
## read id
./mdio_reg eth0 0x0d 0x0001
./mdio_reg eth0 0x0e 0x0002
./mdio_reg eth0 0x0d 0x4001
./mdio_reg eth0 0x0e

./mdio_reg eth0 0x0d 0x0001
./mdio_reg eth0 0x0e 0x0003
./mdio_reg eth0 0x0d 0x4001
./mdio_reg eth0 0x0e


posted @ 2023-08-30 11:47  王阳开  阅读(815)  评论(0)    收藏  举报