OV13850 sensor support on IMX8MP

cancel
Showing results for 
Search instead for 
Did you mean: 

OV13850 sensor support on IMX8MP

504 Views
arunkumar_ev
Contributor II

Hello team,

We are trying to enable OV13850 sensor support on imx8mp to capture RAW10 data. But we get a incorrect test pattern, also sometimes we receive a timeout error. We suspect this is some timing issue. Below is the register dump from csi:

 [ 157.936970] mipi_csis_start_stream: 955
[ 157.954180] CSIS_VERSION[0]: 0x03060301
[ 157.958722] CSIS_CMN_CTRL[4]: 0x00004b05
[ 157.963275] CSIS_CLK_CTRL[8]: 0x000f0000
[ 157.967821] CSIS_INTMSK[10]: 0x0fffff1f
[ 157.972449] CSIS_INTSRC[14]: 0x00000000
[ 157.977077] CSIS_DPHYSTATUS[20]: 0x00000040
[ 157.981703] CSIS_DPHYCTRL[24]: 0x0e80001f
[ 157.986344] CSIS_DPHYBCTRL_L[30]: 0x000001f4
[ 157.990980] CSIS_DPHYBCTRL_H[34]: 0x00000000
[ 157.995608] CSIS_DPHYSCTRL_L[38]: 0x00000000
[ 158.000232] CSIS_DPHYSCTRL_H[3c]: 0x00000000
[ 158.004868] CSIS_ISPCONFIG_CH0[40]: 0x00001078
[ 158.009513] CSIS_ISPCONFIG_CH1[50]: 0x000008fd
[ 158.014140] CSIS_ISPCONFIG_CH2[60]: 0x000008fe
[ 158.018768] CSIS_ISPCONFIG_CH3[70]: 0x000008ff
[ 158.023396] CSIS_ISPRESOL_CH0[44]: 0x06200840
[ 158.028021] CSIS_ISPRESOL_CH1[54]: 0x80008000
[ 158.032659] CSIS_ISPRESOL_CH2[64]: 0x80008000
[ 158.037290] CSIS_ISPRESOL_CH3[74]: 0x80008000
[ 158.041916] CSIS_ISPSYNC_CH0[48]: 0x00000000
[ 158.046544] CSIS_ISPSYNC_CH1[58]: 0x00000000
[ 158.051170] CSIS_ISPSYNC_CH2[68]: 0x00000000
[ 158.055794] CSIS_ISPSYNC_CH3[78]: 0x00000000
[ 158.060422] GPR_GASKET_0_CTRL[60]: 0xffff8000
[ 158.065048] GPR_GASKET_0_HSIZE[64]: 0xffff8000
[ 158.069687] GPR_GASKET_0_VSIZE[68]: 0xffff8000

We are working with following drivers:

   drivers/staging/media/imx/imx8-mipi-csi2-sam.c

   drivers/staging/media/imx/imx8-isi-cap.c

While configuring the device tree we see the property csis-hs-settle. What value we should set for this property? Our sensor is configured with MIPI PHY CLK 640Mbps.

Thanks & Regards

0 Kudos
10 Replies

294 Views
malik_cisse
Contributor II

Hi

Is there actually a description/documentation showing how these drivers interact?

drivers/staging/media/imx/imx8-mipi-csi2-sam.c

drivers/staging/media/imx/imx8-isi-cap.c

This would be much appreciated.

The only documentation I know so far is the source code itself, but it is frustating to reverse engineer from the code.

Thank you

0 Kudos

362 Views
malik_cisse
Contributor II

Hi Arunkumar_ev,

Can I ask how you get CSI register dump?

What command did you use?

Thank you sir,

 

0 Kudos

351 Views
arunkumar_ev
Contributor II

Hello Malik,

The register dump function is already present in driver. In CSI driver "drivers/staging/media/imx/imx8-mipi-csi2-sam.c" the function is static void dump_csis_regs.

You can enable those v4l2_dbg, or change it to printk:

  printk(KERN_INFO "%20s[%x]: 0x%.8x\n", registers[i].name, registers[i].offset, cfg);

Regards,

0 Kudos

343 Views
malik_cisse
Contributor II

Thank you 

0 Kudos

476 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi arunkumar_ev

 

what bsp used in the case, one can try with latest nxp from source.codeaurora.org/external/imx/linux-imx repository
https://source.codeaurora.org/external/imx/linux-imx/tree/?h=imx_5.4.70_2.3.0

 

Best regards
igor

0 Kudos

465 Views
arunkumar_ev
Contributor II

Hello Igor,

The BSP used is yocto zeus 5.4.70 2.3.0.

Do we need to  configure HSSETTLE[7:0] value in MIPI_CSIx_DPHY_COMMON_CTRL?

Any other suggestions?

Best Regards.

0 Kudos

435 Views
arunkumar_ev
Contributor II

This issue is resolved now, we had issues with vendor settings.

324 Views
dennismoore
Contributor I

Hi @arunkumar_ev ,

Could you please provide some more detail on how you resolved this? Which vendor settings?

I am using 2 AR0144 image sensors, one connected to csi0 and the other to csi1. I'm able to get images off the camera connected to csi0, but not from the camera connected to csi1. The device tree nodes for both cameras match, apart from which csi peripheral they link to.

I'm also wondering about these csis-hs-settle and csis-clk-settle properties, and if I am having a clock issue.

Appreciate your help.

Regards,
Dennis Moore

0 Kudos

272 Views
arunkumar_ev
Contributor II

Hi dennismoore,

Please check attached patch file, this is current working changes for us, sorry the driver file in patch is not that clean.

For capture we are using v4lcap utility.

Currently only 8bit mode working for us. Also from patch you can see we did a "subdev_defer", this was because we observed that if our sensor stream start before csi stream, we get a frame timeout. Not sure about the reason behind this.

Settings used in OV13850 driver for 2112x1568 and 4224x3136 resolutions are from vendor. Also the get_fmt function in csi driver was not setting the format received from sensor driver.

Regards

0 Kudos

300 Views
malik_cisse
Contributor II

Hi Dennis,

I did also make ar0144 sensor work on one CSI port using Phytec Pollux board together with their VM016 Kamera.

Maybe their driver supports 2x Kameras and you can use their driver. They have instructions on their web page on how to build the yocto BSP.

As for csis-hs-settle and csis-clk-settle you have good explanation here:

https://community.nxp.com/t5/i-MX-Processors/Explenation-for-HS-SETTLE-parameter-in-MIPI-CSI-D-PHY-r...

https://community.nxp.com/t5/i-MX-Processors/How-to-compute-S-CLKSETTLECTL-value-for-MIPI-CSI-2-rece...

0 Kudos