This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM5718: CSI2 problem

Part Number: AM5718

Tool/software: Linux

Hi.

I also have the same problem on this post ()

I am doing work with AM5718 & 2 OV7251 MIPI camera (single data lane MIPI) .

One is connected to CSI2-0 & the other is connected to CSI2-1.

The driver model is TI-CAL & I2C media driver which is modified from OV490.c.

When booting all is done with success. CAL driver and i2c setting is done with ok.

And I also checked MIPI signal with oscilloscope.

(Clock channel is approx. 56MHz , amplitude is 700mV)

(Data channel amplitude is 1.2v) 

I wonder internal CAL module can detect 700mV clock signal? why clock & data channel's amplitude is different.

As "Jason Lam" said...

All driver is loaded ok but when I capture image from V4L2 streaming select() times out.

/proc/interrupts has no interrupts from CAL/VPE.

So where should I have to check?

Regards.

  • The video experts have been notified. They will respond here.
  • Can you please configure the sensor clock source to 92 MHz and see if that helps? Currently the CAL driver has it's clock settings hard coded to 92 MHz and this can be cause of the handshake failure at your end.
  • Hi Manisha.

    There is some problems on our board (DX, DY signal is mis-connected).
    So now I can retrieve images from CAM but the image is not good.
    See this image for your understandings.
    mobilian.biz/.../raw1-000.raw.jpg
    mobilian.biz/.../raw1-001.raw.jpg
    mobilian.biz/.../raw1-002.raw.jpg
    * Image size is 640x480 and OV7251 was set to print test-pattern.
    As you seen these images, the width is not enough and the vertical direction is also transmitted but stopped.

    OV7251 is operate on 24MHz and frame rate is 100 frame/sec.
    Also I modified clock_rate (192MHz ---> 800Mhz) in cal.c

    Below is my setting and log message when captures images from V4L2.

    Couldd you point out where should I have to check?

    [ 30.038360] cal-000: *** cal_start_streaming : port=1
    [ 30.045208] cal-000: *** ... sensor Pixel Rate: 800000000
    [ 30.051331] cal-000: *** ... CAL-1
    [ 30.057032] cal-000: *** ... CAL-2
    [ 30.061060] cal-000: *** ... CAL-3
    [ 30.069780] cal-000: *** phy enable : 1
    [ 30.079859] cal-000: *** ... CAL-4
    [ 30.087901] cal-000: *** ... CAL_CSI2_TIMING(1) = 0x0000c197
    [ 30.102550] cal-000: *** .. CAL_CSI2_COMPLEXIO wait..ok
    [ 30.109405] cal-000: *** ... CAL_CSI2_COMPLEXIO_CFG(1) = 0x4a000000
    [ 30.117177] cal-000: *** ... CAL_CTRL = 0xff1fe07e
    [ 30.122600] cal-000: *** ... CAL-5
    [ 30.128223] cal-000: *** ... ddrclkperiod_us: 2500
    [ 30.133733] cal-000: *** ... ths_term: 6 (0x06)
    [ 30.140599] cal-000: *** ... ths_settle: 15 (0x0f)
    [ 30.146968] cal-000: *** ... CSI2_0_REG0 = 0x0100060f
    [ 30.152741] cal-000: *** ... CSI2_0_REG1 = 0xe002e10e
    [ 30.160079] cal-000: *** ... CAL-6
    [ 30.164988] cal-000: *** CLK POL : 1
    [ 30.169277] cal-000: *** DAT(0) POL : 1
    [ 30.173826] cal-000: *** ... LANE_MASK ... CAL_CSI2_COMPLEXIO_CFG(1) = 0x4a0000a9
    [ 30.184918] cal-000: *** ... CAL-7
    [ 30.188947] cal-000: *** ... CAL_CSI2_CTX0(1) = 0x00000101
    [ 30.196472] cal-000: *** ... CAL-8
    [ 30.200500] cal-000: *** ... CAL_PIX_PROC(1) = 0x000a0009
    [ 30.207875] cal-000: *** ... CAL-9
    [ 30.211902] cal-000: *** ... CAL_WR_DMA_CTRL(1) = 0x07804304
    [ 30.219551] cal-000: CAL_WR_DMA_OFST(1) = 0x00000500
    [ 30.225268] cal-000: *** ... CAL_WR_DMA_XSIZE(1) = 0x05000000
    [ 30.231648] cal-000: *** ... CAL-10
    [ 30.237090] cal-000: *** ... CAL-11
    [ 30.241202] cal-000: *** ... CAL-12
    [ 30.246661] ov7251 3-0060: ---> start / stop stream : 1
    [ 30.252519] ov7251 3-0060: -> REGISTER : OVT_100 , count=141
    [ 30.309055] cal-000: *** ... CAL streaming ... ok
  • Hi manisha.
    From now I have thought that the MIPI signal is bad (something with noise) but after commenting register setting for CSI2_PHY_REG0 / CSI2_PHY_REG1 in cal.c capturing from camera goes fast.
    But.. still remains partial image problem.
    Could you kindly explain those registers for OV7251 100frame/sec at 800MHz clock speed?
    Regards.
  • Hi Yong Hee,

    I Wanted to inform that I haven't yet got chance to look into the logs and images that you have shared. Hoping to be able to look at them early next week and get back with my response. 

    Regards,

    Manisha

  • We found some bug in our CAL driver that should be applicable to the problems reported by you.  Find attached the patches with fix to those issues. Please apply them and let us know if it helps to resolve the issue.

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/2018.tiL4.9_2D00_AD_2D00_2_2D00_2_2D00_media_2D00_ti_2D00_vpe_2D00_cal_2D00_Fix_2D00_pixel_2D00_processing_2D00_parameters.patch

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/791/0535.tiL4.9_2D00_AD_2D00_1_2D00_2_2D00_media_2D00_ti_2D00_vpe_2D00_cal_2D00_Fix_2D00_ths_5F00_term_2D00_ths_5F00_settle_2D00_parameters.patch

  • hi Yong hee,

    have you tried this patch and how it works?

  • Hi Jason.

    Now I'm trying to patch your code.

    I'll let you know after test.

    Anyway thanks for your endeavor.

    Best regards.

  • hi Yong hee,
    that's not my code but ti's. I will try it later too.
  • Hey manisha.
    Thanks for your help... it works very good.
    As a result , lack of camera knowledge lead me so many faults.
    Best regards.
  • Thanks Yong Hee for the update!