Personal tools

Enabling second camera port on spacesom8mplus

From SomLabs Wiki

Jump to: navigation, search

Enabling second camera port on SpaceSOM-8Mplus


Since Yocto walnascar version, the default device tree enables only a single camera port (MIPI-CSI1) on SpaceCB-8Mplus-ADV board, for SL-MIPI-CSI-OV5640 module. The camera stream may be displayed using the gst-launch tool:

gst-launch-1.0 v4l2src device=/dev/video3 ! waylandsink

This tutorial explains how to enable two ports at once, or switch to MIPI-CSI2 only.

Enabling both MIPI-CSI ports

The MIPI-CSI1 port on SpaceCB-8Mplus-ADV board is enabled by default in spacesom-8mplus-cb-adv.dts file. In order to enable the second port, the following nodes need to be enabled in the mentioned file.

&i2c4 {
        ov5640_1: ov5640_mipi@3c {
                ...
                status = "okay";
                ...
};

&mipi_csi_1 {
        status = "okay";
        ...
};

&isi_1 {
        status = "okay";
        ...
};

The camera streams may be displayed using the gst-launch tool:

gst-launch-1.0 v4l2src device=/dev/video3 ! waylandsink
gst-launch-1.0 v4l2src device=/dev/video4 ! waylandsink

Enabling only MIPI-CSI2 port

In this scenario the following nodes need to be disabled spacesom-8mplus-cb-adv.dts file.

&i2c1 {
        ov5640_0: ov5640_mipi@3c {
                ...
                status = "disabled";
                ...
};

&mipi_csi_0 {
        status = "disabled";
        ...
};

&isi_0 {
        status = "disabled";
        ...
};

The MIPI-CSI2 port should be enabled as described in the previous paragraph.

The camera stream may be displayed using the gst-launch tool:

gst-launch-1.0 v4l2src device=/dev/video2 ! waylandsink