Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 4140

Interfacing (DSI, CSI, I2C, etc.) • Re: MIPI CSI2 device driver for 1D iamge sensor

$
0
0
Hi, 6by9,

I changed MEDIA_BUS_FMT_UYVY8_1X16 to MEDIA_BUS_FMT_Y10_1X10 in my driver source code.
And in dts file, I changed data-lanes (1 -> 2)
I realized that my sensor uses 2 lanes mipi.

I tried some commands.

Code:

v4l2-ctl --list-formats-ext

Code:

ioctl: VIDIOC_ENUM_FMT        Type: Video Capture        [0]: 'Y10P' (10-bit Greyscale (MIPI Packed))        [1]: 'Y10 ' (10-bit Greyscale)

I set format with it.

Code:

v4l2-ctl -v width=1024,height=1024,pixelformat=Y10P

in dmseg

Code:

[  145.490329] unicam fe801000.csi: __subdev_get_format 1024x1024 code:200a[  145.490384] unicam fe801000.csi: unicam_calc_format_size_bpl: fourcc: 50303159 size: 1024x1024 bpl:1280 img_size:1310720[  145.490401] unicam fe801000.csi: __subdev_set_format 1024x1024 code:200a[  145.490413] unicam fe801000.csi: __subdev_get_format 1024x1024 code:200a[  145.490423] unicam fe801000.csi: unicam_calc_format_size_bpl: fourcc: 50303159 size: 1024x1024 bpl:1280 img_size:1310720[  145.490435] unicam fe801000.csi: unicam_s_fmt_vid_cap 1024x1024, mbus_fmt 0x0000200A, V4L2 pix 0x50303159.

Then, I tried to get stream

Code:

v4l2-ctl --stream-mmap=3 --stream-to=test.raw --stream-count=1
in dmseg

Code:

[  504.225509] unicam fe801000.csi: __subdev_get_format 1024x1024 code:200a[  504.225647] unicam fe801000.csi: Running with 2 data lanes[  504.230750] unicam fe801000.csi: __subdev_get_format 1024x1024 code:200a
Some dmseg messages were changed, but there are no responses again.

Which is the simplest way to get MIPI data? (just I need raw data)
My sensor is very unique, so I think use FPGA for convert and stream data, then receive it is the easiest.
(I'm considering using dummy sensor driver)
https://github.com/6by9/linux/tree/rpi ... my-sensor

Thank you for your help.

Statistics: Posted by Koyuki — Fri Sep 27, 2024 2:20 am



Viewing all articles
Browse latest Browse all 4140

Trending Articles