i.mx6q adv7180 interface custom board no video device detected in /dev/video0

cancel
Showing results for 
Search instead for 
Did you mean: 

i.mx6q adv7180 interface custom board no video device detected in /dev/video0

108 Views
Contributor III
  1. Problem statement: The ADV7180 is interfaced with i.MX6q processor on CSI0 bus as shown in following schematic circuit. The linux version 3.14 is used (YOCTO build). The decoder adv7180 is not getting probed at kernel level and not getting attached to ipu/csi. Using UBOOT I2C, device ID 0X21 (i2c address of adv7180) is successfully probed. So there is no video device detected in /dev/video0.
  2. Schematic
  3. Processor interface

 1.png

  1. Decoder circuit

 2.png

 

  1. DTSI file: The adv7180 is connected to i2c2 port. The driver definition and pin configuration is given below,

v4l2_cap_0 {

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

        ipu_id = <0>;

        csi_id = <0>;

        mclk_source = <0>;

        status = "okay";

    };

 

&i2c2 {

                clock-frequency = <100000>;

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_i2c2>;

                status = "okay";

 

                rtc@68 {

                compatible = "st,m41t00";

                reg = <0x68>;

        };

                adv7180: adv7180@21 {

                compatible = "adv,adv7180";

                reg = <0x21>;

                pinctrl-names = "default";

                pinctrl-0 = <&pinctrl_ipu1_2>;

                clocks = <&clks IMX6QDL_CLK_CKO>;

                clock-names = "csi_mclk";

                DOVDD-supply = <&vgen3_reg>; /* 3.3v, enabled via 2.8 VGEN6 */

                AVDD-supply = <&vgen3_reg>;  /* 1.8v */

                DVDD-supply = <&vgen3_reg>;  /* 1.8v */

                PVDD-supply = <&vgen3_reg>;  /* 1.8v */

                pwn-gpios = <&gpio1 17 0>;   /* active high: SD1_DAT1 */

                ipu_id = <0>;

                csi_id = <0>;

                mclk = <24000000>;

                mclk_source = <0>;

                cvbs = <1>;

                };

 

pinctrl_ipu1_2: ipu1grp-2 {

                                                fsl,pins = <

                                                               

 

MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC                             0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC                               0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK            0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DATA_EN__IPU1_CSI0_DATA_EN 0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT4__IPU1_CSI0_DATA04                             0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT5__IPU1_CSI0_DATA05                             0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT6__IPU1_CSI0_DATA06                             0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT7__IPU1_CSI0_DATA07                             0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT8__IPU1_CSI0_DATA08                             0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT9__IPU1_CSI0_DATA09                             0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT10__IPU1_CSI0_DATA10                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT11__IPU1_CSI0_DATA11                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT12__IPU1_CSI0_DATA12                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT13__IPU1_CSI0_DATA13                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT14__IPU1_CSI0_DATA14                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT15__IPU1_CSI0_DATA15                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT16__IPU1_CSI0_DATA16                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT17__IPU1_CSI0_DATA17                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT18__IPU1_CSI0_DATA18                           0x80000000    /*custom add*/

MX6QDL_PAD_CSI0_DAT19__IPU1_CSI0_DATA19                           0x80000000    /*custom add*/

                                                >;

                                };

 

  1. Deconfig used
  2. CONFIG_MEDIA_SUPPORT=y
    CONFIG_MEDIA_CAMERA_SUPPORT=y
    CONFIG_MEDIA_RADIO_SUPPORT=y
    CONFIG_MEDIA_RC_SUPPORT=y
    CONFIG_RC_DEVICES=y
    CONFIG_IR_GPIO_CIR=y
    CONFIG_MEDIA_USB_SUPPORT=y
    CONFIG_USB_VIDEO_CLASS=m
    CONFIG_V4L_PLATFORM_DRIVERS=y
    CONFIG_VIDEO_MXC_OUTPUT=y
    CONFIG_VIDEO_MXC_CAPTURE=m
    CONFIG_MXC_CAMERA_OV5640=m
    CONFIG_MXC_CAMERA_OV5642=m
    CONFIG_MXC_CAMERA_OV5640_MIPI=m
    CONFIG_MXC_TVIN_ADV7180=m
    CONFIG_MXC_IPU_DEVICE_QUEUE_SDC=m
    CONFIG_VIDEO_MXC_IPU_OUTPUT=y
    CONFIG_VIDEO_MXC_PXP_V4L2=y
    CONFIG_VIDEO_MXC_CSI_CAMERA=m
    CONFIG_MXC_VADC=m
    CONFIG_MXC_MIPI_CSI=m
    CONFIG_MXC_CAMERA_OV5647_MIPI=m
    CONFIG_SOC_CAMERA=y
    CONFIG_VIDEO_MX3=y
    CONFIG_V4L_MEM2MEM_DRIVERS=y
    CONFIG_VIDEO_CODA=y
    CONFIG_RADIO_SI476X=y
    CONFIG_SOC_CAMERA_OV2640=y
  3. Need to know valid deconfig menu to enable the video decoder driver in the kernel level. So that ADV7180 get probed and attached to the ipu/CSI and the etc/dev/ will list Video0 for video input
Labels (3)
1 Reply

8 Views
NXP TechSupport
NXP TechSupport

Hi Purvi

adv7180 dts example can be found in linux/arch/arm/boot/dts/imx6qdl-sabreauto.dtsi

imx6qdl-sabreauto.dtsi\dts\boot\arm\arch - linux-imx - i.MX Linux kernel 

also may be useful to look at adv7180 debugging hints on

ADV7180 on IPU2_CSI1 with i.mx6q Device Tree bindings 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------