I am using an imx.6 Sabrelite (PN:BD-S1-imx6) from BoundaryDevices to develop a camera system. The camera sensor is the ov7740 from omnivision, attached to Sabrelite via CSI0 (8 data lines, pixelclock and camera system clock). As I do not have the possibility to connect the hsync and vsync signal this all has to work in BT.656 mode.
I am having issue getting images from the driver. The video for linux drivers hangs waiting for data and after a timeout breaks down the video4 linux pipeline.
The steps I have taken so far:
The test encounter DQBUF failed during capturing, the error is as follow:
ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0 VIDIOC_DQBUF failed.
When trying to decipher the video for linux kernel module, it seems that this occurs when the data queue hasn't been filled until a certain timeout. The queue should be filled through the CSI interrupt handler. As I can see it now, it seems that the interrupt is never raised.
I have taken the following link which have similar problem using BT656 mode to capture in progressive mode as a reference:
https://community.freescale.com/thread/309869
https://community.freescale.com/docs/DOC-95412
For more info, below summarize our setting and dumped info to get the CSI BT656 without HSYNC/VSYNC working:
I think this is due to the CSI/IPU not setup properly for BT.656 mode without hsync/vsync signals. Please give some support on how to configure the CSI/IPU with this camera?
Thanks in advance.
Hello Thomas,
I am sorry I don't have more advice ...
What I knwo is that when CSI0 was not working with my hardware there was at least the CSI test mode working ...
It seems weird that for you it is not ...
Regards,
Aurelien
Nobody ?
I finally figured out what was wrong !!!
There is in the source linux file from freescale arch/arm/mach-imx/mach-imx6q.c a wonderful line : else if (of_machine_is_compatible("fsl,imx6dl-sabresd") ||
So if you try to use your own device tree file you won't get IOMUXC_GPR13 configured correctly !
By default IOMUXC_GPR13 has the value 0x00000008 and should be 0x0000000c for csi parallel use case ...
In your first line of your device tree you actually need to add compatible = XXX, "fsl,imx6dl-sabresd"; and then it will work ...
Hope it will help ...
Hi,
I'm trying to interface the OV7740 in HREF mode (ov7740 camera with custom i.MX6DL board using CSI0 in HREF (gated clock) mode)).
Did you make any other changes to the ov7740 / mxc_v4l2_capture / ipu drivers?
I having the same error:
No interrupts on IPU
camera_callback function is never called
cam->enc_counter is never incremented
VIDIOC_DQBUF ioctl fails
Regards,
Thomas
Hi Thomas,
Did you solved your problem ?? I've the same thing with my ov7740 :-(...
Thanks
Wee Do
Hi,
Sorry for the late response.
Our problem is solved, it was a hardware configuration on our custom board.
Because of the wrong configuration we didn't receive the pixel clock on the i.MX6.
Regards,
Thomas
Hello Thomas,
Are you sure you add in your dts the line
compatible = "yourcompany,imx6dl-yourboard", "fsl,imx6dl", "fsl,imx6dl-sabresd";
Because it calls something magical in arch/arm/mach-imx/mach-imx6q.c
if (of_machine_is_compatible("fsl,imx6dl-sabresd")
...
regmap_update_bits(gpr, IOMUXC_GPR13, 0x3F, 0x0C);
Which enable CS0 instead of MIPI ...
Else have you try the CSI test mode ?
With that line you should enable it :
devregs -c imx6dls 0x02630000 0x4008818; devregs -c imx6dls; devregs -c imx6dls 0x02630010 0x1000000;devregs -c imx6dls 0x02630004 0x04ff09ff
You should find the tool devregs on my github : aurelihein/devregs · GitHub
It is really usefull to set on the go registers ...
Hope it will help you
Aurelien
Hi Aurelien,
Thanks for your reply!
The "fsl,imx6dl-sabresd" option is added to the list of compatible devices and the IOMUXC_GPR13 registers is set correct during boot.
I tried the camera in test mode and I have still the same error.
I used devregs to change registers while avconv was running (waiting for the DQBUF ioctl) but it didn't change anything.
More advice is welcome!
Regards,
Thomas
Hi Aurélien,
I have to use the ov7740 on custom board (with an imx6dl), so could you share your dts file you use for ov7740, please.
Thanks in adance
Hi,
No problem
Do not forget in the compatible line to add "imx6dl-sabresd"
Like this
compatible = "yourcompany,imx6dl-yourboard", "fsl,imx6dl", "fsl,imx6dl-sabresd";
Since the HTML use here is %/!£$# use this link : dts_ov7740.dts - Pastebin.com
Sincerely,
Aurelien BOUIN
Hi,
Thank for your quick answer :-).
Unfortunately, I can't try it for now, i've not received my ov7740.
I'll try when I received it and keep you in touch.
Regards
Robert
Has the issue resolved? If yes, please close this DI and other one with the same title.
Thanks,
Yixing
Hi Yixing and QiangLi,
Thanks to all the advices, I have followed the suggestions but it was still not working on my system. Instead of keeping trial and error that behind my schedule, we added Vsync to make it works so as to go to the next work. But it just a workaround so that we can start with subsequent works, the product is stick to use BT656 without Vsync/Hsync, I will have to solve this problem in the future, it would be great if the issue is still open.
Thanks,
Robert
Hi Robert, you can also reference to that link: https://community.freescale.com/thread/295157
In that link, we verified iMX53 CSI without VSYNC and HSYNC connected (720x480P with BT1120). Currently we have no iMX6 reference board which can support BT656 progressive input, but the iMX6 and iMX5 CSI are same.
Thanks QiangLi,
Currently I am using VSYNC and HSYNC connected for BT656. I will try this and update status here afterwards :smileyhappy:
Appreciate your help.
Regards,
Robert
Hello Robert,
I do have the same OV7740 sensor, and even with VSYNC and HSYNC connected I am unable to get any picture, i get the same error "mxc_v4l_dqueue timeout enc_counter 0 VIDIOC_DQBUF failed"
Could you share your source code it could really help me
Thank you for your help
Aurelien
hello,
I am really unable to get any data from my sensor ... I use this configuration in dts :
MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12 | 0x80000000 | |||
MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13 | 0x80000000 | |||
MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14 | 0x80000000 | |||
MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15 | 0x80000000 | |||
MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16 | 0x80000000 | |||
MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17 | 0x80000000 | |||
MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18 | 0x80000000 | |||
MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19 | 0x80000000 | |||
MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN | 0x80000000 | |||
MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK | 0x80000000 | |||
MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC | 0x80000000 | |||
MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC | 0x80000000 |
Here is my driver for ov7740 : ov7740.c - Pastebin.com
I keep getting : ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
Here is a log if it can help solved the problem : http://pastebin.com/328M7EMK
I checked on the pins signals everything seemsnormal ... pixclock is here
Thank you for your support,
Sincerely
Aurelien BOUIN
can you update ?
I have the same problem !
Thanks :smileyhappy:
Hi Robert, if there is no EAV/SAV embedded on date line, the VSYNC and HSYNC pins are needed for BT656 input.
Hi Qiang Li,
The EAV/SAV was embedded on data line, as shown below:
Thanks,
Robert