i.MX8MP MIPI CSI2 ISI ISP test driver.

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

i.MX8MP MIPI CSI2 ISI ISP test driver.

1,644 次查看
rod_pec
Contributor II

We have a camera with 1696x200 resolution set to 2-lane MIPI at 360 MHz (measured on oscilloscope). Our DT is configured with those options:

max-pixel-frequency = /bits/ 64 <720000000>;

data-lanes = <1 2>

csis-hs-settle = <15>;

isi_0 = disabled

isp_0 = okay
Everything register is configured properly, as we see the LP transition and MIPI data flow.
The custom driver was based on the IMX662 and we expect a RAW12 output from it.
After bring-up of drivers using start_isp, we run video_test:

ISP_LOG_LEVEL=8 ./video_test -w 1696 -h 200 -f RAW12 -t file -d 2 -m

0
The log shows the buffer description but no data is received

Questions:

How can we assess MIPI is receiving anything?

0 项奖励
回复
8 回复数

1,530 次查看
rod_pec
Contributor II

We were make to test with our setup sensor and IMX8MP, we have this: 

 

The camera sensor does not say anything about continuous or non-continuous clock in documentation files. We see with the oscilloscope a moment between frames where data and clock are high. Would that be non-continuous?
Tried setting clock-noncontinuouson our overlay and the only change was that SOT Errors did not increment (everything 0).
According to our driver implementation, the LP transitions are happening on the stream_on function call. Would that be the correct place? Maybe some kind of delay is necessary? 

0 项奖励
回复

1,613 次查看
joanxie
NXP TechSupport
NXP TechSupport

what clock mode do you use? and pls share the boot up logfile and dump the mipi csi registers, let me double check it

0 项奖励
回复

1,561 次查看
rod_pec
Contributor II

HI.

Our sensor cam has a continuous clock mode. 

Attached you will see the boot up log and a mipi csi dump. 

Please let me know if you need any other information or reg status. 

标记 (1)
0 项奖励
回复

1,543 次查看
joanxie
NXP TechSupport
NXP TechSupport

how about setting the camera as non-continuous mode to test again? refer to your print log, SOT error shows the timing issue,  the camera must enter LP mode before mipi dphy enable, the continuous mode make the clock enter HS mode always, so the timing will couldn't meet the request, so pls change the clock mode and test again

0 项奖励
回复

1,525 次查看
rod_pec
Contributor II

We were make to test with our setup sensor and IMX8MP, we have this: 

 

The camera sensor does not say anything about continuous or non-continuous clock in documentation files. We see with the oscilloscope a moment between frames where data and clock are high. Would that be non-continuous?
Tried setting clock-noncontinuouson our overlay and the only change was that SOT Errors did not increment (everything 0).
According to our driver implementation, the LP transitions are happening on the stream_on function call. Would that be the correct place? Maybe some kind of delay is necessary? 

标记 (1)
0 项奖励
回复

1,456 次查看
joanxie
NXP TechSupport
NXP TechSupport

when you set clock-noncontinuouson, the SOT error fix, but still couldn't capture, right? if you set noncontinous clock mode, pls check bit  STOPSTATECLK of MIPI_CSIx_DPHY_STATUS, it must alter between 0 and 1; is it correct? or you can set this register to me, let me check if the dphy works correctly or not

0 项奖励
回复

1,438 次查看
rod_pec
Contributor II

I ran some tests with a sensor had already kernel driver and my sensor under development. So I used this commands to try some debug logs using dmesg in terminal:

$ sudo echo 2 > /sys/module/imx8_mipi_csi2_sam/parameters/debug

$ sudo echo 'file v4l2-fwnode.c +p' > /sys/kernel/debug/dynamic_debug/control

I observed in logs that the bit STOPSTATECLK in MIPI_CSIx_DPHY_STATUS resgister stey always in 1 when I load the driver and start the tests app as showed in print. The value is always C1 and nothing is captured.
Do you know other method to monitoring dynamically the register of interest (devmem maybe)?

My sensor

underDevSensor.png

Reference sensor. 

knowSensor.png

标记 (1)
0 项奖励
回复

1,399 次查看
joanxie
NXP TechSupport
NXP TechSupport

if STOPSTATECLK  alwayas 1, you need confirm if your camera side set correct or not, could you get the signal from camera side or not, then ensure camera enter LP before enable the mipi dphy

0 项奖励
回复