2154533_en-US

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

2154533_en-US

2154533_en-US

Settings to operate ov2740 camera on i.MX93 FRDM

Hi,

I am trying to operate an OV2740 camera module on the IMX93 FRDM board. 

And when I am trying to capture a frame, the v4l2-ctl hangs :

root@imx93frdm:~# v4l2-ctl -d /dev/video0 --set-fmt-video=width=1932,height=1092,pixelformat=BA10 --stream-mmap=4 --stream-count=1 --stream-to=test_capture.raw --verbose


VIDIOC_QUERYCAP: ok
VIDIOC_G_FMT: ok
VIDIOC_S_FMT: ok
Format Video Capture Multiplanar:
Width/Height : 1932/1092
Pixel Format : 'BA10' (10-bit Bayer GRGR/BGBG)
Field : None
Number of planes : 1
Flags :
Colorspace : sRGB
Transfer Function : Default
YCbCr/HSV Encoding: ITU-R 601
Quantization : Full Range
Plane 0 :
Bytes per Line : 3864
Size Image : 4219488
VIDIOC_REQBUFS returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_QUERYBUF returned 0 (Success)
VIDIOC_G_FMT returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_QBUF returned 0 (Success)
VIDIOC_STREAMON returned 0 (Success)


The media graph looks to be ok :

root@imx93frdm:~# media-ctl -p
Media controller API version 6.6.36

Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial
bus info platform:42800000.bus:camera
hw revision 0x0
driver version 6.6.36

Device topology
- entity 1: mxc_isi.0 (16 pads, 2 links, 0 routes)
type V4L2 subdev subtype Unknown flags 0
pad0: Sink
<- "mxc-mipi-csi2.0":4 [ENABLED]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Sink
pad5: Sink
pad6: Sink
pad7: Sink
pad8: Sink
pad9: Sink
pad10: Sink
pad11: Sink
pad12: Source
-> "mxc_isi.0.capture":0 [ENABLED]
pad13: Source
pad14: Source
pad15: Sink

- entity 18: mxc_isi.0.capture (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video0
pad0: Sink
<- "mxc_isi.0":12 [ENABLED]

- entity 22: mxc-mipi-csi2.0 (8 pads, 2 links)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "ov2740 2-0036":0 [ENABLED,IMMUTABLE]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Source
-> "mxc_isi.0":0 [ENABLED]
pad5: Source
pad6: Source
pad7: Source

- entity 31: ov2740 2-0036 (1 pad, 1 link, 0 routes)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[stream:0 fmt:SGRBG10_1X10/1932x1092 field:none
crop.bounds:(0,0)/1932x1092
crop:(0,0)/1932x1092]
-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]

My DTS :
&clk {
assigned-clocks = <&clk IMX93_CLK_CCM_CKO3>;
assigned-clock-parents = <&clk IMX93_CLK_24M>;
assigned-clock-rates = <24000000>;
};

ov2740_mipi: ov2740_mipi@36{
compatible = "ovti,ov2740";
reg = <0x36>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_cam_mclk>;
clocks = <&clk IMX93_CLK_CCM_CKO3>;
assigned-clocks = <&clk IMX93_CLK_CCM_CKO3>;
assigned-clock-rates = <24000000>; 
clock-names = "xclk";
clock-frequency = <24000000>;
reset-gpios = <&pcal6524 22 GPIO_ACTIVE_LOW>;
csi_id = <0>;
mipi_csi;
rotation = <0>;
orientation = <2>;
 
status = "okay";
 
port {
ov2740_mipi_ep: endpoint {
remote-endpoint = <&mipi_csi_in_ep>;
bus-type = <4>;
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies = /bits/ 64 <360000000>;
};
};

&cameradev {
status = "okay";
};
 
&isi_0 {
status = "okay";
 
cap_device {
status = "okay";
};
};
 
 
&mipi_csi {
status = "okay";
fsl,rx-lanes = <2>;
csis-hs-settle = <16>;
 
/* Port 0: sink from the sensor */
port@0 {
reg = <0>;
mipi_csi_in_ep: endpoint {
remote-endpoint = <&ov2740_mipi_ep>;
data-lanes = <2>;
cfg-clk-range = <28>;
hs-clk-range = <0x16>;
bus-type = <4>;
clock-noncontinuous; 
};
};
};

The driver is the ov2740 driver from the linux-imx scargapth. I modified it to match the DT and I changed the PLL configuration to match a 24MHz clock :

Here is the camera data-sheet :
www.elinfor.com/pdf/OmniVision/OV2740-OmniVision.pdf

Note that my module regulators are connected to the 3.3 volt, because of this, I didn't define regulators in the DTS 

Any advice 

BR
Basel 





Re: Settings to operate ov2740 camera on i.MX93 FRDM

Hi @BaselHn!

You can request customized drivers through the following link:


https://www.nxp.com/support/support/nxp-engineering-services/professional-support-for-processors-and...


Best regards,
Chavira

Re: Settings to operate ov2740 camera on i.MX93 FRDM

Hi @Chavira 

What are the options for support in this case? 

BR
Basel

Re: Settings to operate ov2740 camera on i.MX93 FRDM

Hi @BaselHn!


Unfortunately, the OV2740 camera module is not officially supported on the i.MX93 platform. The current Linux BSP, device tree configurations, and drivers are not set up to work with this sensor, which may explain the issues you're encountering with v4l2-ctl hanging during frame capture 1.

For optimal compatibility and performance, we recommend using one of the validated camera modules for the i.MX93-FRDM board. These modules are tested and supported within the BSP, ensuring smoother integration and functionality.

If you still wish to proceed with the OV2740, it would require custom driver development and device tree modifications, which fall outside the scope of standard support.


Best regards,
Chavira

Re: Settings to operate ov2740 camera on i.MX93 FRDM

Hi @Chavira 

Which drivers are not configured to work with it ? 
What we need to patch to make them work  with this camera module ? 

BR 
Basel 

Re: Settings to operate ov2740 camera on i.MX93 FRDM

Hi @BaselHn ,

Unfortunately, that camera is not supported on the iMX93 platform. The current Linux BSP, device tree, and drivers are not configured to work with it.

Best regards,
Chavira

Re: Settings to operate ov2740 camera on i.MX93 FRDM

Hi @Chavira 

What do you mean it is not supported and why? 


Is this means it was not tested on the board?

The RPI cam is with ISP what is not need in our application.

BR
Basel

Re: Settings to operate ov2740 camera on i.MX93 FRDM

HI @BaselHn!

Thank you for contacting NXP Support!

Unfortunately, the camera you're referring to is not currently supported on i.MX93 processors. We recommend using one of the validated camera modules for the i.MX93-FRDM board instead.

A good option is the RPI-CAM-MIPI, which has been tested and confirmed to work reliably with this platform.


Best regards,

Chavira

タグ(1)
評価なし
バージョン履歴
最終更新日:
‎11-21-2025 11:39 PM
更新者: