AnsweredAssumed Answered

Two adv7180 devices on imx6q

Question asked by Mehmet Kurnaz on Dec 24, 2015
Latest reply on Jan 6, 2016 by Yuri Muhin

Hello all,

 

I have a custom board similar to sabreauto board. And I use fsl-yocto-3.14.28. I want to use 2 adv7180 devices. One for CSI-0 -> IPU-0, other for CSI-1 -> IPU-1. My device tree has below nopes.

 

v4l2_cap_0 {

  compatible = "fsl,imx6q-v4l2-capture";

  ipu_id = <0>;

  csi_id = <0>;

  mclk_source = <0>;

  status = "okay";

  };

 

 

  v4l2_cap_1 {

  compatible = "fsl,imx6q-v4l2-capture";

  ipu_id = <1>;

  csi_id = <1>;

  mclk_source = <0>;

  status = "okay";

  };

 

 

adv7180_20: adv7180@20 {

  compatible = "adv,adv7180";

  reg = <0x20>;

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_ipu1_2>;

  clocks = <&clks IMX6QDL_CLK_CKO>;

  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 */

  csi_id = <0>;

  mclk = <24000000>;

  mclk_source = <0>;

  cvbs = <1>;

  };

 

 

  adv7180_21: adv7180@21 {

  compatible = "adv,adv7180";

  reg = <0x21>;

  pinctrl-names = "default";

  pinctrl-0 = <&pinctrl_ipu2_2>;

  clocks = <&clks IMX6QDL_CLK_CKO>;

  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 */

  csi_id = <1>;

  mclk = <24000000>;

  mclk_source = <0>;

  cvbs = <1>;

  };

 

Without any change v4l2_int_device_register for adv7180_int_device in drivers/media/platform/mxc/capture/adv7180.c couldn't success because of adv7180_int_device is declared statically. For first capture master there is no problem. adv7180 is attached to mxc_v4l2_cap0. But second adv7180 couldn't attach to mxc_v4l2_cap1. I have created second adv7180_int_device for second adv7180 and both of them are attached.

When i try ./mxc_v4l2_capture.out -d /dev/video1 -iw 720 -ih 576 -ow 720 -oh 576 -r 0 -fr 15 /mnt/nfs/test2.yuv, I get below error.

VIDIOC_DQBUF failed.

VIDIOC_QBUF failed

 

I tried /dev/video0 and dev/video1 and result is same.

 

I have applied patches for to camera input.

Outcomes