Linux Media Controller development
 help / color / mirror / Atom feed
* [PATCH] media: dw9714: Fix powerup sequence
@ 2025-12-10  7:53 Ricardo Ribalda
  2025-12-10  8:21 ` johannes.goede
  0 siblings, 1 reply; 7+ messages in thread
From: Ricardo Ribalda @ 2025-12-10  7:53 UTC (permalink / raw)
  To: Sakari Ailus, Mauro Carvalho Chehab, Ondrej Jirman, Hans Verkuil
  Cc: linux-media, linux-kernel, Ricardo Ribalda

We have experienced seen multiple I2C errors while doing stress test on
the module:

dw9714 i2c-PRP0001:01: dw9714_vcm_resume I2C failure: -5
dw9714 i2c-PRP0001:01: I2C write fail

Inspecting the powerup sequence we found that it does not match the
documentation at:
https://blog.arducam.com/downloads/DW9714A-DONGWOON(Autofocus_motor_manual).pdf

"""
(2) DW9714A requires waiting time of 12ms after power on. During this
waiting time, the offset calibration of internal amplifier is
operating for minimization of output offset current .
"""

This patch increases the powerup delay to follow the documentation.

Fixes: 9d00ccabfbb5 ("media: i2c: dw9714: Fix occasional probe errors")
Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
---
 drivers/media/i2c/dw9714.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
index 1e7ad355a388cfc37253bd764ec8df98f59beeea..3288de539452ebae41daa0988b2d52f27a790da7 100644
--- a/drivers/media/i2c/dw9714.c
+++ b/drivers/media/i2c/dw9714.c
@@ -149,7 +149,7 @@ static int dw9714_power_up(struct dw9714_device *dw9714_dev)
 
 	gpiod_set_value_cansleep(dw9714_dev->powerdown_gpio, 0);
 
-	usleep_range(1000, 2000);
+	usleep_range(12000, 14000);
 
 	return 0;
 }

---
base-commit: f7231cff1f3ff8259bef02dc4999bc132abf29cf
change-id: 20251210-dw9174-timing-9e58903399c9

Best regards,
-- 
Ricardo Ribalda <ribalda@chromium.org>


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: dw9714: Fix powerup sequence
  2025-12-10  7:53 [PATCH] media: dw9714: Fix powerup sequence Ricardo Ribalda
@ 2025-12-10  8:21 ` johannes.goede
  2025-12-15  8:46   ` Ricardo Ribalda
  0 siblings, 1 reply; 7+ messages in thread
From: johannes.goede @ 2025-12-10  8:21 UTC (permalink / raw)
  To: Ricardo Ribalda, Sakari Ailus, Mauro Carvalho Chehab,
	Ondrej Jirman, Hans Verkuil
  Cc: linux-media, linux-kernel

Hi,

On 10-Dec-25 8:53 AM, Ricardo Ribalda wrote:
> We have experienced seen multiple I2C errors while doing stress test on
> the module:
> 
> dw9714 i2c-PRP0001:01: dw9714_vcm_resume I2C failure: -5
> dw9714 i2c-PRP0001:01: I2C write fail
> 
> Inspecting the powerup sequence we found that it does not match the
> documentation at:
> https://blog.arducam.com/downloads/DW9714A-DONGWOON(Autofocus_motor_manual).pdf
> 
> """
> (2) DW9714A requires waiting time of 12ms after power on. During this
> waiting time, the offset calibration of internal amplifier is
> operating for minimization of output offset current .
> """
> 
> This patch increases the powerup delay to follow the documentation.
> 
> Fixes: 9d00ccabfbb5 ("media: i2c: dw9714: Fix occasional probe errors")
> Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>

Thanks, patch looks good to me:

Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>

Regards,

Hans




> ---
>  drivers/media/i2c/dw9714.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
> index 1e7ad355a388cfc37253bd764ec8df98f59beeea..3288de539452ebae41daa0988b2d52f27a790da7 100644
> --- a/drivers/media/i2c/dw9714.c
> +++ b/drivers/media/i2c/dw9714.c
> @@ -149,7 +149,7 @@ static int dw9714_power_up(struct dw9714_device *dw9714_dev)
>  
>  	gpiod_set_value_cansleep(dw9714_dev->powerdown_gpio, 0);
>  
> -	usleep_range(1000, 2000);
> +	usleep_range(12000, 14000);
>  
>  	return 0;
>  }
> 
> ---
> base-commit: f7231cff1f3ff8259bef02dc4999bc132abf29cf
> change-id: 20251210-dw9174-timing-9e58903399c9
> 
> Best regards,


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: dw9714: Fix powerup sequence
  2025-12-10  8:21 ` johannes.goede
@ 2025-12-15  8:46   ` Ricardo Ribalda
  2025-12-19 11:50     ` Sakari Ailus
  2025-12-22 17:21     ` Sakari Ailus
  0 siblings, 2 replies; 7+ messages in thread
From: Ricardo Ribalda @ 2025-12-15  8:46 UTC (permalink / raw)
  To: johannes.goede
  Cc: Sakari Ailus, Mauro Carvalho Chehab, Ondrej Jirman, Hans Verkuil,
	linux-media, linux-kernel, neil.sun, naomi.huang

Hi Hans

On Wed, 10 Dec 2025 at 09:21, <johannes.goede@oss.qualcomm.com> wrote:
>
> Hi,
>
> On 10-Dec-25 8:53 AM, Ricardo Ribalda wrote:
> > We have experienced seen multiple I2C errors while doing stress test on
> > the module:
> >
> > dw9714 i2c-PRP0001:01: dw9714_vcm_resume I2C failure: -5
> > dw9714 i2c-PRP0001:01: I2C write fail
> >
> > Inspecting the powerup sequence we found that it does not match the
> > documentation at:
> > https://blog.arducam.com/downloads/DW9714A-DONGWOON(Autofocus_motor_manual).pdf
> >
> > """
> > (2) DW9714A requires waiting time of 12ms after power on. During this
> > waiting time, the offset calibration of internal amplifier is
> > operating for minimization of output offset current .
> > """
> >
> > This patch increases the powerup delay to follow the documentation.
> >
> > Fixes: 9d00ccabfbb5 ("media: i2c: dw9714: Fix occasional probe errors")
> > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
>
> Thanks, patch looks good to me:
>
> Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>

Some tags for the record

Tested-by: Neil Sun <neil.sun@lcfuturecenter.com>
Co-developed-by: Naomi Huang <naomi.huang@lcfuturecenter.com>


>
> Regards,
>
> Hans
>
>
>
>
> > ---
> >  drivers/media/i2c/dw9714.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/media/i2c/dw9714.c b/drivers/media/i2c/dw9714.c
> > index 1e7ad355a388cfc37253bd764ec8df98f59beeea..3288de539452ebae41daa0988b2d52f27a790da7 100644
> > --- a/drivers/media/i2c/dw9714.c
> > +++ b/drivers/media/i2c/dw9714.c
> > @@ -149,7 +149,7 @@ static int dw9714_power_up(struct dw9714_device *dw9714_dev)
> >
> >       gpiod_set_value_cansleep(dw9714_dev->powerdown_gpio, 0);
> >
> > -     usleep_range(1000, 2000);
> > +     usleep_range(12000, 14000);
> >
> >       return 0;
> >  }
> >
> > ---
> > base-commit: f7231cff1f3ff8259bef02dc4999bc132abf29cf
> > change-id: 20251210-dw9174-timing-9e58903399c9
> >
> > Best regards,
>


-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: dw9714: Fix powerup sequence
  2025-12-15  8:46   ` Ricardo Ribalda
@ 2025-12-19 11:50     ` Sakari Ailus
  2025-12-22 17:21     ` Sakari Ailus
  1 sibling, 0 replies; 7+ messages in thread
From: Sakari Ailus @ 2025-12-19 11:50 UTC (permalink / raw)
  To: Ricardo Ribalda
  Cc: johannes.goede, Mauro Carvalho Chehab, Ondrej Jirman,
	Hans Verkuil, linux-media, linux-kernel, neil.sun, naomi.huang

Hi Ricardo,

On Mon, Dec 15, 2025 at 09:46:46AM +0100, Ricardo Ribalda wrote:
> Hi Hans
> 
> On Wed, 10 Dec 2025 at 09:21, <johannes.goede@oss.qualcomm.com> wrote:
> >
> > Hi,
> >
> > On 10-Dec-25 8:53 AM, Ricardo Ribalda wrote:
> > > We have experienced seen multiple I2C errors while doing stress test on
> > > the module:
> > >
> > > dw9714 i2c-PRP0001:01: dw9714_vcm_resume I2C failure: -5
> > > dw9714 i2c-PRP0001:01: I2C write fail
> > >
> > > Inspecting the powerup sequence we found that it does not match the
> > > documentation at:
> > > https://blog.arducam.com/downloads/DW9714A-DONGWOON(Autofocus_motor_manual).pdf
> > >
> > > """
> > > (2) DW9714A requires waiting time of 12ms after power on. During this
> > > waiting time, the offset calibration of internal amplifier is
> > > operating for minimization of output offset current .
> > > """
> > >
> > > This patch increases the powerup delay to follow the documentation.
> > >
> > > Fixes: 9d00ccabfbb5 ("media: i2c: dw9714: Fix occasional probe errors")
> > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> >
> > Thanks, patch looks good to me:
> >
> > Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> 
> Some tags for the record
> 
> Tested-by: Neil Sun <neil.sun@lcfuturecenter.com>
> Co-developed-by: Naomi Huang <naomi.huang@lcfuturecenter.com>

Thanks, I added Cc: stable while applying it.

-- 
Regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: dw9714: Fix powerup sequence
  2025-12-15  8:46   ` Ricardo Ribalda
  2025-12-19 11:50     ` Sakari Ailus
@ 2025-12-22 17:21     ` Sakari Ailus
  2025-12-23  7:49       ` Ricardo Ribalda
  1 sibling, 1 reply; 7+ messages in thread
From: Sakari Ailus @ 2025-12-22 17:21 UTC (permalink / raw)
  To: Ricardo Ribalda
  Cc: johannes.goede, Mauro Carvalho Chehab, Ondrej Jirman,
	Hans Verkuil, linux-media, linux-kernel, neil.sun, naomi.huang

Hi Ricardo,

On Mon, Dec 15, 2025 at 09:46:46AM +0100, Ricardo Ribalda wrote:
> Hi Hans
> 
> On Wed, 10 Dec 2025 at 09:21, <johannes.goede@oss.qualcomm.com> wrote:
> >
> > Hi,
> >
> > On 10-Dec-25 8:53 AM, Ricardo Ribalda wrote:
> > > We have experienced seen multiple I2C errors while doing stress test on
> > > the module:
> > >
> > > dw9714 i2c-PRP0001:01: dw9714_vcm_resume I2C failure: -5
> > > dw9714 i2c-PRP0001:01: I2C write fail
> > >
> > > Inspecting the powerup sequence we found that it does not match the
> > > documentation at:
> > > https://blog.arducam.com/downloads/DW9714A-DONGWOON(Autofocus_motor_manual).pdf
> > >
> > > """
> > > (2) DW9714A requires waiting time of 12ms after power on. During this
> > > waiting time, the offset calibration of internal amplifier is
> > > operating for minimization of output offset current .
> > > """
> > >
> > > This patch increases the powerup delay to follow the documentation.
> > >
> > > Fixes: 9d00ccabfbb5 ("media: i2c: dw9714: Fix occasional probe errors")
> > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> >
> > Thanks, patch looks good to me:
> >
> > Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> 
> Some tags for the record
> 
> Tested-by: Neil Sun <neil.sun@lcfuturecenter.com>
> Co-developed-by: Naomi Huang <naomi.huang@lcfuturecenter.com>

Co-developed-by: requires Sob. Do we have that as well?

-- 
Regards,

Sakari Ailus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: dw9714: Fix powerup sequence
  2025-12-22 17:21     ` Sakari Ailus
@ 2025-12-23  7:49       ` Ricardo Ribalda
  2025-12-30 14:12         ` Sakari Ailus
  0 siblings, 1 reply; 7+ messages in thread
From: Ricardo Ribalda @ 2025-12-23  7:49 UTC (permalink / raw)
  To: Sakari Ailus
  Cc: johannes.goede, Mauro Carvalho Chehab, Ondrej Jirman,
	Hans Verkuil, linux-media, linux-kernel, neil.sun, naomi.huang

On Mon, 22 Dec 2025 at 18:21, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
>
> Hi Ricardo,
>
> On Mon, Dec 15, 2025 at 09:46:46AM +0100, Ricardo Ribalda wrote:
> > Hi Hans
> >
> > On Wed, 10 Dec 2025 at 09:21, <johannes.goede@oss.qualcomm.com> wrote:
> > >
> > > Hi,
> > >
> > > On 10-Dec-25 8:53 AM, Ricardo Ribalda wrote:
> > > > We have experienced seen multiple I2C errors while doing stress test on
> > > > the module:
> > > >
> > > > dw9714 i2c-PRP0001:01: dw9714_vcm_resume I2C failure: -5
> > > > dw9714 i2c-PRP0001:01: I2C write fail
> > > >
> > > > Inspecting the powerup sequence we found that it does not match the
> > > > documentation at:
> > > > https://blog.arducam.com/downloads/DW9714A-DONGWOON(Autofocus_motor_manual).pdf
> > > >
> > > > """
> > > > (2) DW9714A requires waiting time of 12ms after power on. During this
> > > > waiting time, the offset calibration of internal amplifier is
> > > > operating for minimization of output offset current .
> > > > """
> > > >
> > > > This patch increases the powerup delay to follow the documentation.
> > > >
> > > > Fixes: 9d00ccabfbb5 ("media: i2c: dw9714: Fix occasional probe errors")
> > > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> > >
> > > Thanks, patch looks good to me:
> > >
> > > Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> >
> > Some tags for the record
> >
> > Tested-by: Neil Sun <neil.sun@lcfuturecenter.com>
> > Co-developed-by: Naomi Huang <naomi.huang@lcfuturecenter.com>
>
> Co-developed-by: requires Sob. Do we have that as well?

Good point, I did not get a explicit Sob.

I wanted to give them credit for this patch, because they did a great
job reporting the issue.

Let's do a Reported-by with no Closes. Does that work for you?

Thanks
>
> --
> Regards,
>
> Sakari Ailus



-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] media: dw9714: Fix powerup sequence
  2025-12-23  7:49       ` Ricardo Ribalda
@ 2025-12-30 14:12         ` Sakari Ailus
  0 siblings, 0 replies; 7+ messages in thread
From: Sakari Ailus @ 2025-12-30 14:12 UTC (permalink / raw)
  To: Ricardo Ribalda
  Cc: johannes.goede, Mauro Carvalho Chehab, Ondrej Jirman,
	Hans Verkuil, linux-media, linux-kernel, neil.sun, naomi.huang

On Tue, Dec 23, 2025 at 08:49:06AM +0100, Ricardo Ribalda wrote:
> On Mon, 22 Dec 2025 at 18:21, Sakari Ailus <sakari.ailus@linux.intel.com> wrote:
> >
> > Hi Ricardo,
> >
> > On Mon, Dec 15, 2025 at 09:46:46AM +0100, Ricardo Ribalda wrote:
> > > Hi Hans
> > >
> > > On Wed, 10 Dec 2025 at 09:21, <johannes.goede@oss.qualcomm.com> wrote:
> > > >
> > > > Hi,
> > > >
> > > > On 10-Dec-25 8:53 AM, Ricardo Ribalda wrote:
> > > > > We have experienced seen multiple I2C errors while doing stress test on
> > > > > the module:
> > > > >
> > > > > dw9714 i2c-PRP0001:01: dw9714_vcm_resume I2C failure: -5
> > > > > dw9714 i2c-PRP0001:01: I2C write fail
> > > > >
> > > > > Inspecting the powerup sequence we found that it does not match the
> > > > > documentation at:
> > > > > https://blog.arducam.com/downloads/DW9714A-DONGWOON(Autofocus_motor_manual).pdf
> > > > >
> > > > > """
> > > > > (2) DW9714A requires waiting time of 12ms after power on. During this
> > > > > waiting time, the offset calibration of internal amplifier is
> > > > > operating for minimization of output offset current .
> > > > > """
> > > > >
> > > > > This patch increases the powerup delay to follow the documentation.
> > > > >
> > > > > Fixes: 9d00ccabfbb5 ("media: i2c: dw9714: Fix occasional probe errors")
> > > > > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
> > > >
> > > > Thanks, patch looks good to me:
> > > >
> > > > Reviewed-by: Hans de Goede <johannes.goede@oss.qualcomm.com>
> > >
> > > Some tags for the record
> > >
> > > Tested-by: Neil Sun <neil.sun@lcfuturecenter.com>
> > > Co-developed-by: Naomi Huang <naomi.huang@lcfuturecenter.com>
> >
> > Co-developed-by: requires Sob. Do we have that as well?
> 
> Good point, I did not get a explicit Sob.
> 
> I wanted to give them credit for this patch, because they did a great
> job reporting the issue.
> 
> Let's do a Reported-by with no Closes. Does that work for you?

It generates a checkpatch.pl warning. I'm fine with that though.

-- 
Sakari Ailus

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2025-12-30 14:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-10  7:53 [PATCH] media: dw9714: Fix powerup sequence Ricardo Ribalda
2025-12-10  8:21 ` johannes.goede
2025-12-15  8:46   ` Ricardo Ribalda
2025-12-19 11:50     ` Sakari Ailus
2025-12-22 17:21     ` Sakari Ailus
2025-12-23  7:49       ` Ricardo Ribalda
2025-12-30 14:12         ` Sakari Ailus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox