3

I am using kernel 4.14.24 from kernel.org on a KARO-TX6Q and an ADV7182 on a custom board.

With the kernel 4.1.15 from KARO git, I used the adv7180_tvin driver modified to work with adv7182. This driver does not use the media_controller system and directly creates a /dev/videoX entry.

Since a new software update, the 4.1.15 kernel is too old. I need to use the 4.14.24 kernel from kernel.org.

In kernel.org adv7180_tvin does not exist and I have to use the media_controller binding system.

Kernel opts :

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

Boot log :

[    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!

DTB file :

&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
    >;
};

There is no /dev/media0 file. How can I debug?

Thanks

Edit :

This line is never called because list_empty(&notifier->waiting) is always false. drivers/media/v4l2-core/v4l2-async.c @126

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

The media controller needs to have both two IPU activated. Solved by adding in dts :

&ipu2 {
        status = "okay";
};

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.