Hi
I'm trying to use the ADV7282M Video decoder with a iMX8MM Board and the Mainline ADV7180 Driver. I've added CONFIG_VIDEO_ADV7180=m to my Kernel config.
My device tree looks like this
&i2c2 {
clock-frequency = <100000>;
pinctrl-names = "default", "gpio";
pinctrl-0 = <&pinctrl_i2c2>;
pinctrl-1 = <&pinctrl_i2c2_gpio>;
scl-gpios = <&gpio5 16 GPIO_ACTIVE_HIGH>;
sda-gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>;
status = "okay";
adv728x_mipi1: adv728x_mipi1@21 {
status = "okay";
compatible = "adi,adv7282-m";
reg = <0x21>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_csi1>;
clocks = <&clk IMX8MM_CLK_CLKO1>;
clock-names = "csi_mclk";
csi_id = <0>;
pwn-gpios = <&gpio5 12 GPIO_ACTIVE_HIGH>;
rst-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
mclk = <24000000>;
mclk_source = <0>;
port {
adv728x_mipi1_ep: endpoint {
remote-endpoint = <&mipi1_sensor_ep>;
};
};
};
[...]
&mipi_csi_1 {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
port {
mipi1_sensor_ep: endpoint@1 {
remote-endpoint = <&adv728x_mipi1_ep>;
data-lanes = <1>;
csis-hs-settle = <13>;
csis-clk-settle = <2>;
csis-wclk;
};
csi1_mipi_ep: endpoint@2 {
remote-endpoint = <&csi1_ep>;
};
};
};
[...]
Also added the following to mipi_csis_formats
{
.code = MEDIA_BUS_FMT_UYVY8_2X8,
.fmt_reg = MIPI_CSIS_ISPCFG_DOUBLE_CMPNT | MIPI_CSIS_ISPCFG_FMT_YCBCR422_8BIT,
.data_alignment = 16,
}
The Video decoder seems to get initialized correctly according to dmesg
# dmesg | grep adv
[ 15.738849] adv7180 1-0021: chip found @ 0x21 (30a30000.i2c)
[ 15.769008] mxc_mipi-csi 32e30000.mipi_csi: Registered sensor subdevice: adv7180 1-0021
But when trying to capture, I get the following Error
# gst-launch-1.0 v4l2src device=/dev/video0 norm=PAL ! video/x-raw,format=UYVY,width=720,height=480,framerate=30/1 ! jpegenc ! avimux ! filesink location=mjpeg.avi
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
(gst-launch-1.0:634): GStreamer-CRITICAL **: 14:53:19.617: range start is not smaller than end for `GstIntRange'
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device '/dev/video0' cannot capture at 720x480
Additional debug info:
gstv4l2object.c(3888): gst_v4l2_object_set_format_full (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Tried to capture at 720x480, but device returned size 720x240
Execution ended after 0:00:00.041957693
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...
Hello kbch,
It looks like you have another format in stream, the module is ok: please get support formats:
$ v4l2-ctl -d /dev/video0 --list-formats-ext
and specify it in the pipeline:
$ gst-launch-1.0 v4l2src device=/dev/video0 ! <b>video/x-raw,format=YUY2,width=720, height=480,framerate=30/1</b> ! 'video/x-raw(memory:NVMM),format=NV12' ! overlaysink