aboutsummaryrefslogtreecommitdiff
path: root/drivers/net/eth-phy-uclass.c
diff options
context:
space:
mode:
authorTim Harvey2022-03-01 12:15:02 -0800
committerRamon Fried2022-04-10 08:44:13 +0300
commitf3409d7ae6127b6aa33ec9cdb63808745ed4b56e (patch)
tree8d93551f916f18eeedccee272780e5bc2ec519cb /drivers/net/eth-phy-uclass.c
parent4223fb0ee18d11462c55ac94198fdc2055f2c27c (diff)
net: eth-phy: prevent undesired de-assertion of phy-reset on request
When gpio_request_by_name allocates a gpio output it by default will de-assert the gpio which for phy-reset will take the PHY out of reset. As this occurs before eth_phy_reset is called to assert the reset line it can cause undesired affects if reset timings are not properly met. Configure the gpio with GPIOD_IS_OUT_ACTIVE so that reset is kept active (reset asserted) to avoid this. Cc: Sean Anderson <sean.anderson@seco.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>
Diffstat (limited to 'drivers/net/eth-phy-uclass.c')
-rw-r--r--drivers/net/eth-phy-uclass.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/eth-phy-uclass.c b/drivers/net/eth-phy-uclass.c
index 1f285f7afd2..27b77444a0c 100644
--- a/drivers/net/eth-phy-uclass.c
+++ b/drivers/net/eth-phy-uclass.c
@@ -137,7 +137,7 @@ static int eth_phy_of_to_plat(struct udevice *dev)
/* search "reset-gpios" in phy node */
ret = gpio_request_by_name(dev, "reset-gpios", 0,
&uc_priv->reset_gpio,
- GPIOD_IS_OUT);
+ GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE);
if (ret && ret != -ENOENT)
return ret;