[PATCH 2/2] ARM: Layerscape: Add LS1021A IOT board support
Renaud Barbier
Renaud.Barbier at ametek.com
Fri Feb 17 05:44:25 PST 2023
>
> A phy is registered in phy_register_device(). The call to register_device() in
> that function will end up in mdio_bus_match(). You could add some
> debugging there to see which phy ids are matched against each other.
>
> An idea is that the at803x driver is not yet registered by the time
> phy_device_connect() is called, but I don't see how this could happen.
>
For some reason mdio_bus_match is not called.
So if I understand the sequence correctly
First phy_register is called and assign genphy to all phys
phy_register_device id = 0x0, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY
phy_register_device id = 0x4dd074, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY
phy_register_device id = 0x4dd074, register genphy_driver.drv = 0xbbe7c5fc, Generic PHY
I see no call being made to mdio_bus_match
Then I see that the Atheros PHY driver is registered:
register generic for: Generic PHY, id = 0xffffffff, config_init = 0xbbe143b8
register specific for: Atheros 8031 ethernet, id = 0x4dd074, config_init = 0xbbe15f38
And eventually phy connect who uses the generic driver
Is not it the problem that the Atheros driver should be loaded first.
ret = register_device(&phydev->dev);
if (ret)
return ret;
if (phydev->bus)
phydev->bus->phy_map[phydev->addr] = phydev;
phydev->registered = 1;
if (phydev->dev.driver)
return 0;
phydev->dev.driver = &genphy_driver.drv;
Would not the line above overwrite the Atheros driver anyway?
More information about the barebox
mailing list