Hi Weidong,
I would like to provide you more information. I added some print message in mxc_v4l2_master_attach() & mxc_v4l_open().
I don't know why v4l2_master_attach() was called twice. First time sdata->csi=0 & cam->csi weren't matched but it was ok for 2nd time.
In MVC: mxc_v4l2_master_attach
slave.name = ov2659
master.name = mxc_v4l2_cap1
Not match, sdata->csi=0, cam->csi=1
mxc_v4l2_master_attach: csi doesn't match
In MVC: mxc_v4l2_master_attach
slave.name = ov2659
master.name = mxc_v4l2_cap0
MATCHED, sdata->csi=0, cam->csi=0
camera ov2659 is found
ov564x: ov564x@30 {
compatible = "ovti,ov564x";
/*reg = <0x3c>;*/
reg = <0x30>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ipu1_2>;
clocks = <&clks 201>;
clock-names = "csi_mclk";
DOVDD-supply = <&vgen4_reg>; /* 1.8v */
AVDD-supply = <&vgen3_reg>; /* 2.8v, on rev C board is VGEN3,
on rev B board is VGEN5 */
DVDD-supply = <&vgen2_reg>; /* 1.5v*/
pwn-gpios = <&gpio1 16 1>; /* active low: SD1_DAT0 */
rst-gpios = <&gpio1 17 0>; /* active high: SD1_DAT1 */
cam-led = <&gpio4 5 0>; /* active high: GPIO19 */
csi_id = <0>;
mclk = <24000000>;
mclk_source = <0>;
};
when mxc_v4l_open() was called, the following message showed that ioctl_dev_init() of ov2659 was called three times. In imx6qdl-sabresd.dtsi, csi_id should be 0 but I just wondered why the error message printed "slave not found!, ipu_id=0, csi=1".
In MVC: mxc_v4l_open
device name is Mxc Camera
ioctl_g_ifparm
ioctl_g_fmt_cap
ioctl_dev_init, tgt_fps=25
ov2659-0x3633=3d
ov2659-0x0100=1
In MVC: mxc_v4l_open
device name is Mxc Camera
ERROR: v4l2 capture: slave not found!, ipu_id=0, csi=1
In MVC: mxc_v4l_open
device name i Mxc Camera
ioctl_g_ifparm
ioctl_g_fmt_cap
+ioctl_dev_init, tgt_fps=25
ov2659-0x3633=3d
ov2659-0x0100=1
In MVC: mxc_v4l_open
device name is Mxc Camera
ERROR: v4l2 capture: slave not found!, ipu_id=0, csi=1
In MVC: mxc_v4l_open
device name is Mxc Camera
ioctl_g_ifparm
ioctl_g_fmt_cap
ioctl_dev_init, tgt_fps=25
ov2659-0x3633=3d
ov2659-0x0100=1
warning: `zygote' uses 32-bit capabilipies (legacy support in use)