Hello,
I am currently working on integrating the IMX219 sensor with our custom IMX8MP board, using the ISP configuration.
We have ported the changes from the following repository into our custom Yocto layer: ( 6.6 sacrthgap KERNEL Version )
https://github.com/nxp-imx-support/meta-imx8mp-isp-imx219.
However, when running gst-launch-1.0 or v4l2-ctl commands, we are facing issues:
The pipeline captures the first frame with distortion but then gets stuck and does not proceed.
The image output is not proper.
Below are the details of our setup:
DTS configuration :
&i2c3 {
status = "okay";
imx219: imx219@10 {
compatible = "sony,imx219";
reg = <0x10>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_gpio_hog3>,<&pinctrl_gpio2>;
clock-names = "xclk";
clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
assigned-clocks = <&clk IMX8MP_CLK_IPP_DO_CLKO2>;
assigned-clock-parents = <&clk IMX8MP_CLK_24M>;
assigned-clock-rates = <24000000>;
mclk = <24000000>;
mclk_source = <0>;
csi_id=<0>;
pwn-gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
port {
imx219_to_mipi_csi2: endpoint {
remote-endpoint = <&mipi_csi_1_in>;
clock-lanes = <0>;
data-lanes = <1 2>;
clock-noncontinuous;
link-frequencies = /bits/ 64 <456000000>;
};
};
};
};
&cameradev {
status = "okay";
};
&mipi_csi_0 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port@0 {
reg = <0>;
mipi_csi_1_in: endpoint {
remote-endpoint = <&imx219_to_mipi_csi2>;
data-lanes = <2>;
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
};
};
};
&isp_0 {
status = "okay";
};
&isi_0 {
status = "disabled";
};
&isi_1 {
status = "disabled";
};
&dewarp {
status = "okay";
};
Logs :
root@imx8mp-evk:~# dmesg | grep -E "csi| imx219"
[ 0.046934] /soc@0/bus@30800000/i2c@30a40000/imx219@10: Fixed dependency cycle(s) with /soc@0/bus@32c00000/camera/csi@32e40000
[ 0.047689] /soc@0/bus@32c00000/camera/csi@32e40000: Fixed dependency cycle(s) with /soc@0/bus@30800000/i2c@30a40000/imx219@10
[ 0.056059] /soc@0/bus@30800000/i2c@30a40000/imx219@10: Fixed dependency cycle(s) with /soc@0/bus@32c00000/camera/csi@32e40000
[ 0.059422] /soc@0/bus@30800000/i2c@30a40000/imx219@10: Fixed dependency cycle(s) with /soc@0/bus@32c00000/camera/csi@32e40000
[ 0.062583] /soc@0/bus@32c00000/camera/csi@32e40000: Fixed dependency cycle(s) with /soc@0/bus@30800000/i2c@30a40000/imx219@10
[ 0.065077] /soc@0/bus@32c00000/camera/csi@32e40000: Fixed dependency cycle(s) with /soc@0/bus@30800000/i2c@30a40000/imx219@10
[ 0.065745] /soc@0/bus@30800000/i2c@30a40000/imx219@10: Fixed dependency cycle(s) with /soc@0/bus@32c00000/camera/csi@32e40000
[ 0.065843] /soc@0/bus@32c00000/camera/csi@32e40000: Fixed dependency cycle(s) with /soc@0/bus@30800000/i2c@30a40000/imx219@10
[ 1.930556] /soc@0/bus@32c00000/camera/csi@32e40000: Fixed dependency cycle(s) with /soc@0/bus@30800000/i2c@30a40000/imx219@10
[ 1.942193] /soc@0/bus@30800000/i2c@30a40000/imx219@10: Fixed dependency cycle(s) with /soc@0/bus@32c00000/camera/csi@32e40000
[ 5.841069] enter imx219_probe
[ 5.869886] imx219 2-0010: No sensor reset pin available
[ 5.871180] imx219_probe camera mipi imx219, is found
[ 6.011700] mxc-md 32c00000.bus:camera: deferring csi device registration
[ 6.062131] imx8_mipi_csi2_sam: module is from the staging directory, the quality is unknown, you have been warned.
[ 6.085889] mxc-mipi-csi2-sam 32e40000.csi: supply mipi-phy not found, using dummy regulator
[ 6.101666] : mipi_csis_imx8mp_phy_reset, No remote pad found!
[ 6.107667] mxc-mipi-csi2-sam 32e40000.csi: lanes: 2, hs_settle: 13, clk_settle: 2, wclk: 1, freq: 500000000
[ 6.577912] mx8-img-md: Registered sensor subdevice: imx219 2-0010 (1)
[ 6.577925] mx8-img-md: created link [imx219 2-0010] => [mxc-mipi-csi2.0]
[ 7.899921] scsi host0: usb-storage 1-1.2:1.0
[ 8.938510] scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.26 PQ: 0 ANSI: 6
[ 9.205826] enter imx219_remove
[ 9.438847] enter imx219_probe
[ 9.445992] imx219 2-0010: No sensor reset pin available
[ 9.455332] imx219_probe camera mipi imx219, is found
[ 9.527424] mx8-img-md: Registered sensor subdevice: imx219 2-0010 (1)
[ 9.536151] mx8-img-md: created link [imx219 2-0010] => [mxc-mipi-csi2.0]
[ 10.501160] scsi host0: usb-storage 1-1.2:1.0
[ 11.527747] scsi 0:0:0:0: Direct-Access SanDisk Cruzer Blade 1.26 PQ: 0 ANSI: 6
Pipeline Behavior and Logs During Capture: Command:
root@imx8mp-evk:~# gst-launch-1.0 v4l2src device=/dev/video2 ! videoconvert ! autovideosink sync=false
[ 239.695562] enter isp_mi_stop
[ 239.891296] enter isp_mi_stop
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
[ 240.400653] enter isp_mi_stop
[ 240.451547] enter isp_s_comp
[ 240.454467] enter isp_s_comp
[ 240.457462] enter isp_s_comp
[ 240.480579] enter wdr3_hw_init
[ 240.483684] wdr3 res: 1920 1080
[ 240.487183] enter isp_s_comp
[ 240.539054] enter isp_set_stream 1
[ 240.554111] enter isp_mi_start
Redistribute latency...
0:00:10.8 / 99:99:99.
OUTPUT :
Media Ouput :
root@imx8mp-evk:~# media-ctl -p
Media controller API version 6.6.74
Media device information
------------------------
driver mxc-md
model FSL Capture Media Device
serial
bus info platform:32c00000.bus:camera
hw revision 0x0
driver version 6.6.74
Device topology
- entity 1: mxc-mipi-csi2.0 (8 pads, 1 link)
type Node subtype V4L flags 0
device node name /dev/v4l-subdev0
pad0: Sink
<- "imx219 2-0010":0 [ENABLED,IMMUTABLE]
pad1: Sink
pad2: Sink
pad3: Sink
pad4: Source
pad5: Source
pad6: Source
pad7: Source
- entity 10: imx219 2-0010 (1 pad, 1 link, 0 routes)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev1
pad0: Source
[stream:0 fmt:SRGGB10_1X10/1920x1080 field:none]
-> "mxc-mipi-csi2.0":0 [ENABLED,IMMUTABLE]
I would appreciate any assistance or suggestions on how to resolve this issue.
Thanks & Regards,
Hardik
Hello,
Apparently you have to change the clock rate, I don't have your sensor at hand but iMX219 is very used with MX8MP.
regards