Skip to content

VC-MIPI-modules/vc_mipi_raspi

Repository files navigation

Raspberry Pi 5 Driver for VC MIPI

This driver package is supporting the official Raspberry Pi 5. Downloads are available under

Releases

For Raspberry Pi 3 and 4 modules and compute modules, please use this driver installation

Raspi3 and 4 Driver

Installation

The driver is tested on 64-bit Raspberry Pi OS with Bookworm (Lite or with desktop). The OS can be installed by the official Raspberry Pi Imager from the Raspberry Pi Foundation.

Raspberry Pi OS

Run the installation with the installation of the needed packages:

sudo apt install ./vc-mipi-driver-bcm2712_0.3.1_arm64.deb

or Run the installation with manual packages:

sudo apt install dkms linux-headers-generic v4l-utils whiptail
sudo dpkg -i ./vc-mipi-driver-bcm2712_0.3.1_arm64.deb

After a reboot the connected sensor(s) should be detected and visible as v4l2 capture devices Under the current Raspberry Pi OS with Bookworm, the sensors are:

Camera Device Subdevice
Cam0 /dev/video0 /dev/v4l-subdev2
Cam1 /dev/video8 /dev/v4l-subdev5

Building the Debian package

Running dpkg-buildpackage by script creates a Debian package

If different Linux headers are used, the path can be specified by the environmental variable KERNEL_HEADERS I.e. if the Linux kernel is built from sources, the path is set by KERNEL_HEADERS=/path/to/linux-gitrepo

Requirements

sudo apt-get install debhelper-compat  dkms dh-dkms debhelper  linux-headers-generic

Script

bash createDebianPackage.sh

Configuration on Raspberry Pi 5

  1. The configuration for the VC MIPI Sensors is in the boot file /boot/firmware/config_vc-mipi-driver-bcm2712.txt. The right lanes configuration for the sensors has to be made. For some sensors, 2 modes are available. If no specific configuration is needed, the "more lanes" configuration is the first choice (i.e. 4 instead 2 lanes)
  2. Additionally the configuration tool vc-config is installed. By calling vc-config it is possible to change the values of the controls and also the region of interest (ROI)
  3. The formats can be adjusted. All formats are displayed, although not all are available which depends on the sensor model.

Cam Controls Cam Selection Lanes configuration Format Selection

ISP and Libcamera Support

For Libcamera support, refer to Libcamera Installation Then the ISP with features like Auto White Balancing (AWB) are supported.

Support Tool

Installation

The official support tool for the v4l2 driver is V4L2-Test

⚠️ Important: Checkout branch feature/gstreamer for full raspberrypi compliance Please refer to the installation there.

Usage

For starting, you have to add the subdevice properly in order to set the controls by tool:

./v4l2-test stream -e <exposure> -g <gain> -f <pixelformat> -p 1 -d <device> -sd <subdevice>
# Camera 0
./v4l2-test stream -e <exposure> -g <gain> -f <pixelformat> -p 1 -d /dev/video0 -sd /dev/v4l-subdev2
# Camera 1
./v4l2-test stream -e <exposure> -g <gain> -f <pixelformat> -p 1 -d /dev/video8 -sd /dev/v4l-subdev5

Display live image

For getting the live image on the screen, add the argument --fb

./v4l2-test stream -e <exposure> -g <gain> -f <pixelformat>  -d <device> -sd <subdevice> --fb
# Camera 0
./v4l2-test stream -e <exposure> -g <gain> -f <pixelformat>  -d /dev/video0 -sd /dev/v4l-subdev2 --fb
# Camera 1
./v4l2-test stream -e <exposure> -g <gain> -f <pixelformat>  -d /dev/video8 -sd /dev/v4l-subdev5 --fb

On desktop version, first you have to switch to console mode Ctrl + Alt + F1

Console mode

Controls

  1. Black level
  2. IO Mode
  3. Trigger mode
  4. Binning mode

Known issues

The driver offers the basic features of the VC MIPI sensors. This has the advantage that the same functions are available with all sensors. If special functions are required, please contact the support team or your contact at Vision Components GmbH

  1. The flipping controls are not supported by standard driver

FAQ

About

Vision Components MIPI CSI-2 driver for Raspberry Pi based Hardware

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •