From: Tim Harvey <tharvey@gateworks.com>
To: u-boot@lists.denx.de, Joe Hershberger <joe.hershberger@ni.com>,
Ramon Fried <rfried.dev@gmail.com>
Cc: Tim Harvey <tharvey@gateworks.com>,
Sean Anderson <sean.anderson@seco.com>
Subject: [PATCH 1/2] net: fec: prevent undesired de-assertion of phy-reset on request
Date: Tue, 1 Mar 2022 12:15:01 -0800 [thread overview]
Message-ID: <20220301201502.28026-2-tharvey@gateworks.com> (raw)
In-Reply-To: <20220301201502.28026-1-tharvey@gateworks.com>
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 <sean.anderson@seco.com>
Signed-off-by: Tim Harvey <tharvey@gateworks.com>
---
drivers/net/fec_mxc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/fec_mxc.c b/drivers/net/fec_mxc.c
index 985b03844739..c1f4930172cf 100644
--- a/drivers/net/fec_mxc.c
+++ b/drivers/net/fec_mxc.c
@@ -1579,7 +1579,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! */
--
2.17.1
next prev parent reply other threads:[~2022-03-01 20:15 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-01 20:15 [PATCH 0/2] prevent undesired de-assertion of phy-reset Tim Harvey
2022-03-01 20:15 ` Tim Harvey [this message]
2022-03-01 20:38 ` [PATCH 1/2] net: fec: prevent undesired de-assertion of phy-reset on request Joe Hershberger
2022-03-02 1:58 ` Adam Ford
2022-03-03 7:55 ` Ramon Fried
2022-04-10 5:05 ` Ramon Fried
2022-03-01 20:15 ` [PATCH 2/2] net: eth-phy: " Tim Harvey
2022-03-01 20:38 ` Joe Hershberger
2022-03-03 7:55 ` Ramon Fried
2022-04-10 5:05 ` Ramon Fried
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220301201502.28026-2-tharvey@gateworks.com \
--to=tharvey@gateworks.com \
--cc=joe.hershberger@ni.com \
--cc=rfried.dev@gmail.com \
--cc=sean.anderson@seco.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox