Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Bryan O'Donoghue <bod@kernel.org>
To: Saikiran B <bjsaikiran@gmail.com>, Hans de Goede <hansg@kernel.org>
Cc: Bryan O'Donoghue <bryan.odonoghue@linaro.org>,
	linux-media@vger.kernel.org, linux-arm-msm@vger.kernel.org,
	rfoss@kernel.org, todor.too@gmail.com,
	vladimir.zapolskiy@linaro.org, sakari.ailus@linux.intel.com,
	mchehab@kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH v2 1/1] media: i2c: ov02c10: Keep power on and use reset for power management
Date: Mon, 26 Jan 2026 15:04:12 +0000	[thread overview]
Message-ID: <371b38d5-9322-4629-b378-ec62e0924fd4@kernel.org> (raw)
In-Reply-To: <CAAFDt1ufYyM4_xTy+AZTdXBB0cGNk+nFQHD5+5U7tUMQqZ+o=g@mail.gmail.com>

On 26/01/2026 14:08, Saikiran B wrote:
> The exact issue is:
> 1. Open Camera -> Close -> Wait 3s -> Open: WORKS.
> 2. Open Camera -> Close -> Wait 1.5s -> Open: FAILS (I2C Timeout / 
> Device Busy).
> 
> If the VDD rail is floating in the brownout region (~1.0V) during that 
> 1.5s window, does the sensor's internal Reset Logic Gate even have 
> enough bias voltage to function?

I think the VDD rail floating is unlikely, this would require the 
description of the LDO configured by XBL to be incorrect - possible but, 
then you'd expect to see an update for Windows to fix it.

Have you gotten the latest firmware for the board from Lenovo ? A 
misconfigured LDO - without active discharge set, should receive a 
firmware update to address.

Another possibility is CCI is powering the chip in sleep.

Lets have a look at the CCI pins.

         cam_rgb_default: cam-rgb-default-state {
                 mclk-pins {
                         pins = "gpio100";
                         function = "cam_aon";
                         drive-strength = <16>;
                         bias-disable;
                 };

                 reset-n-pins {
                         pins = "gpio237";
                         function = "gpio";
                         drive-strength = <2>;
                         bias-disable;
                 };
         };

add
	cam_rgb_sleep: cam-rgb-sleep-state {
                 mclk-pins {
                         pins = "gpio100";
                         function = "cam_aon";
                         drive-strength = <2>;
                         bias-pull-down; // Force to Ground
                 };

                 reset-n-pins {
                         pins = "gpio237";
                         function = "gpio";
                         drive-strength = <2>;
                         bias-pull-down; // Force to Ground
                 };
         };


&cci1_i2c1 {
         camera@36 {
                 compatible = "ovti,ov02c10";
                 reg = <0x36>;

                 reset-gpios = <&tlmm 237 GPIO_ACTIVE_LOW>;
                 pinctrl-names = "default", "sleep";
                 pinctrl-0 = <&cam_rgb_default>;
                 pinctrl-1 = <&cam_rgb_sleep>;

Failing that we should try a more liberal power_on()

power_on():

     Assert Reset (GPIO Low).
     Wait 10ms.
     Enable all regulators (RPMh votes).
     Wait 20ms (Allow PM8010 to ramp and stabilize).
     Start the Clock (MCLK).
     Wait 10ms.
     De-assert Reset (GPIO High).
     Wait 5ms.

If that doesn't work, we will have to go and look at the LDO 
configuration via SPMI directly.

During the 2.3 second window can you run

Getting the kernel's view:
cat /sys/kernel/debug/regulator/regulator_summary

We are looking for use_count > 0 and open_count

We could also look at the SPMI LDO config register

Getting the firmware's view:
cat /sys/kernel/debug/regmap/spmi0-0x08/registers

It should be possible to interrogate the configruation of all of the 
relevant LDOs and ascertain if active-discharge is set, which TBH it 
should be.

> ​My testing suggests the sensor is physically incapable of processing 
> the Reset signal until the rail fully discharges (~2.3s), which is why 
> the 5ms delay has no effect.

Yes accepted but, a 2.3 second delay is avoidable if we root-cause.
P.S.
Please bottom post !

---
bod

  parent reply	other threads:[~2026-01-26 15:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-25 17:17 [PATCH v2 0/2] Fix OV02C10 camera pipeline lock issues Saikiran
2026-01-25 17:17 ` [PATCH v2 1/2] media: qcom: camss: Fix pipeline lock leak in stop_streaming Saikiran
2026-01-25 17:17 ` [PATCH v2 2/2] media: i2c: ov02c10: Check for errors in disable_streams Saikiran
2026-01-26 10:13   ` Konrad Dybcio
2026-01-26 10:21   ` Hans de Goede
2026-01-26  6:15 ` [PATCH v2 0/1] media: i2c: ov02c10: Keep power on and use reset for power management Saikiran
2026-01-26  6:15   ` [PATCH v2 1/1] " Saikiran
2026-01-26 10:32     ` Hans de Goede
2026-01-26 10:59       ` Saikiran B
2026-01-26 11:09     ` Bryan O'Donoghue
2026-01-26 11:23       ` Saikiran B
2026-01-26 11:41         ` Bryan O'Donoghue
2026-01-26 11:58           ` Saikiran B
2026-01-26 12:06             ` Bryan O'Donoghue
2026-01-26 12:24               ` Saikiran B
2026-01-26 12:41                 ` Bryan O'Donoghue
2026-01-26 12:48                   ` Saikiran B
2026-01-26 13:31                     ` Hans de Goede
     [not found]                       ` <I-1OPz69QKXF-LDqvufQARvv_3TIYaLyZIETdiGvSj_JSYhnJNeqiLERDUH2R0kclFyo6MqMRsaiZaS3RKmdZA==@protonmail.internalid>
     [not found]                         ` <CAAFDt1ufYyM4_xTy+AZTdXBB0cGNk+nFQHD5+5U7tUMQqZ+o=g@mail.gmail.com>
2026-01-26 15:04                           ` Bryan O'Donoghue [this message]
2026-01-26 15:40                             ` Saikiran B
2026-01-26 16:00                               ` Bryan O'Donoghue

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=371b38d5-9322-4629-b378-ec62e0924fd4@kernel.org \
    --to=bod@kernel.org \
    --cc=bjsaikiran@gmail.com \
    --cc=bryan.odonoghue@linaro.org \
    --cc=hansg@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=rfoss@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=stable@vger.kernel.org \
    --cc=todor.too@gmail.com \
    --cc=vladimir.zapolskiy@linaro.org \
    /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