From 9b529a972d15af7dabfa2fffa69f0e2ed69b6220 Mon Sep 17 00:00:00 2001 From: T Karthik Reddy Date: Tue, 29 Mar 2022 16:05:57 +0200 Subject: net: phy: Fix rgmii-id phy reset timeout issue While creating a phy device using phy_device_create(), we need to provide a valid phyaddr instead of 0 causing phy address being registered as 0 with mdio bus and shows mdio phy list as below ZynqMP> mdio list eth0: 0 - TI DP83867 <--> ethernet@ff0b0000 eth1: 0 - TI DP83867 <--> ethernet@ff0c0000 Also PHY soft reset is being requested on 0 instead of valid address causing "PHY reset timed out" error. So add phyaddr argument to phy_connect_phy_id() and to its prototype to create phy device with valid phyaddress. Fixes: a744a284e354 ("net: phy: Add support for ethernet-phy-id with gpio reset") Signed-off-by: T Karthik Reddy Signed-off-by: Michal Simek Reviewed-by: Bin Meng Link: https://lore.kernel.org/r/fe35fddb9faa5af577ffdfabaec6879c935a30f8.1648562755.git.michal.simek@xilinx.com --- include/phy.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/phy.h b/include/phy.h index 9ea4bd42db4..5e3da4b01b6 100644 --- a/include/phy.h +++ b/include/phy.h @@ -479,7 +479,7 @@ struct phy_device *phy_device_create(struct mii_dev *bus, int addr, * or NULL otherwise */ struct phy_device *phy_connect_phy_id(struct mii_dev *bus, struct udevice *dev, - phy_interface_t interface); + int phyaddr, phy_interface_t interface); static inline ofnode phy_get_ofnode(struct phy_device *phydev) { -- cgit v1.2.3