Hello,
I am Younghun Jung, a researcher at LKROBOTICCS.
Based on the IMX8MP EVK reference design, we have developed a custom board for robotics applications. Currently, we are trying to connect a CSI camera, but we are encountering issues.
As mentioned earlier, we referred to the EVK design when creating our schematic and mapped the camera pins accordingly. However, instead of the OV5640 defined on the EVK, we are using the IMX219 (Raspberry Pi Camera Module V2). We modified the DTS to recognize this device.
I2C communication seems to be working, and the IMX219 driver appears to load. However, we continue to encounter errors, and the OV5640 (which we removed from the DTS) still appears to be loaded.
Here are the relevant boot log messages:
root@imx8mpevk:~# dmesg | grep -i csi
[ 0.145106] platform 32e40000.csi: Fixed dependency cycle(s) with /soc@0/bus@30800000/i2c@30a30000/ov5640_mipi@3c
[ 0.158626] SCSI subsystem initialized
[ 0.246405] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 243)
[ 2.164387] mxc-mipi-csi2-sam 32e40000.csi: supply mipi-phy not found, using dummy regulator
[ 2.173324] : mipi_csis_imx8mp_phy_reset, No remote pad found!
[ 2.179251] mxc-mipi-csi2-sam 32e40000.csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 500000000
root@imx8mpevk:~# dmesg | grep ov5640
[ 0.145106] platform 32e40000.csi: Fixed dependency cycle(s) with /soc@0/bus@30800000/i2c@30a30000/ov5640_mipi@3c
[ 2.715804] ov5640 1-003c: supply DOVDD not found, using dummy regulator
[ 2.722633] ov5640 1-003c: supply AVDD not found, using dummy regulator
[ 2.729306] ov5640 1-003c: supply DVDD not found, using dummy regulator
[ 2.767596] ov5640 1-003c: ov5640_write_reg: error: reg=3008, val=42
[ 2.774792] ov5640 1-003c: ov5640_write_reg: error: reg=3103, val=11
[ 2.781781] ov5640 1-003c: ov5640_read_reg: error: reg=3108
[ 2.787410] ov5640 1-003c: failed to power on
Below is the relevant portion of the modified DTS:
{
soc@0 {
bus@30800000 {
i2c@30a30000 {
imx219_mipi@10 {
compatible = "sony,imx219";
reg = <0x10>;
pinctrl-names = "default";
pinctrl-0 = <0x37 0x38 0x39>;
clocks = <0x02 0xa5>;
clock-names = "xclk";
assigned-clocks = <0x02 0xa5>;
assigned-clock-parents = <0x02 0x02>;
assigned-clock-rates = <0x16e3600>;
vana-supply = <&{/regulator-pcie}>;
vdig-supply = <&{/regulator-pcie}>;
vddl-supply = <&{/regulator-pcie}>;
powerdown-gpios = <0x3a 0x0b 0x00>;
status = "okay";
phandle = <0xed>;
port {
imx219_out0_ep: endpoint {
remote-endpoint = <&csi0_in_ep>;
data-lanes = <0x01 0x02>;
clock-lanes = <0x00>;
link-frequencies = /bits/ 64 <456000000>;
};
};
};
};
i2c@30a40000 {
imx219_mipi@10 {
compatible = "sony,imx219";
reg = <0x10>;
pinctrl-names = "default";
pinctrl-0 = <0x37 0x38 0x39>;
clocks = <0x02 0xa5>;
clock-names = "xclk";
assigned-clocks = <0x02 0xa5>;
assigned-clock-parents = <0x02 0x02>;
assigned-clock-rates = <0x16e3600>;
csi_id = <0x00>;
vana-supply = <&{/regulator-pcie}>;
vdig-supply = <&{/regulator-pcie}>;
vddl-supply = <&{/regulator-pcie}>;
powerdown-gpios = <0x3a 0x0b 0x00>;
mclk = <0x16e3600>;
mclk_source = <0x00>;
mipi_csi;
status = "disabled";
phandle = <0xf1>;
port {
imx219_out1_ep: endpoint {
remote-endpoint = <&csi1_in_ep>;
data-lanes = <0x01 0x02>;
clock-lanes = <0x00>;
link-frequencies = /bits/ 64 <456000000>;
};
};
};
};
};
};
bus@32c00000 {
camera {
csi@32e40000 {
compatible = "fsl,imx8mp-mipi-csi\0fsl,imx8mn-mipi-csi";
reg = <0x32e40000 0x10000>;
interrupts = <0x00 0x11 0x04>;
clock-frequency = <0x1dcd6500>;
clocks = <0x02 0x10f 0x02 0x61 0x02 0x10d>;
clock-names = "mipi_clk\0disp_axi\0disp_apb";
assigned-clocks = <0x02 0xaa>;
assigned-clock-parents = <0x02 0x41>;
assigned-clock-rates = <0x1dcd6500>;
bus-width = <0x04>;
csi-gpr = <0x76>;
gpr = <0x5d>;
power-domains = <0x5d 0x01>;
status = "okay";
phandle = <0x111>;
port {
csi0_in_ep: endpoint {
remote-endpoint = <&imx219_out0_ep>;
data-lanes = <0x01 0x02>;
clock-lanes = <0x00>;
csis-hs-settle = <0x0d>;
csis-clk-settle = <0x02>;
csis-wclk;
};
};
};
csi@32e50000 {
compatible = "fsl,imx8mp-mipi-csi\0fsl,imx8mn-mipi-csi";
reg = <0x32e50000 0x10000>;
interrupts = <0x00 0x50 0x04>;
clock-frequency = <0xfdad680>;
clocks = <0x02 0x110 0x02 0x61 0x02 0x10d>;
clock-names = "mipi_clk\0disp_axi\0disp_apb";
assigned-clocks = <0x02 0xad>;
assigned-clock-parents = <0x02 0x36>;
assigned-clock-rates = <0xfdad680>;
bus-width = <0x04>;
csi-gpr = <0x78>;
gpr = <0x5d>;
power-domains = <0x5d 0x04>;
status = "disabled";
#address-cells = <0x01>;
#size-cells = <0x00>;
phandle = <0x112>;
port@0 {
reg = <0x00>;
csi1_in_ep: endpoint {
remote-endpoint = <&imx219_out1_ep>;
data-lanes = <0x01 0x02>;
clock-lanes = <0x00>;
csis-hs-settle = <0x0d>;
csis-clk-settle = <0x02>;
csis-wclk;
};
};
};
};
};
}
Despite removing OV5640 and adding IMX219 definitions, the kernel still attempts to load OV5640, and IMX219 initialization fails.
Could you please review the DTS modifications and help us identify what we may have done incorrectly, and how we can properly enable IMX219 while preventing OV5640 from loading?
Thank you in advance for your support.
Best regards,
Younghun Jung
LKROBOTICCS