linux/drivers/media/i2c
Jacopo Mondi 2b821698dc media: i2c: rdacm21: Power up OV10640 before OV490
The current RDACM21 initialization routine powers up the OV10640 image
sensor after the OV490 ISP. The ISP is programmed with a firmware loaded
from an embedded serial flash that (most probably) tries to interact and
program also the image sensor connected to the ISP.

As described in commit "media: i2c: rdacm21: Fix OV10640 powerup" the
image sensor powerdown signal is kept high by an internal pull up
resistor and occasionally fails to startup correctly if the powerdown
line is not asserted explicitly. Failures in the OV10640 startup causes
the OV490 firmware to fail to boot correctly resulting in the camera
module initialization to fail consequentially.

Fix this by powering up the OV10640 image sensor before testing the
OV490 firmware boot completion, by splitting the ov10640_initialize()
function in an ov10640_power_up() one and an ov10640_check_id() one.

Also make sure the OV10640 identification procedure gives enough time to
the image sensor to resume after the programming phase performed by the
OV490 firmware by repeating the ID read procedure.

This commit fixes a sporadic start-up error triggered by a failure to
detect the OV490 firmware boot completion:
rdacm21 8-0054: Timeout waiting for firmware boot

[hverkuil: fixed two typos in commit log]

Fixes: a59f853b3b ("media: i2c: Add driver for RDACM21 camera module")
Signed-off-by: Jacopo Mondi <jacopo+renesas@jmondi.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-06-17 11:31:45 +02:00
..
adv748x media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ccs media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
cx25840 media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
et8ek8 media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
m5mols media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
s5c73m3 media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ad5820.c media: i2c: ad5820: simplify getting state container 2020-11-16 10:31:11 +01:00
ad9389b.c media: i2c: ad9389b: convert to i2c_new_dummy_device 2019-08-13 11:45:04 -03:00
adp1653.c media: i2c: adp1653: simplify getting state container 2020-11-16 10:31:11 +01:00
adv7170.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
adv7175.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
adv7180.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
adv7183_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
adv7183.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
adv7343_regs.h
adv7343.c media: i2c: Convert to new i2c device probe() 2019-08-13 11:54:04 -03:00
adv7393_regs.h
adv7393.c media: fix usage of whitespaces and on indentation 2018-01-04 13:12:01 -05:00
adv7511-v4l2.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
adv7604.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
adv7842.c media: adv7842: remove spurious & and fix vga_edid size 2021-06-17 10:25:23 +02:00
ak881x.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ak7375.c media: i2c: ak7375: use pm_runtime_resume_and_get() 2021-05-19 09:51:40 +02:00
aptina-pll.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
aptina-pll.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
bt819.c media: bt819: Reduce amount of F* words in the world 2019-11-05 09:01:17 -03:00
bt856.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
bt866.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
ccs-pll.c Linux 5.11-rc6 2021-02-01 10:03:45 +01:00
ccs-pll.h media: ccs-pll: Switch from standard integer types to kernel ones 2021-01-12 17:55:28 +01:00
cs53l32a.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
cs3308.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
cs5345.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
dw9714.c media: i2c: dw9714: use pm_runtime_resume_and_get() 2021-05-19 09:51:40 +02:00
dw9768.c media: i2c: dw9768: use pm_runtime_resume_and_get() 2021-05-19 09:51:40 +02:00
dw9807-vcm.c media: i2c: dw9807-vcm: use pm_runtime_resume_and_get() 2021-05-19 09:51:40 +02:00
hi556.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx208.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx214.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx219.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx258.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx274.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx290.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx319.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx334.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
imx355.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ir-kbd-i2c.c media: rc: i2c: Fix an error message 2021-05-23 19:21:24 +02:00
Kconfig media: imx208: Add imx208 camera sensor driver 2021-06-02 12:03:48 +02:00
ks0127.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
ks0127.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
lm3560.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
lm3646.c media: lm3646: remove redundant assignment to variable rval 2019-10-24 18:41:31 -03:00
m52790.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
Makefile media: imx208: Add imx208 camera sensor driver 2021-06-02 12:03:48 +02:00
max2175.c media: media/i2c: remove unneeded variable: "ret" 2021-03-11 11:59:43 +01:00
max2175.h media: i2c: Use the correct style for SPDX License Identifier 2019-11-10 17:47:14 +01:00
max9271.c media: i2c: max9271: Introduce wake_up() function 2021-06-17 11:30:21 +02:00
max9271.h media: i2c: max9271: Introduce wake_up() function 2021-06-17 11:30:21 +02:00
max9286.c media: i2c: max9286: Rework comments in .bound() 2021-06-17 11:29:27 +02:00
ml86v7667.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
msp3400-driver.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
msp3400-driver.h media: msp3400: declare its own pads 2018-09-17 13:16:19 -04:00
msp3400-kthreads.c media: msp3400: use semicolons rather than commas to separate statements 2020-11-16 10:31:07 +01:00
mt9m001.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
mt9m032.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
mt9m111.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
mt9p031.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
mt9t001.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
mt9t112.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
mt9v011.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
mt9v032.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
mt9v111.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
noon010pc30.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov02a10.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov772x.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov2640.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov2659.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov2680.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov2685.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov2740.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov5640.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov5645.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov5647.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov5648.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov5670.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov5675.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov5695.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov6650.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov7251.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov7640.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
ov7670.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov7740.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov8856.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov8865.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov9640.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov9640.h media: ov9640: Use the generic clock framework 2021-02-06 09:38:05 +01:00
ov9650.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov9734.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
ov13858.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
rdacm20.c media: i2c: max9271: Introduce wake_up() function 2021-06-17 11:30:21 +02:00
rdacm21.c media: i2c: rdacm21: Power up OV10640 before OV490 2021-06-17 11:31:45 +02:00
rj54n1cb0c.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
s5k4ecgx.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
s5k5baf.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
s5k6a3.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
s5k6aa.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
saa711x_regs.h media: i2c: Use the correct style for SPDX License Identifier 2019-11-10 17:47:14 +01:00
saa717x.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
saa6588.c media: subdev: disallow ioctl for saa6588/davinci 2021-06-17 10:18:37 +02:00
saa6752hs.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
saa7110.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
saa7115.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
saa7127.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
saa7185.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
sony-btf-mpx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
sr030pc30.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
st-mipid02.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
tc358743_regs.h media: i2c: add SPDX license info 2018-02-14 13:16:31 -05:00
tc358743.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
tda1997x_regs.h media: i2c: Use the correct style for SPDX License Identifier 2019-11-10 17:47:14 +01:00
tda1997x.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
tda7432.c media: add SPDX headers to some files 2019-06-12 11:42:27 -04:00
tda9840.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
tea6415c.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 68 2019-05-24 17:36:46 +02:00
tea6415c.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
tea6420.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 61 2019-05-24 17:36:45 +02:00
tea6420.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
ths7303.c media: replace all <spaces><tab> occurrences 2018-01-04 13:15:05 -05:00
ths8200_regs.h
ths8200.c media: i2c: Convert to new i2c device probe() 2019-08-13 11:54:04 -03:00
tlv320aic23b.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
tvaudio.c media: i2c: fix several typos 2019-03-01 09:29:58 -05:00
tvp514x_regs.h media: media/i2c: fix kerneldoc issues for media i2c headers 2021-03-22 10:23:43 +01:00
tvp514x.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
tvp5150_reg.h media: i2c: Use the correct style for SPDX License Identifier 2019-11-10 17:47:14 +01:00
tvp5150.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
tvp7002_reg.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
tvp7002.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
tw2804.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
tw9903.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
tw9906.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
tw9910.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
uda1342.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
upd64031a.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
upd64083.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
video-i2c.c media: i2c: video-i2c: use pm_runtime_resume_and_get() 2021-05-19 09:51:42 +02:00
vp27smpx.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
vpx3220.c media: vpx3220: make array input_vals static, makes object smaller 2019-11-05 08:48:55 -03:00
vs6624_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00
vs6624.c media: v4l2-subdev: add subdev-wide state struct 2021-06-17 10:01:27 +02:00
wm8739.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00
wm8775.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 157 2019-05-30 11:26:37 -07:00