All of lore.kernel.org
 help / color / mirror / Atom feed
From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
To: Jacopo Mondi <jacopo@jmondi.org>, Quentin Schulz <foss+kernel@0leil.net>
Cc: shawnx.tu@intel.com, mchehab@kernel.org, robh+dt@kernel.org,
	krzysztof.kozlowski+dt@linaro.org, linux-media@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 2/4] media: ov5675: add device-tree support and support runtime PM
Date: Wed, 25 May 2022 14:24:35 +0200	[thread overview]
Message-ID: <d599e48c-1821-164e-619d-dcfd8a689192@theobroma-systems.com> (raw)
In-Reply-To: <49e53ae4-1be9-fae1-6c93-3ce7c16f3ada@theobroma-systems.com>

Hi all,

On 5/10/22 15:42, Quentin Schulz wrote:
> Hi all,
> 
> On 5/10/22 11:46, Jacopo Mondi wrote:
>> Hi Quentin,
>>
>> On Mon, May 09, 2022 at 04:32:24PM +0200, Quentin Schulz wrote:
>>> From: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>>>
>>> Until now, this driver only supported ACPI. This adds support for
>>> Device Tree too while enabling clock and regulators in runtime PM.
>>>
>>> Signed-off-by: Quentin Schulz <quentin.schulz@theobroma-systems.com>
>>
>> Thanks for addressing all comments on the previous version.
>>
>> Looks good to me!
> 
> Unfortunately the sensor disagrees :/
> 
> For some reasons, the first three power-on + power-off are successful 
> (sometimes only the first two) and then the sensor is not working until 
> next cold boot. I got lucky when I tested the patch before sending, much 
> less now. >

For your information, there were actually two issues:

  - the MCLK of our camera sensor is connected to a pin on a Rockchip 
PX30 SoC whose iodomain is not enabled prior to booting the Linux 
kernel. This means that the whole block was not supplied with power 
(something around 100-150mV instead of the expected 1.8V) and the i2c 
transfers during some device probing were broken because the iodomains 
driver could be probed after the OV5675 driver (and also, since it 
persists on CPU reset, a reboot would fix this too since the iodomain 
would have been configured by the preceding boot). We currently handle 
this the hackish way by configuring the iodomain in U-Boot before 
booting the kernel. I have talked with Heiko, the Rockchip maintainer, 
who mentioned there's no way to explicit a dependency to an iodomain in 
Device Tree right now but suggested we expose regulators from the 
iodomain driver. I'll come up with something to fix this properly in the 
kernel in the next few months. This is not related to the camera driver 
in any way but wanted to mention it.

  - the camera sensor was actually faulty. After many attempts at HW 
reworking, looking at the scope, re-reading the datasheet, trying to 
read between the lines, etc... we swapped the camera sensor for a 
fresh-out-of-the-box one and it worked for 30min (then we stopped it) 
with a runtime/suspend every few seconds. I tried with two different 
camera sensors and it worked fine.

Cheers,
Quentin

  reply	other threads:[~2022-05-25 12:24 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-05-09 14:32 [PATCH v3 1/4] media: dt-bindings: ov5675: document YAML binding Quentin Schulz
2022-05-09 14:32 ` [PATCH v3 2/4] media: ov5675: add device-tree support and support runtime PM Quentin Schulz
2022-05-10  9:46   ` Jacopo Mondi
2022-05-10 13:42     ` Quentin Schulz
2022-05-25 12:24       ` Quentin Schulz [this message]
2022-05-25 12:14     ` Quentin Schulz
2022-05-09 14:32 ` [PATCH v3 3/4] media: i2c: ov5675: parse and register V4L2 device tree properties Quentin Schulz
2022-05-10  9:47   ` Jacopo Mondi
2022-05-09 14:32 ` [PATCH v3 4/4] media: i2c: ov5675: add .get_selection support Quentin Schulz
2022-05-12  9:05   ` Jacopo Mondi
2022-05-17  9:25     ` Quentin Schulz
2022-05-17 11:18       ` Jacopo Mondi
2022-05-17 12:47         ` Quentin Schulz
2022-05-20  6:31           ` Jacopo Mondi
2022-05-10 13:30 ` [PATCH v3 1/4] media: dt-bindings: ov5675: document YAML binding Krzysztof Kozlowski

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=d599e48c-1821-164e-619d-dcfd8a689192@theobroma-systems.com \
    --to=quentin.schulz@theobroma-systems.com \
    --cc=devicetree@vger.kernel.org \
    --cc=foss+kernel@0leil.net \
    --cc=jacopo@jmondi.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=shawnx.tu@intel.com \
    /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.