.. _setup_mipi_on_modalix: Configure MIPI Interfaces ---------------------- .. include:: ../blocks/install_sima_cli.rst .. note:: This procedure requires a host machine with the latest sima-cli version installed. It also requires the firmware version of the **Modalix Devkit** to be ``1.7.0_master_B1965`` or above. This is because this build has the necessary ``.dtbo`` files to support MIPI. The **Modalix DevKit** includes two MIPI Interfaces for connecting MIPI cameras as inputs to the device. The MIPI ports are located directly on the carrier board, and developers would need to follow the procedure below to enable them. Before starting, make sure to attach a MIPI camera to one of the MIPI ports while the **Modalix Devkit** is off. Once connected, connect a serial cable from a host machine to the **Modalix Devkit**. Afterwards, turn the **Modalix Devkit** on. Then, establish a serial terminal with ``sima-cli`` and immediately enter ``uboot`` by pressing the any key during the 3 second countdown: .. code-block:: console sima-cli serial -b 115200 ... Hit any key to stop autoboot: 0 sima$ Once in uboot, set the ``dtbos`` variable to the proper **Device Tree Blob Overlay** ``.dtbo`` files corresponding to the carrier board listed below. Afterwards, save the environment and boot into the operating system. #. Waveshare Carrier Board (Rev 1 - Blue Case): ``waveshare-carrier-som.dtbo`` .. code-block:: console sima$ setenv dtbos pcie-4rc-2rc-2rc.dtbo waveshare-carrier-som.dtbo ; saveenv ; boot #. Seeed Studio Carrier Board (Rev 2 - White Case): ``seeed-studio-carrier-som.dtbo`` .. code-block:: console sima$ setenv dtbos pcie-4rc-2rc-2rc.dtbo seeed-studio-carrier-som.dtbo ; saveenv ; boot To validate the interfaces, connect the Modalix SOM to a display and login. Then, connect a MIPI camera to each port and run the following gstreamer pipelines in seperate local terminals. Replace ``video1`` with whatever MIPI port the camera is connected to. #. Decode Raw MIPI Bayer: .. code-block:: console sima@modalix:~$ sudo gst-launch-1.0 v4l2src device=/dev/video1raw ! 'video/x-bayer,format=rggb12le,width=2048,height=1080,framerate=30/1' ! fakesink & #. Show Decoded MIPI Output to Display: .. code-block:: console sima@modalix:~$ sudo gst-launch-1.0 v4l2src device=/dev/video1out ! 'video/x-raw,format=RGB,width=2048,height=1080,framerate=30/1' ! queue2 use-buffering=true max-size-bytes=4294967295 max-size-time=10000000000 ! videoconvert ! autovideosink &