
On Tue, Jun 20, 2023 at 1:46 AM Marek Vasut marek.vasut+renesas@mailbox.org wrote:
In case the PHY DT node describes GPIO reset and no other method of detecting the PHY succeeded, release the PHY from reset using its reset GPIO before reading out the PHY IDs as a last resort. This way there is slightly better chance of successful PHY ID readout.
Signed-off-by: Marek Vasut marek.vasut+renesas@mailbox.org
Cc: Joe Hershberger joe.hershberger@ni.com Cc: Marek Vasut marek.vasut+renesas@mailbox.org Cc: Michal Simek michal.simek@amd.com Cc: Nishanth Menon nm@ti.com Cc: Ramon Fried rfried.dev@gmail.com
drivers/net/phy/phy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 3d69c2c4d28..373006f8206 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -969,7 +969,7 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr, phydev = phy_connect_gmii2rgmii(bus, dev); #endif
if (!phydev)
if (!phydev && !phy_gpio_reset(dev)) phydev = phy_find_by_mask(bus, mask); if (phydev)
-- 2.39.2
Reviewed-by: Ramon Fried rfried.dev@gmail.com