DESK-MX8M-L/Peripherals/MIPI

From DAVE Developer's Wiki
< DESK-MX8M-L
Revision as of 10:29, 30 December 2021 by U0007 (talk | contribs) (Created page with "<section begin=History/> {| style="border-collapse:collapse; " !colspan="4" style="width:100%; text-align:left"; border-bottom:solid 2px #ededed"|History |- !style="border-le...")

(diff) ← Older revision | Approved revision (diff) | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
History
Version Issue Date Notes
1.0.0 Jan 2022 First DESK-MX8M 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 ORCA SOM:

From imx8mp-mito8mplus-cb1001.dts:

&mipi_csi_0 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	port@0 {
		reg = <0>;
		mipi_csi0_ep: endpoint {
			remote-endpoint = <&ov5640_mipi_0_ep>;
			data-lanes = <2>;
			csis-hs-settle = <13>;
			csis-clk-settle = <2>;
			csis-wclk;
		};
	};
};

&mipi_csi_1 {
	#address-cells = <1>;
	#size-cells = <0>;
	status = "okay";

	port@1 {
		reg = <1>;
		mipi_csi1_ep: endpoint {
			remote-endpoint = <&ov5640_mipi_1_ep>;
			data-lanes = <2>;
			csis-hs-settle = <13>;
			csis-clk-settle = <2>;
			csis-wclk;
		};
	};
};

From imx8mp-mito8mplus.dtsi:


&iomuxc {
...
...
	pinctrl_mipi_dsi_en: mipi_dsi_en {
		fsl,pins = <
			MX8MP_IOMUXC_GPIO1_IO08__GPIO1_IO08	0x16
		>;
	};
...
...
};

Accessing the peripheral[edit | edit source]

Linux messages at boot time[edit | edit source]

MIPI CSI-2 driver initialized:

...
...
[    1.486047] mxc-mipi-csi2-sam 32e40000.csi: 32e40000.csi supply mipi-phy not found, using dummy regulator
[    1.496009] mxc-mipi-csi2-sam 32e40000.csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 500000000
[    1.506087] mxc-mipi-csi2-sam 32e50000.csi: 32e50000.csi supply mipi-phy not found, using dummy regulator
[    1.515958] mxc-mipi-csi2-sam 32e50000.csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 266000000
...
...

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

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

Usage with gstreamer[edit | edit source]

Video capture and display using Pcam 5C OV5640 MIPI camera:

gst-launch-1.0 v4l2src device=/dev/video1 ! "video/x-raw,width=1280,height=720" ! queue ! videorate ! vpuenc_h264 ! avimux ! filesink location=camera_test1.avi
...
...

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