Cci issues ov5640 sensor


#1

Hi all,

I am using custom board based on db820c. I am able to read sensor chipid (5640) during probe but i2c communication fails during launching the camera. Any one met this issue? It seems sensor is not responding. I have checked all voltages, MCLK, reset sequence, all are proper.

Below is the error message.
[ 37.550335] i2c-qcom-cci a0c000.cci: master 0 queue 0 timeout
[ 37.550456] i2c-qcom-cci a0c000.cci: cci i2c xfer error -110
[ 37.555217] ov5640 3-0078: ov5640_write_reg: error: reg=3008, val=2

Thanks,
Pradeep


#2

Can you share the CCI node/subnode?
Which OS image are your running, qcomlt debian?


#3

Hi @pradeep

I have a few questions:

  1. did you use exactly the same camera module that is on the other boards? Not all OV5640 camera modules are the same. The Camera modules contain many components, the three most interesting are the sensor die and image correction die (the pair combined are the OV5640) and finally the auto-focus motor driver die. The ‘probe’ portion of the bring-up actually talks to the auto-focus driver die to see if the camera is there. If the module you used has a different driver die it will fail the I2C probe.
  2. did you look at the I2C communications with an oscilloscope? are you sure that you sent the command to the camera module? are the voltage levels correct? is the timing acceptable? Did the camera module ‘ACK’ the I2C transaction? Are you connected to the right I2C bus?

I am sorry to say this, but most basic device probe errors are trivially diagnosed with an oscilloscope, and unfortunately most programmers struggle with module bring up because they have never learned to use and oscilloscope.

Hope this Helps.

-Lawrence-
no longer a Qualcomm employee
Still looking for a good employer.


#4

Thanks @ljking and @Loic for your inputs.

There was a problem with my hardware. I have not removed some residue which was causing the problem. I have checked the voltages. AVDD - 2.68V, DOVDD - 1.8V, DVDD - 2.56V MCLK - 24MHZ. All are proper. startup sequence timing is proper, so Camera is working perfectly. Also autofocus is working perfectly. I have added it in sensor driver itself. I verified both single focus and continuous focus.
sorry, I have not checked I2C communication with oscilloscope. I Just powered the sensor and read chipid of the sensor which is ‘5640’, it is correct.

I am running Linux, 4.14 kernel.

Thanks,
Pradeep


#5

Hi @ljking, @Loic,

I met with another issue again. I am able to launch the camera only once. I have 2 brand new camera boards now. camera only works for the first time(this also works few times, 3 out of 5). From second launch, i am getting below errors. All voltages are proper, MCLK is proper. Please let me know, if you have met this issue earlier. Probe is success during boot time.
Power on, power off sequence is correct.

[ 91.544549] qcom-camss a34000.camss: VFE HW Version = 0x70020000
[ 91.544970] qcom-camss a34000.camss: VFE HW Version = 0x70020000
[ 91.550352] qcom-camss a34000.camss: VFE HW Version = 0x70020000
[ 91.556433] >>>>>>ov5640_set_power_on:
[ 91.738868] i2c-qcom-cci a0c000.cci: master 0 queue 0 timeout
[ 91.739038] i2c-qcom-cci a0c000.cci: cci i2c xfer error -110
[ 91.743748] ov5640 3-0078: ov5640_init_slave_id: failed with -110
[ 91.749935] qcom-camss a34000.camss: Failed to power up pipeline: -110
[ 91.755816] qcom-camss a34000.camss: VFE HW Version = 0x70020000
[ 91.762251] qcom-camss a34000.camss: VFE HW Version = 0x70020000
[ 91.768417] qcom-camss a34000.camss: VFE HW Version = 0x70020000
[ 91.774346] qcom-camss a34000.camss: VFE HW Version = 0x70020000
[ 92.028596] >>>>>>ov5640_set_power_on:
[ 92.202850] i2c-qcom-cci a0c000.cci: master 0 queue 0 timeout
[ 92.202970] i2c-qcom-cci a0c000.cci: cci i2c xfer error -110
[ 92.207733] ov5640 3-0078: ov5640_init_slave_id: failed with -110
[ 92.213785] qcom-camss a34000.camss: Failed to power up pipeline: -110

Thanks,
Pradeep


#6

Hi @Loic,

Below register write, which is software reset fails. Then CCI goes to unknown state.
ov5640_write_reg: error: reg=3008, val=2

Do you know any reason for that?

below commit fixes the issue, camera works fine.
https://patchwork.ozlabs.org/patch/972690/

Thanks,
Pradeep


#7

Not sure, which version of the kernel/ov56410 driver are you running?