IMX415 Cameras do not work with Edge2

Which system do you use? Android, Ubuntu, OOWOW or others?

Ubuntu 24.04.1 LTS (Official Khadas Image)

Which version of system do you use? Please provide the version of the system here:

Ubuntu 24.04.1 LTS

Please describe your issue below:

Hello,

I’m experiencing an issue with my Khadas Edge2 board and two Khadas IMX415 camera modules. I’ve installed the official Khadas Ubuntu 24.04.1 LTS operating system. The cameras are supposed to work out of the box, but I’m unable to get any video output from them.

What I’ve observed and tried so far:

  • No Video Output:
    • I can’t get any video from either of the two IMX415 cameras connected to my Edge2 board.
  • v4l2-ctl Output:
    • Running v4l2-ctl -d /dev/video51 --get-fmt-video shows that the device node exists and provides format information, but I’m unable to capture any video.
  • Kernel Logs (dmesg Output):
    • I see warnings about failing to get reset-gpios and using dummy regulators for dvdd, dovdd, and avdd.
    • One of the cameras fails to detect the sensor ID, showing Unexpected sensor id(000000), ret(-5).
  • Hardware Checks:
    • Verified that the MIPI-CSI cables are securely connected and correctly oriented.
    • Swapped cameras and cables to rule out hardware defects.
    • Tested each camera individually.
  • System Updates:
    • Updated the system with sudo apt update && sudo apt upgrade -y.

Despite these efforts, I’m still unable to get any video output from the cameras. Since the cameras and the board are designed to work together with the Khadas OS, they should function out of the box. I’m unsure why they aren’t working.
Console log
dmesg

[ 14.196997] imx415 3-001a: driver version: 00.01.08
[ 14.200751] imx415 3-001a: Get hdr mode failed! no hdr default
[ 14.203728] imx415 3-001a: detect imx415 lane 2
[ 14.210053] imx415 3-001a: Failed to get reset-gpios
[ 14.212509] imx415 3-001a: could not get default pinstate
[ 14.214889] imx415 3-001a: could not get sleep pinstate
[ 14.217230] imx415 3-001a: supply dvdd not found, using dummy regulator
[ 14.219605] imx415 3-001a: supply dovdd not found, using dummy regulator
[ 14.221894] imx415 3-001a: supply avdd not found, using dummy regulator
[ 14.295337] imx415 3-001a: Detected imx415 id 0000e0
[ 14.299351] imx415 4-001a: driver version: 00.01.08
[ 14.302586] imx415 4-001a: Get hdr mode failed! no hdr default
[ 14.305754] imx415 4-001a: detect imx415 lane 2
[ 14.308289] imx415 4-001a: could not get default pinstate
[ 14.310330] imx415 4-001a: could not get sleep pinstate
[ 14.312371] imx415 4-001a: supply dvdd not found, using dummy regulator
[ 14.314482] imx415 4-001a: supply dovdd not found, using dummy regulator
[ 14.316560] imx415 4-001a: supply avdd not found, using dummy regulator
[ 14.389650] imx415 4-001a: Unexpected sensor id(000000), ret(-5)

v4l2-ctl -d /dev/video51 --get-fmt-video

Format Video Capture Multiplanar:
Width/Height : 3840/2160
Pixel Format : ‘NV12’ (Y/UV 4:2:0)
Field : None
Number of planes : 1
Flags :
Colorspace : Default
Transfer Function : Default
YCbCr/HSV Encoding: Default
Quantization : Full Range
Plane 0 :
Bytes per Line : 3840
Size Image : 12441600

Request for Assistance:

  • Is there something I’m missing in the setup process?
  • Do I need to modify any configurations, such as the device tree, and if so, could someone provide guidance?
  • Are there any known issues with the IMX415 cameras on the Edge2 that I should be aware of?

Thank you for your help!

Hello @kkrak2

Please make sure you have connect the camera correctly and choose the correct camera node:

For video51, it should be in CAM3, you are sure you attach the camera to CAM3?

https://docs.khadas.com/products/sbc/edge2/add-ons/imx415-mipi-camera#tab__other-version

Hi, thank you for your response. It’s in the same exact setup as the picture in the documentation you sent

Hello @kkrak2

I also connect imx415 on CAM1 and CAM3, the dmesg log should shows like

khadas@Khadas:~$ dmesg | grep imx415
[   10.184454] platform csi2-dcphy1: Fixed dependency cycle(s) with /i2c@feab0000/imx415f@1a
[   10.213518] platform csi2-dcphy0: Fixed dependency cycle(s) with /i2c@feac0000/imx415b@1a
[   11.867467] platform csi2-dphy0: Fixed dependency cycle(s) with /i2c@feca0000/imx415@1a
[   12.671399] imx415 3-001a: driver version: 00.01.08
[   12.672619] imx415 3-001a:  Get hdr mode failed! no hdr default
[   12.673826] imx415 3-001a: detect imx415 lane 2
[   12.675018] imx415 3-001a: Failed to get reset-gpios
[   12.676198] imx415 3-001a: could not get default pinstate
[   12.677357] imx415 3-001a: could not get sleep pinstate
[   12.681710] imx415 3-001a: supply dvdd not found, using dummy regulator
[   12.682938] imx415 3-001a: supply dovdd not found, using dummy regulator
[   12.684122] imx415 3-001a: supply avdd not found, using dummy regulator
[   12.754785] imx415 3-001a: Detected imx415 id 0000e0
[   12.758705] imx415 4-001a: driver version: 00.01.08
[   12.761856] imx415 4-001a:  Get hdr mode failed! no hdr default
[   12.765021] imx415 4-001a: detect imx415 lane 2
[   12.767262] imx415 4-001a: could not get default pinstate
[   12.769330] imx415 4-001a: could not get sleep pinstate
[   12.771370] imx415 4-001a: supply dvdd not found, using dummy regulator
[   12.773425] imx415 4-001a: supply dovdd not found, using dummy regulator
[   12.775416] imx415 4-001a: supply avdd not found, using dummy regulator
[   12.848312] imx415 4-001a: Unexpected sensor id(000000), ret(-5)
[   12.858850] imx415 8-001a: driver version: 00.01.08
[   12.867592] imx415 8-001a:  Get hdr mode failed! no hdr default
[   12.873434] imx415 8-001a: detect imx415 lane 4
[   12.879298] imx415 8-001a: could not get default pinstate
[   12.882785] imx415 8-001a: could not get sleep pinstate
[   12.886256] imx415 8-001a: supply dvdd not found, using dummy regulator
[   12.889773] imx415 8-001a: supply dovdd not found, using dummy regulator
[   12.893157] imx415 8-001a: supply avdd not found, using dummy regulator
[   12.963649] imx415 8-001a: Detected imx415 id 0000e0
[   13.135297] imx415 3-001a: Consider updating driver imx415 to match on endpoints
[   13.138737] rockchip-csi2-dphy csi2-dcphy1: dphy0 matches m01_f_imx415 3-001a:bus type 5
[   13.146542] imx415 8-001a: Consider updating driver imx415 to match on endpoints
[   13.149187] rockchip-csi2-dphy csi2-dphy0: dphy0 matches m02_b_imx415 8-001a:bus type 5
[   17.579431] imx415 3-001a: set exposure(shr0) 2047 = cur_vts(2250) - val(203)
[   17.579480] imx415 8-001a: set exposure(shr0) 1845 = cur_vts(2250) - val(405)

You can check whether is the same as yours.

Also, we can use the v4l2-ctl to get the framerate of camera, you can use followings command.

v4l2-ctl -d /dev/video51 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-poll

The latest Edge2 image, CAM3 supports 4K@60fps and CAM1 supports 4K@30fps. So the output log should like this:

khadas@Khadas:~$ v4l2-ctl -d /dev/video51 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-poll
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 60.00 fps
<<<<<<<<<<<<<<<^C
khadas@Khadas:~$ v4l2-ctl -d /dev/video42 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-poll
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 30.00 fps
<<<<<<<<<<<<^C
khadas@Khadas:~$ 

And we preinstall gstreamer in image, you can try it.

gst-launch-1.0 v4l2src device=/dev/video51 io-mode=dmabuf num-buffers=600 ! video/x-raw,format=NV12,width=3840,height=2160,framerate=60/1 ! mpph264enc ! h264parse ! qtmux ! filesink location=/tmp/video51.mp4

When you are checking the function of camera, if there is any error, feel free to upload it.

2 Likes

Hello,

v4l2-ctl -d /dev/video51 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-poll

just outputs select timeout, and thats it, same with

v4l2-ctl -d /dev/video42 --set-fmt-video=width=3840,height=2160,pixelformat=NV12 --stream-mmap=3 --stream-skip=3 --stream-poll.

When I run the gstreamer command, I get this output and it gets stuck infinetely, giving me no other output

Setting pipeline to PAUSED …
Pipeline is live and does not need PREROLL …
Pipeline is PREROLLED …
Setting pipeline to PLAYING …
New clock: GstSystemClock

Fixed it, you need to use Kernel version 5.10.198

Fixed it, you need to use Kernel version 5.10.198

We tested the image before release. So I want to know, what is the kernel version you first used?