From: Minda Chen <minda.chen@starfivetech.com>
To: Marek Vasut <marex@denx.de>, Tom Rini <trini@konsulko.com>,
Roger Quadros <rogerq@kernel.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Alexey Romanov <avromanov@salutedevices.com>,
Sumit Garg <sumit.garg@linaro.org>,
Mark Kettenis <kettenis@openbsd.org>, Nishanth Menon <nm@ti.com>,
Rick Chen <rick@andestech.com>,
Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: u-boot@lists.denx.de, Heinrich Schuchardt <xypron.glpk@gmx.de>,
Simon Glass <sjg@chromium.org>, E Shattow <lucent@gmail.com>,
Minda Chen <minda.chen@starfivetech.com>
Subject: [PATCH v3 5/8] pinctrl: starfive: Setup USB default disable overcurrent pin
Date: Fri, 19 Jul 2024 09:38:19 +0800 [thread overview]
Message-ID: <20240719013822.101374-6-minda.chen@starfivetech.com> (raw)
In-Reply-To: <20240719013822.101374-1-minda.chen@starfivetech.com>
For some JH7110 boards, USB host overcurent pin is not reserved,
To make USB host work, overcurrent pin must be disabled. So set the
pin default disabled.
Signed-off-by: Minda Chen <minda.chen@starfivetech.com>
---
drivers/pinctrl/starfive/pinctrl-jh7110-sys.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/pinctrl/starfive/pinctrl-jh7110-sys.c b/drivers/pinctrl/starfive/pinctrl-jh7110-sys.c
index dafba65eae..1102985ab9 100644
--- a/drivers/pinctrl/starfive/pinctrl-jh7110-sys.c
+++ b/drivers/pinctrl/starfive/pinctrl-jh7110-sys.c
@@ -378,8 +378,15 @@ static int jh7110_sys_pinctrl_probe(struct udevice *dev)
{
struct starfive_pinctrl_soc_info *info =
(struct starfive_pinctrl_soc_info *)dev_get_driver_data(dev);
-
- return starfive_pinctrl_probe(dev, info);
+ struct starfive_pinctrl_priv *priv = dev_get_priv(dev);
+ int ret;
+
+ ret = starfive_pinctrl_probe(dev, info);
+ /* Set default the usb controller overcurrent signal. */
+ if (!ret)
+ clrsetbits_le32(priv->base + JH7110_SYS_GPI,
+ GENMASK(22, 16), BIT(16));
+ return ret;
}
static const struct udevice_id jh7110_sys_pinctrl_ids[] = {
--
2.17.1
next prev parent reply other threads:[~2024-07-19 1:39 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-19 1:38 [PATCH v3 0/8] Add Starfive JH7110 Cadence USB driver Minda Chen
2024-07-19 1:38 ` [PATCH v3 1/8] usb: cdns3: Set USB PHY mode in cdns3_drd_update_mode() Minda Chen
2024-07-26 8:39 ` Minda Chen
2024-07-19 1:38 ` [PATCH v3 2/8] phy: starfive: Add Starfive JH7110 USB 2.0 PHY driver Minda Chen
2024-07-19 1:38 ` [PATCH v3 3/8] phy: starfive: Add Starfive JH7110 PCIe " Minda Chen
2024-07-19 1:38 ` [PATCH v3 4/8] usb: cdns: starfive: Add cdns USB driver Minda Chen
2024-07-19 1:38 ` Minda Chen [this message]
2024-07-26 8:35 ` [PATCH v3 5/8] pinctrl: starfive: Setup USB default disable overcurrent pin Minda Chen
2024-07-19 1:38 ` [PATCH v3 6/8] configs: starfive: Add visionfive2 cadence USB configuration Minda Chen
2024-07-19 1:38 ` [PATCH v3 7/8] dts: starfive: Add JH7110 Cadence USB dts node Minda Chen
2024-07-21 1:47 ` E Shattow
2024-07-21 18:27 ` E Shattow
2024-07-23 1:29 ` Minda Chen
2024-07-23 3:53 ` E Shattow
2024-07-23 10:16 ` Minda Chen
2024-07-23 13:05 ` E Shattow
2024-07-24 3:24 ` Minda Chen
2024-07-24 18:05 ` E Shattow
2024-07-19 1:38 ` [PATCH v3 8/8] MAINTAINERS: Update Starfive visionfive2 maintain files Minda Chen
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=20240719013822.101374-6-minda.chen@starfivetech.com \
--to=minda.chen@starfivetech.com \
--cc=avromanov@salutedevices.com \
--cc=kettenis@openbsd.org \
--cc=lucent@gmail.com \
--cc=marex@denx.de \
--cc=neil.armstrong@linaro.org \
--cc=nm@ti.com \
--cc=rick@andestech.com \
--cc=rogerq@kernel.org \
--cc=sjg@chromium.org \
--cc=sumit.garg@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
--cc=ycliang@andestech.com \
/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