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.

Power on the DevKit, and log in to Linux on it over SSH or the serial console.

From Linux, set the U-Boot dtbos variable to the appropriate Device Tree Blob Overlay (.dtbo) file, then reboot. The correct file depends on the carrier board, camera manufacturer, sensor type, and camera port.

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, IMX415, AR0234, AR0822, 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:

The U-Boot environment is on a read-only mount, /var/uboot. Make it writable, set the variable with sudo, and make it read-only again:

sima@modalix:~$ sudo mount -o remount,rw /var/uboot
sima@modalix:~$ sudo fw_setenv dtbos modalix-som-waveshare-ARDU-IMX477-1CAM.dtbo
sima@modalix:~$ sudo mount -o remount,ro /var/uboot
sima@modalix:~$ fw_printenv dtbos
sima@modalix:~$ sudo reboot

The camera overlays in platform release 3.0.0 are listed below. To list the overlays on your board, run this command:

sima@modalix:~$ ls /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-IMX568-0CAM.dtbo
modalix-som-connectech-LI-IMX568-1CAM.dtbo
modalix-som-connectech-LI-IMX568-2CAM.dtbo
modalix-som-connectech-LI-IMX568-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-connectech-METOAK-DUAL.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-IMX568-0CAM.dtbo
modalix-som-seeedstudio-ECON-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-IMX415-0CAM.dtbo
modalix-som-seeedstudio-LI-IMX415-2CAM.dtbo
modalix-som-seeedstudio-LI-IMX568-0CAM.dtbo
modalix-som-seeedstudio-LI-IMX568-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-ECON-MIPI-GEN-1CAM.dtbo
modalix-som-waveshare-INTROSPECT-MIPI-GEN-2CAM-VC1.dtbo
modalix-som-waveshare-INTROSPECT-MIPI-GEN-2CAM-VC2.dtbo
modalix-som-waveshare-INTROSPECT-MIPI-GEN-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-AR0822-1CAM.dtbo
modalix-som-waveshare-LI-AR0822-2CAM.dtbo
modalix-som-waveshare-LI-ECON-IMX568-DUAL.dtbo
modalix-som-waveshare-LI-IMX415-1CAM.dtbo
modalix-som-waveshare-LI-IMX415-2CAM.dtbo
modalix-som-waveshare-LI-IMX568-1CAM-594MBPS.dtbo
modalix-som-waveshare-LI-IMX568-1CAM.dtbo
modalix-som-waveshare-LI-IMX568-2CAM.dtbo
modalix-som-waveshare-LI-IMX568-DUAL.dtbo
modalix-som-waveshare-LI-OG05C10-1CAM.dtbo
modalix-som-waveshare-LI-OG05C10-2CAM.dtbo
modalix-som-waveshare-LI-OG05C10-DUAL.dtbo
modalix-som-waveshare-METOAK-DUAL.dtbo
modalix-som-waveshare4CSI-ARDU-IMX477-QUAD.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.

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:

The U-Boot environment is on a read-only mount, /var/uboot. Make it writable, set the variable with sudo, and make it read-only again:

sima@modalix:~$ sudo mount -o remount,rw /var/uboot
sima@modalix:~$ sudo fw_setenv dtbos "modalix-som-waveshare-ECON-IMX678-1CAM.dtbo modalix-som-waveshare-LI-OG05C10-2CAM.dtbo"
sima@modalix:~$ sudo mount -o remount,ro /var/uboot
sima@modalix:~$ fw_printenv dtbos
sima@modalix:~$ sudo reboot
  • 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.