As the work requires,I am using the universual file to read the phy register(AQR113C) . The mdio address is 0x0.
the universual file i had upload as one attachment. mdio_opr.c (1.9 KB)
and cross build a mdio bin file.
then in cmd line exec:
and other reg is 0x0 too.
I have read kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c
and /kernel/kernel-5.10/drivers/net/phy/phy.c (func phy_mii_ioctl) ,but can not find any solution.
for a further test,I have test on xavier devkit platform,can get the phy reg data.
Hi WayneWWW:
sorry,I don’t know what’s you mean.
DTC files?
I modify hardware/nvidia/platform/t23x/concord/kernel-dts/cvb/tegra234-ethernet-3737-0000.dtsi
add line nvidia,mdio_addr = <0>;
Hi WayneWWW:
I trace the source code .
in kernel/nvidia/drivers/net/ethernet/nvidia/nvethernet/ether_linux.c
ether_mdio_register
->of_mdiobus_register (the kernel API)
kernel/kernel-5.10/drivers/net/mdio/of_mdio.c
of_mdiobus_register
->for_each_available_child_of_node(np, child)
->of_mdiobus_register_phy
->phy = get_phy_device(mdio, addr, is_c45);
and get_phy_device is lib api
Hi WayneWWW:
I am using the orin devkit for test now,and the before log and test is based on Orin devkit .
so I think the default configure is what you show in the picture.
I paln to do the same thing on our carrier board after test ok on orin devkit.
could you read phy_id on orin devkit for the same test use the attach file mdio_opr.c
thanks.