Open main menu

DAVE Developer's Wiki β

DESK-MX6-L/Pheripherals/MIPI

< DESK-MX6-L
Revision as of 15:28, 3 March 2022 by U0007 (talk | contribs)

History
Version Issue Date Notes

1.0.0

Oct 2020 First DESK release
2.0.0 Feb 2022 DESK 3.0.0 release


Contents

Peripheral MIPIEdit

Device tree configurationEdit

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 peripheralEdit

Linux messages at boot timeEdit

MIPI CSI-2 driver initialized:

...
...
[    0.851756] mxc_mipi_csi2 21dc000.mipi: i.MX MIPI CSI2 driver probed
[    0.851773] mxc_mipi_csi2 21dc000.mipi: i.MX MIPI CSI2 dphy version is 0x3130302a
[    0.852015] 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
[    4.844134] camera ov5640_mipi is found
root@desk-mx6:~# ls -la /dev/video1*
crw-rw---- 1 root video 81, 1 Feb 27 16:33 /dev/video1
crw-rw---- 1 root video 81, 2 Feb 27 16:33 /dev/video16
crw-rw---- 1 root video 81, 3 Feb 27 16:33 /dev/video17
crw-rw---- 1 root video 81, 4 Feb 27 16:33 /dev/video18

Usage with gstreamerEdit

Video capture and display using OV5640 MIPI camera:

root@desk-mx6:~# gst-launch-1.0 -v imxv4l2src device=/dev/video1 ! imxv4l2sink
...
...
====== IMXV4L2SRC: 4.6.1 build on May 11 2021 03:19:55. ======
====== IMXV4L2SINK: 4.6.1 build on May 11 2021 03:19:55. ======
Setting pipeline to PAUSED ...
display(/dev/fb0) resolution is (800x480).
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
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 informationEdit

More information about gstreamer on its web site.

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