imx8mq 4 lane mipi csi configuration

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx8mq 4 lane mipi csi configuration

Jump to solution
3,007 Views
dennis3
Contributor V

There are a couple of threads where 4 lane configuration CSI is not working.

 * Camera porting guide for MIPI-CSI2 on i.MX8M? -> Maybe it's a clock rate problem?, No porting guide available.

 * iMX8M MIPI-CSI 4-lane configuration -> Never got it to work, switched to single lane.

 

Does anyone have this working with a 4-lane camera?  If so, what additional changes were required?

I've configured my mipi_csi endpoint/device for 4 lanes correctly (at least I think from the log)

3.102329] mxc-mipi-csi2_yav 30a70000.mipi_csi1: mipi_csi2_probe
[ 3.108554] CSI: Registered sensor subdevice: mxc-mipi-csi2.0
[ 3.114394] mxc-mipi-csi2_yav 30a70000.mipi_csi: Remote device at /mipi_csi1@30a70000/port/endpoint1 XXX found
[ 3.124432] mxc-mipi-csi2_yav 30a70000.mipi_csi1: lanes: 4, name: mxc-mipi-csi2.0
[ 3.154081] mxc-mipi-csi2_yav 30a70000.mipi_csi: Registered sensor subdevice: mycamera 0-0060

The data format is the same as the example Ov5640 camera.  (YUYV 422 format).

I'm having the same result as other threads where v4l2 fails to dequeue buffers after I start the stream.  I've verified 4 lane mipi data is being driven from the device.  We are using a camera ISP to process raw camera data before receiving it at the imx side.  We've used this same ISP and sensor on our imx6 solution and have no problems receiving the data on that platform.  I don't however know if there are changes in the i.mx8m receiver that would require us to change anything about the data.

Any ideas for debugging or suggestions appreciated.

Labels (1)
0 Kudos
1 Solution
2,538 Views
dennis3
Contributor V

I found another post detailing clock settings for the imx8 and 4-lane cameras.  If anyone else runs across this, these are the recommended clocks I used in the mipi_csi_1:

assigned-clock-rates = <266000000>, <333000000>, <66000000

View solution in original post

0 Kudos
4 Replies
2,539 Views
dennis3
Contributor V

I found another post detailing clock settings for the imx8 and 4-lane cameras.  If anyone else runs across this, these are the recommended clocks I used in the mipi_csi_1:

assigned-clock-rates = <266000000>, <333000000>, <66000000

0 Kudos
2,538 Views
dennis3
Contributor V

Just wanted to add a note this issue is not solved.  We need 4 lane configuration for our sensor to deliver higher resolution images.

However, i the mean time, we can also work with 1080p images over 2 lane mipi.  We are still looking for guidance on how to move from 2 lane to 4 lane mipi.  What is required in the DTS file aside from changing the lane configuration in the mipi_csi controller?  Clock change required?  Some other registers?  Driver bugs?  Thank you for any input.

0 Kudos
2,538 Views
joanxie
NXP TechSupport
NXP TechSupport

what camera do you use and what raw data do you need? and check if current bsp supports your raw data or not, refer to the source code from “drivers/media/platform/mxc/capture/mx6s_capture.c“

0 Kudos
2,538 Views
dennis3
Contributor V

I believe these details are documented in the original post.  I there something specific you are curious about?

We already know the data format is supported (yuv422) and we know the data is received properly. With 2 lanes only enabled we can receive 1920x1080 images and Android can display them in the camera app.  The reason we need 4 lanes enabled is to move to higher resolution and frame rate images/video.

0 Kudos