summaryrefslogtreecommitdiff
path: root/include/phy.h
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2022-03-16 12:52:02 -0400
committerTom Rini <trini@konsulko.com>2022-03-16 12:52:02 -0400
commit297e6eb8dcf9d90aaf9b0d146cdd502403003d04 (patch)
treea08774cdaa4a72af892d4c7a57b3e1307734ad89 /include/phy.h
parentc24b4e4fb8810b496e5f303ffd2641293f4c4b50 (diff)
parent0ac03fbab51c72fa978569a831c001c4ddad8e2a (diff)
Merge tag 'xilinx-for-v2022.07-rc1' of https://source.denx.de/u-boot/custodians/u-boot-microblaze into next
Xilinx changes for v2022.07-rc1 microblaze: - Add support for reserved memory xilinx: - Update FRU code with MAC reading zynqmp: - Remove double AMS setting - DT updates (mostly for SOMs) - Add support for zcu106 rev 1.0 zynq: - Update nand binding nand: - Aligned zynq_nand to upstream DT binding net: - Add support for ethernet-phy-id mmc: - Workaround CD in zynq_sdhci driver also for ZynqMP - Add support for dynamic/run-time SD config for SOMs gpio: - Add driver for slg7xl45106 firmware: - Add support for dynamic SD config power-domain: - Update zynqmp driver with the latest firmware video: - Add skeleton driver for DP and DPDMA i2c: - Fix i2c to work with QEMU pinctrl: - Add driver for zynqmp pinctrl driver
Diffstat (limited to 'include/phy.h')
-rw-r--r--include/phy.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/phy.h b/include/phy.h
index c66fd43ea88..9ea4bd42db4 100644
--- a/include/phy.h
+++ b/include/phy.h
@@ -454,6 +454,32 @@ void phy_connect_dev(struct phy_device *phydev, struct udevice *dev);
struct phy_device *phy_connect(struct mii_dev *bus, int addr,
struct udevice *dev,
phy_interface_t interface);
+/**
+ * phy_device_create() - Create a PHY device
+ *
+ * @bus: MII/MDIO bus that hosts the PHY
+ * @addr: PHY address on MDIO bus
+ * @phy_id: where to store the ID retrieved
+ * @is_c45: Device Identifiers if is_c45
+ * @interface: interface between the MAC and PHY
+ * @return: pointer to phy_device if a PHY is found, or NULL otherwise
+ */
+struct phy_device *phy_device_create(struct mii_dev *bus, int addr,
+ u32 phy_id, bool is_c45,
+ phy_interface_t interface);
+
+/**
+ * phy_connect_phy_id() - Connect to phy device by reading PHY id
+ * from phy node.
+ *
+ * @bus: MII/MDIO bus that hosts the PHY
+ * @dev: Ethernet device to associate to the PHY
+ * @interface: Interface between the MAC and PHY
+ * @return: pointer to phy_device if a PHY is found,
+ * or NULL otherwise
+ */
+struct phy_device *phy_connect_phy_id(struct mii_dev *bus, struct udevice *dev,
+ phy_interface_t interface);
static inline ofnode phy_get_ofnode(struct phy_device *phydev)
{