• Jacopo Mondi's avatar
    media: ov5640: Split DVP and CSI-2 timings · 5113d5b3
    Jacopo Mondi authored
    Separate the timings for the DVP mode from the timings for the CSI-2
    mode in the ov5640 modes definition.
    
    The CSI-2 timings will deviate from the DVP ones as the clock tree is
    calculated differently.
    
    In CSI-2 mode change the analog crop rectangles as the OV5640 pixel
    array is composed as:
    - vertically: 16 dummy columns, 2592 valid ones and 16 dummy columns for
      a total of 2624 columns
    - horizontally: 8 optical black lines, 6 dummy ones, 1944 valid and 6
      dummies for a total of 1964 lines
    
    Adjust the analog crop rectangle in CSI-2 mode to:
    - Skip the first 16 dummy columns
    - Skip the first 14 black/dummy lines
    - Pass the whole valid pixel array size to the ISP for all modes except
      1024x768, 720p and 1080p which are obtained by cropping the valid pixel
      array.
    
    Tested in RGB565, UYVY and RGB888 modes in CSI-2 mode.
    Signed-off-by: default avatarJacopo Mondi <jacopo@jmondi.org>
    Signed-off-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
    Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
    5113d5b3
ov5640.c 97.6 KB