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.
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
=>
at uboot , it is working. I want to access phy registers in Linux. Kindly help.