Hello!
I'm trying to connect camera and get any data from it. The connection scheme looks like this: Camera=>TVP5151=>CSI0 parallel interface=>IPU0
I added TVP5151 support in the device tree:
&i2c1 {
clock-frequency = <100000>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_i2c1_2>;
status = "okay";
videoin: tvp5151@5D {
compatible = "ti,tvp5150";
reg = <0x5D>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu1_2>;
clocks = <&clks 201>;
clock-names = "csi_mclk";
mclk = <24000000>;
mclk_source = <0>;
ipu_id = <0>;
csi_id = <0>;
cvbs = <1>;
};
};
I also added:
v4l2_cap_0 {
compatible = "fsl,imx6q-v4l2-capture";
ipu_id = <0>;
csi_id = <0>;
mclk_source = <0>;
status = "okay";
};
I2C connection works fine - I can read TVP5151 registers and its values are correct. The problem is that when I try to open video device:
cat /dev/video0
I get this error:
ERROR: v4l2 capture: slave not found!
I found that this error is caused by function mxc_v4l_open() (mxc_v4l2_capture.c). After calling:
cam_data *cam = video_get_drvdata(dev);
the pointer cam->sensor is NULL, so we get the error:
if (cam->sensor == NULL)
{
pr_err("ERROR: v4l2 capture: slave not found!\n");
return -EAGAIN;
}
What is a reason of such a behaviour?
Thank you in advance!