Debian Codegraph @

Documentation/admin-guide/media/rkcif.rst

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