How to test raw camera sensor for imx8m mini

cancel
Showing results for 
Search instead for 
Did you mean: 

How to test raw camera sensor for imx8m mini

2,243 Views
hiectai
Contributor III

Hello community
I am developing drivers for raw8 camera sensor based on ov5647_mipi.c using for board imx8m mini EVK.
I have identified the camera and confirmed the pixel format is BA81 as the log below. I tried many gstreamer commands to save the .raw file but all failed.

***************************************************************

root@imx8mmevk:~# insmod gc2053_camera_mipi_113.ko
[ 395.316860] gc2053_mipi 2-0037: 2-0037 supply DOVDD not found, using dummy regulator
[ 395.324696] gc2053_mipi 2-0037: 2-0037 supply DVDD not found, using dummy regulator
[ 395.332457] gc2053_mipi 2-0037: 2-0037 supply AVDD not found, using dummy regulator
[ 396.288841] mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: gc2053_mipi 2-0037
[ 396.297214] camera gc2053_mipi is found
root@imx8mmevk:~# v4l2-ctl --list-formats-ext -d /dev/video0
ioctl: VIDIOC_ENUM_FMT
Index : 0
Type : Video Capture
Pixel Format: 'BA81'
Name : 8-bit Bayer BGBG/GRGR
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1280x720
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 1920x1080
Interval: Discrete 0.033s (30.000 fps)
Interval: Discrete 0.033s (30.000 fps)
Size: Discrete 2592x1944
Interval: Discrete 0.067s (15.000 fps)

root@imx8mmevk:~#

***************************************************************
Let me ask which gstreamer command is used to check the raw camera sensor for imx8? How to know the camera works well?
Thank so much.

0 Kudos
4 Replies

1,569 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi タイ チャン

nxp linux bsp supports MIPI CSI camera (part number: MINISASTOCSI)

for camera capture one can use following command:
gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080 ! waylandsink

Unfortunately currently there is no documentation for adding support for new camera, may be useful to check:

mxc_v4l2_test\test - imx-test - i.MX Driver Test Application Software 

https://boundarydevices.com/yocto-release-for-i-mx-8mm/ 

DART-MX8M CSI - Variscite Wiki 

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,025 Views
rjm
Contributor IV

And how can I get it working with 2021's Linux version 5.10.9-1.0.0+g32513c25d8c7, as is flashed from the LF_v5.10_1.0.0_images_IMX8MMEVK download?

I did use the default .dtb-file - it is documented in this forum that it already incorporates ov5640.

kernel boot snippet:

[    1.582147] i2c /dev entries driver 
[    1.586398] mx6s-csi 32e20000.csi1_bridge: initialising
[    1.592314] mxc_mipi-csi 32e30000.mipi_csi: supply mipi-phy not found, using dummy
regulator
[    1.601053] mxc_mipi-csi 32e30000.mipi_csi: mipi csi v4l2 device registered
[    1.608041] CSI: Registered sensor subdevice: mxc_mipi-csi.0
[    1.613728] mxc_mipi-csi 32e30000.mipi_csi: lanes: 2, hs_settle: 13, clk_settle: 2
, wclk: 1, freq: 33300000

And some command line actions:

root@imx8mmevk:~# v4l2-ctl --list-devices 
i.MX6S_CSI (platform:32e20000.csi1_bridge):
       /dev/video0
root@imx8mmevk:~# gst-launch-1.0 v4l2src device=/dev/video0 ! autovideosink  
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data stream
error.
Setting pipeline to PLAYING ...
Additional debug info:
../git/libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline0
/GstV4l2Src:v4l2src0:
streaming stopped, reason not-negotiated (-4)
ERROR: pipeline doesn't want to preroll.
Execution ended after 0:00:00.000499292
Setting pipeline to NULL ...
Total showed frames (0), playing for (0:00:00.000552408), fps (0.000).
Freeing pipeline ...

Finally, executing ./autorun-v4l2.sh results in:

autorun-v4l2.sh not supported on current soc

Please advice me!

 

0 Kudos

1,004 Views
rjm
Contributor IV

NXP, please verify the correct operation of the standard MINISASTOCSI adapter with built-in camera - with the EVKB-board revision. The adapter/camera is received from ARROW electronics for test usage for a few weeks only. Then the unit must be returned.

0 Kudos

858 Views
rjm
Contributor IV

It has been pointed out that the camera was inserted the false way into the header - which does not have any provision to prevent this through polarization in the geometry.

The camera test works with Gatesgarth as well as with Hardknott edition.

0 Kudos