- 24 Mar 2025
- 4 Minutes to read
- Print
- DarkLight
- PDF
NXP IMX95LPD5EVK-19CM board TEVS Camera Usage Guide
- Updated on 24 Mar 2025
- 4 Minutes to read
- Print
- DarkLight
- PDF
Introduction
This article guides you how to get started using TEVS Series camera on NXP IMX95LPD5EVK-19CM board.
Supported Camera Modules
Camera Series | Products |
---|---|
TEVS | TEVS-AR0144 |
Overview
Prepare adapter board and cable for TechNexion camera
Prepare adapter board and cable connect to EVK board:
Prepare Yocto demo image for testing TechNexion camera
The demo image contains the required device tree blobs and camera drivers to enable TechNexion TEVS Series cameras.
Choose the correct demo image that is compatible with the EVK board you have.
Prebuilt demo images can be available for download via TechNexion's server.
Image Download Link
Flash image to SD card
Under Windows:
balena etcher
Under Linux:
bmap-tools
$ sudo apt-get update
$ sudo apt-get install bmap-tools
Ensure the boot mode is configured as boot from SD card.
i.MX 95 LPD5 EVK Quick Start Guide
Please refer to Instructions for testing camera section for camera testing steps.
Build Yocto
Develop Linux kernel
Fetch and compile Linux kernel
The Build Environment
Tested under ubuntu 20.04.
Using aarch64-linux-gnu-gcc 9.4.0 cross compiler.
Supported TechNexion Linux kernel branch for TEVS Series cameras
Linux | branch |
---|---|
6.6.52 | tn-imx_6.6.52_2.2.0-next |
Install cross-compile & dependency tools.
$ sudo apt update
$ sudo apt install -y gcc-aarch64-linux-gnu libncurses-dev libssl-dev bison flex git make
Download the source code.
$ git clone https://github.com/TechNexion/linux-tn-imx.git -b tn-imx_6.6.52_2.2.0-next
Set cross-compile environment & the kernel config.
$ export ARCH=arm64
$ export CROSS_COMPILE=/usr/bin/aarch64-linux-gnu-
$ cd linux-tn-imx
~/linux-tn-imx$ make imx_v8_defconfig
Compile the kernel & module driver.
# compile kernel
~/linux-tn-imx$ make -j$(nproc)
# create kernel module folder
~/linux-tn-imx$ mkdir -p ./modules
# compile module driver
~/linux-tn-imx$ rm -rf ./modules/*
~/linux-tn-imx$ make INSTALL_MOD_PATH=./modules modules_install
Change kernel Image, DTB & modules.
~/linux-tn-imx/$ cp arch/arm64/boot/Image <mount_folder>/boot/Image
~/linux-tn-imx/$ cp arch/arm64/boot/dts/freescale/imx95-19x19-evk-tevs-tev-nxp.dts <mount_folder>/boot/
~/linux-tn-imx/$ sudo cp -r ./modules/lib/modules/* <mount_folder>/root/lib/modules/
Instructions for testing camera
Specify camera DTB in u-boot
Connect debug console cable to NXP IMX95LPD5EVK-19CM.
Power on board, and enter u-boot prompt.
Specify camera dtb via
fdtfile
u-boot environment variable.
u-boot=> setenv fdtfile imx95-19x19-evk-tevs-tev-nxp.dtb
Continue boot process.
u-boot=> saveenv
u-boot=> boot
Setup the media controller before camera streaming
We can check whether camera have been link via media control command.
$ media-ctl -p
Get the media controller information as follows.
Media controller API version 6.6.23
Media device information
------------------------
driver mxc-isi
model FSL Capture Media Device
serial
bus info platform:4ad50000.isi
hw revision 0x0
driver version 6.6.23
Device topology
- entity 1: crossbar (13 pads, 9 links, 8 routes)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev0
routes:
2/0 -> 5/0 [ACTIVE]
2/0 -> 6/0 [ACTIVE]
2/0 -> 7/0 [ACTIVE]
2/0 -> 8/0 [ACTIVE]
2/0 -> 9/0 [ACTIVE]
2/0 -> 10/0 [ACTIVE]
2/0 -> 11/0 [ACTIVE]
2/0 -> 12/0 [ACTIVE]
pad0: Sink
pad1: Sink
pad2: Sink
[stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
<- "4ac10000.syscon:formatter@20":1 [ENABLED,IMMUTABLE]
pad3: Sink
pad4: Sink
pad5: Source
[stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:lim-range]
-> "mxc_isi.0":0 [ENABLED,IMMUTABLE]
…
- entity 15: mxc_isi.0 (2 pads, 2 links, 0 routes)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev1
pad0: Sink
[stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:jpeg xfer:srgb ycbcr:601 quantization:full-range
compose.bounds:(0,0)/1920x1080
compose:(0,0)/1920x1080]
<- "crossbar":5 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:YUV8_1X24/1920x1080 field:none colorspace:jpeg xfer:srgb ycbcr:601 quantization:full-range
crop.bounds:(0,0)/1920x1080
crop:(0,0)/1920x1080]
-> "mxc_isi.0.capture":0 [ENABLED,IMMUTABLE]
- entity 18: mxc_isi.0.capture (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "mxc_isi.0":1 [ENABLED,IMMUTABLE]
…
- entity 103: 4ac10000.syscon:formatter@20 (2 pads, 2 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev9
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range]
<- "csidev-4ad30000.csi":1 [ENABLED,IMMUTABLE]
pad1: Source
[stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range]
-> "crossbar":2 [ENABLED,IMMUTABLE]
- entity 108: csidev-4ad30000.csi (2 pads, 2 links, 1 route)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev10
routes:
0/0 -> 1/0 [ACTIVE]
pad0: Sink
[stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range]
<- "tevs 2-0048":0 []
pad1: Source
[stream:0 fmt:UYVY8_1X16/1920x1080 field:none colorspace:smpte170m xfer:709 ycbcr:601 quantization:lim-range]
-> "4ac10000.syscon:formatter@20":0 [ENABLED,IMMUTABLE]
- entity 113: tevs 2-0048 (1 pad, 1 link, 0 routes)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev11
pad0: Source
[stream:0 fmt:UYVY8_1X16/640x480@1/60 field:none colorspace:srgb xfer:srgb ycbcr:601 quantization:full-range
crop.bounds:(0,0)/640x480
crop:(0,0)/640x480]
-> "csidev-4ad30000.csi":0 []
Or it will be easier to understand if you output it as an image.
$ media-ctl --print-dot > graph.dot
$ dot -Tpng graph.dot > graph.png
# if you don't have tool, you need to install it as follows.
# sudo apt-get install -y graphviz
Modify the route through the “crossbar” and only keep the channel of video0.
$ media-ctl -R "'crossbar' [2/0 -> 5/0 [1], 2/0 -> 6/0 [0], 2/0 -> 7/0 [0], 2/0 -> 8/0 [0], 2/0 -> 9/0 [0], 2/0 -> 10/0 [0], 2/0 -> 11/0 [0], 2/0 -> 12/0 [0]]"
Enable the link between TEVS and CSI device.
$ media-ctl -l "'tevs 2-0048':0 -> 'csidev-4ad30000.csi':0 [1]"
You can list camera formats, resolutions and frame interval via v4l2 control command.
# formats
$ v4l2-ctl -d /dev/v4l-subdev11 --list-subdev-mbus-codes
ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=0)
0x200f: MEDIA_BUS_FMT_UYVY8_1X16
# resolutions
$ v4l2-ctl -d /dev/v4l-subdev11 --list-subdev-framesize code=0x200f
ioctl: VIDIOC_SUBDEV_ENUM_FRAME_SIZE (pad=0)
Size Range: 640x480 - 640x480
Size Range: 1280x720 - 1280x720
Size Range: 1280x800 - 1280x800
# frame interval of resolution
$ v4l2-ctl -d /dev/v4l-subdev11 --list-subdev-frameintervals width=640,height=480,code=0x200f
ioctl: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL (pad=0)
Interval: 0.017s (60.000 fps)
$ v4l2-ctl -d /dev/v4l-subdev11 --list-subdev-frameintervals width=1280,height=720,code=0x200f
ioctl: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL (pad=0)
Interval: 0.017s (60.000 fps)
$ v4l2-ctl -d /dev/v4l-subdev11 --list-subdev-frameintervals width=1280,height=800,code=0x200f
ioctl: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL (pad=0)
Interval: 0.017s (60.000 fps)
Set the media controller resolution to 1280×720.
$ media-ctl -V "'crossbar':2 [fmt:UYVY8_1X16/1280x720 field:none colorspace:srgb xfer:srgb ycbcr:601]"
$ media-ctl -V "'mxc_isi.0':0 [fmt:UYVY8_1X16/1280x720 field:none colorspace:srgb xfer:srgb ycbcr:601]"
$ media-ctl -V "'4ac10000.syscon:formatter@20':0 [fmt:UYVY8_1X16/1280x720 field:none colorspace:srgb xfer:srgb ycbcr:601]"
$ media-ctl -V "'csidev-4ad30000.csi':0 [fmt:UYVY8_1X16/1280x720 field:none colorspace:srgb xfer:srgb ycbcr:601]"
$ media-ctl -V "'tevs 2-0048':0 [fmt:UYVY8_1X16/1280x720 field:none colorspace:srgb xfer:srgb ycbcr:601]"
Start camera video stream via gstreamer
Specify the capture device you just get and start gstreamer to get video stream on screen.
$ gst-launch-1.0 v4l2src device=/dev/video0 ! "video/x-raw, format=YUY2, width=1280, height=720" ! waylandsink sync=false
Trouble shooting
Boot up NXP IMX95LPD5EVK-19CM and check initialization of TEVS driver.
If it shows below messages, the driver is initialized correctly.
$ dmesg -t | grep tevs
tevs 1-0048: tevs_probe() device node: tevs@48
tevs 1-0048: Version:24.9.0.1
tevs 1-0048: Product:TEVS-AR0234, HeaderVer:3, MIPI_Rate:800
tevs 1-0048: probe success