aboutsummaryrefslogtreecommitdiff
path: root/include/miiphy.h
diff options
context:
space:
mode:
authorAlex Marginean <alexandru.marginean@nxp.com>2019-11-25 17:15:12 +0200
committerJoe Hershberger <joe.hershberger@ni.com>2019-12-09 09:47:43 -0600
commit2f6245594e1f11db00efcaa5ac122918f019e0b4 (patch)
tree1b8933734b1754fe0e5c1213913c0950370e1ecf /include/miiphy.h
parenta5d32c37d9eec2f819273536a5600a0fbde09acb (diff)
downloadu-boot-2f6245594e1f11db00efcaa5ac122918f019e0b4.zip
u-boot-2f6245594e1f11db00efcaa5ac122918f019e0b4.tar.gz
u-boot-2f6245594e1f11db00efcaa5ac122918f019e0b4.tar.bz2
net: mdio-uclass: add dm_eth_phy_connect helper function
The function connects an ethernet device to a PHY using DT information. This API is only available for eth devices with an associated device tree node. Signed-off-by: Alex Marginean <alexandru.marginean@nxp.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
Diffstat (limited to 'include/miiphy.h')
-rw-r--r--include/miiphy.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/miiphy.h b/include/miiphy.h
index 94bf0da..61c136b 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -165,6 +165,18 @@ struct phy_device *dm_mdio_phy_connect(struct udevice *mdiodev, int phyaddr,
struct udevice *ethdev,
phy_interface_t interface);
+/**
+ * dm_eth_phy_connect - Connect an Eth device to a PHY based on device tree
+ *
+ * Picks up the DT phy-handle and phy-mode from ethernet device node and
+ * connects the ethernet device to the linked PHY.
+ *
+ * @ethdev: ethernet device
+ *
+ * @return pointer to phy_device, or 0 on error
+ */
+struct phy_device *dm_eth_phy_connect(struct udevice *ethdev);
+
#endif
#ifdef CONFIG_DM_MDIO_MUX