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: 0x03060301
[ 157.958722] CSIS_CMN_CTRL: 0x00004b05
[ 157.963275] CSIS_CLK_CTRL: 0x000f0000
[ 157.967821] CSIS_INTMSK: 0x0fffff1f
[ 157.972449] CSIS_INTSRC: 0x00000000
[ 157.977077] CSIS_DPHYSTATUS: 0x00000040
[ 157.981703] CSIS_DPHYCTRL: 0x0e80001f
[ 157.986344] CSIS_DPHYBCTRL_L: 0x000001f4
[ 157.990980] CSIS_DPHYBCTRL_H: 0x00000000
[ 157.995608] CSIS_DPHYSCTRL_L: 0x00000000
[ 158.000232] CSIS_DPHYSCTRL_H[3c]: 0x00000000
[ 158.004868] CSIS_ISPCONFIG_CH0: 0x00001078
[ 158.009513] CSIS_ISPCONFIG_CH1: 0x000008fd
[ 158.014140] CSIS_ISPCONFIG_CH2: 0x000008fe
[ 158.018768] CSIS_ISPCONFIG_CH3: 0x000008ff
[ 158.023396] CSIS_ISPRESOL_CH0: 0x06200840
[ 158.028021] CSIS_ISPRESOL_CH1: 0x80008000
[ 158.032659] CSIS_ISPRESOL_CH2: 0x80008000
[ 158.037290] CSIS_ISPRESOL_CH3: 0x80008000
[ 158.041916] CSIS_ISPSYNC_CH0: 0x00000000
[ 158.046544] CSIS_ISPSYNC_CH1: 0x00000000
[ 158.051170] CSIS_ISPSYNC_CH2: 0x00000000
[ 158.055794] CSIS_ISPSYNC_CH3: 0x00000000
[ 158.060422] GPR_GASKET_0_CTRL: 0xffff8000
[ 158.065048] GPR_GASKET_0_HSIZE: 0xffff8000
[ 158.069687] GPR_GASKET_0_VSIZE: 0xffff8000
We are working with following drivers:
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
Is there actually a description/documentation showing how these drivers interact?
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.
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);
what bsp used in the case, one can try with latest nxp from source.codeaurora.org/external/imx/linux-imx repository
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?
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.
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.
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: