Skip to main content

MIPI Camera Interfaces

note

Please install or upgrade sima-cli before continuing. This guide is intended for use with the latest sima-cli version.

note

This procedure requires a host with the latest sima-cli version installed. It also requires a Modalix DevKit firmware version that includes the .dtbo files for MIPI support.

The Modalix DevKit includes two MIPI interfaces for camera input. The MIPI ports are located on the carrier board.

Before you start, power off the Modalix DevKit and attach a MIPI camera to one of the MIPI ports.

Connect a serial cable from the host to the Modalix DevKit, then power on the DevKit.

Open a serial terminal with sima-cli, then press any key during the 3 second countdown to enter U-Boot:

sima-cli serial -b 115200
...
Hit any key to stop autoboot: 0
sima$

In U-Boot, set the dtbos variable to the appropriate Device Tree Blob Overlay (.dtbo) file. The correct file depends on the carrier board, camera manufacturer, sensor type, and camera port. Then save the environment and boot into the operating system.

The filename follows this pattern:

modalix-som-<carrier_board>-<camera_manufacturer>-<sensor_type>-<port>.dtbo

Select each component based on your hardware:

ComponentValuesDescription
Carrier Boardconnectech, seeedstudio, waveshareThe carrier board model
Camera ManufacturerARDU, ECON, LIArducam, e-con Systems, or Leopard Imaging
Sensor TypeIMX477, IMX568, FPGA-IMX568, KOBE1-IMX568, IMX678, AR0234, OG05C10The camera sensor model
Port0CAM, 1CAM, 2CAM, 3CAM, DUALThe MIPI port number connected to the camera

By default, the Modalix DevKit has the Waveshare carrier board. For example, for an Arducam IMX477 camera connected to port 1 of a Modalix DevKit:

sima$ setenv dtbos modalix-som-waveshare-ARDU-IMX477-1CAM.dtbo ; saveenv ; boot

The camera overlays in platform release 2.1.3 are listed below. Other releases use different names for some overlays. To list the overlays on your board, run this command from Linux:

sima@modalix:~$ ls /boot/boot-*/modalix-som-*.dtbo

For the camera to order, the ports on each carrier board, and the sensor modes behind each overlay, see Supported MIPI Cameras.

modalix-som-connectech-ARDU-IMX477-0CAM.dtbo
modalix-som-connectech-ARDU-IMX477-1CAM.dtbo
modalix-som-connectech-ARDU-IMX477-2CAM.dtbo
modalix-som-connectech-ARDU-IMX477-3CAM.dtbo
modalix-som-connectech-ECON-FPGA-IMX568-0CAM.dtbo
modalix-som-connectech-ECON-FPGA-IMX568-1CAM.dtbo
modalix-som-connectech-ECON-FPGA-IMX568-2CAM.dtbo
modalix-som-connectech-ECON-FPGA-IMX568-3CAM.dtbo
modalix-som-connectech-ECON-IMX678-0CAM.dtbo
modalix-som-connectech-ECON-IMX678-1CAM.dtbo
modalix-som-connectech-ECON-IMX678-2CAM.dtbo
modalix-som-connectech-ECON-IMX678-3CAM.dtbo
modalix-som-connectech-ECON-KOBE1-IMX568-0CAM.dtbo
modalix-som-connectech-ECON-KOBE1-IMX568-1CAM.dtbo
modalix-som-connectech-ECON-KOBE1-IMX568-2CAM.dtbo
modalix-som-connectech-ECON-KOBE1-IMX568-3CAM.dtbo
modalix-som-connectech-LI-AR0234-0CAM.dtbo
modalix-som-connectech-LI-AR0234-1CAM.dtbo
modalix-som-connectech-LI-AR0234-2CAM.dtbo
modalix-som-connectech-LI-AR0234-3CAM.dtbo
modalix-som-connectech-LI-OG05C10-0CAM.dtbo
modalix-som-connectech-LI-OG05C10-1CAM.dtbo
modalix-som-connectech-LI-OG05C10-2CAM.dtbo
modalix-som-connectech-LI-OG05C10-3CAM.dtbo
modalix-som-seeedstudio-ARDU-IMX477-0CAM.dtbo
modalix-som-seeedstudio-ARDU-IMX477-2CAM.dtbo
modalix-som-seeedstudio-ECON-FPGA-IMX568-0CAM.dtbo
modalix-som-seeedstudio-ECON-FPGA-IMX568-2CAM.dtbo
modalix-som-seeedstudio-ECON-IMX678-0CAM.dtbo
modalix-som-seeedstudio-ECON-IMX678-2CAM.dtbo
modalix-som-seeedstudio-ECON-KOBE1-IMX568-0CAM.dtbo
modalix-som-seeedstudio-ECON-KOBE1-IMX568-2CAM.dtbo
modalix-som-seeedstudio-LI-AR0234-0CAM.dtbo
modalix-som-seeedstudio-LI-AR0234-2CAM.dtbo
modalix-som-seeedstudio-LI-OG05C10-0CAM.dtbo
modalix-som-seeedstudio-LI-OG05C10-2CAM.dtbo
modalix-som-waveshare-ARDU-IMX477-1CAM.dtbo
modalix-som-waveshare-ARDU-IMX477-2CAM.dtbo
modalix-som-waveshare-ARDU-IMX477-DUAL.dtbo
modalix-som-waveshare-ECON-FPGA-IMX568-1CAM.dtbo
modalix-som-waveshare-ECON-FPGA-IMX568-2CAM.dtbo
modalix-som-waveshare-ECON-IMX568-1CAM.dtbo
modalix-som-waveshare-ECON-IMX568-2CAM.dtbo
modalix-som-waveshare-ECON-IMX678-1CAM.dtbo
modalix-som-waveshare-ECON-IMX678-2CAM.dtbo
modalix-som-waveshare-ECON-IMX678-DUAL.dtbo
modalix-som-waveshare-ECON-KOBE1-IMX568-1CAM.dtbo
modalix-som-waveshare-ECON-KOBE1-IMX568-2CAM.dtbo
modalix-som-waveshare-LI-AR0234-1CAM.dtbo
modalix-som-waveshare-LI-AR0234-2CAM.dtbo
modalix-som-waveshare-LI-AR0234-DUAL.dtbo
modalix-som-waveshare-LI-OG05C10-1CAM.dtbo
modalix-som-waveshare-LI-OG05C10-2CAM.dtbo
modalix-som-waveshare-LI-OG05C10-DUAL.dtbo

To validate the interfaces, connect the Modalix DevKit to a display and log in. Then, use libcamera to verify camera connectivity.

  1. List available cameras:

    sima@modalix:~$ cam -l
  2. Show different camera formats for camera 1:

    sima@modalix:~$ cam -c 1 -I
  3. Capture an image from camera 1:

    sima@modalix:~$ rm -rf frame* && cam -c 1 --capture=1 -F -s pixelformat=NV12

Use Multiple Cameras​

To use more than one camera, set dtbos to one overlay for each camera, separated by spaces. U-Boot applies every overlay in the list. This works from platform release 2.1.0.

The cameras can be different models. Use the overlay that matches the model and port of each camera. For example, for a Modalix DevKit with an e-con Systems IMX678 camera on port 1 and a Leopard Imaging OG05C10 camera on port 2:

sima$ setenv dtbos modalix-som-waveshare-ECON-IMX678-1CAM.dtbo modalix-som-waveshare-LI-OG05C10-2CAM.dtbo
sima$ printenv dtbos
sima$ saveenv ; boot
  • Use one overlay for each port.
  • The order of the overlays does not matter.
  • A DUAL overlay sets up both ports of the Waveshare carrier board with the same camera model. Use either a DUAL overlay or two port overlays, not both.
  • For the ports that have an overlay on each carrier board, see Supported MIPI Cameras.
  • Not every combination has been tested. Verify yours with cam -l and a capture from each camera.

After the board boots, run cam -l. It lists one entry for each camera.

You can also set the variable from Linux, without the serial console:

sima@modalix:~$ fw_setenv dtbos "modalix-som-waveshare-ECON-IMX678-1CAM.dtbo modalix-som-waveshare-LI-OG05C10-2CAM.dtbo"
sima@modalix:~$ fw_printenv dtbos
sima@modalix:~$ sudo reboot