Hello Community,
I am trying to connect an OV9281 camera to a custom System-on-Module containing an i.MX93 (Compulab UCM-iMX93). I am using Linux kernel version 6.1.22 and I am compiling the driver included in the kernel source (drivers/media/i2c/ov9282.c) as a built-in module by adding CONFIG_VIDEO_OV9282=y to the kernel configuration.
The device tree that I am using is added below:
/dts-v1/;
#include "ucm-imx93.dtsi" // (includes NXP's imx93.dtsi)
#include "ucm-imx93-lvds.dtsi"
&cameradev {
status = "okay";
};
&isi_0 {
status = "okay";
cap_device {
status = "okay";
};
};
&lpi2c3 {
sensor_ov9281: camera@60 {
compatible = "ovti,ov9281";
reg = <0x60>;
clocks = <&clk IMX93_CLK_MIPI_PHY_CFG>;
reset-gpios=<&pca9555 11 GPIO_ACTIVE_HIGH>;
status="okay";
port {
ov9281_ep: endpoint {
remote-endpoint = <&mipi_csi_ep>;
data-lanes = <1 2>;
clock-lanes = <0>;
link-frequencies = /bits/ 64 <400000000>;
};
};
};
};
&mipi_csi {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mipi_csi_ep: endpoint {
remote-endpoint = <&ov9281_ep>;
data-lanes = <2>;
cfg-clk-range = <28>;
hs-clk-range = <0x2b>;
bus-type = <4>;
};
};
};
The following logs appear during boot:
[ 2.022852] mxc-isi 4ae40000.isi: mxc_isi.0 registered successfully
[ 2.030292] mx8-img-md: Registered mxc_isi.0.capture as /dev/video0
[ 2.042583] mxc-md 42800000.bus:camera: deferring csi device registration
[ 2.050356] dwc-mipi-csi2-host 4ae00000.csi: lanes: 2, name: mxc-mipi-csi2.0
[ 2.744418] mx8-img-md: Registered mxc_isi.0.capture as /dev/video0
[ 2.755665] mx8-img-md: Can't find i2c client device for camera@60
[ 2.762004] mx8-img-md: Unregistered all entities
The error "Can't find i2c client device" appears to come from the kernel module "imx8_media_dev". After boot, no V4L2 subdevice nodes are created under /dev/.
What are some possible reasons why this error might occur, and am I looking in the right place for troubleshooting the V4L2 problem ?
Any advice for troubleshooting this problem would be greatly appreciated.
Hi Chavira,
Thank you for confirming that the device tree looks good.
It looks like the camera is being detected at address 0x60 using i2cdetect.
root@ucm-imx93:~# i2cdetect -y 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: UU -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- UU UU UU UU -- -- -- -- -- -- -- --
60: 60 -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: 70 -- -- -- -- -- -- --
Enrique
Hi @enrique001!
Thank you for contacting NXP Support!
The device tree looks good, unfortunately, I don´t have access tho the camera and to your SOM.
You can get the documentation of the device tree configuration in the link below:
The problem looks like the i2c bus is not detecting the direction 0x60, I recommend using i2c-tools to detect the i2c direction using the command
i2cdetect -y 2
Best Regards!
Chavira
Hi @enrique001!
I see the port@0 defined in "ucm-imx93.dtsi" Do you delete the nodes &mipi_csi and sensor_mipi2 of the"ucm-imx93.dtsi"?
And please confirm if the i2c that you are using is the 2 or 3 because the command "i2cdetect -y 2" is for i2c2.
To check the i2c3 use the command "i2cdetect -y 3"
Best Regards!
Chavira