AnsweredAssumed Answered

v4l2 capture: mxc_v4l_read timeout counter 0

Question asked by Lars Weber on Mar 2, 2015
Latest reply on Mar 10, 2015 by Lars Weber

Hello,

 

im working on a custom board with a mx6dl and a tw9910 video decoder as a tvin source.

It looks like the tw9910 has a lot in common with the adv7180 so i used that driver as a starting point.

I removed the i2c communication from that driver and initialize the tw9910 from userspace.

The tw9910 is decoding the video fine and we verified that it sends the data with a pixelclock of 27Mhz to the CSI0 of the imx.

Hsync and Vsync are provided.

 

adv7180: adv7180@21 {
compatible = "adv,adv7180";
reg = <0x21>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu1_4>;
clocks = <&clks 201>;
clock-names = "csi_mclk";
DOVDD-supply = <&reg_3p3v>; /* 3.3v, enabled via 2.8 VGEN6 */
AVDD-supply = <&reg_3p3v>;  /* 1.8v */
DVDD-supply = <&reg_3p3v>;  /* 1.8v */
PVDD-supply = <&reg_3p3v>;  /* 1.8v */
pwn-gpios = <&gpio1 6 0>;
csi_id = <0>;
mclk = <27000000>;
mclk_source = <0>;
cvbs = <1>;

    };

v4l2_cap_1 {
compatible = "fsl,imx6q-v4l2-capture";
ipu_id = <0>;
csi_id = <0>;
mclk_source = <0>;
status = "okay";

    };

pinctrl_ipu1_4: ipu1grp-4 {
fsl,pins = <
MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA120x80000000
MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA130x80000000
MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA140x80000000
MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA150x80000000
MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA160x80000000
MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA170x80000000
MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA180x80000000
MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA190x80000000
MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK   0x80000000
MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC 0x80000000
MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC0x80000000
//Data Enable has to be pulled HIGH!
MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x80000000
>;
};

 

The CSI0_DATA_EN pin should be pulled high but isn't connected on the board.

So i assume that through the default configuration it is pulled high by the imx.

I also assume that the IPU1 correlates to the ipu_id = <0> and the csi to csi_id = <0>. Is that correct?

 

The video0 device is showing up but reading from it resolves in an error:

 

In MVC: mxc_v4l_open

   device name is Mxc Camera

End of mxc_v4l_open: v2f pix widthxheight 720 x 576

End of mxc_v4l_open: crop_bounds widthxheight 720 x 625

End of mxc_v4l_open: crop_defrect widthxheight 720 x 625

End of mxc_v4l_open: crop_current widthxheight 720 x 625

On Open: Input to ipu size is 720 x 625

Inside ipu_csi_init_interface with pixel_fmt=1498831189

Inside ipu_csi_init_interface: Selected CSI_SENS_CONF_DATA_FMT_YUV422_UYVY

imx-ipuv3 2400000.ipu: CSI_SENS_CONF = 0x00000A02

imx-ipuv3 2400000.ipu: CSI_ACT_FRM_SIZE = 0x027002CF

In MVC:mxc_v4l_ioctl

In MVC: mxc_v4l_do_ioctl 80685600

   case VIDIOC_QUERYCAP

cap.capabilities= 5000005In MVC:mxc_v4l_ioctl

 

In MVC: mxc_v4l_do_ioctl c02c563a

   case VIDIOC_CROPCAP

In MVC:mxc_v4l_ioctl

In MVC: mxc_v4l_do_ioctl 4014563c

   case VIDIOC_S_CROP

   Cropping Input to ipu size 720 x 625

In MVC:mxc_v4l_ioctl

In MVC: mxc_v4l_do_ioctl c0cc5605

   case VIDIOC_S_FMT

In MVC: mxc_v4l2_s_fmt

   type=V4L2_BUF_TYPE_VIDEO_CAPTURE

End of mxc_v4l2_s_fmt: v2f pix widthxheight 720 x 576

End of mxc_v4l2_s_fmt: crop_bounds widthxheight 720 x 625

End of mxc_v4l2_s_fmt: crop_defrect widthxheight 720 x 625

End of mxc_v4l2_s_fmt: crop_current widthxheight 720 x 625

In MVC:mxc_poll

frameRead

ERROR: v4l2 capture: mxc_v4l_read timeout counter 0

imx-ipuv3 2400000.ipu: CSI stop timeout - 5 * 10ms

read error 62, Timer expiredIn MVC:mxc_v4l_close

mxc_v4l_close: release resource

MVC: In mxc_free_frame_buf

In MVC:mxc_free_frames

 

I tried to change different parameters for the csi capture like: csi_param.Vsync_pol, csi_param.Hsync_pol, csi_param.data_en_pol but i still get no csi_irq_handler interrupt.

 

Do you have any suggestions where i could look next or what i'm doing wrong?

 

Thanks for you answers!

Outcomes