Hi,
We have got IMX6D custom designed board designed based on imx6Q reference board (Wandboard). in custom board we have 512 MB LPDDR2 where as reference board has 1GB/2GB DDR3 RAM.
Now we have connected mipi csi2 camera (Raspi camera (connector is also customized with 15 pin connector)).
When I am running the command for capturing image or video using avconv or gst-launch-1.0 then, image is not being captured.
When iam running the command as :
$ sudo avconv -f video4linux2 -r 30 -s 640x480 -i /dev/video0 out.avi (or)
$ sudo avconv -f video4linux2 -s 640x480 -i /dev/video0 -ss 0:0:2 -frames 1 test.jpg
then it is giving error as ioctl VIDIOC_REQBUFs
and "/dev/video0: No buffer space available"
When we are running this command, we are getting CSI_D0M,CSI_D0P, CSI_D1M, CSI_D1P correctly and laos getting 25 MHz clock from the crystal.
But we are not observing CSI_CLK0M (CN), CSI_CLK0P (CP) are not coming???? what could be the reason.
$gst-launch-1.0 v4l2src device="/dev/video0" num-buffers=1 ! video/x-bayer,width=640,height=480,framerate=1/1 ! bayer2rgb ! videoconvert ! jpegenc ! filesink location=sample_640_480.jpeg
then it is forming sample_640_480.jpeg file but it is not opening.
in all the above commands, when we are entering/running then led on the camera board is glowing and not when terminating the command, then led is going off.
Following are the findings:
1. camera sensor is being detecting in i2c by using i2c-tools (i2cdetect)
root@ubuntu:~# i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- UU -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
2.
root@ubuntu:~# lsmod
Module Size Used by
mxc_v4l2_capture 28532 1
ipu_bg_overlay_sdc 5401 1 mxc_v4l2_capture
ipu_still 2528 1 mxc_v4l2_capture
ipu_prp_enc 5943 1 mxc_v4l2_capture
ipu_csi_enc 3863 1 mxc_v4l2_capture
ipu_fg_overlay_sdc 6217 1 mxc_v4l2_capture
ov5647_camera_mipi 30906 0
Here v4l2_int_device entry is not there.... why v4l2_int_device entry is not there. what could be the problem?????? i have v4l2_int_device.c file and v4l2_int_device.h files. What could be possible error
when iam dumping mipi csi2 regs by using devmem2 tool
[root@erez]# devmem 0x21dc000
0x3130302A
[root@erez]# devmem 0x21dc004
0x1
[root@erez]# devmem 0x21dc008
0x1
[root@erez]# devmem 0x21dc00c
0x1
[root@erez]# devmem 0x21dc010
0x1
[root@erez]# devmem 0x21dc014
0x200
[root@erez]# devmem 0x21dc018
0x0
[root@erez]# devmem 0x21dc020
0x00000000
[root@erez]# devmem 0x21dc024
0x0
[root@erez]# devmem 0x21dc02c
0x00000000
[root@erez]# devmem 0x21dc030
0x0
[root@erez]# devmem 0x21dc034
0x0
These are dts file entries for reference (wrt mipi csi2)
v4l2_cap_0 {
compatible = "fsl,imx6q-v4l2-capture";
ipu_id = <0>;
csi_id = <1>;
//csi_id = <0>;
mclk_source = <0>;
mipi_camera = <1>;
default_input = <1>;
status = "okay";
};
v4l2_out {
compatible = "fsl,mxc_v4l2_output";
status = "okay";
};
&i2c3 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c3_3>;
status = "okay";
ov5647_mipi@36 {
compatible = "ovti,ov5647_mipi";
reg = <0x36>;
// Pi camera has its own 25MHz clock.
clocks = <&clks 0>;
clock-names = "csi_mclk";
DOVDD-supply = <®_3p3v>;
AVDD-supply = <®_3p3v>;
DVDD-supply = <®_3p3v>;
pwn-gpios = <&gpio5 31 GPIO_ACTIVE_HIGH>;
led-gpios = <&gpio5 19 GPIO_ACTIVE_HIGH>;
ipu_id = <0>;
csi_id = <1>;
//csi_id = <0>;
mclk = <25000000>;
mclk_source = <0>;
//pinctrl-names = "default";
//pinctrl-0 = <&pinctrl_mipi_csi_1>;
extended-buffer;
};
};
&iomuxc {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_hog_1>;
imx6qdl-wandboard {
pinctrl_hog_1: hoggrp-1 {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT12__GPIO5_IO30 0x80000000
MX6QDL_PAD_CSI0_DAT13__GPIO5_IO31 0x0f0b0
MX6QDL_PAD_CSI0_MCLK__GPIO5_IO19 0x80000000
>;
};
};
};
&mipi_csi {
ipu_id = <0>;
csi_id = <1>;
//csi_id = <0>;
v_channel = <0>;
lanes = <2>;
mipi_dphy_clk = <0x28>;
status = "okay";
};
How resolve the issues????
Hi Srinivasa
seems v4l2_int_device is loaded at run time, so if some errors
happen it will not load. You can add debug printfs to trace where
problem occurs.
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------