[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200717163441.GA1339445@lunn.ch>
Date: Fri, 17 Jul 2020 18:34:41 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Fabio Estevam <festevam@...il.com>
Cc: netdev <netdev@...r.kernel.org>,
Florian Fainelli <f.fainelli@...il.com>,
Russell King - ARM Linux <linux@...linux.org.uk>,
Heiner Kallweit <hkallweit1@...il.com>,
Bruno Thomsen <bth@...strup.com>,
Lars Alex Pedersen <laa@...strup.com>
Subject: Re: fec: micrel: Ethernet PHY type ID auto-detection issue
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
Powered by blists - more mailing lists