How to get the Sony-IMX219-Raspberry-Pi-V2-CMOS camera working with VisionFive2?

Hey All,
I’m trying to get the a spare Sony-IMX219-Raspberry-Pi-V2-CMOS camera I had laying around working on my VisionFive2 version 1.2a. Since the VisionFive 2 has 1 × 2-lane MIPI CSI camera port, supporting up to 1080p@30fps, and the Sony-IMX219-Raspberry-Pi-V2-CMOS camera is CSI compatible (AFAICT), I am hoping to get this working. I’m just not sure how to approach this, I think it has something to do with adding the correct device tree files to the boot partition so that they can be loaded at boot time. Is this correct? I am open to any suggestions/help with this, Thanks!

When I look at the JH7110 upstream status, the camera should actually already be working.

Add Starfive Camera Subsystem driver

This patch series adds support for the Starfive Camera Subsystem
found on Starfive JH7110 SoC.

The driver implements V4L2, Media controller and V4L2 subdev interfaces.
Camera sensor using V4L2 subdev interface in the kernel is supported.

The driver is tested on VisionFive V2 board with IMX219 camera sensor.
GStreamer 1.18.5 with v4l2src plugin is supported.

It would be great if you could tell us which Debian release you have installed, what kind of power supply you have connected, what steps you have taken to use the camera and if you have any error messages in the serial sonsole related to the camera.

2 Likes

[SunWukong]:Thanks for prompt reply!:slight_smile:

Armbian VERSION=23.02.0-trunk, Kernel version 5.15.94, GaN 100W PS, Anker charging cable. I used GitHub - jacksonliam/mjpg-streamer: Fork of http://sourceforge.net/projects/mjpg-streamer/ to compile and run mjpg-streamer-experimental, which nets the following results:

./mjpg_streamer -i “./input_uvc.so” -o “./output_http.so”
MJPG Streamer Version: git rev: 310b29f4a94c46652b20c4b7b6e5cf24e532af39
i: Using V4L2 device.: /dev/video0
i: Desired Resolution: 640 x 480
i: Frames Per Second.: -1
i: Format…: JPEG
i: TV-Norm…: DEFAULT
ERROR opening V4L interface: No such file or directory
i: init_VideoIn failed.

I noticed there is no /dev/video0, or any other for that matter, in /dev.

Here is the output of # i2cdetect -l:

i2c-0 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-2 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-5 i2c Synopsys DesignWare I2C adapter I2C adapter
i2c-6 i2c Synopsys DesignWare I2C adapter I2C adapter

This next entry is truncated in the “0 to6” section, for the sake of brevity, not trying to spam here…
Running v4l2-ctl --device=/dev/i2c-0 to 6 yields:
Unable to detect what device /dev/i2c-0 to 6 is, exiting.

dmesg | grep i2c*
[ 4.295921] i2c_dev: i2c /dev entries driver
[ 4.400058] i2c 2-0045: Fixing up cyclic dependency with 295d0000.mipi
[ 4.400396] i2c 2-0019: Fixing up cyclic dependency with 295d0000.mipi
[ 4.402887] i2c 6-0010: Fixing up cyclic dependency with 19800000.vin_sysctl
[ 10.196225] starfive-i2s 120b0000.i2stx_4ch0: designware: play supported
[ 10.203026] starfive-i2s 120b0000.i2stx_4ch0: designware: i2s master mode supported

Imx219 Camera is working with the latest img (5.15). Not fully v4l2 compatible. It needs some tuning. Pinkish image when dark.

Update:
Maybe the pink tint is due to HDMI issue.