Hi,
We have implemented ISP layer with the following repo given by NXP to IMX8MP processor and we can capture/stream IMX219 camera without problem.
meta-imx8mp-isp-imx219
We use B0182 Arducam camera from Arducam, and it has a VCM module to drive lens. Before adding the DW9714 driver to kernel, we can access to VCM via I2C and control it by device address 0x0c. We can see that our vcm module works fine and we can make a manual focus while streaming. So we don't have any problem about the hardware. The device tree overlay of IMX219 and VCM is given below.
/* Verdin I2C_4_CSI SODIMM 93-95 */
&i2c3 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
vcm: dw9714@c {
// #address-cells = <1>;
// #size-cells = <0>;
compatible = "dongwoon,dw9714";
reg = <0x0c>;
id = <9714>;
vcc-supply = <®_3p3v>;
};
imx219: imx219@10 {
compatible = "sony,imx219";
reg = <0x10>;
clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
clock-names = "xclk";
assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
assigned-clock-rates = <24000000>;
csi_id = <0>;
pwn-gpios = <&gpio1 6 GPIO_ACTIVE_HIGH>;
rst-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
mclk = <24000000>;
mclk_source = <0>;
lens-focus = <&vcm>;
mipi_csi;
status = "okay";
port {
imx219_mipi_0_ep: endpoint {
remote-endpoint = <&mipi_csi0_ep>;
data-lanes = <1 2>;
clock-lanes = <0>;
clock-noncontinuous;
link-frequencies = /bits/ 64 <456000000>;
};
};
};
};
&mipi_csi_0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mipi_csi0_ep: endpoint {
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
data-lanes = <2>;
remote-endpoint = <&imx219_mipi_0_ep>;
};
};
};
&cameradev {
/delete-node/ mipi_csi_1;
};
&cameradev {
status = "okay";
};
&isi_0 {
status = "disabled";
};
&isi_1 {
status = "disabled";
};
&isp_0 {
status = "okay";
};
&dewarp {
status = "okay";
};
After that, we have added the vcm module driver to the kernel with the help of this forum thread. Acc. to this topic, vcm module driver contains dw9714_priv_ioctl. And also we have added the proper "focus-lens" node inside to the device tree of imx219. We can approve that when I start run.sh, this script loads kernel modules including imx219.ko, dw9714.ko is loaded automatically, and when I prompt lsmod, I can see that this module is used by imx219 module.
Now the problem begins. We use ./vvext 2 command to control camera features like AutoFocus. When I enter the proper inputs to vvext API, for example, enabling AF, setting mode to manual and setting AF Length to 100(other values are also tested) nothing hapens.
To analyze the problem, we have placed a debug lines to the IMX219_IsiFocusSetIss function, in the imx219.c code in the isp-imx repo. We have approved that when we apply vvext api command, isp-media-server enters focus functions. However these function are all empty and only contains TRACE log lines.
This topic also claims that these functions are empty. We have test isp-imx versions from 18 to 24 and all are the same.
To sum up, we can not run manual focus or auto focus vv_ext controls via API. Can you guide us to solve this problem?
Thanks in advance.
IMX8MPLUS MIPI-CAMERA #ISP #IMX219
Hello,
You need modify the driver for arducam since the MX219 works with auto focus.
Regards
Can you describe this more detail? What do you mean by modifying the driver?
I have added the code to driver as an example of ar1335_mipi.c driver.
However as I mentioned before the ISS drivers are empty for autofocus functions.