dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "H. Nikolaus Schaller" <hns@goldelico.com>
Cc: linux-gpio@vger.kernel.org, devicetree@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-leds@vger.kernel.org,
	linux-sound@vger.kernel.org, robh@kernel.org,
	conor+dt@kernel.org, lee@kernel.org
Subject: Re: [PATCH v2 14/20] ARM: dts: omap3-pandora: Model LCD power enable dependencies
Date: Tue, 24 Nov 2026 07:45:13 +0000	[thread overview]
Message-ID: <sashiko-outbox-230664@kernel.org> (raw)
In-Reply-To: <0c0bc2049bad3e236bab5fd86b8cd0b11fd56d11.1795505160.git.hns@goldelico.com>

Thank you for your contribution! Sashiko AI review found 4 potential
issues to consider:
- [High] ARM: dts: omap3-pandora: usb_host_5v disabled after boot due to
  no consumer
- [Low] ARM: dts: omap3-pandora: deprecated fixed-regulator-* node names
  on new nodes
- [Low] ARM: dts: omap3-pandora: twl_gpio inserted between bluetooth
  comment and mcbsp3
- [Low] ARM: dts: omap3-pandora: dead startup-delay-us on GPIO-less
  lcd_5v regulator
--

commit f12a2f12a91cab92b448c35782704537aa5d9f32
Author: H. Nikolaus Schaller <hns@goldelico.com>

ARM: dts: omap3-pandora: Model LCD power enable dependencies

This commit adds fixed-regulator nodes aux_5v and lcd_5v to model the LCD
and USB host 5V power supply enable dependencies across OpenPandora board
revisions, and enables ti,use-regen on twl_gpio.

> diff --git a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
> index 2097ec15c6513..f25fc4f8ad042 100644
> --- a/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
> +++ b/arch/arm/boot/dts/ti/omap/omap3-pandora-common.dtsi
> @@ -31,6 +31,28 @@ hfclk_26m: oscillator {
>  		clock-frequency = <26000000>;
>  	};
>  
> +	/* Shared 5V rail for headphone amplifier, early LCD and USB */
> +	aux_5v: fixed-regulator-5v {
> +		compatible = "regulator-fixed"; /* TPS61029DRC */
> +		regulator-name = "aux_5v";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		startup-delay-us = <5000>;
> +		enable-active-high;
> +		gpio = <&twl_gpio 20 GPIO_ACTIVE_HIGH>; /* REGEN */
> +		vin-supply = <&vaux1>; /* logical enable dependency */
> +	};
> +
> +	/* LCD_5V: switched shared 5V on rev 5a, separate supply on rev 6d */
> +	lcd_5v: fixed-regulator-lcd-5v {

[Severity: Low]
Documentation/devicetree/bindings/regulator/fixed-regulator.yaml marks node
names not matching ^regulator(-[0-9]+v[0-9]+|-[0-9a-z-]+)?$ as deprecated.
Should these new nodes be named regulator-5v (or regulator-aux-5v) and
regulator-lcd-5v so they do not add dtbs_check warnings?

> +		compatible = "regulator-fixed";
> +		regulator-name = "lcd_5v";
> +		regulator-min-microvolt = <5000000>;
> +		regulator-max-microvolt = <5000000>;
> +		startup-delay-us = <5000>;
> +		vin-supply = <&aux_5v>; /* logical enable dependency */
> +	};

[Severity: Low]
Does startup-delay-us on lcd_5v have any effect when the node has no enable
GPIO?

In reg_fixed_voltage_probe(), a regulator-fixed node without a gpio property
registers with fixed_voltage_ops (which has no .is_enabled callback) and
rdev->ena_pin set to NULL.  _regulator_is_enabled() therefore always returns
1, causing _regulator_enable() to skip _regulator_do_enable() where
desc.enable_time (startup-delay-us) is applied.  Since lcd_5v controls no
hardware resource of its own, lcd could reference aux_5v directly in
vcc-supply, or startup-delay-us could be dropped from lcd_5v.

Also, the commit message mentions "patch 17", which will lose its meaning in
git history once committed.

[ ... ]

> @@ -212,15 +234,13 @@ hsusb2_phy: hsusb2-phy-pins {
>  		#phy-cells = <0>;
>  	};
>  
> -	/* HS USB Host VBUS supply
> -	 * disabling this regulator causes current leakage, and LCD flicker
> -	 * on earlier (CC) board revisions, so keep it always on */
> +	/* HS USB Host VBUS supply */
>  	usb_host_5v: fixed-regulator-usb_host_5v {
> +		vin-supply = <&aux_5v>;
>  		compatible = "regulator-fixed";
>  		regulator-name = "usb_host_5v";
>  		regulator-min-microvolt = <5000000>;
>  		regulator-max-microvolt = <5000000>;
> -		regulator-always-on;
>  		regulator-boot-on;
>  		enable-active-high;
>  		gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>;	/* GPIO_164 */

[Severity: High]
Won't removing regulator-always-on from usb_host_5v cause
regulator_late_cleanup() to disable USB Host VBUS 30 seconds after boot?

Nothing in the device tree references &usb_host_5v (hsusb2_phy only has
vcc-supply = <&vaux2>), so rdev->use_count stays at 0.  When
regulator_late_cleanup() runs, it sees !c->always_on and rdev->use_count == 0
and calls _regulator_do_disable(rdev), turning off GPIO 164 with no consumer
to re-enable it and reintroducing the current leakage and LCD flicker on CC
boards noted in the removed comment.

In addition, set_machine_constraints() enables rdev->supply (aux_5v, and
transitively vaux1) at boot when boot_on is set, but regulator_late_cleanup()
calls _regulator_do_disable() directly without disabling rdev->supply,
permanently leaking that enable reference on aux_5v and vaux1.

[ ... ]

> @@ -711,6 +731,10 @@ &mcbsp2 {
>  };
>  
>  /* bluetooth */
> +&twl_gpio {
> +	ti,use-regen;
> +};
> +
>  &mcbsp3 {
>  };

[Severity: Low]
This isn't a bug, but inserting &twl_gpio here separates the /* bluetooth */
comment from the &mcbsp3 node it describes.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1795505160.git.hns@goldelico.com?part=14

  reply	other threads:[~2026-11-24  7:45 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-24  7:25 [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 01/20] dt-bindings: gpio: twl4030: Document REGEN GPIO H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 02/20] gpio: twl4030: Support " H. Nikolaus Schaller
2026-11-24  7:43   ` sashiko-bot
2026-11-24  7:25 ` [PATCH v2 03/20] ASoC: twl4030: Allow APLL rate selection through set_sysclk() H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 04/20] dt-bindings: sound: pcm1754: Describe PCM1773 H. Nikolaus Schaller
2026-11-24 12:05   ` Mark Brown
2026-11-24 14:33     ` [Letux-kernel] " H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 05/20] ASoC: codecs: pcm1754: Add PCM1773 support H. Nikolaus Schaller
2026-11-24 14:48   ` Mark Brown
2026-11-24  7:25 ` [PATCH v2 06/20] dt-bindings: sound: Document OpenPandora sound card H. Nikolaus Schaller
2026-11-24  7:40   ` sashiko-bot
2026-11-24 13:40     ` Rob Herring
2026-11-24 12:04   ` Mark Brown
2026-11-24 13:35   ` Rob Herring (Arm)
2026-11-24 14:42     ` H. Nikolaus Schaller
2026-11-24 14:45   ` Krzysztof Kozlowski
2026-11-24 14:50     ` H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 07/20] ASoC: ti: omap3pandora: Convert sound card to DT H. Nikolaus Schaller
2026-11-24  7:45   ` sashiko-bot
2026-11-24 14:48   ` Mark Brown
2026-11-24 14:55     ` H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 08/20] dt-bindings: mfd: twl4030: Document 64-cycle PWM H. Nikolaus Schaller
2026-11-24 14:40   ` Krzysztof Kozlowski
2026-11-24 14:49     ` H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 09/20] pwm: twl: Support 64-cycle PWM frame H. Nikolaus Schaller
2026-11-24  7:37   ` sashiko-bot
2026-11-24  7:25 ` [PATCH v2 10/20] dt-bindings: backlight: pwm: Document enable guard H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 11/20] backlight: pwm: Support enable guard period H. Nikolaus Schaller
2026-11-24  7:36   ` sashiko-bot
2026-11-24  7:25 ` [PATCH v2 12/20] drm/panel: td043mtea1: Attach DT backlight H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 13/20] ARM: dts: omap3pandora: Disable unused DMA channels H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 14/20] ARM: dts: omap3-pandora: Model LCD power enable dependencies H. Nikolaus Schaller
2026-11-24  7:45   ` sashiko-bot [this message]
2026-11-24  7:25 ` [PATCH v2 15/20] ARM: dts: omap3pandora: Enable audio interfaces H. Nikolaus Schaller
2026-11-24  7:25 ` [PATCH v2 16/20] ARM: dts: omap3pandora: Describe PCM1773 H. Nikolaus Schaller
2026-11-24  7:40   ` sashiko-bot
2026-11-24  7:25 ` [PATCH v2 17/20] ARM: dts: omap3pandora: Describe sound card H. Nikolaus Schaller
2026-11-24  7:47   ` sashiko-bot
2026-11-24  7:25 ` [PATCH v2 18/20] ARM: dts: omap3pandora: Switch backlight to PWM H. Nikolaus Schaller
2026-11-24  7:46   ` sashiko-bot
2026-11-24  7:25 ` [PATCH v2 19/20] backlight: Remove legacy Pandora driver H. Nikolaus Schaller
2026-11-24  7:26 ` [PATCH v2 20/20] ARM: OMAP2+: Remove Pandora platform-data quirks H. Nikolaus Schaller
2026-11-24 13:38 ` [PATCH v2 00/20] ARM: omap3: pandora: Modernize audio and backlight to use Device Tree to finally remove pdata-quirks Mark Brown
2026-11-24 14:52   ` H. Nikolaus Schaller
2026-11-24 15:13 ` Rob Herring
2026-11-24 15:27   ` H. Nikolaus Schaller

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=sashiko-outbox-230664@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hns@goldelico.com \
    --cc=lee@kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-sound@vger.kernel.org \
    --cc=robh@kernel.org \
    --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