ISL7998x is not working on Apalis iMX6Q (MIPI CSI)

1452-captura-de-tela-de-2019-02-08-13-44-26.png

I’m trying to run a camera that uses MIPI CSI 2, however I’m having problems and I would like to receive a help from you. I will describe my environment:

  • Base Board Ixora v1.1
  • Module Apalis iMX6Q 2GB;
  • The Video Decoder ISL79987IRZ;
  • Kernel is 4.9.87;
  • Yocto branch rocko;
  • Ported Driver: L4.1.15_ISL7998x_Surroundview_Patch_20161122.zip (https://community.nxp.com/docs/DOC-339457);

The driver is already integrated into the kernel and enabled. With the command “make menuconfig” it is in:

 -> Device Drivers
      -> Multimedia support
           -> V4L platform devices
                -> MXC Video For Linux Video Capture
                    -> MXC Camera/V4L2 PRP Features support
                        <*> Intersil ISL7998x Video Decoder support
                        <*>mxc VADC support
                        <*>Select Overlay Rounting (Queue ipu device for overlay library)
                        <*>Pre-processor Encoder library
                        <*>IPU CSI Encoder library)

Parts of the Device Tree imx6qdl-apalis-ixora-v1.1.dtsi file:

/ {
	v4l2_cap_0: v4l2_cap_0 {
                compatible = "fsl,imx6q-v4l2-capture";
                ipu_id = <0>;
                csi_id = <0>;
                mclk_source = <0>;
                status = "okay";
        };

        v4l2_cap_2: v4l2_cap_2 { // mipi-csi2 camera
                compatible = "fsl,imx6q-v4l2-capture";
                ipu_id = <0>;
                csi_id = <1>;
                mclk_source = <0>;
                status = "okay";
        };
};

&i2c3 {
	status = "okay";

	isl7998x_mipi: isl7998x_mipi@44 {
                compatible = "intersil,isl7998x_mipi";
                reg = <0x44>;
                clocks = <&clks 200>;
                clock-names = "csi_mclk";
                mclk = <27000000>;
                mclk_source = <0>;
                csi_id = <1>;
	};
};

&mipi_csi {
        ipu_id = <0>;
        csi_id = <1>;
        v_channel = <0>;
        lanes = <2>;
        status = "okay";
};

When loading the kernel, the following messages are displayed:

dmesg | grep csi

[    0.250861] mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 driver probed ipu-1 csi-1
[    0.250873] mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 dphy version is 0x3130302a
[    1.795969] mxc_v4l2_master_attach: ipu(0:0)/csi(0:1)/mipi(0:0) doesn't match
[    1.795987] mxc_v4l2_master_attach: ipu0:/csi0 parallel attached isl7998x:mxc_v4l2_cap0
[    1.796005] mxc_v4l2_master_attach: ipu0:/csi1 parallel attached isl7998x:mxc_v4l2_cap1
[    1.796017] mxc_v4l2_master_attach: ipu(1:0)/csi(0:1)/mipi(0:0) doesn't match
[    1.796021] mxc_v4l2_master_attach: ipu(1:0)/csi(0:0)/mipi(0:0) doesn't match
[    1.796030] mxc_v4l2_master_attach: ipu(1:0)/csi(1:1)/mipi(0:0) doesn't match
[    1.796036] mxc_v4l2_master_attach: ipu(1:0)/csi(0:1)/mipi(0:0) doesn't match
[    1.796041] mxc_v4l2_master_attach: ipu(1:0)/csi(1:0)/mipi(0:0) doesn't match
[    1.796046] mxc_v4l2_master_attach: ipu(1:0)/csi(0:0)/mipi(0:0) doesn't match
[   13.420543] mxc_mipi_csi2 21dc000.mipi_csi: mipi_csi2_reset: mipi_lane_bps = 432 Mbps
[   13.420556] mxc_mipi_csi2 21dc000.mipi_csi: mipi_csi2_reset: value = 0xc.

dmesg | grep isl

[    1.795987] mxc_v4l2_master_attach: ipu0:/csi0 parallel attached isl7998x:mxc_v4l2_cap0
[    1.796005] mxc_v4l2_master_attach: ipu0:/csi1 parallel attached isl7998x:mxc_v4l2_cap1
[    1.796051] isl7998x_mipi is found

See above for the driver to the end of the probe function successfully.

Accessing / dev has the following video options:

ls -la /dev/video*

crw-rw----    1 root     video      81,   2 Dec 17 15:20 /dev/video0
crw-rw----    1 root     video      81,   3 Dec 17 15:20 /dev/video1
crw-rw----    1 root     video      81,   0 Dec 17 15:20 /dev/video16
crw-rw----    1 root     video      81,   1 Dec 17 15:20 /dev/video17

Running the gst-launch-1.0 command has the following error:

gst-launch-1.0 v4l2src device=/dev/video0 ! videoconvert ! autovideosink

or

gst-launch-1.0 v4l2src device=/dev/video1 ! videoconvert ! autovideosink

[  506.984147] mxc_mipi_csi2 21dc000.mipi_csi: mipi_csi2_reset: mipi_lane_bps = 432 Mbps
[  506.991994] mxc_mipi_csi2 21dc000.mipi_csi: mipi_csi2_reset: value = 0xc.
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[  507.664909] UYVY
[  518.233107] ERROR: v4l2 capture: mxc_v4l_dqueue timeout enc_counter 0
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Failed to allocate a buffer
Additional debug info:
../../../git/sys/v4l2/gstv4l2src.c(866): gst_v4l2src_create (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0
Execution ended after 0:00:10.610824001
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

gst-launch-1.0 v4l2src device=/dev/video16 ! videoconvert ! autovideosink

or

gst-launch-1.0 v4l2src device=/dev/video17 ! videoconvert ! autovideosink

Returns that they are not capture devices.

Could anyone help?

Thank you all!

Please note that the BSP beta version your Linux kernel came from is no longer supported. As for the device tree have a look at our Ixora one supporting our OV5640 CSI camera module.