Hi, my name is Victor and I'm in a project where we're trying to send image from a custom 4-lane camera to the IMX8MP (in a imx8mp-evk board) using the MIPI-CSI2 interface but I'm stuck trying to make it work.
I want to modify the ov5640 config and drivers but I'm not sure how many things I have to change. I'm ony interested in make it work sending image, the I2C is not needed at this moment and the camera is conected to the MIPI_CSI_0.
1) Is it enough if I modify the device tree configuration? which parameters do I have to modify? This is the configuration that I'm using:
imx8mp.dtsi:
mipi_csi_0: csi@32e40000 {
compatible = "fsl,imx8mp-mipi-csi", "fsl,imx8mn-mipi-csi";
reg = <0x32e40000 0x10000>;
interrupts = <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
clock-frequency = <500000000>;
clocks = <&clk IMX8MP_CLK_MEDIA_CAM1_PIX>,
<&clk IMX8MP_CLK_MEDIA_AXI>,
<&clk IMX8MP_CLK_MEDIA_APB>;
clock-names = "mipi_clk", "disp_axi", "disp_apb";
assigned-clocks = <&clk IMX8MP_CLK_MEDIA_CAM1_PIX>;
assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_1000M>;
assigned-clock-rates = <500000000>;
bus-width = <4>;
csi-gpr = <&mediamix_gasket0>;
gpr = <&mediamix_blk_ctl>;
no-reset-control;
power-domains = <&mipi_phy1_pd>;
status = "disabled";
};
imx8mp-evk.dts:
&mipi_csi_0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mipi_csi0_ep: endpoint {
remote-endpoint = <&ov5640_mipi_0_ep>;
data-lanes = <4>;
};
};
};
2) Do I have to modify the ov5640 driver too? I've located this driver: ov5640_mipi_v2.c but not sure about it
Just modifying the device tree if I try to build a pipe with gstreamer to read from video0 I'm getting this error:
gst-launch-1.0 -v v4l2src ! "video/x-bayer,format=bggr,width=640,height=480,framerate=30/1" ! bayer2rgb ! videoconvert ! autovideosink sync=false
Setting pipeline to PAUSED ...
ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' is not a capture device.Additional debug info:
../../../git/sys/v4l2/v4l2_calls.c(677): gst_v4l2_open (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Capabilities: 0x4204000
Setting pipeline to NULL ...
Freeing pipeline ...
Also the configuration read from v412-ctl tool is:
v4l2-ctl --list-devices
mxc-isi-m2m (platform:32e00000.isi:m2m_devic):
/dev/video0
v4l2-ctl --list-formats-ext
ioctl: VIDIOC_ENUM_FMT
Type: Video Capture Multiplanar
[0]: 'RGBP' (16-bit RGB 5-6-5)
[1]: 'RGB3' (24-bit RGB 8-8-8)
[2]: 'BGR3' (24-bit BGR 8-8-8)
[3]: 'YUYV' (YUYV 4:2:2)
[4]: 'YUV4' (32-bit A/XYUV 8-8-8-8)
[5]: 'NV12' (Y/CbCr 4:2:0)
[6]: 'YM24' (Planar YUV 4:4:4 (N-C))
[7]: 'XR24' (32-bit BGRX 8-8-8-8)
[8]: 'AR24' (32-bit BGRA 8-8-8-8)
Please any help will be appreciated
I just used the evk dts as a base. Should I use the Hassler one to get the camera working?
I just got my imx8mp board, firstly, pls tell me what bsp version you use? let me reproduce this
Did you get any where with this? It is important to get the capture device functioning.
Hi, the BSP we're curently using is the 5.4.47.
Any help will be appreciated,
Thanks