diff options
| author | Tim Harvey <[email protected]> | 2022-03-01 12:15:01 -0800 |
|---|---|---|
| committer | Ramon Fried <[email protected]> | 2022-04-10 08:44:13 +0300 |
| commit | 4223fb0ee18d11462c55ac94198fdc2055f2c27c (patch) | |
| tree | 21cd313ece92ebd9c138685a5eb41f8b558d931e | |
| parent | e24b58f5ed4f9a0b5b1c80a5f35aa71fcad7f233 (diff) | |
net: fec: 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 fec_gpio_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 <[email protected]>
Signed-off-by: Tim Harvey <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
Tested-by: Adam Ford <[email protected]> #imx8mm-beacon
Reviewed-by: Ramon Fried <[email protected]>
| -rw-r--r-- | drivers/net/fec_mxc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c index 3ac8e2a9cd1..a623a5c45e4 100644 --- a/drivers/net/fec_mxc.c +++ b/drivers/net/fec_mxc.c @@ -1324,7 +1324,7 @@ static int fecmxc_of_to_plat(struct udevice *dev) #if CONFIG_IS_ENABLED(DM_GPIO) ret = gpio_request_by_name(dev, "phy-reset-gpios", 0, - &priv->phy_reset_gpio, GPIOD_IS_OUT); + &priv->phy_reset_gpio, GPIOD_IS_OUT | GPIOD_IS_OUT_ACTIVE); if (ret < 0) return 0; /* property is optional, don't return error! */ |
