From: Michele Bisogno <micbis.openwrt@gmail.com>
To: u-boot@lists.denx.de
Cc: marek.vasut+renesas@mailbox.org, paul@pbarker.dev,
jh80.chung@samsung.com, peng.fan@nxp.com, lukma@denx.de,
mkorpershoek@kernel.org, trini@konsulko.com,
Michele Bisogno <micbis.openwrt@gmail.com>
Subject: [PATCH v3 1/2] regulator: rzg2l: implement connectivity notification
Date: Thu, 16 Apr 2026 17:38:26 +0200 [thread overview]
Message-ID: <20260416153827.14256-2-micbis.openwrt@gmail.com> (raw)
In-Reply-To: <20260416153827.14256-1-micbis.openwrt@gmail.com>
Implement CON_CTRL manual connectivity notification.
By setting SEL_CONNECT and CONNECT_1, the UTM+ core is notified of
connection status in peripheral mode.
Signed-off-by: Michele Bisogno <micbis.openwrt@gmail.com>
---
drivers/power/regulator/rzg2l-usbphy-regulator.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/drivers/power/regulator/rzg2l-usbphy-regulator.c b/drivers/power/regulator/rzg2l-usbphy-regulator.c
index 0354555d0b5..03f8dec4f08 100644
--- a/drivers/power/regulator/rzg2l-usbphy-regulator.c
+++ b/drivers/power/regulator/rzg2l-usbphy-regulator.c
@@ -9,16 +9,22 @@
#include <renesas/rzg2l-usbphy.h>
#define VBENCTL 0x03c
+#define CON_CTRL 0x020
#define VBENCTL_VBUS_SEL BIT(0)
+#define SEL_CONNECT BIT(4)
+#define CONNECT_1 BIT(0)
static int rzg2l_usbphy_regulator_set_enable(struct udevice *dev, bool enable)
{
struct rzg2l_usbphy_ctrl_priv *priv = dev_get_priv(dev->parent);
- if (enable)
+ if (enable) {
clrbits_le32(priv->regs + VBENCTL, VBENCTL_VBUS_SEL);
- else
+ setbits_le32(priv->regs + CON_CTRL, SEL_CONNECT | CONNECT_1);
+ } else {
setbits_le32(priv->regs + VBENCTL, VBENCTL_VBUS_SEL);
+ clrbits_le32(priv->regs + CON_CTRL, SEL_CONNECT | CONNECT_1);
+ }
return 0;
}
--
2.34.1
next prev parent reply other threads:[~2026-04-17 12:44 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 15:38 [PATCH v3 0/2] Changes since v2: Added missing Signed-off-by tags Michele Bisogno
2026-04-16 15:38 ` Michele Bisogno [this message]
2026-04-16 18:03 ` [PATCH v3 1/2] regulator: rzg2l: implement connectivity notification Marek Vasut
2026-04-16 15:38 ` [PATCH v3 2/2] usb: gadget: renesas: add support for RZ/G2L SoC Michele Bisogno
2026-04-16 18:11 ` Marek Vasut
2026-04-16 18:13 ` [PATCH v3 0/2] Changes since v2: Added missing Signed-off-by tags Marek Vasut
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=20260416153827.14256-2-micbis.openwrt@gmail.com \
--to=micbis.openwrt@gmail.com \
--cc=jh80.chung@samsung.com \
--cc=lukma@denx.de \
--cc=marek.vasut+renesas@mailbox.org \
--cc=mkorpershoek@kernel.org \
--cc=paul@pbarker.dev \
--cc=peng.fan@nxp.com \
--cc=trini@konsulko.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