rkcif.rst 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. .. SPDX-License-Identifier: GPL-2.0
  2. =========================================
  3. Rockchip Camera Interface (CIF)
  4. =========================================
  5. Introduction
  6. ============
  7. The Rockchip Camera Interface (CIF) is featured in many Rockchip SoCs in
  8. different variants.
  9. The different variants are combinations of common building blocks, such as
  10. * INTERFACE blocks of different types, namely
  11. * the Digital Video Port (DVP, a parallel data interface)
  12. * the interface block for the MIPI CSI-2 receiver
  13. * CROP units
  14. * MIPI CSI-2 receiver (not available on all variants): This unit is referred
  15. to as MIPI CSI HOST in the Rockchip documentation.
  16. Technically, it is a separate hardware block, but it is strongly coupled to
  17. the CIF and therefore included here.
  18. * MUX units (not available on all variants) that pass the video data to an
  19. image signal processor (ISP)
  20. * SCALE units (not available on all variants)
  21. * DMA engines that transfer video data into system memory using a
  22. double-buffering mechanism called ping-pong mode
  23. * Support for four streams per INTERFACE block (not available on all
  24. variants), e.g., for MIPI CSI-2 Virtual Channels (VCs)
  25. This document describes the different variants of the CIF, their hardware
  26. layout, as well as their representation in the media controller centric rkcif
  27. device driver, which is located under drivers/media/platform/rockchip/rkcif.
  28. Variants
  29. ========
  30. Rockchip PX30 Video Input Processor (VIP)
  31. -----------------------------------------
  32. The PX30 Video Input Processor (VIP) features a digital video port that accepts
  33. parallel video data or BT.656.
  34. Since these protocols do not feature multiple streams, the VIP has one DMA
  35. engine that transfers the input video data into system memory.
  36. The rkcif driver represents this hardware variant by exposing one V4L2 subdevice
  37. (the DVP INTERFACE/CROP block) and one V4L2 device (the DVP DMA engine).
  38. Rockchip RK3568 Video Capture (VICAP)
  39. -------------------------------------
  40. The RK3568 Video Capture (VICAP) unit features a digital video port and a MIPI
  41. CSI-2 receiver that can receive video data independently.
  42. The DVP accepts parallel video data, BT.656 and BT.1120.
  43. Since the BT.1120 protocol may feature more than one stream, the RK3568 VICAP
  44. DVP features four DMA engines that can capture different streams.
  45. Similarly, the RK3568 VICAP MIPI CSI-2 receiver features four DMA engines to
  46. handle different Virtual Channels (VCs).
  47. The rkcif driver represents this hardware variant by exposing up the following
  48. V4L2 subdevices:
  49. * rkcif-dvp0: INTERFACE/CROP block for the DVP
  50. and the following video devices:
  51. * rkcif-dvp0-id0: The support for multiple streams on the DVP is not yet
  52. implemented, as it is hard to find test hardware. Thus, this video device
  53. represents the first DMA engine of the RK3568 DVP.
  54. .. kernel-figure:: rkcif-rk3568-vicap.dot
  55. :alt: Topology of the RK3568 Video Capture (VICAP) unit
  56. :align: center