[PATCH] net: phy: ethernet_id: fix duplicate eth_phy binding
Vinay Tilak, Pranav
Pranav.VinayTilak at amd.com
Tue Apr 7 08:17:16 CEST 2026
[Public]
Hi @Marek Vasut,
> -----Original Message-----
> From: Marek Vasut <marek.vasut at mailbox.org>
> Sent: Monday, April 6, 2026 9:35 PM
> To: Vinay Tilak, Pranav <Pranav.VinayTilak at amd.com>; u-boot at lists.denx.de;
> Simek, Michal <michal.simek at amd.com>
> Cc: git (AMD-Xilinx) <git at amd.com>; Begari, Padmarao
> <Padmarao.Begari at amd.com>; Jerome Forissier
> <jerome.forissier at arm.com>; Tom Rini <trini at konsulko.com>; Marek Vasut
> <marek.vasut+renesas at mailbox.org>; Ramon Fried <rfried.dev at gmail.com>
> Subject: Re: [PATCH] net: phy: ethernet_id: fix duplicate eth_phy binding
>
> On 4/6/26 10:41 AM, Pranav Tilak wrote:
> > When both CONFIG_PHY_ETHERNET_ID and CONFIG_DM_ETH_PHY are
> enabled,
> > eth_phy_binds_nodes() called from eth_post_bind() already binds the
> > ethernet PHY node to eth_phy_generic_drv. However,
> > phy_connect_phy_id() called via zynq_phy_init() -> phy_connect()
> > cannot attach to the already bound PHY device and creates a second
> > instance, resulting in duplicate entries in the dm tree.
> >
> > Fix this by guarding the bind/probe block in phy_connect_phy_id() with
> > uclass_get_device_by_ofnode() to skip re-binding if the PHY node is
> > already registered in UCLASS_ETH_PHY.
> Shouldn't phy_connect() check whether the PHY isn't already bound and bail
> early if it is ?
Yes, i checked we can move the duplicate binding check from phy_connect_phy_id() to its caller in phy_connect() and using uclass_get_device_by_phandle() to skip re-binding if the PHY node is already registered in UCLASS_ETH_PHY. Will update in v2.
Thanks,
Pranav Tilak.
More information about the U-Boot
mailing list