sensors/ov5647 was added to the repository, so each step can be compared
with the files there. You can replace the names with your sensor’s.
1
Checking the Sensor Fits
The sensor’s output, bit depth and link rate must be within the board’s limits.
2
Kernel Driver
The sensor needs a V4L2 driver with exposure and gain controls.
3
Scaffolding
camera-isp-sdk new creates the descriptor, the overlay fragment and the DCC sources.4
Filling in the Overlay and the Descriptor
Sensor specific values come from the driver’s DT binding and the datasheet.
5
Building, Installing and Bring-up
The package is built, installed on the board and the sensor is tested step by step.
1. Checking the Sensor Fits
- The sensor must deliver RAW Bayer at 8, 10 or 12 bits over MIPI CSI-2 D-PHY with at most 2 data lanes (both connectors of the board are 2-lane). YUV sensors do not need the ISP.
- The mode width must be a multiple of 8 for RAW10/RAW12 and of 16 for RAW8. If it is not, the driver has to crop (as the IMX477 driver does).
- The pixel rate must fit the link: width × height × fps × bits below lanes × 2 × link frequency.
2. Kernel Driver
The ISP path needs these controls:- In the T3 Gemstone kernel already (
grep VIDEO_<SENSOR> t3_gem_o1_defconfig): nothing to do. If the module is not on the image, the T3 Gemstone package repository may have it askernel-module-<name>-6.12.24-ti(as for the OV5647). - In the mainline or Raspberry Pi kernel: you need to copy the driver to
sensors/<id>/driver/with aKbuild(obj-m += <id>.o) and setdriver=driverin the descriptor. Embedded data pads of Raspberry Pi drivers useMEDIA_BUS_FMT_SENSOR_DATA, which the TI kernel does not have, and must be removed. You can build it withtask drivers SENSORS=<id> KDIR=...(Building Sensor Drivers); the package then carries it.
3. Scaffolding
sensors/ov5647/ with a descriptor, an overlay fragment, a README checklist and DCC sources copied
from imx230. In the sources the camera module ID is set to 5647, the AE/AWB statistics grid is fitted to
1920x1080 and the demosaic coefficients are moved to the BGGR order of --code.
4. Filling in the Overlay and the Descriptor
4.1 Overlay Fragment
sensors/ov5647/overlay.dtsi is written once for both ports with these macros.
The fragment must define
CAM_DATA_LANES, and CAM_CLOCK_NONCONTINUOUS if the sensor uses a non-continuous
clock. The compatible string, I2C address, clock and supplies are taken from the driver’s DT binding.
4.2 Descriptor
The fields markedTODO in sensors/ov5647/sensor.conf are filled in.
[gain] models:
The formula is in the sensor’s datasheet or in libcamera’s
cam_helper_<sensor>.cpp.
5. Building, Installing and Bring-up
You can build the package and install it on the board as in Installation.root with the Edge AI environment loaded
(Installation). Each step isolates one layer.
status=supported is set in the descriptor and the ISP is tuned
(ISP Tuning).
