Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 15 Jun 2016 01:11 PM by  Adam Ford
Where are initial media-ctl links set in your BSP
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages
L DiRuscio
New Member
New Member
Posts:44


--
15 Jun 2016 10:35 AM

    I need to use 2 cameras. I added another i2c_board_info struct to board-ompa3logic.c to tell it about the new I2C address of the 2nd camera (do I need to do more?)

    I see they are detected during boot, both cameras are listed in boot log: "mt9p031 2-0048" AND  "mt9p031 2-005d" but I can not establish a media link to the 2nd camera.

    when I run media-ctl -p right after a fresh boot, I see that the CCDC entity somehow has the first camera listed (see below) My question is what provides that info, so I can tell it about my second camera?

    From medi-ctl -p command:

    - entity 5: OMAP3 ISP CCDC (3 pads, 9 links)
                type V4L2 subdev subtype Unknown
                device node name /dev/v4l-subdev2
            pad0: Sink [SGRBG10 4096x4096]
                    <- "OMAP3 ISP CCP2":1 []
                    <- "OMAP3 ISP CSI2a":1 []
                    <- "mt9p031 2-0048":0 [] --- HOW DO I GET IT TO LIST THE "mt9p031 2-005d" camera here, too?
            pad1: Source [SGRBG10 4096x4096]
                    -> "OMAP3 ISP CCDC output":0 []
                    -> "OMAP3 ISP resizer":0 []
            pad2: Source [SGRBG10 4096x4095]
                    -> "OMAP3 ISP preview":0 []
                    -> "OMAP3 ISP AEWB":0 [ENABLED,IMMUTABLE]
                    -> "OMAP3 ISP AF":0 [ENABLED,IMMUTABLE]
                    -> "OMAP3 ISP histogram":0 [ENABLED,IMMUTABLE] 

    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    15 Jun 2016 11:22 AM
    I forwarded this question along to one of the developers who has the most camera knowledge.

    adam
    Adam Ford
    Advanced Member
    Advanced Member
    Posts:794


    --
    15 Jun 2016 01:11 PM
    I talked with the developer and he gave me some suggestions. First, we haven't ever tried this, so we cannot be certain it will work. We have only ever used 1 camera on a board as a proof of concept.

    static struct isp_subdev_i2c_board_info omap3logic_mt9p031_subdevs[] is a NULL terminated list, so you'll need to clone the contents of (see stuff below) for each camera.

    {
    .board_info = &omap3logic_mt9p031_board_info,
    .i2c_adapter_id = 2,
    },


    You'll most likely need to clone (see below) for the second camera which would be referenced by what you just did above.

    static struct i2c_board_info omap3logic_mt9p031_board_info = {
    I2C_BOARD_INFO("mt9p031", 0x48),
    .platform_data = &omap3logic_mt9p031_platform_data,
    };

    Lastly, you'll need to reference the new cameras in "static struct isp_v4l2_subdevs_group omap3logic_camera_subdevs[]"

    This is a NULL terminated list of cameras.

    Make a copy of
    {
    .subdevs = omap3logic_mt9p031_subdevs,
    .interface = ISP_INTERFACE_PARALLEL,
    .bus = {
    .parallel = {
    .data_lane_shift = ISPCTRL_SHIFT_0 >> ISPCTRL_SHIFT_SHIFT, //3.3+ISP_LANE_SHIFT_0,
    .clk_pol = 1, // PIXCLK inverted
    .hs_pol = 0, // HSYNC not inverted
    .vs_pol = 0, // VSYNC not inverted
    .bridge = ISPCTRL_PAR_BRIDGE_DISABLE>> ISPCTRL_PAR_BRIDGE_SHIFT //3.3+ISP_BRIDGE_DISABLE,
    //3.3+ .bt656 = 0,
    },
    },
    },

    for the second camera and place it in the list before the final NULL. Having two cameras in this list should correspond in the same order as the cameras in the previous list you did in omap3logic_mt9p031_subdevs.

    Does that help?


    Since we don't have either your cameras or your development board, it's all considered theoretical, but if you're intersted in getting some development assistance (or accelerate your development), we do have development services available, and I can have an account manager discuss with you options.

    Hopefully that helps.

    adam


    You are not authorized to post a reply.