mdio read write in Linux

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

mdio read write in Linux

2,842 Views
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 Kudos
Reply
2 Replies

2,834 Views
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 Kudos
Reply

2,831 Views
rashmikj
Contributor III

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

0 Kudos
Reply