Hi,
We are trying to integrate ADV7282A-M with i.MX8MQ using the MIPI CSI2 interface and Linux Kernel.
We are using the open source ADV7282A-M driver: drivers/media/i2c/adv7180.c from Kernel Version 4.14.98 (from NXP BSP: imx-yocto-L4.14.98_2.2.0)
While testing, we are not receiving any frames, however the gstreamer command is not throwing any errors.
It seems that V4L2 QBUF IOCTLS are called, however DQBUF IOCTLS is not called since we are not receiving any frames.
We have few questions in this regard.
1)
Following is my DTS config:
adv7282_mipi2: adv7282_mipi2@21 {
compatible = "adi,adv7282-m";
reg = <0x21>;
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi2_pwn>, <&pinctrl_csi_rst>;
clocks = <&clk IMX8MQ_CLK_CLKO2>;
clock-names = "csi_mclk";
assigned-clocks = <&clk IMX8MQ_CLK_CLKO2>;
assigned-clock-parents = <&clk IMX8MQ_SYS2_PLL_200M>;
assigned-clock-rates = <20000000>;
csi_id = <1>;
pwn-gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
mclk = <24000000>;
mclk_source = <0>;
cvbs = <1>;
port {
adv7282_mipi2_ep: endpoint {
remote-endpoint = <&mipi2_sensor_ep>;
};
};
};
I am not certain what should be the MIPI DPHY clock. Currently, I have programmed it to 24MHz.
However, I am observing almost all possible errors on the MIPI controller of i.MX8MQ
root@imx8mqevk:~# /unit_tests/memtool -32 0x30b6010C 1
E
Reading 0x1 count starting at address 0x30B6010C
0x30B6010C: 0000003E
[0] – crc error
[1] – one bit ecc error
[2] – two bit ecc error
[3] – ULPS status change
[4] – DPHY ErrSotHS has occurred
[5] – DPHY ErrSotSync_HS has occurred
[6] – DPHY ErrEsc has occurred
[7] – DPHY ErrSyncEsc has occurred
[8] – DPHY ErrControl has occurred
2)
Will you have any guidelines on how to debug this. What status registers should I check on the ADV7282A-M side. I am only doing color bar at the moment.
3)
Also, do you have any Test Application (similar to mxc_v4l2_tvin.c) to use to verify the adv7180 Linux Driver. Currently, I am using gstreamer as follows:
gst-launch-1.0 -v --gst-debug-level=2 v4l2src device=/dev/video1 norm=PAL ! 'video/x-raw, format=(string)UYVY,width=720,height=480,framerate=(fraction)30/1,interlace-mode=(string)interlaced' ! videoconvert ! autovideosink
However, many of the driver V4L2 IOCTLS are not being called, for example adv7180_s_std IOCTL callback is not called.
4)
I also noticed an application note: AN-1337, which mentions the following:
Some MIPI CSI-2 receivers wait for an LP to HS mode
transition on the MIPI CSI-2 clock lane before starting video
capture. However, the LP to HS mode transition on the MIPI CSI-2
clock lane occurs only once on the ADV7280-M, ADV7281-M,
ADV7281-MA, and ADV7282-M immediately after they are
initially programmed.
Is this toggle required for i.MX8MQ MIPI CSI2 Controller. Has anyone faced this issue with imx series processors.