DESK-MX6-L/Pheripherals/MIPI

From DAVE Developer's Wiki
< DESK-MX6-L
Revision as of 14:22, 16 July 2021 by U0009 (talk | contribs) (U0009 moved page AXEL Lite SOM/DESK-MX6-L/Pheripherals/MIPI to DESK-MX6-L/Pheripherals/MIPI: modifica gestione DESK come prodotto a se stante)

Jump to: navigation, search
History
Version Issue Date Notes
1.0.0 Oct 2020 First DESK release


Peripheral MIPI[edit | edit source]

Device tree configuration[edit | edit source]

Here below an example of device tree configuration used on standard DAVE's kit for the AXELLite SOM:

From imx6qdl-sbcx-revb-common.dtsi:

&mipi_csi {
    pinctrl-names = "default";
    pinctrl-0 = <&pinctrl_mipi_csi_axel_sbc>;
    status = "okay";
    ipu_id = <0>;
    csi_id = <1>;
    v_channel = <0>;
    lanes = <2>;
};

From imx6qdl-axelcommon.dtsi:


&iomuxc {
...
...
        pinctrl_mipi_csi_axel_sbc: mipi_csigrp-2 {
            fsl,pins = <
                MX6QDL_PAD_SD3_DAT7__GPIO6_IO17 0x0b0b0 /* ov5640 mipi powerdown */
                MX6QDL_PAD_SD3_DAT6__GPIO6_IO18 0x000b0 /* ov5640 mipi reset */
                MX6QDL_PAD_CSI0_MCLK__CCM_CLKO1 0x000b0 /* ov5640 mclk */
            >;
        };
...
...
};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

MIPI CSI-2 driver initialized:

...
...
[    0.261643] mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 driver probed
[    0.261659] mxc_mipi_csi2 21dc000.mipi_csi: i.MX MIPI CSI2 dphy version is 0x3130302a
[    0.431259] MIPI CSI2 driver module loaded
...
...

and if a MIPI camera is inserted, it has been recognized and its video driver loaded:

root@desk-mx6:~# dmesg | grep -i camera
[    3.373634] camera ov5640_mipi is found
root@desk-mx6:~# ls -la /dev/video1*
crw-rw---- 1 root video 81, 3 Jun 22 00:33 /dev/video1
crw-rw---- 1 root video 81, 0 Jun 22 00:33 /dev/video16
crw-rw---- 1 root video 81, 1 Jun 22 00:33 /dev/video17
root@desk-mx6:~#

Usage with gstreamer[edit | edit source]

Video capture and display using OV5640 MIPI camera:

root@desk-mx6:~# gst-launch-1.0 -v imxv4l2src device=/dev/video1 ! imxv4l2sink

[  592.680143] ERROR: v4l2 capture: slave not found!
====== IMXV4L2SRC: 4.4.5 build on Jun 22 2020 02:01:01. ======
====== IMXV4L2SINK: 4.4.5 build on Jun 22 2020 02:01:01. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (800x480).
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
/GstPipeline:pipeline0/GstImxV4l2Src:imxv4l2src0.GstPad:src: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)30/1
/GstPipeline:pipeline0/GstImxV4l2Sink:imxv4l2sink0.GstPad:sink: caps = video/x-raw, format=(string)NV12, width=(int)640, height=(int)480, framerate=(fraction)30/1
v4l2sink need allocate 3 buffers.
...
...

Additional information[edit | edit source]

More information about gstreamer on its web site.

More information about i.MX gstreamer plugin on the gstreamer-imx web site