Hi NXP Team,
I can't use https://github.com/wkz/mdio-tools in LSDK20.04 on LS1046A。
I have tried versions 1.1 to 1.3, and the result is the same.
Can you help me confirm this issue?
mdio-tools cannot used on DPAA Ethernet ports.
We use mdio_proxy_module in LSDK 21.08.
mdio_proxy_module:
url: https://github.com/nxp-qoriq/mdio-proxy-module.git
tag: LSDK-21.08
However you need to port the source code to make it suitable for your version Linux Kernel.
To find out mdio bus name, you need to do the following.
find /sys | grep -i class|grep -i mdio
Please refer to my following log.
root@localhost:~# find /sys | grep -i class|grep -i mdio /sys/class/mdio_bus
/sys/class/mdio_bus/0x0000000001afc000
/sys/class/mdio_bus/0x0000000001aeb000
/sys/class/mdio_bus/0x0000000001af3000
/sys/class/mdio_bus/0x0000000001ae5000
/sys/class/mdio_bus/0x0000000001ae7000
/sys/class/mdio_bus/0x0000000001ae1000
/sys/class/mdio_bus/fixed-0
/sys/class/mdio_bus/0x0000000001afd000
/sys/class/mdio_bus/0x0000000001af1000
/sys/class/mdio_bus/0x0000000001ae9000
/sys/class/mdio_bus/0x0000000001ae3000
root@localhost:~# ./mdio-app 0x0000000001afc000 0 c22 0
Got back data: 0x1040
root@localhost:~# ./mdio-app 0x0000000001afc000 0 c22 1
Got back data: 0x7989
root@localhost:~# ./mdio-app 0x0000000001afc000 0 c22 2
Got back data: 0x001c
root@localhost:~#
For PHY registers read and write, you could clone phytool and build it from: https://github.com/wkz/phytool.git
Then copy phytool to the target board to use it.
In the default Linux Kernel driver, phytool write is not supported, you need to apply the attached patches.