Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rosen Penev" <rosenp@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCHv3 2/2] ARM: dts: broadcom: model USB VBUS power with regulator-fixed
Date: Thu, 24 Sep 2026 23:53:19 +0000	[thread overview]
Message-ID: <20260924235319.B50161F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260924233831.127617-3-rosenp@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] usb: bcma: unclaimed vbus-supply regulator disables USB power after 30s
- [Medium] usb: bcma: silent power management failure due to missing vcc GPIO
--

commit 5639b159d14f6b05d776251fb2e51af77ccdaf1b
Author: Rosen Penev <rosenp@gmail.com>
Subject: ARM: dts: broadcom: model USB VBUS power with regulator-fixed

This commit replaces the undocumented vcc-gpio property on usb2/usb3
controller nodes with the standard vbus-supply and regulator-fixed model. 
Boards now declare a regulator bound to the chipcommon GPIO, preserving 
polarity and using regulator-boot-on to mirror the CFE state.

> diff --git a/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wxr-1750dhp.dts b/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wxr-1750dhp.dts
> index f5c95c9a712ec..80414c72f9129 100644
> --- a/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wxr-1750dhp.dts
> +++ b/arch/arm/boot/dts/broadcom/bcm4708-buffalo-wxr-1750dhp.dts
> @@ -101,6 +101,16 @@ led-usb {
>  			trigger-sources = <&xhci_port1 &ehci_port1 &ohci_port1>;
>  		};
>  	};
> +
> +	usb_power: regulator-usb {
> +		compatible = "regulator-fixed";
> +		regulator-name = "usb-vcc";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		regulator-boot-on;
> +		gpios = <&chipcommon 10 GPIO_ACTIVE_HIGH>;

[Severity: High]
Does this regulator definition need regulator-always-on? 

The bcma-hcd driver in drivers/usb/host/bcma-hcd.c:bcma_hcd_probe() attempts
to fetch a raw "vcc" GPIO rather than claiming this vbus-supply regulator. As
a result, the new regulator remains unclaimed with a zero use count, and the
regulator core will automatically disable USB power 30 seconds after boot when
it disables unclaimed non-always-on regulators.

> +		enable-active-high;
> +	};
>  };
>  
>  &srab {
> @@ -130,7 +140,7 @@ port@4 {
>  };
>  
>  &usb3 {
> -	vcc-gpio = <&chipcommon 10 GPIO_ACTIVE_HIGH>;
> +	vbus-supply = <&usb_power>;

[Severity: Medium]
Will replacing the vcc-gpio property with vbus-supply break power management
for this device?

When bcma_hcd_probe() fails to fetch the vcc GPIO descriptor, the usb_dev
gpio_desc remains NULL. Later power management calls, such as during suspend
in bcma_hcd_suspend() which calls bcma_hci_platform_power_gpio(), will simply
return early upon seeing a NULL descriptor. This silently skips all hardware
power control operations on state transitions.

>  };
>  
>  &usb3_phy {

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260924233831.127617-3-rosenp@gmail.com?part=1

  reply	other threads:[~2026-09-24 23:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-24 23:38 [PATCHv3 0/2] usb: bcma: control VBUS via a regulator Rosen Penev
2026-09-24 23:38 ` [PATCHv3 1/2] usb: bcma: add regulator support Rosen Penev
2026-09-24 23:48   ` sashiko-bot
2026-09-24 23:38 ` [PATCHv3 2/2] ARM: dts: broadcom: model USB VBUS power with regulator-fixed Rosen Penev
2026-09-24 23:53   ` sashiko-bot [this message]
2026-09-25  6:54 ` [PATCHv3 0/2] usb: bcma: control VBUS via a regulator Krzysztof Kozlowski
2026-09-27 21:10   ` Rosen Penev

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=20260924235319.B50161F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=rosenp@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    /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