mdio read write in Linux

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

mdio read write in Linux

2,848 次查看
rashmikj
Contributor III

I am using phytool "https://github.com/wkz/phytool" to read / write MDIO bus in Linux on LS1046ARDB Kit.

The read works fine but when i try to write , it gives following error

"error: phy_write (-22)".

Is it related to some permissions. Kindly help.

 

0 项奖励
回复
2 回复数

2,840 次查看
yipingwang
NXP TechSupport
NXP TechSupport

It seems that there is problem with this application. You could use "mdio write" command in u-boot, please refer to the following example.

=> mdio write FM1@DTSEC3 0xd 0x7
=> mdio write FM1@DTSEC3 0xe 0x3c
=> mdio write FM1@DTSEC3 0xd 0x4007
=> mdio read FM1@DTSEC3 0xe
Reading from bus FSL_MDIO0
PHY at address 1:
14 - 0x6
=> mdio write FM1@DTSEC3 0xe 0x0
=> mdio read FM1@DTSEC3 0xe
Reading from bus FSL_MDIO0
PHY at address 1:
14 - 0x0
=>

0 项奖励
回复

2,837 次查看
rashmikj
Contributor III

at uboot , it is working.  I want to access phy registers in Linux. Kindly help.

0 项奖励
回复