Any CSI camera for Verdin imx8mm on Dahlia carrier?

I’ve been struggling to get any video from adv7280a-m (See: https://www.toradex.com/community/questions/59268/verdin-imx8mm-dahlia-mipi-csi-from-adv7280m-with-b.html )

While it appears that my 7280 is correctly configured and sending video to the CSI port and v4l2-ctl sees it as a subdevice with adequate inputs, I can’t actually get any valid frames in userland.

I decided the next thing to try is to connect some other supported camera to the Dahlia’s CSI interface. I built a small adapter for a Raspberry Pi v1.3 OV5647 camera and ordered one from Amazon. I don’t have high hopes for this working though.

It doesn’t appear that I can procure an OV5640 camera from Toradex for the Verdin platform and the one for Apalis or earlier has been discontinued.

So I guess my first question is, has anyone succeeded in actually getting video from a CSI camera on Verdin?

Also, I’m confused about the various drivers (upstream, downstream, mainline, etc).

  • drivers/media/i2c seems to be the mainline drivers which create v4l2 subdevices.
  • drivers/media/platform/mxc/capture seems to be upstream NXP specific drivers but from what I can tell are to be used with imxv4l2 gstreamer plugins which are not applicable for imx8 (and aren’t even in BSP5.0).
  • But imx8mm seems to have a different CSI IP from imx8mq and this suggests I should be using drivers/media/platform/mxc/capture because the mx6s_capture bridge driver is referenced in imx8mm dtsi.

Thus, my next question is: what CSI video drivers should I be using and what gstreamer plugins for Verdin imx8mm on Dahlia?

If I can succeed in getting ANY video streaming from ANY camera sensor, then I can instrument the mx6s driver and figure out whether my issue is on the adv7280a-m side or just in how I’m using the driver(s).

Any help is appreciated.

Hello hpeyerl,

The MIPI CSI is a complicated system the camera are mot plug and play. We are working on a new camera with econ systems that will work out of the box with the verdin this one will come soon into the store. Also,What we are working with Vision components that have many different Mipi sensors and there will be a driver package for that.

what is your timeline on the project.

Best Regards,

Matthias Gohlke

what is your timeline on the project.

Jan 31, 2021.

It doesn’t appear that I can procure an OV5640 camera from Toradex for the Verdin platform and the one for Apalis or earlier has been discontinued.

There is actually no such thing as a “special” Verdin version thereof. But yes, our CSI Camera Module 5MP OV5640 has been discontinued.

So I guess my first question is, has anyone succeeded in actually getting video from a CSI camera on Verdin?

Of course, we brought it up with that former OV5640 of ours.

Also, I’m confused about the various drivers (upstream, downstream, mainline, etc).

Nothing to be confused about. For the i.MX 8 series it is all still downstream NXP stuff. Mainline/upstream is usually used interchangeably meaning the same thing but the i.MX 8 series isn’t quite there yet feature wise.

drivers/media/i2c seems to be the mainline drivers which create v4l2 subdevices.

Yes.

drivers/media/platform/mxc/capture seems to be upstream NXP specific drivers

No, this is downstream NXP stuff which does not exist in mainline/upstream.

but from what I can tell are to be used with imxv4l2 gstreamer plugins which are not applicable for imx8 (and aren’t even in BSP5.0).

I don’t think that is entirely true. Any Gstreamer “plug-in” should be usable with V4L2.

But imx8mm seems to have a different CSI IP from imx8mq and this suggests I should be using drivers/media/platform/mxc/capture because the mx6s_capture bridge driver is referenced in imx8mm dtsi.

I admit NXP’s stuff is a big mess!

Thus, my next question is: what CSI video drivers should I be using

https://git.toradex.com/cgit/linux-toradex.git/tree/arch/arm64/configs/toradex_defconfig?h=toradex_5.4-2.3.x-imx#n499

and what gstreamer plugins for Verdin imx8mm on Dahlia?

TDX Wayland with XWayland 5.1.0+build.4 (dunfell) verdin-imx8mm ttymxc0
Verdin-iMX8MM_Reference-Multimedia-Image

root@verdin-imx8mm:~# cat /boot/overlays.txt 
fdt_overlays=verdin-imx8mm_lt8912_overlay.dtbo verdin-imx8mm_ov5640_overlay.dtbo

root@verdin-imx8mm:~# dmesg | grep csi 
[    1.402539] mx6s-csi 32e20000.csi1_bridge: initialising
[    1.408425] mxc_mipi-csi 32e30000.mipi_csi: mipi csi v4l2 device registered
[    1.415417] CSI: Registered sensor subdevice: mxc_mipi-csi.0
[    1.421108] mxc_mipi-csi 32e30000.mipi_csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 333000000
[    7.556528] mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: ov5640_mipi 2-003c

root@verdin-imx8mm:~# dmesg | grep ov56
[    7.556528] mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: ov5640_mipi 2-003c
[    7.572919] ov5640_mipi 2-003c: Camera is found

root@verdin-imx8mm:~# lsmod | grep ov56
ov5640_camera_mipi_v2    24576  1

root@verdin-imx8mm:~# gst-launch-1.0 v4l2src device='/dev/video0' ! video/x-raw,format=YUY2,width=1920,height=1080,framerate=30/1 ! waylandsink -v

If I can succeed in getting ANY video streaming from ANY camera sensor, then I can instrument the mx6s driver and figure out whether my issue is on the adv7280a-m side or just in how I’m using the driver(s).

Good luck!