Hi @xilsqyyx,
Full disclosure, we are using a custom board with Snapdragon820c, but we are running linux 4.14.
I ran some commands on our board with the IMX-412 mipi camera connected. These are the results:
#slroot @ ~/sl/bin
SD> v4l2-ctl -d /dev/video0 --get-fmt-video
Format Video Capture Multiplanar:
Width/Height : 4056/3040
Pixel Format : ‘pRAA’ (10-bit Bayer RGRG/GBGB Packed)
Field : None
Number of planes : 1
Flags :
Colorspace : sRGB
Transfer Function : sRGB
YCbCr/HSV Encoding: ITU-R 601
Quantization : Full Range
Plane 0 :
Bytes per Line : 5072
Size Image : 15418880
#slroot @ ~/sl/bin
SD> v4l2-ctl -d /dev/video0 --stream-mmap=4 --stream-count=1 --stream-to=imx412.raw --verbose
VIDIOC_QUERYCAP: ok
idx: 0 seq: 0 bytesused: 15418880 ts: 920.725200
#slroot @ ~/sl/bin
SD> ls -l *.raw
-rw-r–r-- 1 slroot linaro 15418880 Jul 29 07:58 imx412.raw
#slroot @ ~/sl/bin
SD>
The IMX-412 is set to 4 mipi data lanes, but we have another driver for our customers that use 2 mipi data lanes. When I run the v4l2-ctl command to stream, this is what is in the dmesg log:
[ 1250.920098] Setting csi frequency=200000000 pixel_clock=492000000
[ 1250.926413] qcom-camss a34000.camss: CSIPHY 3PH HW Version = 0x10000000
[ 1250.926744] qcom-camss a34000.camss: VFE HW Version = 0x70020000
[ 1250.967116] pixel_clock=492000000 settle_cnt = 18 lane=0x8f
[ 1250.969579] imx412_4lane 5-001a: imx412 streaming=1
[ 1251.587272] imx412_4lane 5-001a: VC Sensor MODE=1 PowerOn STATUS=0x80 i=1
[ 1251.587298] imx412_4lane 5-001a: imx412 streaming=0
We have had some issues with the V4L2_CID_PIXEL_RATE settings, so we added some print statements to the qcom_camss driver to show that “pixel_clock”=492000000. With our two lane mipi data lanes we set this to 1/2 that value in the imx412 driver code. I only mention this because of the SOF timeout message:
We set the V4L2_CID_PIXEL_RATE and V4L2_CID_LINK_FREQ in the set_fmt function of our imx412 driver. It “looks” like your default in your driver for the V4L2_CID_PIXEL_RATE is this:
.pclk = 480000000
This seems close to the value we set for our four mipi data lanes. Can you confirm that this is what you set the device tree to use (4 mipi data lanes)?
Thanks,
Kim