All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Alain Volmat" <alain.volmat@foss.st.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 2/4] arm64: dts: st: ensure IMX335 is enabled on stm32mp257f-ev1
Date: Mon, 14 Sep 2026 07:01:40 +0000	[thread overview]
Message-ID: <20260914070140.CCCE61F00893@smtp.kernel.org> (raw)
In-Reply-To: <20260914-stm32mp2-dk-camera-v1-2-2f2bd719bb63@foss.st.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Using a GPIO hog to enable the camera's local regulator bypasses the regulator framework, breaking runtime power management and risking power sequencing violations.
--

commit b096d3a18793729d58affdc2e7b576dc33241f8d
Author: Alain Volmat <alain.volmat@foss.st.com>

arm64: dts: st: ensure IMX335 is enabled on stm32mp257f-ev1

This commit removes the dedicated fixed regulators for the IMX335 camera
and instead routes its supplies directly to the system scmi_v3v3 supply.
It also adds a GPIO hog to unconditionally drive the camera's enable pin high.

> diff --git a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
> --- a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
> +++ b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
[ ... ]
> +&gpioi {
> +	/* Enable the IMX335 power line */
> +	imx335-en-hog {
> +		gpio-hog;
> +		gpios = <0 GPIO_ACTIVE_HIGH>;
> +		output-high;
> +		line-name = "imx335_en";
> +	};
> +};

[Severity: Medium]
Does using a GPIO hog here bypass the regulator framework and break runtime
power management? 

Since the hog forces the regulator's enable pin HIGH unconditionally as soon
as the GPIO controller probes, the camera module appears to be powered on at
all times. Does this defeat the IMX335 driver's runtime PM which attempts to
manage the power sequences to save power?

[ ... ]
>  imx335: camera@1a {
>  		compatible = "sony,imx335";
>  		reg = <0x1a>;
>  		clocks = <&clk_ext_camera>;
> -		avdd-supply = <&imx335_2v9>;
> -		ovdd-supply = <&imx335_1v8>;
> -		dvdd-supply = <&imx335_1v2>;
> +		avdd-supply = <&scmi_v3v3>;
> +		ovdd-supply = <&scmi_v3v3>;
> +		dvdd-supply = <&scmi_v3v3>;
>  		reset-gpios = <&gpioi 7 (GPIO_ACTIVE_LOW | GPIO_PUSH_PULL)>;

[Severity: Medium]
By pointing the camera's supplies directly to the system supply instead of a
fixed regulator that owns the enable GPIO, will the runtime PM toggle requests
from the IMX335 driver be ignored by the actual hardware?

If the main scmi_v3v3 supply is disabled during suspend while the GPIO block
remains active, the EN pin might be driven HIGH into an unpowered regulator.
Could this risk hardware back-powering via ESD diodes?

Should this enable GPIO be modeled as a fixed regulator instead of a hog to
maintain proper power sequencing?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260914-stm32mp2-dk-camera-v1-0-2f2bd719bb63@foss.st.com?part=2

  reply	other threads:[~2026-09-14  7:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-14  6:54 [PATCH 0/4] arm64: dts: st: enable camera on stm32mp2x-dk and correct stm32mp2x-ev Alain Volmat
2026-09-14  6:54 ` [PATCH 1/4] arm64: dts: st: add imx335/csi/dcmipp nodes on stm32mp257f-dk Alain Volmat
2026-09-14  7:03   ` sashiko-bot
2026-09-14  6:54 ` [PATCH 2/4] arm64: dts: st: ensure IMX335 is enabled on stm32mp257f-ev1 Alain Volmat
2026-09-14  7:01   ` sashiko-bot [this message]
2026-09-14  6:54 ` [PATCH 3/4] arm64: dts: st: use video-interfaces media bus type in stm32mp257f-ev1 Alain Volmat
2026-09-14  6:54 ` [PATCH 4/4] arm64: dts: st: add imx335/csi/dcmipp nodes on stm32mp235f-dk Alain Volmat
2026-09-28 12:36 ` [PATCH 0/4] arm64: dts: st: enable camera on stm32mp2x-dk and correct stm32mp2x-ev Alexandre TORGUE

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=20260914070140.CCCE61F00893@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alain.volmat@foss.st.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.