mirror of
https://github.com/u-boot/u-boot.git
synced 2025-01-10 12:53:25 +08:00
net: phy: Use PHY MDIO address from DT if available
In case the PHY is fully described in DT, use PHY MDIO address from DT directly instead of always using auto-detection. This also fixes the behavior of 'mdio list' in such DT setup, which now prints the PHY connected to the MAC correctly. Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org> Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com>
This commit is contained in:
parent
485bfe1adb
commit
91e70367a5
@ -71,6 +71,9 @@ struct phy_device *phy_connect_phy_id(struct mii_dev *bus, struct udevice *dev,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (phyaddr == -1)
|
||||||
|
phyaddr = ofnode_read_u32_default(phandle_args.node, "reg", -1);
|
||||||
|
|
||||||
id = vendor << 16 | device;
|
id = vendor << 16 | device;
|
||||||
phydev = phy_device_create(bus, phyaddr, id, false);
|
phydev = phy_device_create(bus, phyaddr, id, false);
|
||||||
if (phydev)
|
if (phydev)
|
||||||
|
Loading…
Reference in New Issue
Block a user