summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMatthias Schiffer <[email protected]>2025-09-30 10:05:10 +0200
committerTom Rini <[email protected]>2025-10-10 11:07:44 -0600
commit8db554dcbb2374a2dea130af56d781732070beb7 (patch)
treea680802e57b1b38725cb1144bd30e0db02d15ad2 /include
parent361731fc39c3257c28efda902344270b7eb1fd4d (diff)
net: mdio-uclass: introduce dm_eth_phy_connect_interface()
dm_eth_phy_connect_interface() is a variant of dm_eth_phy_connect() that allows to set the used PHY mode, in case the MAC driver needs to fix it up. The previously static dm_eth_connect_phy_handle() is renamed and extended for this purpose. Signed-off-by: Matthias Schiffer <[email protected]>
Diffstat (limited to 'include')
-rw-r--r--include/miiphy.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/miiphy.h b/include/miiphy.h
index 00d0b9b6a43..96afe5f4030 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -193,6 +193,21 @@ struct phy_device *dm_mdio_phy_connect(struct udevice *mdiodev, int phyaddr,
phy_interface_t interface);
/**
+ * dm_eth_phy_connect_interface - Connect an Eth device to a PHY based on device
+ * tree with custom PHY interface
+ *
+ * Picks up the DT phy-handle and from ethernet device node and connects the
+ * ethernet device to the linked PHY, while allowing the caller to specify
+ * the phy-mode to use.
+ *
+ * @ethdev: ethernet device
+ * @interface: MAC-PHY protocol
+ *
+ * Return: pointer to phy_device, or 0 on error
+ */
+struct phy_device *dm_eth_phy_connect_interface(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