
On 1/22/25 10:22, Tapio Reijonen wrote:
Change the order to connect gmiitorgmii before PHY creation. The gmiitorgmii create additional in DTS configured PHY during it's configuration. This ensures, that converter sits between the MAC and the external phy MAC <==> GMII2RGMII <==> RGMII_PHY.
as I said please extend commit message to describe reasons behind this and using that dt config as you use.
Fixes: a744a284e354 ("net: phy: Add support for ethernet-phy-id with gpio reset")
And we can discuss if this is a fix of this commit. It is more or less workaround for Linux kernel limitation and not actual fix. Because with correct DT binding existing code should work. Obviously correct way to handle it would be to fix Linux kernel driver not to convince U-Boot to use Linux kernel dt binding.
M
Signed-off-by: Tapio Reijonen tapio.reijonen@vaisala.com
(no changes since v1)
drivers/net/phy/phy.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 716a1d461115..740533adecac 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -939,14 +939,14 @@ struct phy_device *phy_connect(struct mii_dev *bus, int addr, phydev = phy_device_create(bus, 0, PHY_NCSI_ID, false); #endif
-#ifdef CONFIG_PHY_ETHERNET_ID +#ifdef CONFIG_PHY_XILINX_GMII2RGMII if (!phydev)
phydev = phy_connect_phy_id(bus, dev, addr);
#endifphydev = phy_connect_gmii2rgmii(bus, dev);
-#ifdef CONFIG_PHY_XILINX_GMII2RGMII +#ifdef CONFIG_PHY_ETHERNET_ID if (!phydev)
phydev = phy_connect_gmii2rgmii(bus, dev);
phydev = phy_connect_phy_id(bus, dev, addr);
#endif
if (!phydev)