[PATCH v3 1/2] regulator: rzg2l: implement connectivity notification

Marek Vasut marek.vasut at mailbox.org
Thu Apr 16 20:03:42 CEST 2026


On 4/16/26 5:38 PM, Michele Bisogno wrote:
> 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 at 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;
>   }

Why does Linux not need a change like this to 
drivers/reset/reset-rzg2l-usbphy-ctrl.c ?


More information about the U-Boot mailing list