IMX6 ADV7180: 없음 /dev/media0

IMX6 ADV7180: 없음 /dev/media0

저는 KARO-TX6Q의 kernel.org와 커스텀 보드의 ADV7182에서 커널 4.14.24를 사용하고 있습니다.

KARO git의 커널 4.1.15의 경우 adv7182와 작동하도록 수정된 adv7180_tvin 드라이버를 사용했습니다. 이 드라이버는 media_controller 시스템을 사용하지 않으며 /dev/videoX 항목을 직접 생성합니다.

4.1.15 커널은 새로운 소프트웨어 업데이트로 인해 너무 오래되었습니다. kernel.org의 4.14.24 커널을 사용해야 합니다.

adv7180_tvin이 kernel.org에 존재하지 않습니다. media_controller 바인딩 시스템을 사용해야 합니다.

커널 선택:

CONFIG_MEDIA_CONTROLLER=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
CONFIG_VIDEO_MUX=y
CONFIG_VIDEO_CODA=y
CONFIG_VIDEO_MEM2MEM_DEINTERLACE=y
CONFIG_VIDEO_SH_VEU=y
CONFIG_VIDEO_ADV7180=m
CONFIG_IMX_IPUV3_CORE=y
CONFIG_IMX_HAVE_PLATFORM_IPU_CORE=y

시작 로그:

[    3.468290] imx-media capture-subsystem: Media device initialized
[    3.474664] imx-media capture-subsystem: imx_media_add_async_subdev: added port, match type FWNODE
[    3.483815] imx-media capture-subsystem: imx_media_add_async_subdev: added ipu1_csi0_mux, match type FWNODE
[    3.493779] imx-media capture-subsystem: imx_media_add_async_subdev: added camera, match type FWNODE
[    3.503180] imx-media capture-subsystem: imx_media_add_async_subdev: added port, match type FWNODE
[    3.512311] imx-media capture-subsystem: imx_media_add_async_subdev: added port, match type FWNODE
[    3.521454] imx-media capture-subsystem: imx_media_add_async_subdev: added port, match type FWNODE
[    3.530520] imx-media capture-subsystem: imx_media_add_async_subdev: added ipu2_csi1_mux, match type FWNODE
[    3.541128] imx-media capture-subsystem: imx_media_add_async_subdev: added imx-ipuv3-vdic.2, match type DEVNAME
[    3.551657] imx-media capture-subsystem: imx_media_add_async_subdev: added imx-ipuv3-ic.3, match type DEVNAME
[    3.561998] imx-media capture-subsystem: imx_media_add_async_subdev: added imx-ipuv3-ic.4, match type DEVNAME
[    3.572307] imx-media capture-subsystem: imx_media_add_async_subdev: added imx-ipuv3-ic.5, match type DEVNAME
[    3.582649] imx-media capture-subsystem: imx_media_add_async_subdev: added imx-ipuv3-vdic.8, match type DEVNAME
[    3.593245] imx-media capture-subsystem: imx_media_add_async_subdev: added imx-ipuv3-ic.9, match type DEVNAME
[    3.603684] imx-media capture-subsystem: imx_media_add_async_subdev: added imx-ipuv3-ic.10, match type DEVNAME
[    3.603994] imx-media capture-subsystem: imx_media_add_async_subdev: added imx-ipuv3-ic.11, match type DEVNAME
[    3.604921] imx-media: Registered subdev ipu1_vdic
[    3.605717] imx-media: Registered subdev ipu2_vdic
[    3.606199] imx-media: Registered subdev ipu1_ic_prp
[    3.606447] imx-media: Registered subdev ipu1_ic_prpenc
[    3.608277] imx-media: Registered subdev ipu1_ic_prpvf
[    3.609036] imx-media: Registered subdev ipu2_ic_prp
[    3.609254] imx-media: Registered subdev ipu2_ic_prpenc
[    3.610069] imx-media: Registered subdev ipu2_ic_prpvf
[    3.611536] imx-media: Registered subdev ipu1_csi0
[    3.612867] imx-media: Registered subdev ipu1_csi1
[    3.821930] imx-media: Registered subdev ipu1_csi0_mux
[    3.822390] imx-media: Registered subdev ipu2_csi1_mux
[   14.911115] imx-media: Registered subdev adv7180 1-0020
[   14.931374] imx-media capture-subsystem: Entity type for entity adv7180 1-0020 was not initialized!

데이터 TB 파일:

&i2c2 {
    pinctrl-names = "default", "gpio";
    pinctrl-0 = <&pinctrl_i2c2>;
    pinctrl-1 = <&pinctrl_i2c2_gpio>;
    scl-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
    sda-gpios = <&gpio3 16 GPIO_ACTIVE_HIGH>;
    clock-frequency = <100000>;
    status = "okay";

    adv7182: camera@20 {
        compatible = "adi,adv7182";
        pinctrl-names = "default";
        /* pinctrl-0 = <&pinctrl_adv7182>; */
        reg = <0x20>;
        powerdown-gpios = <&gpio3 17 GPIO_ACTIVE_LOW>;
        interrupt-parent = <&gpio1>;
        interrupts = <27 IRQ_TYPE_LEVEL_LOW>;

        port {
            adv7182_to_ipu1_csi0_mux: endpoint {
                remote-endpoint = <&ipu1_csi0_mux_from_parallel_sensor>;
                bus-width = <8>;
            };
        };
    };
};

&ipu1_csi0_from_ipu1_csi0_mux {
    bus-width = <8>;
};

&ipu1_csi0_mux_from_parallel_sensor {
    remote-endpoint = <&adv7182_to_ipu1_csi0_mux>;
    bus-width = <8>;
};

&ipu1_csi0 {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_ipu1_csi0>;
};


pinctrl_ipu1_csi0: ipu1_csi0grp {
    fsl,pins = <
    MX6QDL_PAD_CSI0_PIXCLK__IPU1_CSI0_PIXCLK    0x10
    MX6QDL_PAD_CSI0_VSYNC__IPU1_CSI0_VSYNC      0x10
    MX6QDL_PAD_CSI0_MCLK__IPU1_CSI0_HSYNC       0x10
    MX6QDL_PAD_DISP0_DAT12__IPU1_DISP0_DATA12   0x10
    MX6QDL_PAD_DISP0_DAT13__IPU1_DISP0_DATA13   0x10
    MX6QDL_PAD_DISP0_DAT14__IPU1_DISP0_DATA14   0x10
    MX6QDL_PAD_DISP0_DAT15__IPU1_DISP0_DATA15   0x10
    MX6QDL_PAD_DISP0_DAT16__IPU1_DISP0_DATA16   0x10
    MX6QDL_PAD_DISP0_DAT17__IPU1_DISP0_DATA17   0x10
    MX6QDL_PAD_DISP0_DAT18__IPU1_DISP0_DATA18   0x10
    MX6QDL_PAD_DISP0_DAT19__IPU1_DISP0_DATA19   0x10
    >;
};

/dev/media0 파일이 없습니다. 어떻게 디버깅할 수 있나요?

감사해요

편집하다:

list_empty(¬ifier->waiting)이 항상 false이기 때문에 이 줄은 호출되지 않습니다.드라이버/미디어/v4l2-core/v4l2-async.c @126

if (list_empty(&notifier->waiting) && notifier->complete)
    return notifier->complete(notifier); // <-- this line

답변1

미디어 컨트롤러를 사용하려면 두 IPU가 동시에 활성화되어야 합니다. dts를 추가하여 해결되었습니다.

&ipu2 {
        status = "okay";
};

관련 정보