Part Number: DRA754
Tool/software: Linux
We have connected adv7182 video decoder to vin3a of video input port (vip) on J6 for one of our target. Available driver of adv7182 (drivers/media/i2c/adv7180.c) is used as v4l2 subdev. Subdev registering successful with vip driver and device node for this is coming, but video capture is failing. Time-out error is coming. Before going for start of streaming, vpdma and vip setup and irq enable seems ok, code flow is as expected. Setting ADV7182 chip to run on free-run mode, it’s clear in status3 register that, it is getting set to run on free-run mode. But no interrupt is seen on vip.
Below are the few details:
- This is the dts change:
/* ADV7182 Video encoder */
&vip2 {
status = "okay";
};
&vin3a {
status = "okay";
endpoint@0 {
slave-mode;
remote-endpoint = <&adv7182>;
};
};
&i2c2 {
status = "okay";
clock-frequency = <400000>;
adv7182-in@20 {
compatible = "adi,adv7182";
reg = <0x20>;
pwrdwn-gpio = <&gpio6 4 GPIO_ACTIVE_HIGH>;
reset-gpio = <&gpio6 18 GPIO_ACTIVE_HIGH>;
intrq-gpio = <&gpio5 16 GPIO_ACTIVE_LOW>;
remote = <&vip2>;
port {
adv7182: endpoint {
buswidth = <8>;
remote-endpoint = <&vin3a>;
channels = <0>;
};
};
};
};
- Setting it to Embedded Sync Bt.656 and 8b data interface.
- Kernel version is GSSDK 3.01. *Added “adv7180_s_stream” function extra on top of this, in adv7180.c driver.
- Log looks like this;
[ 2.766616] vip2-s0: vip_set_slice_path:
[ 2.774831] vip2-s0: vip_set_slice_path: DATA_PATH_SELECT(0000010C): 80008000
[ 2.782678] vip2-s1: vip_set_slice_path:
[ 2.790990] vip2-s1: vip_set_slice_path: DATA_PATH_SELECT(00000110): 80008000
[ 2.798482] vip 48990000.vip: loading firmware vpdma-1b8.bin
OMAP_HSMMC_HL_HWINFO = 0x0 memsize = 0x0
[ 2.818544] vip 48990000.vip: VPDMA firmware loaded
[ 2.838065] vip2-s0: endpoing is registered
[ 2.846825] vip2-s0: register async notifier for 1 subdevs
mnt# insmod adv7180.ko
[ 31.979539] adv7180 1-0020: chip found @ 0x20 (OMAP I2C adapter)
[ 32.054377] vip2-s0: vip_async_bound
[ 32.058115] vip2-s0: Port A: Using subdev adv7180 1-0020 for capture
[ 32.065199] vip2-s0: subdev adv7180 1-0020: code: 2006 idx: 0
[ 32.071510] vip2-s0: matched fourcc: YUYV: code: 2006 idx: 0
[ 32.093108] vip2-s0: device registered as video0
[ 32.103259] vip2-s0: vip_async_complete
[ 32.109483] vip2-s0: vip_open
[ 32.109527] vip2-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:YUYV size: 720x480
[ 32.109541] vip2-s0: calc_format_size: fourcc:YUYV size: 720x480 bpl:1440 img_size:691200
[ 32.109547] vip2-s0: init_stream fourcc:YUYV size: 720x480 bpl:1440 img_size:691200
[ 32.109551] vip2-s0: init_stream vpdma data type: 0x07
[ 32.109556] vip2-s0: vip_init_stream: stream instance 0xec46a800
[ 32.109718] vip2-s0: vip_release
[ 32.109727] vip2-s0: vip_release_stream: stream instance 0xec46a800
[ 32.109733] vip2-s0: vip_release_port: port instance 0xee97f810
Running the test application:
:/mnt# ./capture
*** starting the application ***
[ 36.193749] vip2-s0: vip_open
[ 36.227863] vip2-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:YUYV size: 720x480
[ 36.243799] vip2-s0: calc_format_size: fourcc:YUYV size: 720x480 bpl:1440 img_size:691200
[ 36.252638] vip2-s0: init_stream fourcc:YUYV size: 720x480 bpl:1440 img_size:691200
[ 36.260921] vip2-s0: init_stream vpdma data type: 0x07
[ 36.266291] vip2-s0: vip_init_stream: stream instance 0xec46a800
[ 36.294565] vip2-s0: cropped (0,0)/720x480 of 720x480
[ 36.304630] vip2-s0: s_fmt input fourcc:YUYV size: 720x576
[ 36.318473] vip2-s0: try_fmt fourcc:YUYV size: 720x576
[ 36.324260] vip2-s0: try_fmt best subdev size: 0x0
[ 36.335750] vip2-s0: calc_format_size: fourcc:YUYV size: 128x128 bpl:256 img_size:32768
[ 36.344504] vip2-s0: s_fmt try_fmt fourcc:YUYV size: 128x128
[ 36.350712] vip2-s0: s_fmt fourcc:YUYV size: 128x128 bpl:256 img_size:32768
[ 36.357997] vip2-s0: s_fmt pix_to_mbus mbus_code: 2006 size: 0x0
[ 36.400192] vip2-s0: s_fmt subdev fmt mbus_code: 2006 size: 720x480
[ 36.406749] vip2-s0: s_fmt vpdma data type: 0x07
[ 36.428627] vip2-s0: get 4 buffer(s) of size 32768 each.
[ 36.476174] vip2-s0: Added mmr_adb config desc
[ 36.481404] vip2-s0: Added sc_coeff_h config desc
[ 36.486372] vip2-s0: Added sc_coeff_v config desc
[ 36.492254] vip2-s0: CFD_SC_CLIENT 7 slice_id: 0
[ 36.497125] vip2-s0: Submitting desc on list# 0
[ 36.515476] vip2-s0: vip_set_slice_path:
[ 36.524278] vip2-s0: vip_set_slice_path: DATA_PATH_SELECT(0000010C): 00010210
[ 36.578804] vip2-s0: start_streaming: buf 0xee6bf000 4
[ 36.635164] vip2-s0: start_streaming: start_dma buf 0xee6bf000
[ 36.645388] vip2-s0: start_dma: buf:0xee6bf000, vb:0xec46ac68, dma_addr:0xbd480000
** start_capturing 279 **
** main 694 **
select timeout
[ 38.690035] vip2-s0: vip_release
[ 38.697601] vip2-s0: vip_stop_streaming:
[ 38.702255] vip2-s0: vip_disable_sc_path:
[ 38.706454] vip2-s0: vip_set_slice_path:
[ 38.715048] vip2-s0: vip_set_slice_path: DATA_PATH_SELECT(0000010C): 20010200
[ 38.750216] vip2-s0: Clear channel no: 102
[ 38.754614] vip2-s0: vip_release_stream: stream instance 0xec46a800
[ 38.761666] vip2-s0: vip_release_port: port instance 0xee97f810
Please let us know if I have to do any configuration in vip driver to support adv7182 video decoder.