diff options
author | Marek Vasut <marek.vasut+renesas@mailbox.org> | 2024-03-18 15:57:01 +0100 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2024-03-26 19:58:26 -0400 |
commit | e99a6efa80eaf69aa07d5845f6d2bb362a81c0dd (patch) | |
tree | db6bb5520f2527aa5ccf43f83147ab2276b894e2 /include | |
parent | 85d44e424a32b49f2c9ddf002a684e43bb7828c1 (diff) | |
download | u-boot-e99a6efa80eaf69aa07d5845f6d2bb362a81c0dd.zip u-boot-e99a6efa80eaf69aa07d5845f6d2bb362a81c0dd.tar.gz u-boot-e99a6efa80eaf69aa07d5845f6d2bb362a81c0dd.tar.bz2 |
net: phy: Factor out PHY GPIO reset code
Pull the PHY GPIO reset code into separate function, since
this is and will be reused multiple times. Set up default
reset assert and deassert timing to generous 20ms and 1ms
for maximum compatibility in case those DT properties are
missing.
Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/phy.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/phy.h b/include/phy.h index ae23814..90b7e36 100644 --- a/include/phy.h +++ b/include/phy.h @@ -184,6 +184,15 @@ struct fixed_link { int phy_reset(struct phy_device *phydev); /** + * phy_gpio_reset() - Resets the specified PHY using GPIO reset + * Toggles the optional PHY reset GPIO + * + * @dev: PHY udevice to reset + * @return: 0 if OK, -ve on error + */ +int phy_gpio_reset(struct udevice *dev); + +/** * phy_find_by_mask() - Searches for a PHY on the specified MDIO bus * The function checks the PHY addresses flagged in phy_mask and returns a * phy_device pointer if it detects a PHY. |