This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728 VIP and V4L2 interface with TVP5146 Analog Video Decoder Problem

Other Parts Discussed in Thread: TVP5146, TVP5158

Hi All

I am trying to capture movie from TVP5146 analog video decoder from VIP1 VIN1A. I was able to add TVP514x driver to the kernel and the I2C detects it. But it is not recognized by V4L2 . I am using Compulab board with TI-SDK linux kernel 4.1.

Please explain how to get V4L2 to know there is some TVP5146 decoder and register it as /dev/videoN . There is just /dev/video0 and /dev/video10 and none of them are the desired analog video decoder.

The output of udev boot log is as follows:

[    6.911168] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
[    7.112772] vpe 489d0000.vpe: Device registered as /dev/video0
[    7.244212] vip 48970000.vip: loading firmware vpdma-1b8.bin
[    7.260650] vip 48970000.vip: VPDMA firmware loaded
[    7.260727] vip1-s0: Port A: Using subdev tvp514x 3-005c for capture
[    7.260731] vip1-s0: No suitable format reported by subdev tvp514x 3-005c

The contents of udev from i2c driver:

root@cl-som-am57x:~# cd /sys/bus/i2c/devices/i2c-3/3-005c/driver/3-005c
root@cl-som-am57x:/sys/bus/i2c/devices/i2c-3/3-005c/driver/3-005c# cat uevent
DRIVER=tvp514x
OF_NAME=tvp514x
OF_FULLNAME=/ocp/i2c@4807a000/tvp514x@5c
OF_COMPATIBLE_0=ti,tvp5146
OF_COMPATIBLE_N=1
MODALIAS=i2c:tvp5146

The devices recognized by V4L2:

root@cl-som-am57x:/# v4l2-ctl --list-devices
omapwb-m2m (platform:omapwb-m2m):
        /dev/video10

vpe (platform:vpe):
        /dev/video0


Video support config in kernel defconfig file:

CONFIG_MEDIA_SUPPORT=y
CONFIG_MEDIA_CAMERA_SUPPORT=y
CONFIG_MEDIA_CONTROLLER=y
CONFIG_VIDEO_V4L2_SUBDEV_API=y
CONFIG_V4L_PLATFORM_DRIVERS=y
CONFIG_VIDEO_TI_CAL=m
CONFIG_VIDEO_TI_VIP=m
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_TI_VPE=m
CONFIG_VIDEO_TVP514X=y

 

The modified section of dts file for adding TVP514x and VIN1A :

&i2c4 {
	status = "okay";
	pinctrl-names = "default";
	pinctrl-0 = <&i2c4_pins_default>;
	clock-frequency = <400000>;
	.
	.
	.
	tvp514x@5c {
		compatible = "ti,tvp5146";
		reg = <0x5c>;

		port {
			tvp514x_1: endpoint {
				remote-endpoint = <&vin1a>;
				hsync-active = <1>; /* Active high (Defaults to 0) */
				vsync-active = <1>; /* Active high (Defaults to 0) */
				pclk-sample = <0>; /* Active low (Defaults to 0) */
			};
		};
	};
};

&vip1 {
	status = "okay";
};

&vin1a {
	pinctrl-names = "default";
	pinctrl-0 = <&vin1a_pins_default>;	
	status = "okay";
	endpoint {
		slave-mode;
		remote-endpoint = <&tvp514x_1>;
	};
};

&dra7_pmx_core {
	.
	.
	.
	
vin1a_pins_default: vin1a_pins_default {
		pinctrl-single,pins = <
			DRA7XX_CORE_IOPAD(0x34DC, PIN_INPUT | MUX_MODE0) /* vin1a_clk0 AG8 */	
			DRA7XX_CORE_IOPAD(0x34F4, PIN_INPUT | MUX_MODE0) /* vin1a_d0  AE8 */
			DRA7XX_CORE_IOPAD(0x34F8, PIN_INPUT | MUX_MODE0) /* vin1a_d1  AD8 */
			DRA7XX_CORE_IOPAD(0x34FC, PIN_INPUT | MUX_MODE0) /* vin1a_d2  AG7 */
			DRA7XX_CORE_IOPAD(0x3500, PIN_INPUT | MUX_MODE0) /* vin1a_d3  AH6 */
			DRA7XX_CORE_IOPAD(0x3504, PIN_INPUT | MUX_MODE0)  /* vin1a_d4 AH3 */
			DRA7XX_CORE_IOPAD(0x3508, PIN_INPUT | MUX_MODE0) /* vin1a_d5 AH5 */
			DRA7XX_CORE_IOPAD(0x350C, PIN_INPUT | MUX_MODE0)  /* vin1a_d6 AH6 */
			DRA7XX_CORE_IOPAD(0x3510, PIN_INPUT | MUX_MODE0)  /* vin1a_d7 AH4 */
		>;
	};
};

  • Hi,

    I will forward this to the software team. They will respond directly here.
  • Hi Biser


    No response from software team? I am sitting here like forever!

    Thanks!

  • The advertised V4L2 pixel format and Media Bus code don't match in the driver. The current media bus code advertised is MEDIA_BUS_FMT_YUYV8_2X8 which does not reflect what the encoder actually outputs and VIP driver rejects this format. This encoder generate MEDIA_BUS_FMT_UYVY8_2X8 so advertising as such should make it working.

    Apply below patch and see if that helps to fix the issue. 

    drivers/media/i2c/tvp514x.c | 6 +++---

     1 file changed, 3 insertions(+), 3 deletions(-)

     

    diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c index a93985a9b070..6ef370a8ff42 100644

    --- a/drivers/media/i2c/tvp514x.c

    +++ b/drivers/media/i2c/tvp514x.c

    @@ -894,7 +894,7 @@ static int tvp514x_enum_mbus_code(struct v4l2_subdev *sd,

                   if (index != 0)

                                  return -EINVAL;

     

    -              code->code = MEDIA_BUS_FMT_YUYV8_2X8;

    +             code->code = MEDIA_BUS_FMT_UYVY8_2X8;

     

                   return 0;

     }

    @@ -922,7 +922,7 @@ static int tvp514x_get_pad_format(struct v4l2_subdev *sd,

                                  return 0;

                   }

     

    -              format->format.code = MEDIA_BUS_FMT_YUYV8_2X8;

    +             format->format.code = MEDIA_BUS_FMT_UYVY8_2X8;

                   format->format.width = tvp514x_std_list[decoder->current_std].width;

                   format->format.height = tvp514x_std_list[decoder->current_std].height;

                   format->format.colorspace = V4L2_COLORSPACE_SMPTE170M; @@ -946,7 +946,7 @@ static int tvp514x_set_pad_format(struct v4l2_subdev *sd,

                   struct tvp514x_decoder *decoder = to_decoder(sd);

     

                   if (fmt->format.field != V4L2_FIELD_INTERLACED ||

    -                  fmt->format.code != MEDIA_BUS_FMT_YUYV8_2X8 ||

    +                 fmt->format.code != MEDIA_BUS_FMT_UYVY8_2X8 ||

                       fmt->format.colorspace != V4L2_COLORSPACE_SMPTE170M ||

                       fmt->format.width != tvp514x_std_list[decoder->current_std].width ||

                       fmt->format.height != tvp514x_std_list[decoder->current_std].height)

    --

  • Hi Manisha

    I got the /dev/video1 after apply these modifications you said. Now I am trying to communicate with decoder. It seems there is something missing for setting parameters. I got VIDIOC_S_INPUT error when trying to change some parameters:

    root@cl-som-am57x:/# v4l2-ctl --device /dev/video1 --set-input=2
    VIDIOC_S_INPUT: failed: Invalid argument

    And when I get the input list, the output is:

    root@cl-som-am57x:/dev# v4l2-ctl --device /dev/video1 --list-inputs
    ioctl: VIDIOC_ENUMINPUT
            Input       : 0
            Name        : camera 1
            Type        : 0x00000002
            Audioset    : 0x00000000
            Tuner       : 0x00000000
            Standard    : 0x0000000000FFB0FF (PAL-B/B1/G/H/I/D/D1/K NTSC-M/M-JP/M-KR SECAM-B/D/G/H/K/K1/L/Lc)
            Status      : 0x00000000 (ok)
            Capabilities: 0x00000004 (SDTV standards)

    This IC has some 35 different input configuration. I want to use CVBS VI_4_A (write 0x0C to register 0x00) and PAL-B. Is it possible via v4l2 functions?

    I am neither able to get the frame sizes:

    root@cl-som-am57x:/# v4l2-ctl --device /dev/video1 --list-framesizes=UYVY
    ioctl: VIDIOC_ENUM_FRAMESIZES
    root@cl-som-am57x:/# v4l2-ctl --device /dev/video1 --list-framesizes=NV12
    ioctl: VIDIOC_ENUM_FRAMESIZES
    root@cl-som-am57x:/# v4l2-ctl --device /dev/video1 --list-framesizes=YUYV
    ioctl: VIDIOC_ENUM_FRAMESIZES

    Is there something missing?

  • Input selection/enumeration IOCTLs are not functional in VIP, as they are not being forwarded to the sub device.  

    Some feedback on the dts setting  -

    • The DTS entry for TVP decoder is wrong – Specify the channels being used
    • Instead of allowing ONLY one out of the multiple, we allow ALL video channels (Line interleaved multiplexing)
    • TVP generates BT656  embedded sync (no hsync, vsync needed)
    • Also, for subdev binding, the endpoints need to be linked

  • Hi Manisha

    I have search a lot about the correct DTS entry for interfacing TVP decoder to the VIP and I just find this wiki:

    processors.wiki.ti.com/.../Processor_SDK_VIP_Driver

    I could not find more information. Would you mind provide more detailed information about the DTS entry and endpoints links?
    And how we pass the input (Composite_VIN_x) and standard (PAL-B) information to the decoder? Is there any need to write a specific app which uses i2c to program the decoder? In the datasheet it is mentioned that we need to program some registers after reset in a specific order.
    I appreciate your help.
  • You need to just remove the hsync, vsync and pclk_sample lines from your dts. Rest is good. This would make it recognizable as BT.656 embedded sync sub-device. 

        tvp514x@5c {

            compatible = "ti,tvp5146";

            reg = <0x5c>;

            port {

                tvp514x_1: endpoint {

                    remote-endpoint = <&vin1a>;

                };

            };

        };

    Now regarding the specific tvp514x modes, no need to create a user i2c register blaster to program the encoder. That is what the driver is there for. If the mode you need is not already supported by the driver then you need to add it there.

    Since VIP does not support sub-device s/g_input API properly but only default to a single input#0, you may want to hard-code the desired mode as the default mode inside the tvp514x.c driver itself.

    If you will be needing to handle multiple different modes at run time, then you may want to add proper support for the input selection API within VIP.

    If you grep a bit under drivers/media/platform you’ll find that most bridge driver don’t implement the input selection API. But an example would be the am437x-vpfe driver.

  • Thank you very much Manisha. 

    But when I removed the hsync, vsync and pclk_sample lines from my dts, device did not registered as /dev/video1 (there is no /dev/videoN relating to the decoder. 

    When I put them back, the /dev/video1 appears. 

    The "decoder driver registered !!" message is shown in both cases.

    About the input selection and format, I don't to switch. So as you suggested, I modified the default register values and formats in the tvp514x.c driver file. But when I try to run some tests, there is always error

    capturevpedisplay:
    vip: S_FMT failed: Invalid argument

    dmabuftest:
    ERROR:v4l2_open:313: VIDIOC_S_FMT failed: Invalid argument (-1)

    After that, I read some registers from TVP5146 via "i2cget". It seems there is nothing programmed on the TVP5146 because all the read back values are same as default values from the datasheet NOT the values on the driver file. 

    Here is my modifications to the driver file:

    diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c
    index 1c6bc30..d785bca 100644
    --- a/drivers/media/i2c/tvp514x.c
    +++ b/drivers/media/i2c/tvp514x.c
    @@ -66,7 +66,7 @@ MODULE_LICENSE("GPL");
     /* enum tvp514x_std - enum for supported standards */
     enum tvp514x_std {
            STD_NTSC_MJ = 0,
    -       STD_PAL_BDGHIN,
    +       STD_PAL_BDGHIN = 1,
            STD_INVALID
     };
     
    @@ -133,12 +133,12 @@ struct tvp514x_decoder {
     /* TVP514x default register values */
     static struct tvp514x_reg tvp514x_reg_list_default[] = {
            /* Composite selected */
    -       {TOK_WRITE, REG_INPUT_SEL, 0x05},
    +       {TOK_WRITE, REG_INPUT_SEL, 0x0C}, /* 0x05 */
            {TOK_WRITE, REG_AFE_GAIN_CTRL, 0x0F},
    -       /* Auto mode */
    -       {TOK_WRITE, REG_VIDEO_STD, 0x00},
    +       /* Auto mode (changed by me) */
    +       {TOK_WRITE, REG_VIDEO_STD, 0x02}, /* 0x00 */
            {TOK_WRITE, REG_OPERATION_MODE, 0x00},
    -       {TOK_SKIP, REG_AUTOSWITCH_MASK, 0x3F},
    +       {TOK_SKIP, REG_AUTOSWITCH_MASK, 0x23}, /* */
            {TOK_WRITE, REG_COLOR_KILLER, 0x10},
            {TOK_WRITE, REG_LUMA_CONTROL1, 0x00},
            {TOK_WRITE, REG_LUMA_CONTROL2, 0x00},
    @@ -201,13 +201,13 @@ static struct tvp514x_reg tvp514x_reg_list_default[] = {
            /* HS, VS active high */
            {TOK_WRITE, REG_SYNC_CONTROL, 0x00},
            /* 10-bit BT.656 */
    -       {TOK_WRITE, REG_OUTPUT_FORMATTER1, 0x00},
    +       {TOK_WRITE, REG_OUTPUT_FORMATTER1, 0x40}, /* 0x00 */
            /* Enable clk & data */
            {TOK_WRITE, REG_OUTPUT_FORMATTER2, 0x11},
            /* Enable AVID & FLD */
    -       {TOK_WRITE, REG_OUTPUT_FORMATTER3, 0xEE},
    +       {TOK_WRITE, REG_OUTPUT_FORMATTER3, 0xFF}, /* 0xEE */
            /* Enable VS & HS */
    -       {TOK_WRITE, REG_OUTPUT_FORMATTER4, 0xAF},
    +       {TOK_WRITE, REG_OUTPUT_FORMATTER4, 0xFF}, /* AF */
            {TOK_WRITE, REG_OUTPUT_FORMATTER5, 0xFF},
            {TOK_WRITE, REG_OUTPUT_FORMATTER6, 0xFF},
            /* Clear status */
    @@ -942,7 +942,7 @@ static int tvp514x_enum_mbus_code(struct v4l2_subdev *sd,
            if (index != 0)
                    return -EINVAL;
     
    -       code->code = MEDIA_BUS_FMT_YUYV8_2X8;
    +       code->code = MEDIA_BUS_FMT_UYVY8_2X8;
     
            return 0;
     }
    @@ -967,7 +967,7 @@ static int tvp514x_get_pad_format(struct v4l2_subdev *sd,
                    return 0;
            }
     
    -       format->format.code = MEDIA_BUS_FMT_YUYV8_2X8;
    +       format->format.code = MEDIA_BUS_FMT_UYVY8_2X8;
            format->format.width = tvp514x_std_list[decoder->current_std].width;
            format->format.height = tvp514x_std_list[decoder->current_std].height;
            format->format.colorspace = V4L2_COLORSPACE_SMPTE170M;
    @@ -991,7 +991,7 @@ static int tvp514x_set_pad_format(struct v4l2_subdev *sd,
            struct tvp514x_decoder *decoder = to_decoder(sd);
     
            if (fmt->format.field != V4L2_FIELD_INTERLACED ||
    -           fmt->format.code != MEDIA_BUS_FMT_YUYV8_2X8 ||
    +           fmt->format.code != MEDIA_BUS_FMT_UYVY8_2X8 ||
                fmt->format.colorspace != V4L2_COLORSPACE_SMPTE170M ||
                fmt->format.width != tvp514x_std_list[decoder->current_std].width ||
                fmt->format.height != tvp514x_std_list[decoder->current_std].height)
    @@ -1042,17 +1042,17 @@ static struct tvp514x_decoder tvp514x_dev = {
            .fmt_list = tvp514x_fmt_list,
            .num_fmts = ARRAY_SIZE(tvp514x_fmt_list),
            .pix = {
    -               /* Default to NTSC 8-bit YUV 422 */
    -               .width          = NTSC_NUM_ACTIVE_PIXELS,
    -               .height         = NTSC_NUM_ACTIVE_LINES,
    +               /* Default to PAL 8-bit YUV 422 */
    +               .width          = PAL_NUM_ACTIVE_PIXELS,
    +               .height         = PAL_NUM_ACTIVE_LINES,
                    .pixelformat    = V4L2_PIX_FMT_UYVY,
                    .field          = V4L2_FIELD_INTERLACED,
    -               .bytesperline   = NTSC_NUM_ACTIVE_PIXELS * 2,
    -               .sizeimage      = NTSC_NUM_ACTIVE_PIXELS * 2 *
    -                                       NTSC_NUM_ACTIVE_LINES,
    +               .bytesperline   = PAL_NUM_ACTIVE_PIXELS * 2,
    +               .sizeimage      = PAL_NUM_ACTIVE_PIXELS * 2 *
    +                                       PAL_NUM_ACTIVE_LINES,
                    .colorspace     = V4L2_COLORSPACE_SMPTE170M,
                    },
    -       .current_std = STD_NTSC_MJ,
    +       .current_std = STD_PAL_BDGHIN, 
            .std_list = tvp514x_std_list,
            .num_stds = ARRAY_SIZE(tvp514x_std_list),
     
    @@ -1146,7 +1146,7 @@ tvp514x_probe(struct i2c_client *client, const struct i2c_device_id *id)
                     (decoder->pdata->vs_polarity << 3));
            /* Set default standard to auto */
            decoder->tvp514x_regs[REG_VIDEO_STD].val =
    -               VIDEO_STD_AUTO_SWITCH_BIT;
    +               VIDEO_STD_PAL_BDGHIN_BIT;  /* VIDEO_STD_AUTO_SWITCH_BIT */
     
            /* Register with V4L2 layer as slave device */
            sd = &decoder->sd;

  • Thank you very much Manisha.

    But when I removed the hsync, vsync and pclk_sample lines from my dts, device did not registered as /dev/video1 (there is no /dev/videoN relating to the decoder.

    When I put them back, the /dev/video1 appears.

    The "decoder driver registered !!" message is shown in both cases.

    About the input selection and format, I don't to switch. So as you suggested, I modified the default register values and formats in the tvp514x.c driver file. But when I try to run some tests, there is always error:

    capturevpedisplay:
    vip: S_FMT failed: Invalid argument

    dmabuftest:
    ERROR:v4l2_open:313: VIDIOC_S_FMT failed: Invalid argument (-1)

    After that, I read some registers from TVP5146 via "i2cget". It seems there is nothing programmed on the TVP5146 because all the read back values are same as default values from the datasheet NOT the values on the driver file.

    Here is my modifications to the driver file:

    diff --git a/drivers/media/i2c/tvp514x.c b/drivers/media/i2c/tvp514x.c
    index 1c6bc30..d785bca 100644
    --- a/drivers/media/i2c/tvp514x.c
    +++ b/drivers/media/i2c/tvp514x.c
    @@ -66,7 +66,7 @@ MODULE_LICENSE("GPL");
     /* enum tvp514x_std - enum for supported standards */
     enum tvp514x_std {
            STD_NTSC_MJ = 0,
    -       STD_PAL_BDGHIN,
    +       STD_PAL_BDGHIN = 1,
            STD_INVALID
     };
     
    @@ -133,12 +133,12 @@ struct tvp514x_decoder {
     /* TVP514x default register values */
     static struct tvp514x_reg tvp514x_reg_list_default[] = {
            /* Composite selected */
    -       {TOK_WRITE, REG_INPUT_SEL, 0x05},
    +       {TOK_WRITE, REG_INPUT_SEL, 0x0C}, /* 0x05 */
            {TOK_WRITE, REG_AFE_GAIN_CTRL, 0x0F},
    -       /* Auto mode */
    -       {TOK_WRITE, REG_VIDEO_STD, 0x00},
    +       /* Auto mode (changed by me) */
    +       {TOK_WRITE, REG_VIDEO_STD, 0x02}, /* 0x00 */
            {TOK_WRITE, REG_OPERATION_MODE, 0x00},
    -       {TOK_SKIP, REG_AUTOSWITCH_MASK, 0x3F},
    +       {TOK_SKIP, REG_AUTOSWITCH_MASK, 0x23}, /* */
            {TOK_WRITE, REG_COLOR_KILLER, 0x10},
            {TOK_WRITE, REG_LUMA_CONTROL1, 0x00},
            {TOK_WRITE, REG_LUMA_CONTROL2, 0x00},
    @@ -201,13 +201,13 @@ static struct tvp514x_reg tvp514x_reg_list_default[] = {
            /* HS, VS active high */
            {TOK_WRITE, REG_SYNC_CONTROL, 0x00},
            /* 10-bit BT.656 */
    -       {TOK_WRITE, REG_OUTPUT_FORMATTER1, 0x00},
    +       {TOK_WRITE, REG_OUTPUT_FORMATTER1, 0x40}, /* 0x00 */
            /* Enable clk & data */
            {TOK_WRITE, REG_OUTPUT_FORMATTER2, 0x11},
            /* Enable AVID & FLD */
    -       {TOK_WRITE, REG_OUTPUT_FORMATTER3, 0xEE},
    +       {TOK_WRITE, REG_OUTPUT_FORMATTER3, 0xFF}, /* 0xEE */
            /* Enable VS & HS */
    -       {TOK_WRITE, REG_OUTPUT_FORMATTER4, 0xAF},
    +       {TOK_WRITE, REG_OUTPUT_FORMATTER4, 0xFF}, /* AF */
            {TOK_WRITE, REG_OUTPUT_FORMATTER5, 0xFF},
            {TOK_WRITE, REG_OUTPUT_FORMATTER6, 0xFF},
            /* Clear status */
    @@ -942,7 +942,7 @@ static int tvp514x_enum_mbus_code(struct v4l2_subdev *sd,
            if (index != 0)
                    return -EINVAL;
     
    -       code->code = MEDIA_BUS_FMT_YUYV8_2X8;
    +       code->code = MEDIA_BUS_FMT_UYVY8_2X8;
     
            return 0;
     }
    @@ -967,7 +967,7 @@ static int tvp514x_get_pad_format(struct v4l2_subdev *sd,
                    return 0;
            }
     
    -       format->format.code = MEDIA_BUS_FMT_YUYV8_2X8;
    +       format->format.code = MEDIA_BUS_FMT_UYVY8_2X8;
            format->format.width = tvp514x_std_list[decoder->current_std].width;
            format->format.height = tvp514x_std_list[decoder->current_std].height;
            format->format.colorspace = V4L2_COLORSPACE_SMPTE170M;
    @@ -991,7 +991,7 @@ static int tvp514x_set_pad_format(struct v4l2_subdev *sd,
            struct tvp514x_decoder *decoder = to_decoder(sd);
     
            if (fmt->format.field != V4L2_FIELD_INTERLACED ||
    -           fmt->format.code != MEDIA_BUS_FMT_YUYV8_2X8 ||
    +           fmt->format.code != MEDIA_BUS_FMT_UYVY8_2X8 ||
                fmt->format.colorspace != V4L2_COLORSPACE_SMPTE170M ||
                fmt->format.width != tvp514x_std_list[decoder->current_std].width ||
                fmt->format.height != tvp514x_std_list[decoder->current_std].height)
    @@ -1042,17 +1042,17 @@ static struct tvp514x_decoder tvp514x_dev = {
            .fmt_list = tvp514x_fmt_list,
            .num_fmts = ARRAY_SIZE(tvp514x_fmt_list),
            .pix = {
    -               /* Default to NTSC 8-bit YUV 422 */
    -               .width          = NTSC_NUM_ACTIVE_PIXELS,
    -               .height         = NTSC_NUM_ACTIVE_LINES,
    +               /* Default to PAL 8-bit YUV 422 */
    +               .width          = PAL_NUM_ACTIVE_PIXELS,
    +               .height         = PAL_NUM_ACTIVE_LINES,
                    .pixelformat    = V4L2_PIX_FMT_UYVY,
                    .field          = V4L2_FIELD_INTERLACED,
    -               .bytesperline   = NTSC_NUM_ACTIVE_PIXELS * 2,
    -               .sizeimage      = NTSC_NUM_ACTIVE_PIXELS * 2 *
    -                                       NTSC_NUM_ACTIVE_LINES,
    +               .bytesperline   = PAL_NUM_ACTIVE_PIXELS * 2,
    +               .sizeimage      = PAL_NUM_ACTIVE_PIXELS * 2 *
    +                                       PAL_NUM_ACTIVE_LINES,
                    .colorspace     = V4L2_COLORSPACE_SMPTE170M,
                    },
    -       .current_std = STD_NTSC_MJ,
    +       .current_std = STD_PAL_BDGHIN, 
            .std_list = tvp514x_std_list,
            .num_stds = ARRAY_SIZE(tvp514x_std_list),
     
    @@ -1146,7 +1146,7 @@ tvp514x_probe(struct i2c_client *client, const struct i2c_device_id *id)
                     (decoder->pdata->vs_polarity << 3));
            /* Set default standard to auto */
            decoder->tvp514x_regs[REG_VIDEO_STD].val =
    -               VIDEO_STD_AUTO_SWITCH_BIT;
    +               VIDEO_STD_PAL_BDGHIN_BIT;  /* VIDEO_STD_AUTO_SWITCH_BIT */
     
            /* Register with V4L2 layer as slave device */
            sd = &decoder->sd;
    

  • Can enable  VIP debug trace log, run standard yavta test case and share the logs with us. You can do so as follows -

    echo 3 > /sys/module/ti_vip/parameters/debug

    yavta -c10 -fYUYV -Fvout_test.yuv -s720x576 /dev/video1

    After that share entire dmesg logs.

    Aidin Haddadi said:
    After that, I read some registers from TVP5146 via "i2cget". It seems there is nothing programmed on the TVP5146 because all the read back values are same as default values from the datasheet NOT the values on the driver file.

    This is expected. The device registers do not program until the STREAM_ON messages since the above apps failed at S_FMT message, it never got that far. 

  • Aidin,

    In VIP during the S_FMT call the driver attempt to validate the requested frame size against what is supported by the subdevice.
    For this to work the subdevice must support .enum_frame_size so that it can get the list of supported resolutions.

    This call is not implemented by tvp514x.c, that may be the reason why the S_FMT is failing.
    You could add this by adding a simple function and only advertising the resolution which comply with the tv std. You can look at ov2659.c and adapt the ov2659_enum_frames_sizes() function to suit.
  • Hi Manisha

    I have modified the tvp514x.c driver file for .enum_frame_size = tvp514x_enum_frame_sizes but the result was same. Here is the dmesg log after the test:
    yavta /dev/video1 -c10 -fYUYV -Fvout_test.yuv -s720x576

    [  150.428061] vip1-s0: vip_open
    [  150.428081] vip1-s0: subdev default mbus_fmt 0000 is not matched.
    [  150.428089] vip1-s0: init_port set_fmt failed in subdev
    [  150.428098] vip1-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV24 size: 0x0
    [  150.428108] vip1-s0: calc_format_size: fourcc:NV24 size: 128x128 bpl:128 img_size:32768
    [  150.428116] vip1-s0: init_stream fourcc:NV24 size: 128x128 bpl:128 img_size:32768
    [  150.428123] vip1-s0: init_stream vpdma data type: 0x00
    [  150.428132] vip1-s0: Created stream instance ed0f3800
    [  150.428494] vip1-s0: s_fmt input fourcc:YUYV size: 720x576
    [  150.428504] vip1-s0: try_fmt fourcc:YUYV size: 720x576
    [  150.428514] vip1-s0: calc_format_size: fourcc:YUYV size: 720x576 bpl:1440 img_size:829440
    [  150.428521] vip1-s0: s_fmt try_fmt fourcc:YUYV size: 720x576
    [  150.428529] vip1-s0: s_fmt fourcc:YUYV size: 720x576 bpl:1440 img_size:829440
    [  150.428574] vip1-s0: s_fmt pix_to_mbus mbus_code: 2006 size: 720x576
    [  150.428581] vip1-s0: set_fmt failed in subdev
    [  150.428736] vip1-s0: vip_release
    [  150.428753] vip1-s0: Releasing stream instance ed0f3800

  • Can you share the dmesg log after enabling the debug logs through kernel boot line? Add "ti_vip.debug=3" to the kernel boot line

  • Hi Manisha
    Here is the log. I think some functions and declarations in the tvp514x.c driver are not compatible with vip.

    7384.dmesg.txt
    [    0.000000] Booting Linux on physical CPU 0x0
    [    0.000000] Initializing cgroup subsys cpuset
    [    0.000000] Initializing cgroup subsys cpu
    [    0.000000] Initializing cgroup subsys cpuacct
    [    0.000000] Linux version 4.1.13-cl-som-am57x-ti-3.1-g8dc6617-dirty (aidin@UbuntuVM) (gcc version 4.9.3 20150413 (prerelease) (Linaro GCC 4.9-2015.05) ) #1 SMP PREEMPT Sat Sep 24 12:08:24 IRST 2016
    [    0.000000] CPU: ARMv7 Processor [412fc0f2] revision 2 (ARMv7), cr=30c5387d
    [    0.000000] CPU: PIPT / VIPT nonaliasing data cache, PIPT instruction cache
    [    0.000000] Machine model: CompuLab CL-SOM-AM57x on SB-SOM-AM57x
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009d000000, size 32 MiB
    [    0.000000] Reserved memory: initialized node ipu1_cma@9d000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000095800000, size 56 MiB
    [    0.000000] Reserved memory: initialized node ipu2_cma@95800000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x0000000099000000, size 64 MiB
    [    0.000000] Reserved memory: initialized node dsp1_cma@99000000, compatible id shared-dma-pool
    [    0.000000] Reserved memory: created CMA memory pool at 0x000000009f000000, size 8 MiB
    [    0.000000] Reserved memory: initialized node dsp2_cma@9f000000, compatible id shared-dma-pool
    [    0.000000] cma: Reserved 24 MiB at 0x00000000fe400000
    [    0.000000] Forcing write-allocate cache policy for SMP
    [    0.000000] Memory policy: Data cache writealloc
    [    0.000000] On node 0 totalpages: 474368
    [    0.000000] free_area_init_node: node 0, pgdat c091b700, node_mem_map ee5a3000
    [    0.000000]   DMA zone: 1710 pages used for memmap
    [    0.000000]   DMA zone: 0 pages reserved
    [    0.000000]   DMA zone: 145408 pages, LIFO batch:31
    [    0.000000]   HighMem zone: 328960 pages, LIFO batch:31
    [    0.000000] DRA752 ES1.1
    [    0.000000] PERCPU: Embedded 12 pages/cpu @ee532000 s17088 r8192 d23872 u49152
    [    0.000000] pcpu-alloc: s17088 r8192 d23872 u49152 alloc=12*4096
    [    0.000000] pcpu-alloc: [0] 0 [0] 1
    [    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 472658
    [    0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.20:/home/aidin/rootfs-cl-som,nolock console=ttyO2,115200n8 ip=192.168.0.10::192.168.0.1:255.255.255.0::eth1:off ti_vip.debug=3
    [    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)
    [    0.000000] Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
    [    0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
    [    0.000000] Memory: 1681064K/1897472K available (6411K kernel code, 295K rwdata, 2252K rodata, 340K init, 257K bss, 27992K reserved, 188416K cma-reserved, 1291264K highmem)
    [    0.000000] Virtual kernel memory layout:
        vector  : 0xffff0000 - 0xffff1000   (   4 kB)
        fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
        vmalloc : 0xf0000000 - 0xff000000   ( 240 MB)
        lowmem  : 0xc0000000 - 0xef800000   ( 760 MB)
        pkmap   : 0xbfe00000 - 0xc0000000   (   2 MB)
        modules : 0xbf000000 - 0xbfe00000   (  14 MB)
          .text : 0xc0008000 - 0xc087e074   (8665 kB)
          .init : 0xc087f000 - 0xc08d4000   ( 340 kB)
          .data : 0xc08d4000 - 0xc091dd08   ( 296 kB)
           .bss : 0xc0920000 - 0xc096058c   ( 258 kB)
    [    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
    [    0.000000] Preemptible hierarchical RCU implementation.
    [    0.000000]  Additional per-CPU info printed with stalls.
    [    0.000000] NR_IRQS:16 nr_irqs:16 16
    [    0.000000] OMAP clockevent source: timer1 at 32768 Hz
    [    0.000000] clocksource 32k_counter: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 58327039986419 ns
    [    0.000000] sched_clock: 32 bits at 32kHz, resolution 30517ns, wraps every 65535999984741ns
    [    0.000000] OMAP clocksource: 32k_counter at 32768 Hz
    [    0.000427] Architected cp15 timer(s) running at 6.14MHz (virt).
    [    0.000457] clocksource arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x16af5adb9, max_idle_ns: 440795202250 ns
    [    0.000462] sched_clock: 56 bits at 6MHz, resolution 162ns, wraps every 4398046511023ns
    [    0.000473] Switching to timer-based delay loop, resolution 162ns
    [    0.001006] Console: colour dummy device 80x30
    [    0.001023] WARNING: Your 'console=ttyO2' has been replaced by 'ttyS2'
    [    0.001029] This ensures that you still see kernel messages. Please
    [    0.001034] update your kernel commandline.
    [    0.001046] Calibrating delay loop (skipped), value calculated using timer frequency.. 12.29 BogoMIPS (lpj=61475)
    [    0.001059] pid_max: default: 32768 minimum: 301
    [    0.001144] Security Framework initialized
    [    0.001181] Mount-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.001191] Mountpoint-cache hash table entries: 2048 (order: 1, 8192 bytes)
    [    0.001722] Initializing cgroup subsys blkio
    [    0.001736] Initializing cgroup subsys memory
    [    0.001762] Initializing cgroup subsys devices
    [    0.001774] Initializing cgroup subsys freezer
    [    0.001786] Initializing cgroup subsys perf_event
    [    0.001807] CPU: Testing write buffer coherency: ok
    [    0.002053] /cpus/cpu@0 missing clock-frequency property
    [    0.002102] /cpus/cpu@1 missing clock-frequency property
    [    0.002113] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
    [    0.002150] Setting up static identity map for 0x800082c0 - 0x80008318
    [    0.060680] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
    [    0.060748] Brought up 2 CPUs
    [    0.060760] SMP: Total of 2 processors activated (24.59 BogoMIPS).
    [    0.060767] CPU: All CPU(s) started in SVC mode.
    [    0.061148] devtmpfs: initialized
    [    0.086099] VFP support v0.3: implementor 41 architecture 4 part 30 variant f rev 0
    [    0.086890] omap_hwmod: l3_main_2 using broken dt data from ocp
    [    0.100534] omap_hwmod: tptc0 using broken dt data from edma-controller
    [    0.101005] omap_hwmod: tptc1 using broken dt data from edma-controller
    [    0.262927] clocksource jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
    [    0.266829] pinctrl core: initialized pinctrl subsystem
    [    0.267631] NET: Registered protocol family 16
    [    0.268557] DMA: preallocated 256 KiB pool for atomic coherent allocations
    [    0.290563] cpuidle: using governor ladder
    [    0.320585] cpuidle: using governor menu
    [    0.327273] gpiochip_add: registered GPIOs 0 to 31 on device: gpio
    [    0.327850] OMAP GPIO hardware version 0.1
    [    0.328491] gpiochip_add: registered GPIOs 32 to 63 on device: gpio
    [    0.329367] gpiochip_add: registered GPIOs 64 to 95 on device: gpio
    [    0.330223] gpiochip_add: registered GPIOs 96 to 127 on device: gpio
    [    0.331085] gpiochip_add: registered GPIOs 128 to 159 on device: gpio
    [    0.331923] gpiochip_add: registered GPIOs 160 to 191 on device: gpio
    [    0.332765] gpiochip_add: registered GPIOs 192 to 223 on device: gpio
    [    0.333600] gpiochip_add: registered GPIOs 224 to 255 on device: gpio
    [    0.334190] irq: no irq domain found for /ocp/l4@4a000000/scm@2000/pinmux@1400 !
    [    0.347047] omap-gpmc 50000000.gpmc: could not find pctldev for node /ocp/l4@4a000000/scm@2000/pinmux@1400/nand_flash_pins, deferring probe
    [    0.355936] No ATAGs?
    [    0.355967] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers.
    [    0.355976] hw-breakpoint: maximum watchpoint size is 8 bytes.
    [    0.358479] omap4_sram_init:Unable to allocate sram needed to handle errata I688
    [    0.358489] omap4_sram_init:Unable to get sram pool needed to handle errata I688
    [    0.359055] OMAP DMA hardware revision 0.0
    [    0.398200] edma-dma-engine edma-dma-engine.0: TI EDMA DMA engine driver
    [    0.400914] omap-dma-engine 4a056000.dma-controller: OMAP DMA engine driver
    [    0.401371] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator-vdd_3v3[0]'
    [    0.401593] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator-ads7846-reg[0]'
    [    0.401829] of_get_named_gpiod_flags: parsed 'gpio' property of node '/regulatorfixed-wlan_power[0]' - status (-517)
    [    0.401907] of_get_named_gpiod_flags: parsed 'gpio' property of node '/regulatorfixed-wlan_twl_oe[0]' - status (0)
    [    0.402159] of_get_named_gpiod_flags: parsed 'gpio' property of node '/fixedregulator-wlan_en[0]' - status (0)
    [    0.402383] of_get_named_gpiod_flags: can't parse 'gpio' property of node '/fixedregulator-v3_3[0]'
    [    0.406330] omap-iommu 40d01000.mmu: 40d01000.mmu registered
    [    0.406505] omap-iommu 40d02000.mmu: 40d02000.mmu registered
    [    0.406661] omap-iommu 58882000.mmu: 58882000.mmu registered
    [    0.406812] omap-iommu 55082000.mmu: 55082000.mmu registered
    [    0.407078] omap-iommu 41501000.mmu: 41501000.mmu registered
    [    0.407261] omap-iommu 41502000.mmu: 41502000.mmu registered
    [    0.407678] SCSI subsystem initialized
    [    0.407848] libata version 3.00 loaded.
    [    0.408381] omap_i2c 48070000.i2c: could not find pctldev for node /ocp/l4@4a000000/scm@2000/pinmux@1400/i2c1_pins_default, deferring probe
    [    0.408412] omap_i2c 48060000.i2c: could not find pctldev for node /ocp/l4@4a000000/scm@2000/pinmux@1400/i2c3_pins_default, deferring probe
    [    0.408441] omap_i2c 4807a000.i2c: could not find pctldev for node /ocp/l4@4a000000/scm@2000/pinmux@1400/i2c4_pins_default, deferring probe
    [    0.408469] omap_i2c 4807c000.i2c: could not find pctldev for node /ocp/l4@4a000000/scm@2000/pinmux@1400/i2c5_pins_default, deferring probe
    [    0.408631] media: Linux media interface: v0.10
    [    0.408687] Linux video capture interface: v2.00
    [    0.408730] pps_core: LinuxPPS API ver. 1 registered
    [    0.408738] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
    [    0.408764] PTP clock support registered
    [    0.409366] omap-mailbox 48840000.mailbox: omap mailbox rev 0x400
    [    0.409645] omap-mailbox 48842000.mailbox: omap mailbox rev 0x400
    [    0.409898] Advanced Linux Sound Architecture Driver Initialized.
    [    0.410548] Switched to clocksource arch_sys_counter
    [    0.420129] NET: Registered protocol family 2
    [    0.420772] TCP established hash table entries: 8192 (order: 3, 32768 bytes)
    [    0.420837] TCP bind hash table entries: 8192 (order: 4, 65536 bytes)
    [    0.420961] TCP: Hash tables configured (established 8192 bind 8192)
    [    0.421010] UDP hash table entries: 512 (order: 2, 16384 bytes)
    [    0.421041] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes)
    [    0.421189] NET: Registered protocol family 1
    [    0.421413] RPC: Registered named UNIX socket transport module.
    [    0.421422] RPC: Registered udp transport module.
    [    0.421429] RPC: Registered tcp transport module.
    [    0.421435] RPC: Registered tcp NFSv4.1 backchannel transport module.
    [    0.421450] PCI: CLS 0 bytes, default 64
    [    0.422438] CPU PMU: Failed to parse /pmu/interrupt-affinity[0]
    [    0.422473] hw perfevents: enabled with armv7_cortex_a15 PMU driver, 7 counters available
    [    0.424241] futex hash table entries: 512 (order: 3, 32768 bytes)
    [    0.424329] audit: initializing netlink subsys (disabled)
    [    0.424361] audit: type=2000 audit(0.400:1): initialized
    [    0.431367] VFS: Disk quotas dquot_6.6.0
    [    0.431533] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
    [    0.433510] NFS: Registering the id_resolver key type
    [    0.433542] Key type id_resolver registered
    [    0.433550] Key type id_legacy registered
    [    0.433609] jffs2: version 2.2. (NAND) (SUMMARY)  \xffffffc2\xffffffa9 2001-2006 Red Hat, Inc.
    [    0.435570] NET: Registered protocol family 38
    [    0.435654] bounce: pool size: 64 pages
    [    0.435670] io scheduler noop registered
    [    0.435684] io scheduler deadline registered
    [    0.435723] io scheduler cfq registered (default)
    [    0.439166] pinctrl-single 4a003400.pinmux: 281 pins at pa fc003400 size 1124
    [    0.441745] dra7-pcie 51000000.pcie: GPIO lookup for consumer pcie-reset
    [    0.441758] dra7-pcie 51000000.pcie: using device tree for GPIO lookup
    [    0.441770] of_get_named_gpiod_flags: can't parse 'pcie-reset-gpios' property of node '/ocp/axi@0/pcie@51000000[0]'
    [    0.441780] of_get_named_gpiod_flags: can't parse 'pcie-reset-gpio' property of node '/ocp/axi@0/pcie@51000000[0]'
    [    0.441789] dra7-pcie 51000000.pcie: using lookup tables for GPIO lookup
    [    0.441799] dra7-pcie 51000000.pcie: lookup for GPIO pcie-reset failed
    [    0.475538] dra7-pcie 51000000.pcie: PCI host bridge to bus 0000:00
    [    0.475551] pci_bus 0000:00: root bus resource [io  0x1000-0xffff]
    [    0.475562] pci_bus 0000:00: root bus resource [mem 0x20013000-0x2fffffff]
    [    0.475572] pci_bus 0000:00: root bus resource [bus 00-ff]
    [    0.475605] pci 0000:00:00.0: [104c:8888] type 01 class 0x060400
    [    0.475638] pci 0000:00:00.0: reg 0x10: [mem 0x00000000-0x000fffff]
    [    0.475658] pci 0000:00:00.0: reg 0x14: [mem 0x00000000-0x0000ffff]
    [    0.475693] pci 0000:00:00.0: IOMMU is currently not supported for PCI
    [    0.475726] pci 0000:00:00.0: supports D1
    [    0.475736] pci 0000:00:00.0: PME# supported from D0 D1 D3hot
    [    0.475964] PCI: bus0: Fast back to back transfers disabled
    [    0.476097] PCI: bus1: Fast back to back transfers enabled
    [    0.476110] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
    [    0.476189] pci 0000:00:00.0: BAR 0: assigned [mem 0x20100000-0x201fffff]
    [    0.476203] pci 0000:00:00.0: BAR 1: assigned [mem 0x20020000-0x2002ffff]
    [    0.476216] pci 0000:00:00.0: PCI bridge to [bus 01]
    [    0.476698] of_get_named_gpiod_flags: parsed 'gpios' property of node '/backlight[0]' - status (0)
    [    0.478362] omapdss_dss 58000000.dss: master bind failed: -517
    [    0.478983] of_get_named_gpiod_flags: parsed 'hpd-gpios' property of node '/connector@0[0]' - status (0)
    [    0.479022] connector-hdmi connector@0: failed to find video source
    [    0.479252] panel-dpi display: GPIO lookup for consumer enable
    [    0.479261] panel-dpi display: using device tree for GPIO lookup
    [    0.479291] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/display[0]' - status (-517)
    [    0.479300] panel-dpi display: lookup for GPIO enable failed
    [    0.481914] Serial: 8250/16550 driver, 10 ports, IRQ sharing enabled
    [    0.484654] omap8250 48020000.serial: GPIO lookup for consumer enable
    [    0.484666] omap8250 48020000.serial: using device tree for GPIO lookup
    [    0.484676] of_get_named_gpiod_flags: can't parse 'enable-gpios' property of node '/ocp/serial@48020000[0]'
    [    0.484687] of_get_named_gpiod_flags: can't parse 'enable-gpio' property of node '/ocp/serial@48020000[0]'
    [    0.484695] omap8250 48020000.serial: using lookup tables for GPIO lookup
    [    0.484705] omap8250 48020000.serial: lookup for GPIO enable failed
    [    0.485004] 48020000.serial: ttyS2 at MMIO 0x48020000 (irq = 299, base_baud = 3000000) is a 8250
    [    1.477046] console [ttyS2] enabled
    [    1.481663] [drm] Initialized drm 1.1.0 20060810
    [    1.486311] Error: Driver 'tfp410' is already registered, aborting...
    [    1.501057] brd: module loaded
    [    1.508219] loop: module loaded
    [    1.512641] ahci 4a140000.sata: SSS flag set, parallel bus scan disabled
    [    1.519390] ahci 4a140000.sata: AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl platform mode
    [    1.528021] ahci 4a140000.sata: flags: 64bit ncq sntf stag pm led clo only pmp pio slum part ccc apst
    [    1.538279] scsi host0: ahci
    [    1.541469] ata1: SATA max UDMA/133 mmio [mem 0x4a140000-0x4a1410ff] port 0x100 irq 333
    [    1.549871] mtdoops: mtd device (mtddev=name/number) must be supplied
    [    1.600569] davinci_mdio 48485000.mdio: davinci mdio revision 1.6
    [    1.606692] davinci_mdio 48485000.mdio: detected phy mask fffffffc
    [    1.615322] Atheros 8031 ethernet 48485000.mdio:00: GPIO lookup for consumer reset
    [    1.615334] Atheros 8031 ethernet 48485000.mdio:00: using lookup tables for GPIO lookup
    [    1.615343] Atheros 8031 ethernet 48485000.mdio:00: lookup for GPIO reset failed
    [    1.617260] Atheros 8031 ethernet 48485000.mdio:01: GPIO lookup for consumer reset
    [    1.617271] Atheros 8031 ethernet 48485000.mdio:01: using lookup tables for GPIO lookup
    [    1.617280] Atheros 8031 ethernet 48485000.mdio:01: lookup for GPIO reset failed
    [    1.617292] libphy: 48485000.mdio: probed
    [    1.621338] davinci_mdio 48485000.mdio: phy[0]: device 48485000.mdio:00, driver Atheros 8031 ethernet
    [    1.630612] davinci_mdio 48485000.mdio: phy[1]: device 48485000.mdio:01, driver Atheros 8031 ethernet
    [    1.640404] cpsw 48484000.ethernet: Detected MACID = 00:01:c0:1b:2d:7a
    [    1.647658] cpsw 48484000.ethernet: cpsw: Detected MACID = 00:01:c0:1b:2d:7c
    [    1.655961] mousedev: PS/2 mouse device common for all mice
    [    1.661596] i2c /dev entries driver
    [    1.667922] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd
    [    1.667933] omap_hsmmc 4809c000.mmc: using device tree for GPIO lookup
    [    1.667962] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@4809c000[0]' - status (0)
    [    1.667998] omap_hsmmc 4809c000.mmc: Got CD GPIO
    [    1.672661] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer wp
    [    1.672670] omap_hsmmc 4809c000.mmc: using device tree for GPIO lookup
    [    1.672695] of_get_named_gpiod_flags: parsed 'wp-gpios' property of node '/ocp/mmc@4809c000[0]' - status (0)
    [    1.672708] omap_hsmmc 4809c000.mmc: Got WP GPIO
    [    1.677511] omap_hsmmc 4809c000.mmc: no pinctrl state for sdr104 mode
    [    1.683997] omap_hsmmc 4809c000.mmc: no pinctrl state for ddr50 mode
    [    1.690377] omap_hsmmc 4809c000.mmc: no pinctrl state for sdr50 mode
    [    1.696770] omap_hsmmc 4809c000.mmc: no pinctrl state for sdr25 mode
    [    1.703168] omap_hsmmc 4809c000.mmc: no pinctrl state for sdr12 mode
    [    1.709548] omap_hsmmc 4809c000.mmc: no pinctrl state for hs mode
    [    1.750807] omap_hsmmc 480b4000.mmc: GPIO lookup for consumer cd
    [    1.750817] omap_hsmmc 480b4000.mmc: using device tree for GPIO lookup
    [    1.750827] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@480b4000[0]'
    [    1.750836] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@480b4000[0]'
    [    1.750845] omap_hsmmc 480b4000.mmc: using lookup tables for GPIO lookup
    [    1.750854] omap_hsmmc 480b4000.mmc: lookup for GPIO cd failed
    [    1.750864] omap_hsmmc 480b4000.mmc: GPIO lookup for consumer wp
    [    1.750872] omap_hsmmc 480b4000.mmc: using device tree for GPIO lookup
    [    1.750881] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@480b4000[0]'
    [    1.750889] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@480b4000[0]'
    [    1.750897] omap_hsmmc 480b4000.mmc: using lookup tables for GPIO lookup
    [    1.750905] omap_hsmmc 480b4000.mmc: lookup for GPIO wp failed
    [    1.790787] omap_hsmmc 480d1000.mmc: GPIO lookup for consumer cd
    [    1.790798] omap_hsmmc 480d1000.mmc: using device tree for GPIO lookup
    [    1.790808] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@480d1000[0]'
    [    1.790817] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@480d1000[0]'
    [    1.790825] omap_hsmmc 480d1000.mmc: using lookup tables for GPIO lookup
    [    1.790834] omap_hsmmc 480d1000.mmc: lookup for GPIO cd failed
    [    1.790844] omap_hsmmc 480d1000.mmc: GPIO lookup for consumer wp
    [    1.790851] omap_hsmmc 480d1000.mmc: using device tree for GPIO lookup
    [    1.790860] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@480d1000[0]'
    [    1.790868] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@480d1000[0]'
    [    1.790877] omap_hsmmc 480d1000.mmc: using lookup tables for GPIO lookup
    [    1.790885] omap_hsmmc 480d1000.mmc: lookup for GPIO wp failed
    [    1.791046] omap_hsmmc 480d1000.mmc: no pinctrl state for sdr25 mode
    [    1.797427] omap_hsmmc 480d1000.mmc: no pinctrl state for sdr12 mode
    [    1.803824] omap_hsmmc 480d1000.mmc: no pinctrl state for hs mode
    [    1.810177] reg-fixed-voltage regulatorfixed-wlan_twl_oe: Failed to resolve vin-supply for wlan_twl_oe_fixed
    [    1.840884] ledtrig-cpu: registered to indicate activity on CPUs
    [    1.847200] omap-aes 4b500000.aes: OMAP AES hw accel rev: 3.3
    [    1.853679] omap-aes 4b700000.aes: OMAP AES hw accel rev: 3.3
    [    1.859866] omap-des 480a5000.des: OMAP DES hw accel rev: 2.2
    [    1.866623] omap-sham 4b101000.sham: hw accel on OMAP rev 4.3
    [    1.877988] oprofile: using timer interrupt.
    [    1.882597] Initializing XFRM netlink socket
    [    1.886903] NET: Registered protocol family 17
    [    1.891420] ata1: SATA link down (SStatus 0 SControl 300)
    [    1.896907] NET: Registered protocol family 15
    [    1.901478] Key type dns_resolver registered
    [    1.905882] omap_voltage_late_init: Voltage driver support not added
    [    1.912601] cpu cpu0: of_pm_voltdm_notifier_register: Failed to get cpu0 regulator/voltdm: -517
    [    1.921396] cpu cpu0: cpu0 clock notifier not ready, retry
    [    1.927027] Power Management for TI OMAP4+ devices.
    [    1.932188] ThumbEE CPU extension supported.
    [    1.936488] Registering SWP/SWPB emulation handler
    [    1.942658] dmm 4e000000.dmm: workaround for errata i878 in use
    [    1.950144] dmm 4e000000.dmm: initialized all PAT entries
    [    1.956199] omap-gpmc 50000000.gpmc: GPMC revision 6.0
    [    1.961401] gpmc_mem_init: disabling cs 0 mapped at 0x0-0x1000000
    [    1.967551] gpiochip_find_base: found new base at 510
    [    1.967668] gpiochip_add: registered GPIOs 510 to 511 on device: omap-gpmc
    [    1.968231] omap2-nand 8000000.nand: GPIO lookup for consumer ready
    [    1.968242] omap2-nand 8000000.nand: using device tree for GPIO lookup
    [    1.968252] of_get_named_gpiod_flags: can't parse 'ready-gpios' property of node '/ocp/gpmc@50000000/nand@0,0[0]'
    [    1.968262] of_get_named_gpiod_flags: can't parse 'ready-gpio' property of node '/ocp/gpmc@50000000/nand@0,0[0]'
    [    1.968271] omap2-nand 8000000.nand: using lookup tables for GPIO lookup
    [    1.968280] omap2-nand 8000000.nand: lookup for GPIO ready failed
    [    1.968559] nand: No NAND device found
    [    1.972365] omap2-nand 8000000.nand: scan failed, may be bus-width mismatch
    [    1.979582] of_get_named_gpiod_flags: parsed 'gpio' property of node '/regulatorfixed-wlan_power[0]' - status (-517)
    [    1.980313] omap_i2c 48070000.i2c: bus 0 rev0.12 at 400 kHz
    [    1.986542] omap_i2c 48060000.i2c: bus 2 rev0.12 at 400 kHz
    [    1.992186] mmc0: MAN_BKOPS_EN bit is not set
    [    1.997398] palmas 3-0058: Irq flag is 0x00000008
    [    2.002861] mmc0: new high speed MMC card at address 0001
    [    2.008584] mmcblk0: mmc0:0001 SEM04G 3.68 GiB
    [    2.013266] mmcblk0boot0: mmc0:0001 SEM04G partition 1 2.00 MiB
    [    2.019318] mmcblk0boot1: mmc0:0001 SEM04G partition 2 2.00 MiB
    [    2.027778] palmas 3-0058: Muxing GPIO 2f, PWM 0, LED 0
    [    2.033526]  mmcblk0:
    [    2.060652] gpiochip_find_base: found new base at 502
    [    2.060759] gpiochip_add: registered GPIOs 502 to 509 on device: 4807a000.i2c:tps659038@58:tps659038_gpio
    [    2.061175] wm8731 3-001a: Assuming static MCLK
    [    2.065830] omap_i2c 4807a000.i2c: bus 3 rev0.12 at 400 kHz
    [    2.101120] gpiochip_find_base: found new base at 486
    [    2.101223] gpiochip_add: registered GPIOs 486 to 501 on device: pca9555
    [    2.101233] pca953x 4-0020: interrupt support not compiled in
    [    2.107141] omap_i2c 4807c000.i2c: bus 4 rev0.12 at 400 kHz
    [    2.113393] OMAP DSS rev 6.1
    [    2.116573] omapdss_dss 58000000.dss: bound 58001000.dispc (ops dispc_component_ops)
    [    2.124986] omapdss_dss 58000000.dss: bound 58040000.encoder (ops hdmi5_component_ops)
    [    2.133153] of_get_named_gpiod_flags: parsed 'hpd-gpios' property of node '/connector@0[0]' - status (0)
    [    2.133371] panel-dpi display: GPIO lookup for consumer enable
    [    2.133381] panel-dpi display: using device tree for GPIO lookup
    [    2.133411] of_get_named_gpiod_flags: parsed 'enable-gpios' property of node '/display[0]' - status (0)
    [    2.134029] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer cd
    [    2.134039] omap_hsmmc 4809c000.mmc: using device tree for GPIO lookup
    [    2.134065] of_get_named_gpiod_flags: parsed 'cd-gpios' property of node '/ocp/mmc@4809c000[0]' - status (0)
    [    2.134099] omap_hsmmc 4809c000.mmc: Got CD GPIO
    [    2.138739] omap_hsmmc 4809c000.mmc: GPIO lookup for consumer wp
    [    2.138748] omap_hsmmc 4809c000.mmc: using device tree for GPIO lookup
    [    2.138772] of_get_named_gpiod_flags: parsed 'wp-gpios' property of node '/ocp/mmc@4809c000[0]' - status (0)
    [    2.138784] omap_hsmmc 4809c000.mmc: Got WP GPIO
    [    2.143586] omap_hsmmc 4809c000.mmc: no pinctrl state for sdr104 mode
    [    2.150056] omap_hsmmc 4809c000.mmc: no pinctrl state for ddr50 mode
    [    2.156454] omap_hsmmc 4809c000.mmc: no pinctrl state for sdr50 mode
    [    2.162917] omap_hsmmc 4809c000.mmc: no pinctrl state for sdr25 mode
    [    2.169298] omap_hsmmc 4809c000.mmc: no pinctrl state for sdr12 mode
    [    2.175694] omap_hsmmc 4809c000.mmc: no pinctrl state for hs mode
    [    2.221094] omap_hsmmc 480d1000.mmc: GPIO lookup for consumer cd
    [    2.221105] omap_hsmmc 480d1000.mmc: using device tree for GPIO lookup
    [    2.221115] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@480d1000[0]'
    [    2.221124] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@480d1000[0]'
    [    2.221132] omap_hsmmc 480d1000.mmc: using lookup tables for GPIO lookup
    [    2.221140] omap_hsmmc 480d1000.mmc: lookup for GPIO cd failed
    [    2.221151] omap_hsmmc 480d1000.mmc: GPIO lookup for consumer wp
    [    2.221158] omap_hsmmc 480d1000.mmc: using device tree for GPIO lookup
    [    2.221167] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@480d1000[0]'
    [    2.221175] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@480d1000[0]'
    [    2.221183] omap_hsmmc 480d1000.mmc: using lookup tables for GPIO lookup
    [    2.221191] omap_hsmmc 480d1000.mmc: lookup for GPIO wp failed
    [    2.221344] omap_hsmmc 480d1000.mmc: no pinctrl state for sdr25 mode
    [    2.227727] omap_hsmmc 480d1000.mmc: no pinctrl state for sdr12 mode
    [    2.234143] omap_hsmmc 480d1000.mmc: no pinctrl state for hs mode
    [    2.240488] reg-fixed-voltage regulatorfixed-wlan_twl_oe: Failed to resolve vin-supply for wlan_twl_oe_fixed
    [    2.271058] of_get_named_gpiod_flags: can't parse 'simple-audio-card,hp-det-gpio' property of node '/sound@0[0]'
    [    2.271069] of_get_named_gpiod_flags: can't parse 'simple-audio-card,mic-det-gpio' property of node '/sound@0[0]'
    [    2.271225] 3-001a supply AVDD not found, using dummy regulator
    [    2.277209] 3-001a supply HPVDD not found, using dummy regulator
    [    2.283299] 3-001a supply DCVDD not found, using dummy regulator
    [    2.289365] 3-001a supply DBVDD not found, using dummy regulator
    [    2.296637] asoc-simple-card sound@0: wm8731-hifi <-> 48468000.mcasp mapping ok
    [    2.304017] asoc-simple-card sound@0: ASoC: no source widget found for Line Jack
    [    2.311462] asoc-simple-card sound@0: ASoC: Failed to add route Line Jack -> direct -> LLINEIN
    [    2.320113] asoc-simple-card sound@0: ASoC: no source widget found for Line Jack
    [    2.327586] asoc-simple-card sound@0: ASoC: Failed to add route Line Jack -> direct -> RLINEIN
    [    2.352444] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
    [    2.359084] [drm] No driver support for vblank timestamp query.
    [    2.631291] [drm] Enabling DMM ywrap scrolling
    [    2.671489] Console: switching to colour frame buffer device 100x30
    [    2.680340] omapdrm omapdrm.0: fb0: omapdrm frame buffer device
    [    2.686306] omapdrm omapdrm.0: registered panic notifier
    [    2.720744] omapwb-m2m: Device registered as video10
    [    2.725732] [drm] Initialized omapdrm 1.0.0 20110917 on minor 0
    [    2.731846] of_get_named_gpiod_flags: parsed 'gpio' property of node '/regulatorfixed-wlan_power[0]' - status (0)
    [    2.732845] omap_hsmmc 480d1000.mmc: GPIO lookup for consumer cd
    [    2.732856] omap_hsmmc 480d1000.mmc: using device tree for GPIO lookup
    [    2.732867] of_get_named_gpiod_flags: can't parse 'cd-gpios' property of node '/ocp/mmc@480d1000[0]'
    [    2.732877] of_get_named_gpiod_flags: can't parse 'cd-gpio' property of node '/ocp/mmc@480d1000[0]'
    [    2.732886] omap_hsmmc 480d1000.mmc: using lookup tables for GPIO lookup
    [    2.732895] omap_hsmmc 480d1000.mmc: lookup for GPIO cd failed
    [    2.732906] omap_hsmmc 480d1000.mmc: GPIO lookup for consumer wp
    [    2.732914] omap_hsmmc 480d1000.mmc: using device tree for GPIO lookup
    [    2.732923] of_get_named_gpiod_flags: can't parse 'wp-gpios' property of node '/ocp/mmc@480d1000[0]'
    [    2.732931] of_get_named_gpiod_flags: can't parse 'wp-gpio' property of node '/ocp/mmc@480d1000[0]'
    [    2.732939] omap_hsmmc 480d1000.mmc: using lookup tables for GPIO lookup
    [    2.732947] omap_hsmmc 480d1000.mmc: lookup for GPIO wp failed
    [    2.733129] omap_hsmmc 480d1000.mmc: no pinctrl state for sdr25 mode
    [    2.739512] omap_hsmmc 480d1000.mmc: no pinctrl state for sdr12 mode
    [    2.745920] omap_hsmmc 480d1000.mmc: no pinctrl state for hs mode
    [    2.752293] wlan_twl_oe_fixed: supplied by wlan_power_fixed
    [    2.757926] wlan_en_fixed: supplied by wlan_twl_oe_fixed
    [    2.800828] hctosys: unable to open rtc device (rtc0)
    [    2.824239] net eth1: initializing cpsw version 1.15 (0)
    [    2.916471] net eth1: phy found : id is : 0x4dd074
    [    4.494375] omapdss HDMIWP error: Failed to set PHY power mode to 2
    [    4.875850] omapdss HDMIWP error: Failed to set PHY power mode to 2
    [    6.026207] omapdss HDMIWP error: Failed to set PHY power mode to 2
    [    6.917358] cpsw 48484000.ethernet eth1: Link is Up - 1Gbps/Full - flow control rx/tx
    [    6.940658] IP-Config: Complete:
    [    6.943904]      device=eth1, hwaddr=00:01:c0:1b:2d:7c, ipaddr=192.168.0.10, mask=255.255.255.0, gw=192.168.0.1
    [    6.954095]      host=192.168.0.10, domain=, nis-domain=(none)
    [    6.959954]      bootserver=255.255.255.255, rootserver=192.168.0.20, rootpath=
    [    6.967357] wlan_power_fixed: disabling
    [    6.971259] wlan_en_fixed: disabling
    [    6.974848] wlan_twl_oe_fixed: disabling
    [    6.978785] ads7846-reg: disabling
    [    6.982416] ALSA device list:
    [    6.985395]   #0: cl-som-amx57xx
    [    7.017286] VFS: Mounted root (nfs filesystem) on device 0:15.
    [    7.036296] devtmpfs: mounted
    [    7.039484] Freeing unused kernel memory: 340K (c087f000 - c08d4000)
    [    8.269907] random: nonblocking pool is initialized
    [    8.444055] udevd[123]: starting version 182
    [    9.075652] of_get_named_gpiod_flags: parsed 'gpios' property of node '/leds/led@0[0]' - status (0)
    [    9.165230] omap-rproc 58820000.ipu: assigned reserved memory node ipu1_cma@9d000000
    [    9.247316]  remoteproc0: 58820000.ipu is available
    [    9.299157]  remoteproc0: Note: remoteproc is still under development and considered experimental.
    [    9.422325]  remoteproc0: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [    9.518657] omap_rng 48090000.rng: OMAP Random Number Generator ver. 20
    [    9.542448] vpe 489d0000.vpe: loading firmware vpdma-1b8.bin
    [    9.576607] omap-rproc 55020000.ipu: assigned reserved memory node ipu2_cma@95800000
    [    9.604341]  remoteproc1: 55020000.ipu is available
    [    9.624672] vpe 489d0000.vpe: Device registered as /dev/video0
    [    9.686874] CAN device driver interface
    [    9.742728]  remoteproc1: Note: remoteproc is still under development and considered experimental.
    [    9.768363] rtc-em3027 3-0056: rtc core: registered rtc-em3027 as rtc0
    [    9.922734]  remoteproc1: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [    9.940267] omap_wdt: OMAP Watchdog Timer Rev 0x01: initial timeout 60 sec
    [    9.969575] tvp514x 4-005d: tvp514x 4-005d decoder driver registered !!
    [    9.991496] palmas_pwrbutton 4807a000.i2c:tps659038@58:tps659038_pwr_button: h/w controlled shutdown duration=12 seconds
    [    9.991765] c_can_platform 4ae3c000.can: c_can_platform device registered (regs=fce3c000, irq=344)
    [    9.996115] vip 48970000.vip: loading firmware vpdma-1b8.bin
    [    9.998395] omap-rproc 40800000.dsp: assigned reserved memory node dsp1_cma@99000000
    [    9.998438]  remoteproc2: 40800000.dsp is available
    [    9.998440]  remoteproc2: Note: remoteproc is still under development and considered experimental.
    [    9.998442]  remoteproc2: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [    9.998755] omap-rproc 41000000.dsp: assigned reserved memory node dsp2_cma@9f000000
    [    9.998789]  remoteproc3: 41000000.dsp is available
    [    9.998792]  remoteproc3: Note: remoteproc is still under development and considered experimental.
    [    9.998794]  remoteproc3: THE BINARY FORMAT IS NOT YET FINALIZED, and backward compatibility isn't yet guaranteed.
    [   10.088094] input: palmas_pwron as /devices/platform/44000000.ocp/4807a000.i2c/i2c-3/3-0058/4807a000.i2c:tps659038@58:tps659038_pwr_button/input/input0
    [   10.130572] vip 48970000.vip: VPDMA firmware loaded
    [   10.136374] vip1-s0: can't get next endpoint: loop: 1
    [   10.136381] vip1-s0: register async notifier for 1 subdevs
    [   10.136388] vip1-s0: vip_async_bound
    [   10.136393] vip1-s0: Port A: Using subdev tvp514x 4-005d for capture
    [   10.154903] vip1-s0: subdev tvp514x 4-005d: code: 2006 idx: 0
    [   10.154913] vip1-s0: matched fourcc: NV24: code: 2006 idx: 0
    [   10.154919] vip1-s0: matched fourcc: NV16: code: 2006 idx: 1
    [   10.154924] vip1-s0: matched fourcc: NV12: code: 2006 idx: 2
    [   10.154928] vip1-s0: matched fourcc: UYVY: code: 2006 idx: 3
    [   10.154932] vip1-s0: matched fourcc: YUYV: code: 2006 idx: 4
    [   10.154936] vip1-s0: matched fourcc: VYUY: code: 2006 idx: 5
    [   10.154940] vip1-s0: matched fourcc: YVYU: code: 2006 idx: 6
    [   10.156127] vip1-s0: device registered as video1
    [   10.164474] vip1-s0: vip_async_complete
    [   10.250430] vip1-s0: vip_open
    [   10.250447] vip1-s0: subdev default mbus_fmt 0000 is not matched.
    [   10.250452] vip1-s0: init_port set_fmt failed in subdev
    [   10.250459] vip1-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV24 size: 0x0
    [   10.250467] vip1-s0: calc_format_size: fourcc:NV24 size: 128x128 bpl:128 img_size:32768
    [   10.250472] vip1-s0: init_stream fourcc:NV24 size: 128x128 bpl:128 img_size:32768
    [   10.250479] vip1-s0: init_stream vpdma data type: 0x00
    [   10.250485] vip1-s0: Created stream instance dfe94000
    [   10.250729] vip1-s0: vip_release
    [   10.250745] vip1-s0: Releasing stream instance dfe94000
    [   10.411704] of_get_named_gpiod_flags: parsed 'pendown-gpio' property of node '/ocp/qspi@4b300000/ads7846@1[0]' - status (0)
    [   10.428268] ads7846 spi32766.1: touchscreen, irq 67
    [   10.437132] input: ADS7846 Touchscreen as /devices/platform/44000000.ocp/4b300000.qspi/spi_master/spi32766/spi32766.1/input/input1
    [   10.464725] omap-hdmi-audio omap-hdmi-audio.0.auto: snd-soc-dummy-dai <-> 58040000.encoder mapping ok
    [   10.529002] m25p80 spi32766.0: found m25px16, expected m25p80
    [   10.534848] m25p80 spi32766.0: m25px16 (2048 Kbytes)
    [   10.539850] 3 ofpart partitions found on MTD device spi32766.0
    [   10.547121] Creating 3 MTD partitions on "spi32766.0":
    [   10.552453] 0x000000000000-0x0000000c0000 : "uboot"
    [   10.566052] 0x0000000c0000-0x000000100000 : "uboot environment"
    [   10.593054] 0x000000100000-0x000000200000 : "reserved"
    [   10.701157] omapdrm_pvr: disagrees about version of symbol module_layout
    [   10.904277] omapdrm_pvr: disagrees about version of symbol module_layout
    [   10.915015]  remoteproc1: registered virtio0 (type 7)
    [   10.983028]  remoteproc0: registered virtio1 (type 7)
    [   11.076319]  remoteproc1: powering up 55020000.ipu
    [   11.097453]  remoteproc1: Booting fw image dra7-ipu2-fw.xem4, size 3485072
    [   11.105651] omap-iommu 55082000.mmu: 55082000.mmu: version 2.1
    [   11.207039]  remoteproc1: remote processor 55020000.ipu is now up
    [   11.213877] virtio_rpmsg_bus virtio0: rpmsg host is online
    [   11.219410] virtio_rpmsg_bus virtio0: creating channel rpmsg-rpc addr 0x3b
    [   11.228118]  remoteproc0: powering up 58820000.ipu
    [   11.258465]  remoteproc0: Booting fw image dra7-ipu1-fw.xem4, size 6142375
    [   11.266635] omap-iommu 58882000.mmu: 58882000.mmu: version 2.1
    [   11.286494]  remoteproc0: remote processor 58820000.ipu is now up
    [   11.302333] virtio_rpmsg_bus virtio1: rpmsg host is online
    [   11.500529] rpmsg_rpc rpmsg0: probing service rpmsg-dce with src 1024 dst 59
    [   11.509779] rpmsg_rpc rpmsg0: published functions = 8
    [   11.761569] usbcore: registered new interface driver usbfs
    [   11.767720] usbcore: registered new interface driver hub
    [   11.774971] usbcore: registered new device driver usb
    [   11.830108] virtio_rpmsg_bus virtio1: creating channel rpmsg-client-sample addr 0x32
    [   11.840145] virtio_rpmsg_bus virtio1: creating channel rpmsg-client-sample addr 0x33
    [   11.848341] virtio_rpmsg_bus virtio1: creating channel rpmsg-omx addr 0x3c
    [   11.855408] virtio_rpmsg_bus virtio1: creating channel rpmsg-rpc addr 0x3b
    [   11.862532] rpmsg_rpc rpmsg4: probing service rpc_example_2 with src 1024 dst 59
    [   11.874202] rpmsg_rpc rpmsg4: published functions = 8
    [   11.874233] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   11.874254] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 1
    [   11.894390] xhci-hcd xhci-hcd.1.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x00210010
    [   11.904456] xhci-hcd xhci-hcd.1.auto: irq 428, io mem 0x48890000
    [   11.912142] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    [   11.920111] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   11.928482] usb usb1: Product: xHCI Host Controller
    [   11.934086] usb usb1: Manufacturer: Linux 4.1.13-cl-som-am57x-ti-3.1-g8dc6617-dirty xhci-hcd
    [   11.946178] usb usb1: SerialNumber: xhci-hcd.1.auto
    [   11.954075] hub 1-0:1.0: USB hub found
    [   11.958938] hub 1-0:1.0: 1 port detected
    [   11.964634] xhci-hcd xhci-hcd.1.auto: xHCI Host Controller
    [   11.972483] xhci-hcd xhci-hcd.1.auto: new USB bus registered, assigned bus number 2
    [   11.981681] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
    [   11.991634] usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
    [   12.000768] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   12.009642] usb usb2: Product: xHCI Host Controller
    [   12.015293] usb usb2: Manufacturer: Linux 4.1.13-cl-som-am57x-ti-3.1-g8dc6617-dirty xhci-hcd
    [   12.024835] usb usb2: SerialNumber: xhci-hcd.1.auto
    [   12.032061] hub 2-0:1.0: USB hub found
    [   12.036899] hub 2-0:1.0: 1 port detected
    [   12.042783] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
    [   12.049012] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 3
    [   12.061837] xhci-hcd xhci-hcd.2.auto: hcc params 0x0220f04c hci version 0x100 quirks 0x00210010
    [   12.072079] xhci-hcd xhci-hcd.2.auto: irq 429, io mem 0x488d0000
    [   12.080713] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
    [   12.089003] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   12.097703] usb usb3: Product: xHCI Host Controller
    [   12.104100] usb usb3: Manufacturer: Linux 4.1.13-cl-som-am57x-ti-3.1-g8dc6617-dirty xhci-hcd
    [   12.114044] usb usb3: SerialNumber: xhci-hcd.2.auto
    [   12.121183] hub 3-0:1.0: USB hub found
    [   12.126495] hub 3-0:1.0: 1 port detected
    [   12.132246] xhci-hcd xhci-hcd.2.auto: xHCI Host Controller
    [   12.139823] xhci-hcd xhci-hcd.2.auto: new USB bus registered, assigned bus number 4
    [   12.149076] usb usb4: We don't know the algorithms for LPM for this host, disabling LPM.
    [   12.158854] usb usb4: New USB device found, idVendor=1d6b, idProduct=0003
    [   12.166309] usb usb4: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    [   12.174706] usb usb4: Product: xHCI Host Controller
    [   12.181041] usb usb4: Manufacturer: Linux 4.1.13-cl-som-am57x-ti-3.1-g8dc6617-dirty xhci-hcd
    [   12.190179] usb usb4: SerialNumber: xhci-hcd.2.auto
    [   12.195969] hub 4-0:1.0: USB hub found
    [   12.200512] hub 4-0:1.0: 1 port detected
    [   12.310975]  remoteproc2: powering up 40800000.dsp
    [   12.315793]  remoteproc2: Booting fw image dra7-dsp1-fw.xe66, size 21591344
    [   12.329990] omap_hwmod: mmu0_dsp1: _wait_target_disable failed
    [   12.335919] omap-iommu 40d01000.mmu: 40d01000.mmu: version 3.0
    [   12.341823] omap-iommu 40d02000.mmu: 40d02000.mmu: version 3.0
    [   12.359198]  remoteproc3: powering up 41000000.dsp
    [   12.365375]  remoteproc3: Booting fw image dra7-dsp2-fw.xe66, size 21591344
    [   12.377093]  remoteproc2: RSC_INTMEM is deprecated. Please do not use this resource type to support loading into internal memories.
    [   12.395570] omap_hwmod: mmu0_dsp2: _wait_target_disable failed
    [   12.401475] omap-iommu 41501000.mmu: 41501000.mmu: version 3.0
    [   12.407358] omap-iommu 41502000.mmu: 41502000.mmu: version 3.0
    [   12.417204]  remoteproc2: remote processor 40800000.dsp is now up
    [   12.424016] virtio_rpmsg_bus virtio2: rpmsg host is online
    [   12.429545]  remoteproc2: registered virtio2 (type 7)
    [   12.440247]  remoteproc3: RSC_INTMEM is deprecated. Please do not use this resource type to support loading into internal memories.
    [   12.459870]  remoteproc3: remote processor 41000000.dsp is now up
    [   12.464348] virtio_rpmsg_bus virtio2: creating channel rpmsg-proto addr 0x3d
    [   12.474266] virtio_rpmsg_bus virtio3: rpmsg host is online
    [   12.474365] virtio_rpmsg_bus virtio3: creating channel rpmsg-proto addr 0x3d
    [   12.486921]  remoteproc3: registered virtio3 (type 7)
    [   12.491843] cmemk: disagrees about version of symbol module_layout
    [   12.570575] usb 3-1: new high-speed USB device number 2 using xhci-hcd
    [   12.711810] usb 3-1: New USB device found, idVendor=04b4, idProduct=6570
    [   12.719631] usb 3-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
    [   12.727200] usb 3-1: Product: USB2.0 Hub
    [   12.757127] hub 3-1:1.0: USB hub found
    [   12.761222] hub 3-1:1.0: 4 ports detected
    [   13.040592] usb 3-1.1: new high-speed USB device number 3 using xhci-hcd
    [   13.141790] usb 3-1.1: New USB device found, idVendor=04b4, idProduct=6570
    [   13.148699] usb 3-1.1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
    [   13.156070] usb 3-1.1: Product: USB2.0 Hub
    [   13.173133] hub 3-1.1:1.0: USB hub found
    [   13.177386] hub 3-1.1:1.0: 4 ports detected
    [   13.460583] usb 3-1.1.1: new low-speed USB device number 4 using xhci-hcd
    [   13.566854] usb 3-1.1.1: New USB device found, idVendor=1a81, idProduct=1006
    [   13.574039] usb 3-1.1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
    [   13.581649] usb 3-1.1.1: Product: Wireless keyboard and mouse
    [   13.587929] usb 3-1.1.1: Manufacturer: KYE
    [   13.593401] usb 3-1.1.1: ep 0x81 - rounding interval to 64 microframes, ep desc says 80 microframes
    [   13.602662] usb 3-1.1.1: ep 0x82 - rounding interval to 64 microframes, ep desc says 80 microframes
    [   13.700692] usbcore: registered new interface driver usbhid
    [   13.706340] usbhid: USB HID core driver
    [   13.717982] usbcore: registered new interface driver usbmouse
    [   13.726742] usbcore: registered new interface driver usbkbd
    [   13.754724] input: KYE Wireless keyboard and mouse as /devices/platform/44000000.ocp/488c0000.omap_dwc3_2/488d0000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.1/3-1.1.1/3-1.1.1:1.0/0003:1A81:1006.0001/input/input2
    [   13.830784] hid-generic 0003:1A81:1006.0001: input: USB HID v1.11 Keyboard [KYE Wireless keyboard and mouse] on usb-xhci-hcd.2.auto-1.1.1/input0
    [   13.845108] input: KYE Wireless keyboard and mouse as /devices/platform/44000000.ocp/488c0000.omap_dwc3_2/488d0000.usb/xhci-hcd.2.auto/usb3/3-1/3-1.1/3-1.1.1/3-1.1.1:1.1/0003:1A81:1006.0002/input/input3
    [   13.921167] hid-generic 0003:1A81:1006.0002: input,hiddev0: USB HID v1.11 Mouse [KYE Wireless keyboard and mouse] on usb-xhci-hcd.2.auto-1.1.1/input1
    [   15.414186] NET: Registered protocol family 10
    [   16.798293] Bluetooth: Core ver 2.20
    [   16.802010] NET: Registered protocol family 31
    [   16.806474] Bluetooth: HCI device and connection manager initialized
    [   16.813187] Bluetooth: HCI socket layer initialized
    [   16.818714] Bluetooth: L2CAP socket layer initialized
    [   16.823928] Bluetooth: SCO socket layer initialized
    [  119.990887] vip1-s0: vip_open
    [  119.990907] vip1-s0: subdev default mbus_fmt 0000 is not matched.
    [  119.990914] vip1-s0: init_port set_fmt failed in subdev
    [  119.990923] vip1-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV24 size: 0x0
    [  119.990934] vip1-s0: calc_format_size: fourcc:NV24 size: 128x128 bpl:128 img_size:32768
    [  119.990943] vip1-s0: init_stream fourcc:NV24 size: 128x128 bpl:128 img_size:32768
    [  119.990950] vip1-s0: init_stream vpdma data type: 0x00
    [  119.990958] vip1-s0: Created stream instance dfe94000
    [  119.991332] vip1-s0: s_fmt input fourcc:YUYV size: 720x576
    [  119.991344] vip1-s0: try_fmt fourcc:YUYV size: 720x576
    [  119.991353] vip1-s0: calc_format_size: fourcc:YUYV size: 720x576 bpl:1440 img_size:829440
    [  119.991361] vip1-s0: s_fmt try_fmt fourcc:YUYV size: 720x576
    [  119.991369] vip1-s0: s_fmt fourcc:YUYV size: 720x576 bpl:1440 img_size:829440
    [  119.991376] vip1-s0: s_fmt pix_to_mbus mbus_code: 2006 size: 720x576
    [  119.991383] vip1-s0: set_fmt failed in subdev
    [  119.991529] vip1-s0: vip_release
    [  119.991546] vip1-s0: Releasing stream instance dfe94000

  • Please try attached patch. Hopefully this should get you going. 

    0001-media-i2c-tvp514x-get_fmt-make-sure-valid-default-va.patch

  • Hi Manisha

    After applying the patch, the S_FMT error gone, but when I try to run test, I got this error:

    Error opening device /dev/video1: No such device (19)

    What about vsync and hsync and pclock lines in dts file? As I said before, when I removed these lines, the device did not recognized and I put them back. How vip knows to use BT656 standard? I also add .g_mbus_config to tvp514x_video_ops and force it with cfg->type = V4L2_MBUS_BT656 . But there is no progress.

    The dmesg log is:

    dmesg | grep vip
    [    0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.20:/home/aidin/rootfs-cl-som,nolock console=ttyO2,115200n8 ip=192.168.0.10::192.168.0.1:255.255.255.0::eth1:off ti_vip.debug=3
    [    8.511949] vip 48970000.vip: loading firmware vpdma-1b8.bin
    [    8.560871] vip 48970000.vip: VPDMA firmware loaded
    [    8.571333] vip1-s0: can't get next endpoint: loop: 1
    [    8.571336] vip1-s0: register async notifier for 1 subdevs
    [    8.571339] vip1-s0: vip_async_bound
    [    8.571342] vip1-s0: Port A: Using subdev tvp514x 4-005d for capture
    [    8.571346] vip1-s0: subdev tvp514x 4-005d: code: 2006 idx: 0
    [    8.571349] vip1-s0: matched fourcc: NV24: code: 2006 idx: 0
    [    8.571352] vip1-s0: matched fourcc: NV16: code: 2006 idx: 1
    [    8.571354] vip1-s0: matched fourcc: NV12: code: 2006 idx: 2
    [    8.571356] vip1-s0: matched fourcc: UYVY: code: 2006 idx: 3
    [    8.571358] vip1-s0: matched fourcc: YUYV: code: 2006 idx: 4
    [    8.571359] vip1-s0: matched fourcc: VYUY: code: 2006 idx: 5
    [    8.571361] vip1-s0: matched fourcc: YVYU: code: 2006 idx: 6
    [    8.592094] vip1-s0: device registered as video1
    [    8.592112] vip1-s0: vip_async_complete
    [    9.024582] vip1-s0: vip_open
    [    9.024600] vip1-s0: subdev default mbus_fmt 2006 is not matched.
    [    9.024610] vip1-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV24 size: 720x576

  • Aidin Haddadi said:
    What about vsync and hsync and pclock lines in dts file? As I said before, when I removed these lines, the device did not recognized and I put them back. How vip knows to use BT656 standard?

    hsync, vsync and pclock are required for discrete sync sensor. Since you are using embedded sync sensor, these settings aren't required in dts. When driver doesn't see these signals, it assume the sensor to be BT656. 

    The dmesg log below shows the vip boot sequence which indicates that VIP successfully negotiated with the tvp514x. Looks like this is the log that has hsync and vsync lines in the dts.

     

    Can you share the vip debug log that correspond to the failure when the hsync/vsync lines are removed from the dts and the test is run which produces: "Error opening device /dev/video1: No such device (19)" message.

     

    Also when you get the message above does the /dev/video1 still exist?  Can you also enable some of v4l2 framework logs prior to running the test as follows -

     

    echo 3 > /sys/class/video4linux/video1/dev_debug

     

  • Hi Manisha

    manisha said:
    hsync, vsync and pclock are required for discrete sync sensor. Since you are using embedded sync sensor, these settings aren't required in dts. When driver doesn't see these signals, it assume the sensor to be BT656. 

    That's right. I am totally familiar with the embedded sync codes. I have already configure so many decoders and encoders with FPGA. But when I remove them, there is no /dev/video1 !!!

    manisha said:
    The dmesg log below shows the vip boot sequence which indicates that VIP successfully negotiated with the tvp514x. Looks like this is the log that has hsync and vsync lines in the dts.

    Yes this log is with hsync and vsync in the dts file.

    manisha said:
    Can you share the vip debug log that correspond to the failure when the hsync/vsync lines are removed from the dts and the test is run which produces: "Error opening device /dev/video1: No such device (19)" message.

    As I said earlier, when I remove the hsync/vsync/pclk lines from dts, there is no /dev/video1 to run any tests.

    manisha said:
    Also when you get the message above does the /dev/video1 still exist?

    Yes the /dev/video1 is exist. I check it again, it seems it dose not registered as v4l2 sub device. ( v4l2-ctl --list-devices )

    manisha said:
    Can you also enable some of v4l2 framework logs prior to running the test

    I am on it.

  • Please apply attached two patches to your kernel and hopefully this should take care of the remaining v4l2 handshake roadblocks. These patches are HACK for now. 

    You will also need to modify the dts file to add "channels" parameters as follows -

            compatible = "ti,tvp5146";

            reg = <0x5c>;

     

            port {

                tvp514x_1: endpoint {

                    remote-endpoint = <&vin1a>;

                   pclk-sample = <0>;

                   channels = <0>;

                };

            };

        };

    0001-media-i2c-tvp514x-HACK-fix-handshaking-with-VIP.patch0002-media-ti-vpe-vip-Allow-V4L2_FIELD_INTERLACED.patch

  • Hi Manisha,

    Thank you very much. After applying those changes, the device registered as /dev/video1 but still NOT as v4l2 sub device!!! So I add the function for addressing V4L2_MBUS_BT656 in the driver: (borrowed from adv7180 driver in kernel 4.4)

    /* added by Aidin
    		 * The TVP5146 sensor supports BT.656 output modes.
    		 * The BT.656 is default.
    		 */
    
    static int tvp514x_g_mbus_config(struct v4l2_subdev *sd,
    				 struct v4l2_mbus_config *cfg)
    {		
    		cfg->flags = V4L2_MBUS_MASTER | V4L2_MBUS_PCLK_SAMPLE_RISING |
    				 V4L2_MBUS_DATA_ACTIVE_HIGH;
    		cfg->type = V4L2_MBUS_BT656;	
    
    	return 0;
    }

    and I add .g_mbus_config = tvp514x_g_mbus_config, to tvp514x_video_ops .

    After these changes, the device came under v4l2 devices and I could run test. But there is NO output. Is there anything still missing?

    Here are some console outputs and dmesg logs:

    Patches applied and V4L2_MBUS_BT656 added in the driver, dts file modified as you described:

    :/home# dmesg | grep vip
    [    0.000000] Kernel command line: root=/dev/nfs rw nfsroot=192.168.0.20:/home/aidin/rootfs-cl-som,nolock console=ttyO2,115200n8 ip=192.168.0.10::192.168.0.1:255.255.255.0::eth1:off ti_vip.debug=3
    [    8.586426] vip 48970000.vip: loading firmware vpdma-1b8.bin
    [    8.610647] vip 48970000.vip: VPDMA firmware loaded
    [    8.617528] vip1-s0: can't get next endpoint: loop: 1
    [    8.617536] vip1-s0: register async notifier for 1 subdevs
    [    8.780290] vip1-s0: vip_async_bound
    [    8.780300] vip1-s0: Port A: Using subdev tvp514x 4-005d for capture
    [    8.790161] vip1-s0: subdev tvp514x 4-005d: code: 2006 idx: 0
    [    8.790309] vip1-s0: matched fourcc: NV24: code: 2006 idx: 0
    [    8.790320] vip1-s0: matched fourcc: NV16: code: 2006 idx: 1
    [    8.790327] vip1-s0: matched fourcc: NV12: code: 2006 idx: 2
    [    8.790333] vip1-s0: matched fourcc: UYVY: code: 2006 idx: 3
    [    8.790340] vip1-s0: matched fourcc: YUYV: code: 2006 idx: 4
    [    8.790346] vip1-s0: matched fourcc: VYUY: code: 2006 idx: 5
    [    8.790354] vip1-s0: matched fourcc: YVYU: code: 2006 idx: 6
    [    8.816247] vip1-s0: device registered as video1
    [    8.834801] vip1-s0: vip_async_complete
    [    9.417529] vip1-s0: vip_open
    [    9.417545] vip1-s0: subdev default mbus_fmt 2006 is not matched.
    [    9.417552] vip1-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV24 size: 720x576
    [    9.417562] vip1-s0: calc_format_size: fourcc:NV24 size: 720x576 bpl:720 img_size:829440
    [    9.417569] vip1-s0: init_stream fourcc:NV24 size: 720x576 bpl:720 img_size:829440
    [    9.417573] vip1-s0: init_stream vpdma data type: 0x00
    [    9.417582] vip1-s0: Created stream instance ecf6c000
    [    9.417687] vip1-s0: vip_release
    [    9.417701] vip1-s0: Releasing stream instance ecf6c000
    [   48.959417] vip1-s0: vip_open
    [   48.959437] vip1-s0: subdev default mbus_fmt 2006 is not matched.
    [   48.959447] vip1-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV24 size: 720x576
    [   48.959458] vip1-s0: calc_format_size: fourcc:NV24 size: 720x576 bpl:720 img_size:829440
    [   48.959467] vip1-s0: init_stream fourcc:NV24 size: 720x576 bpl:720 img_size:829440
    [   48.959474] vip1-s0: init_stream vpdma data type: 0x00
    [   48.959482] vip1-s0: Created stream instance ecf6c000
    [   48.959499] vip1-s0: vip_release
    [   48.959513] vip1-s0: Releasing stream instance ecf6c000

    yavta test : (nothing happens, I terminated it, no files have been created)

    :~# yavta /dev/video1 -c10 -fYUYV -Fvout_test.yuv -s720x576
    
    Device /dev/video1 opened.
    Device `vip' on `platform:vip' is a video output (without mplanes) device.
    Video format set: YUYV (56595559) 720x576 (stride 1440) field none buffer size 829440
    Video format: YUYV (56595559) 720x576 (stride 1440) field none buffer size 829440
    8 buffers requested.
    length: 829440 offset: 0 timestamp type/source: mono/EoF
    Buffer 0/0 mapped at address 0xb6cf0000.
    length: 829440 offset: 831488 timestamp type/source: mono/EoF
    Buffer 1/0 mapped at address 0xb6c25000.
    length: 829440 offset: 1662976 timestamp type/source: mono/EoF
    Buffer 2/0 mapped at address 0xb6b5a000.
    length: 829440 offset: 2494464 timestamp type/source: mono/EoF
    Buffer 3/0 mapped at address 0xb6a8f000.
    length: 829440 offset: 3325952 timestamp type/source: mono/EoF
    Buffer 4/0 mapped at address 0xb69c4000.
    length: 829440 offset: 4157440 timestamp type/source: mono/EoF
    Buffer 5/0 mapped at address 0xb68f9000.
    length: 829440 offset: 4988928 timestamp type/source: mono/EoF
    Buffer 6/0 mapped at address 0xb682e000.
    length: 829440 offset: 5820416 timestamp type/source: mono/EoF
    Buffer 7/0 mapped at address 0xb6763000.
    ^C
    
    :~# dmesg | grep video
    [    0.408702] Linux video capture interface: v2.00
    [    0.478840] connector-hdmi connector@0: failed to find video source
    [    2.730778] omapwb-m2m: Device registered as video10
    [   11.694067] vpe 489d0000.vpe: Device registered as /dev/video0
    [   12.031440] vip1-s0: device registered as video1
    [   63.251455] video1: VIDIOC_QUERYCAP: driver=vip, card=vip, bus=platform:vip, version=0x0004010d, capabilities=0x85200001, device_caps=0x05200001
    [   63.251680] video1: VIDIOC_S_FMT: type=vid-cap, width=720, height=576, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=829440, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0
    [   63.251894] video1: VIDIOC_G_FMT: type=vid-cap, width=720, height=576, pixelformat=YUYV, field=none, bytesperline=1440, sizeimage=829440, colorspace=1, flags=0x0, ycbcr_enc=0, quantization=0
    [   63.257545] video1: VIDIOC_REQBUFS: count=8, type=vid-cap, memory=mmap
    [   63.257828] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=0, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x0, length=829440
    [   63.258171] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=1, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0xcb000, length=829440
    [   63.258460] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=2, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x196000, length=829440
    [   63.258798] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=3, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x261000, length=829440
    [   63.259083] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=4, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x32c000, length=829440
    [   63.259452] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=5, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x3f7000, length=829440
    [   63.259810] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=6, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x4c2000, length=829440
    [   63.260162] video1: VIDIOC_QUERYBUF: 00:00:00.00000000 index=7, type=vid-cap, flags=0x00002000, field=any, sequence=0, memory=mmap, bytesused=0, offset/userptr=0x58d000, length=829440
    [   63.287285] video1: VIDIOC_STREAMON: type=vid-cap
    :/home# dmesg | grep vip
    
    [  128.056370] vip1-s0: vip_open
    [  128.056389] vip1-s0: subdev default mbus_fmt 2006 is not matched.
    [  128.056399] vip1-s0: vip_init_port: g_mbus_fmt subdev mbus_code: 2006 fourcc:NV24 size: 720x576
    [  128.056410] vip1-s0: calc_format_size: fourcc:NV24 size: 720x576 bpl:720 img_size:829440
    [  128.056419] vip1-s0: init_stream fourcc:NV24 size: 720x576 bpl:720 img_size:829440
    [  128.056426] vip1-s0: init_stream vpdma data type: 0x00
    [  128.056434] vip1-s0: Created stream instance ecf6c000
    [  128.056778] vip1-s0: s_fmt input fourcc:YUYV size: 720x576
    [  128.056787] vip1-s0: try_fmt fourcc:YUYV size: 720x576
    [  128.056796] vip1-s0: calc_format_size: fourcc:YUYV size: 720x576 bpl:1440 img_size:829440
    [  128.056804] vip1-s0: s_fmt try_fmt fourcc:YUYV size: 720x576
    [  128.056812] vip1-s0: s_fmt fourcc:YUYV size: 720x576 bpl:1440 img_size:829440
    [  128.056819] vip1-s0: s_fmt pix_to_mbus mbus_code: 2006 size: 720x576
    [  128.056826] vip1-s0: s_fmt subdev s_fmt mbus_code: 2006 size: 720x576
    [  128.056832] vip1-s0: s_fmt vpdma data type: 0x07
    [  128.056964] vip1-s0: g_fmt fourcc:YUYV code: 2006 size: 720x576 bpl:1440 img_size:829440
    [  128.056972] vip1-s0: g_fmt vpdma data type: 0x07
    [  128.057112] vip1-s0: get 8 buffer(s) of size 829440 each.
    [  128.066021] vip1-s0: start_streaming: buf 0xec8f4c00 8
    [  128.078679] vip1-s0: start_streaming: start_dma buf 0xec8f4c00
    [  185.702646] vip1-s0: vip_release
    [  185.702856] vip1-s0: Clear channel no: 38
    [  185.702888] vip1-s0: Releasing stream instance ecf6c000

    capturevpedisplay , this creates nothing!


    :/home# capturevpedisplay 720 576 yuyv 720 576 uyvy 0 1 -s 26:1600x900
    vpe:/dev/video0 open success!!!
    vip open success!!!
    using 1 connectors, 1600x900 display, multiplanar: 1
    vip: G_FMT(start): width = 720, height = 576, 4cc = YUYV
    vpe i/p: G_FMT: width = 720, height = 576, 4cc = YUYV
    vpe o/p: G_FMT: width = 720, height = 576, 4cc = UYVY

    dmabuftest : this again shows nothing


    :/home# dmabuftest -s 26:1600x900 -d /dev/video1 -c 720x576@NV12 
    Opening Display..
    using 1 connectors, 1600x900 display, multiplanar: 1
    Opening V4L2..
    Exported buffer fd = 17
    
    Exported buffer fd = 18
    
    Exported buffer fd = 19
    
    Exported buffer fd = 20
    
    Exported buffer fd = 21
    
    Exported buffer fd = 22
    
    ^C
    

    I have checked the TVP5146 registers with i2cget function. They have been configured correct. I have checked theTVP5146 clock and data signals with oscilloscope and they were fine too. 

    So what is missing here?

  • You seems to be on linux kernel version 4.1. The dts entries that I shared earlier was for kernel version 4.4. Can you try changing the dts entry for channels as num-channels and set that to 1 as below, undo your changes for  g_mbus_config. Also put printks in vip_create_streams() function in vip.c file to check if bus_type is getting detected as parallel or BT.656. 

        tvp514x@5c {

            compatible = "ti,tvp5146";

            reg = <0x5c>;

     

            port {

                tvp514x_1: endpoint {

                    remote-endpoint = <&vin1a>;

                   pclk-sample = <0>;

                   num-channels = <1>;

                };

            }; 

  • Hi manisha

    manisha said:
    You seems to be on linux kernel version 4.1.

    Yes it is.

    I have modified the dts  ( num-channels = <1>; ) and I removed the extra function for g_mbus_config from tvp514x.c driver file as you said. The decoder is recognized as v4l2 sub device but there is still NO output from any tests!  

    I add the printk in vip.c driver file. I got V4L2_MBUS_PARALLEL .

    [    8.766609]  vip V4L2_MBUS_PARALLEL

    The function is as follows:

    static int vip_create_streams(struct vip_port *port,
    			      struct v4l2_subdev *subdev)
    {
    	struct v4l2_of_bus_parallel *bus;
    	int i;
    
    	for (i = 0; i < VIP_CAP_STREAMS_PER_PORT; i++)
    		free_stream(port->cap_streams[i]);
    
    	if (get_subdev_active_format(port, subdev))
    		return -ENODEV;
    
    	if (port->endpoint->bus_type == V4L2_MBUS_PARALLEL) {
    		port->flags |= FLAG_MULT_PORT;
    		alloc_stream(port, 0, VFL_TYPE_GRABBER);
    		printk(" vip V4L2_MBUS_PARALLEL");
    	} else if (port->endpoint->bus_type == V4L2_MBUS_BT656) {
    		port->flags |= FLAG_MULT_PORT;
    		bus = &port->endpoint->bus.parallel;
    		printk(" vip V4L2_MBUS_BT656");
    		for (i = 0; i < bus->num_channels; i++) {
    			if (bus->channels[i] >= 16)
    				continue;
    			alloc_stream(port, bus->channels[i], VFL_TYPE_GRABBER);
    		}
    	}
    	return 0;
    }

  • In 4.1, you also need to remove the "pclk-sample = <0>;" from dts file. Missed informing on this yesterday.
    Basically if any of the following lines are present in v4.1 it will be set as a standard parallel endpoint with discrete sync:

    - hsync-active
    - vsync-active
    - pclk-sample
    - field-even-active

    Hopefully, with this the sub-device should get detect as BT656.
  • Hi Manisha

    manisha said:
    In 4.1, you also need to remove the "pclk-sample = <0>;" from dts file.

    When I did that, the /dev/video1 was gone. I have tried it before. From my tests at least one of these signals you mentioned should be present in the dts file for the decoder to be registered as a video device. So what do next?

    Also from the logs, the vip got the device as V4L2_MBUS_BT656.

    Is there any chance to surpass these problems by moving to kernel 4.4 ?

  • If you can migrate to 4.4, I would suggest doing so.  That should take care of problem related to version incompatibility with respect to dts configuration. 

  • OK. It seems there is no way. I found no extra information about dts entries on the web. The Linux cross reference said that "/* If hsync-active/vsync-active are missing, embedded BT.656 sync is used */"  . But it does not work. When I insert pclk-sample, it does not recognized as BT.656 and when I remove it, the decoder would not be registered as /dev/video1. 

    I will migrate to 4.4 and I will let you know about the results.

  • Hi Manisha

    I tried to make things work with the latest ti-processor-sdk-linux-am57xx-evm-03.01.00.06 but I noticed that in the current release there is just vip1 definition in the dra7.dtsi file. For dome reason I am using vip2 VIN4A and when I tried to add its definition to the dra7.dtsi file, I got errors when compiling dts. There are some differences from the previous release. I also tried to handle the errors and compiling the dts but at the end when booting the kernel, I got kernel panic error regarding L3:

    44000000.ocp:L3 Custom Error: MASTER MPU TARGET L4_PER1_P3 (Idle): Data Access in Supervisor mode during Functional access

    So what is the correct way to add vip2 (and vip3) support to the current SDK release?

  • Hi Aidin,

    Please compare the changes between .dts of the v4.4. version against the 4.1 version that you started with and incorporate the relevenat changes. You probably may be missing the include of “am57xx-beagle-x15-common.dtsi” in turn which includes “dra74x.dtsi” which now contains the vip2 and vip3 definitions.

     That particular changes was made to be more accurate as not all dra7 device have all 3 instances of VIP only the ones based on the DRA74x device do. For other error messages, always share with us entire dmesg log for us to analyse and comment. 

    Regards,

    Manisha

  • Hi,
    Aidin,do you fix up it?I debug the tvp5158,it seems that it is the same problem as your.

    Br,
    vefone
  • Hi Vefone

    Unfortunately I did not have time in the past month and I did not get a chance to go further! It seems somebody solve this problem here:
    e2e.ti.com/.../1990409
    but he did not answer about what he did!

    I will post if I got any progress.
  • Hi,
    Aidin,Thank you!I had fixed up it.

    e2e.ti.com/.../2037172

    vefone