On Fri, Jul 17, 2020 at 12:52:08PM -0300, Fabio Estevam wrote: > Hi Bruno,
> > I have been having issues with Ethernet PHY type ID > > auto-detection when changing from the deprecated fec > > phy-reset-{gpios,duration,post-delay} properties to the > > modern mdio reset-{assert-us,deassert-us,gpios} > > properties in the device tree. > > Kernel error messages (modem mdio reset): > > mdio_bus 30be0000.ethernet-1: MDIO device at address 1 is missing. > > fec 30be0000.ethernet eth0: Unable to connect to phy It sounds like the PHY is not responding during scanning of the bus. https://elixir.bootlin.com/linux/v5.8-rc4/source/drivers/of/of_mdio.c#L277 If you dig down the call chain: https://elixir.bootlin.com/linux/v5.8-rc4/source/drivers/net/phy/phy_device.c#L778 This reads register 2 and 3 of the PHY to get its ID. https://elixir.bootlin.com/linux/v5.8-rc4/source/drivers/net/phy/phy_device.c#L817 If the ID is mostly 0xff there is no device there. So check the initial reset state of the PHY, and when is it taken out of reset, and is the delay long enough for it to get itself together and start answering requests. Andrew