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.

Linux/AM5728: VIP minimum sub device driver

Part Number: AM5728


Tool/software: Linux

Hello,

I have connected a camera with 16Bit YCbCr 4:2:2 output with embedded sync to the VIP via camera module interface on the AM572xEVM. The camera outputs video in a fixed format 1920x1080p25 with 74.25MHZ pixel clock. There is no communication from am5728 to the camera. The camera starts immediately to stream video when power is on. Now I need a minimum sub device driver and a device tree entry in order to receive the video in gstreamer. 

My questions are as follows:

1. What is the minimum implementation of a sub device driver without configuration capabilities? Is there an example? I had a look at the ov7640.c which is very short, but has i2c which is not needed.

2. How will the device tree entries look like?

Thanks in advance for your help

Marc

  • Hi,

    The software team have been notified. They will respond here.
  • Hello,

    do you have any suggestions for me? Is there an example of a minimum sub device driver? Are media entities and pads needed?

    Thank you
  • I have escalated the request.
  • Marc48067 said:
    I have connected a camera with 16Bit YCbCr 4:2:2 output with embedded sync to the VIP via camera module interface on the AM572xEVM

    VIP driver doesn't support 16 bit bus embedded sync (BT.1120). It only supports 8 bit bus embedded sync ie BT656

    Marc48067 said:
    1. What is the minimum implementation of a sub device driver without configuration capabilities? Is there an example? I had a look at the ov7640.c which is very short, but has i2c which is not needed.

    Since the sensor being used is embedded sync, suggest you to look at tvp514x.c driver as a model. You can stub out/remove i2c part if they aren't needed. For ex, you may have to use v4l2_subdev_init() directly instead of v4l2_i2c_subdev_init()

    Marc48067 said:
    2. How will the device tree entries look like?

    DTS entry could look like this

     

    / {

                   cam_name1 {

                                  compatible = "<company_id>,<cam_name>";

     

                                  port {

                                                 #address-cells = <1>;

                                                 #size-cells = <0>;

                                                 cam1: endpoint {

                                                                reg = <1>;

                                                                /* or whichever vin port it is connected to */

                                                                remote-endpoint = <&vin1a>;

                                                                pclk-sample = <0>;

                                                                channels = <0>;

                                                 };

                                  };

                   };

    };

     

    This should at least allow it to handshake with at a V4L2 framework level as an embedded sync sub-device.

  • Marc48067 said:
    Are media entities and pads needed?

    VIP doesn't support media framework, so media entities aren't needed in the sub-device. However, the sub-device does need to support the V4L2 Sub-device API i.e CONFIG_VIDEO_V4L2_SUBDEV_API.

  • Thanks a lot!

    Below are the subdev ops from tvp514x.c driver. I don't know which ops are mandatory and must be implemented and which can be NULL. Also I don't know the purpose of each op.

    static const struct v4l2_subdev_video_ops tvp514x_video_ops = {
    .s_std = tvp514x_s_std,
    .s_routing = tvp514x_s_routing,
    .querystd = tvp514x_querystd,
    .g_parm = tvp514x_g_parm,
    .s_parm = tvp514x_s_parm,
    .s_stream = tvp514x_s_stream,
    };

    static const struct v4l2_subdev_pad_ops tvp514x_pad_ops = {
    .enum_mbus_code = tvp514x_enum_mbus_code,
    .get_fmt = tvp514x_get_pad_format,
    .set_fmt = tvp514x_set_pad_format,
    };

    static const struct v4l2_subdev_ops tvp514x_ops = {
    .video = &tvp514x_video_ops,
    .pad = &tvp514x_pad_ops,


    What does it mean that the subdriver must support the CONFIG_VIDEO_V4L2_SUBDEV_API? Which ops must it implement?

    Thank you and have a nice day

    Marc

  • So that means our camera must deliver separate syncs for 16Bit YCbCr 4:2:2. Otherwise it won't work with the vip driver, right? Do you plan to support embedded sync for YCbCr 16 Bit in future version of the vip driver?

  • How can I test if video capture is ok? Is there a terminal command to capture video via VIP and display it via DSS on HDMI/LCD output of the AM5728EVM?
  • I meant you need to enhance the VIP driver itself to add the support for 16 bit embedded sync capture. We do not have plan to support for that mode in future as our reference EVM doesn't have interface to hook up the 16 bit embedded sync camera and hence no means to test the driver.

  • You can use yavta to test video capture. It is file based capture so you need to open the captured image file in some utility to see if it is good. Check the wiki page here for more on yavta -
    processors.wiki.ti.com/.../Linux_Core_VIP_User's_Guide
  • Marc,

    Check links shared in below wiki page for answers on sub device implementation.

  • Hello,
    I have such a problem now. Have you solved the problem?