Skip to content

Kernel Driver Organization

sdunnington edited this page Jun 9, 2017 · 3 revisions

Device Tree

  • The OV5640 camera connection to the Qualcomm ISP is described by the kernel file 'arch/arm64/boot/dts/qcom/d3-camera-mezzanine.dtsi'.
  • The camera subsystem driver, alias camss, is listed in the beginning with two physical ports.
    • Each port defined must be attached to a valid sensor in order for the subsystem to complete the bind operation.
    • The board is only shipped with one sensor, so the second port is disabled in the released code tree.
  • The camera sensors, ov5640, are assigned in the second section assigned to BLSP 6.
    • The first sensor on J3 is physically using the Camera Control Interface port or CCI.
      • The CCI driver in development by Linaro does not act as a full I2C driver for this release.
      • The ov5640 driver includes a hack along with a flag in the device tree to indicate that the CCI port should be used instead of BLSP6.
      • The device tree boolean flag 'qcom,use_cci' should be set for the J3 port to indicate the CCI connection.
    • The port also includes two flags for default horizontal and vertical flip settings: 'ovti,vflip' and 'ovti,hflip'.
      • By default the vertical flip is set. This is the correct orientation for a vertically oriented board with the sensor on top and folded over.
      • The sensor orientations can be changed by modifying these flags.
      • Instructions to modify the flags can be found here: Sensor Flip Flags

OV5640 Driver

QCom Camera Subsystem

  • The camera subsystem driver code is located in the kernel folder 'drivers/media/platform/qcom'.
  • The MSM camera driver subsystem is under development by Linaro.
  • It is composed of the following components:
    • CCI - camera control interface, an I2C port for sensor communication.
    • CSIPHY->CSID->ISPIF - dual ISP interfaces for MIPI CSI2 camera capture.
    • VFE - Three configurable outputs from the ISP for different resolutions and color formats. Entities vfe0_rdi0 and vfe0_rdi1 support UYVY 422 on /dev/video0 and dev/video1 respectively; vfe0_pix supports NV12M 420 on /dev/video3.

Clone this wiki locally