Integrating custom CSI ov13850 camera board to dragonboard 410c for Android image

mezzanine
success_story

#1

Hello there,

I’m using dragonboard 410c from Arrow, I’m trying to integrate OV13850 MIPI camera in android image, we have designed our own interfacing board for the camera and dragon board. We are using APQ8016/msm8916 platform for android image.

we tried following to integrate the ov13850 driver.

  1. Initially we tried running patch (0001-ARM-dts-msm-Add-ov13853-camera-dtsi.patch) for the ov13850 which we downloaded from code aurora but found no change in driver level.

  2. added ov13850 file in kconfig & makefile in kernel/drivers/platform/msm/camera_v2/sensors/
    and did successful compilation, but camera init failed due to get cam_src_clk failure.
    attaching the debug prints of correspondng errors:

    i2c /dev entries driver
    [ 12.222469] platform 1d00000.qcom,vidc: Driver msm_vidc_v4l2 requests probe deferral
    [ 12.235254] adp1660 i2c_add_driver success
    [ 12.238439] msm_flash_init_module:1043 Enter
    [ 12.242916] msm_flash_lm3642_init entry
    [ 12.332414] cam_src_clk get failed
    [ 12.334772] msm_camera_power_up: clk enable failed
    [ 12.339546] msm_camera_power_up:1350 failed
    [ 12.428591] failed rc -517
    [ 12.430280] platform 20.qcom,eeprom: Driver qcom,eeprom requests probe deferral
    [ 12.439264] g_sctrl[0] ffffffc030df3000
    [ 12.442351] g_sctrl[1] ffffffc030df4000[ 12.445722] mt9m114_init_module:1155
    [ 12.449682] mt9m114_init_module:1160 rc -19
    [ 12.453503] ov5645_init_module:557
    [ 12.501048] msm_cci_init: Failed in getting TOP gdscr regulator handle
    [ 12.506705] msm_cci_init:763: hw_version = 0x10000008
    [ 12.512110] msm_cci_irq:930 MASTER_0 error 0x10000000
    [ 12.516717] msm_cci_i2c_read:428 read_words = 0, exp words = 1
    [ 12.522541] msm_cci_i2c_read_bytes:506 failed rc -22
    [ 12.527450] msm_camera_cci_i2c_read: line 48 rc = -22
    [ 12.532612] msm_sensor_match_id: ov5645: read id failed
    [ 12.537693] msm_sensor_check_id:1336 match id failed rc -22
    [ 12.655319] msm_cci_init: Failed in getting TOP gdscr regulator handle
    [ 12.660926] msm_cci_init:763: hw_version = 0x10000008
    [ 12.666394] msm_cci_irq:930 MASTER_0 error 0x10000000
    [ 12.670984] msm_cci_i2c_read:428 read_words = 0, exp words = 1
    [ 12.676807] msm_cci_i2c_read_bytes:506 failed rc -22
    [ 12.681719] msm_camera_cci_i2c_read: line 48 rc = -22
    [ 12.686803] msm_sensor_match_id: ov5645: read id failed
    [ 12.691962] msm_sensor_check_id:1336 match id failed rc -22
    [ 12.805262] msm_cci_init: Failed in getting TOP gdscr regulator handle
    [ 12.810866] msm_cci_init:763: hw_version = 0x10000008
    [ 12.816337] msm_cci_irq:930 MASTER_0 error 0x10000000
    [ 12.820928] msm_cci_i2c_read:428 read_words = 0, exp words = 1
    [ 12.826752] msm_cci_i2c_read_bytes:506 failed rc -22
    [ 12.831663] msm_camera_cci_i2c_read: line 48 rc = -22
    [ 12.836734] msm_sensor_match_id: ov5645: read id failed
    [ 12.841905] msm_sensor_check_id:1336 match id failed rc -22
    [ 12.912337] msm_sensor_platform_probe ov5645 power up failed
    [ 12.916971] ovti,ov5645: probe of 78.qcom,camera failed with error -22
    [ 12.923523] ov7695_init_module:315
    [ 12.927324] ov13850_init_module:253
    [ 12.930747] ov13850_init_module:260 rc -19

Can any one help on this? we tried enabling the cam_src_clk forcefully but found no change.

thanks in advance,
Regards,
Chaithra


#2

Does your camera module have its own ISP?


#3

Hello,

yes, camera module as its own ISP and contains MIPI signals interface, camera module is a 13Mpx and it generates 4 lane MIPI-signals.

waiting for your response.

regards,
Chaithra


#4

Have you tried the ov13850 patches with the latest 4.9 kernel in a debian
image? The developers currently use Debian for developing the driver.

I also assume that the camera is connected to CSI0 since CSI1 only supports
2 lanes.


#5

Hello,

yes we tired using “0001-ARM-dts-msm-Add-ov13853-camera-dtsi.patch” for the “android image” for msm8916 but couldnt enable.

yes we have connected to CSI0 and we are using android image. “we are not using debian image”, can u plesae share us the link or tagID wer we can download debian 4.9 kernel?

but since our requirement is on android image can we integrate it into andorid 5.0?

waiting for your reply.
thanks in advance,
regards,
chaithra


#6

This is the 4.9 kernel branch[1]. It is currently not supported with Android.

So you’ll need to run the debian image[2]. This is the best way to get help from developers working on the camera drivers currently. Once you get it working on debian with a newer kernel, you might find it easier to backport the patch to the old Android kernels.

[1] https://git.linaro.org/landing-teams/working/qualcomm/kernel.git/log/?h=release/qcomlt-4.9
[2] http://www.96boards.org/documentation/ConsumerEdition/DragonBoard-410c/README.md/


#7

Hello,

thanks for your reply.

I checked both the links.
Link[1] referring to kernel file I downloaded the file, but in Link [2] Software download is for android but can you share me debian image build from source? such that i can change for OV13850 camera?

regards,
Chaithra


#8

[2] also point to Debian and Openembedded images. Download the Debian one from http://www.96boards.org/documentation/ConsumerEdition/DragonBoard-410c/Downloads/Debian.md/

You don’t need to build debian from source, only change the kernel by creating a custom boot.img based on instructions[3]

[3] https://github.com/96boards/documentation/wiki/Dragonboard-Boot-Image


#9

Hi chaithra,

Have you bring up ov13850 on Android L system now? And I have done it through AISTARVISION Adapter V2.0 Mezzanine, ov13850 and ov8865 both works well.

Thanks,
Jason


#10

@jasonz, could you share the dtsi snippet that you used to connect the camera?


#11

Hi zonque,

For bayer sensor, keep the default camera node setting in apq8016-camera-sensor-sbc.dtsi is ok.

Thanks!


#12

Ah, thanks. So you’re not based on the new mainline camss driver I take it?

I’m actually just interested in finding the right settings for the clock-lanes and data-lanes properties in DTS for a 4-lane camera. The mainline documentation states that the clock lane must always be 1, but I can’t find any reference to the correct values for data-lanes. @todortomov, any idea?


#13

Okay, I figured it out. For the record, the clock lane on apq8016 is always 1, and the data lanes are 0, 2, 3 and 4. Unless of course the lanes are swapped in hardware. The camss driver seems to work just fine, no it’s time to investigate on the pixel format.


#14

zonque http://discuss.96boards.org/u/zonque
October 17

Okay, I figured it out. For the record, the clock lane on apq8016 is
always 1, and the data lanes are 0, 2, 3 and 4. Unless of course the
lanes are swapped in hardware. The camss driver seems to work just fine,
no it’s time to investigate on the pixel format.

Thanks for the update! I know you’ve been having to puzzle a lot of this
out for yourself (if I did have any useful ideas I would have shared…
but I didn’t). Either way its always great to see success stories on the
forum.