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.

OMAP4460 CPI port - Handling BT656

Hi,

I am currently implementing a driver to capture video from the OMAP4460's CPI port. The input is a BT.656 (YUV422 8bit) interlaced video stream.

According to the OMAP4460 TRM, section  8.2.2.3.2, Figure 8-10, it appears that the video signals containing a BT.656 stream should be connected to the ISS on cam2_d[11:4] and not cam2_d[7:0]. I did not find any text to back this up, though...

1. Do I need some special setting to tell the ISS to take data from [11:4] instead of [7:0] ? or is this implicit when enabling BT.656 from register ISIF_REC656IF.


2. I am also unsure as to how I tell the ISS/ISIF how many bytes per line I have considering the fact that the data input is the VPORT (IPIPEIF_CFG1.INPSRC1=0 and IPIPEIF_CFG1.INPSRC2=0)

Any help would be greatly appreciated...

Thanks,

Marc

  • Hi Marc,

    -1-  No implicit settings are required for the BT.656 data coming from the CPI interface. Video port is taking the whole data stream coming from the corresponding ISS Interface (CCP2, CSI or CPI). 

    -2-  Lets say your data path is CPI -> VP -> IPIPEIF -> ISIF -> BL, then you need to set the PPLN (pixels per line) & LPFR (lines per frame) parameters for your use case for both IPIPEIF & ISIF (both interfaces receive as long as the corresponding sensor outputs video data). Specifically ISIF supports 8- to 16-bit-wide RAW data signals and 8-/16-bit YCbCr signals (described in Table 8-337 ISS ISP ISIF Data Input Formats). The interface can be set in the three different modes from the ISIF_MODESET[13:12]INPMOD bit field.

    NOTE: If you're just starting your development have in mind that there is no driver for CPI, that you can use as a reference, you will be doing the sw from scratch.

    Hope this helps.

    Best Regards,

    Yordan

  • Hi Yordan,

    Thanks for the quick reply.

    I am indeed using the pipeline path CPI->VP->IPIPEIF->ISIF->BL. (IPIPEIF_CFG1.INPSRC1=0 and IPIPEIF.INPSRC=0). My goal is to capture video from my sensor. The sensor is then connected to a video decoder which provides 8 bit ITU-R BT.656 parallel video data to the CPI.

    So, if BT.656 data is indeed arriving on cam2_d[11:4] (as figure 8-10 of the TRM suggests), do I need to configure the IPIPEIF/ISIF input mode for 16 bit, even if the video stream is 8-bit ITU-R BT.656?

    If this is true, I could leave cam2_d[3:0] not connected, right ?

    Thanks again for  your help. I really appreciate it.

    Marc

  • Hi Marc,

    If your input stream is 8-bit, then there is no need to configure IPIEIF/ISIF input mode for 16 bit.

    You can leave the unused balls unconnected.

    Best Regards,

    Yordan

  • Hi Yordan,

    Ok. So no lane shift required I guess, the ISIF is "aware" in BT.656 mode to look at bits [11:4] instead of [7:0], correct ?

    1. Furthermore, if I have a BT.656 YCbcr 8bit stream coming in, how do I configure the IPIPEIF input format in IPIPEIF_CFG2.YUV16 field ?
    The TRM says 0 is for 12-bit RAW data and 1 for 16-bit YUV. I don't have an 8bit option.

    2. For the ISIF, I set ISIF_MODESET.INPMOD to 0x2 (YCbCr 8bit) to support my input (choices are RAW, YCbCr 16bit and 8bit) and set ISIF_REC656IF.R656ON=1 with ISIF_CCDCFG.BT656=0 (8bit)

    Does this make sense ?

    I am validating the basic settings of my driver. I am unable to trigger IRQ activity at the moment. Besides IRQs, I use the omapconf tool which seems to say that everything is good.

    Thanks,

    Marc

  • Marc,

    -1- I think YUV16 is the better choice, when your input is BT.656 data stream.
    However you should consider the following dependencies (described in TRM) when setting the YUV16 bit:
    if ((CFG1.INPSRC2==0 && CFG2.YUV16) ||
    CFG1.INPSRC2==3) {
    data_out[15:0] = yuv[15:0]
    }
    else if (CFG1.INPSRC2==1 && CFG2.YUV16 &&
    CFG1.UNPACK=1) {
    data_out[15:8] = gain_clip[7:0];
    data_out[ 7:0] = 0;
    }
    else {
    data_out[15:12] = 0;
    data_out[11: 0] = gain_clip[11:0];
    }

    -2- Yes this configuration for ISIF seems OK.

    Best Regards,
    Yordan

  • Hi Yordan,

    Thanks for your last reply.

    I am currently checking all my CPI signals and came across this text in the TRM:

    The Parallel interface (CPI), CCP2, and CSI2-B share pins. Their modes are not supported
    as a pin configuration mux option. The modes are configured from the CSI2-B/CCP2
    CAMERARX configured from the system control module (see Chapter 18, Control Module).

    My video input is on CPI pins cam2_d[11:4].

    In order for CPI signals to route correctly to the ISS Video Port, I use the following register settings.

    CONTROL_CAMERA_RX: 001b0000 (addr: 0x4a100608)
    TCTRL_CTRL: 10000000 (addr: 0x52000430)

    Is this enough ?

    Many thanks,

    Marc