Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Michael Riesch via B4 Relay <devnull+michael.riesch.collabora.com@kernel.org>
To: "Mehdi Djait" <mehdi.djait@linux.intel.com>,
	"Maxime Chevallier" <maxime.chevallier@bootlin.com>,
	"Théo Lebrun" <theo.lebrun@bootlin.com>,
	"Thomas Petazzoni" <thomas.petazzoni@bootlin.com>,
	"Gerald Loacker" <gerald.loacker@wolfvision.net>,
	"Bryan O'Donoghue" <bryan.odonoghue@linaro.org>,
	"Markus Elfring" <Markus.Elfring@web.de>,
	"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
	"Mauro Carvalho Chehab" <mchehab@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Kever Yang" <kever.yang@rock-chips.com>,
	"Nicolas Dufresne" <nicolas.dufresne@collabora.com>,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	"Collabora Kernel Team" <kernel@collabora.com>,
	"Paul Kocialkowski" <paulk@sys-base.io>,
	"Alexander Shiyan" <eagle.alexander923@gmail.com>,
	"Val Packett" <val@packett.cool>, "Rob Herring" <robh@kernel.org>,
	"Philipp Zabel" <p.zabel@pengutronix.de>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>
Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org,
	 linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	 linux-rockchip@lists.infradead.org,
	 Michael Riesch <michael.riesch@collabora.com>,
	 Michael Riesch <michael.riesch@collabora.com>
Subject: [PATCH v14 01/18] Documentation: admin-guide: media: add rockchip camera interface
Date: Fri, 24 Oct 2025 14:51:30 +0200	[thread overview]
Message-ID: <20240220-rk3568-vicap-v14-1-b38b6da0fc80@collabora.com> (raw)
In-Reply-To: <20240220-rk3568-vicap-v14-0-b38b6da0fc80@collabora.com>

From: Michael Riesch <michael.riesch@collabora.com>

Add a document that describes the different variants of the Rockchip
Camera Interface (CIF), their hardware layout, as well as their
representation in the media controller centric rkcif device driver,
which is located under drivers/media/platform/rockchip/rkcif.

Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org>
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
 .../admin-guide/media/rkcif-rk3568-vicap.dot       | 21 ++++++
 Documentation/admin-guide/media/rkcif.rst          | 83 ++++++++++++++++++++++
 Documentation/admin-guide/media/v4l-drivers.rst    |  1 +
 MAINTAINERS                                        |  7 ++
 4 files changed, 112 insertions(+)

diff --git a/Documentation/admin-guide/media/rkcif-rk3568-vicap.dot b/Documentation/admin-guide/media/rkcif-rk3568-vicap.dot
new file mode 100644
index 000000000000..02340135a2ac
--- /dev/null
+++ b/Documentation/admin-guide/media/rkcif-rk3568-vicap.dot
@@ -0,0 +1,21 @@
+digraph board {
+        rankdir=TB
+        n00000001 [label="{{<port0> 0} | rkcif-dvp0\n/dev/v4l-subdev0 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
+        n00000001:port1 -> n00000004
+        n00000004 [label="rkcif-dvp0-id0\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
+        n0000000a [label="{{<port0> 0} | rkcif-mipi0\n/dev/v4l-subdev1 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
+        n0000000a:port1 -> n0000000d
+        n0000000a:port1 -> n00000013 [style=dashed]
+        n0000000a:port1 -> n00000019 [style=dashed]
+        n0000000a:port1 -> n0000001f [style=dashed]
+        n0000000d [label="rkcif-mipi0-id0\n/dev/video1", shape=box, style=filled, fillcolor=yellow]
+        n00000013 [label="rkcif-mipi0-id1\n/dev/video2", shape=box, style=filled, fillcolor=yellow]
+        n00000019 [label="rkcif-mipi0-id2\n/dev/video3", shape=box, style=filled, fillcolor=yellow]
+        n0000001f [label="rkcif-mipi0-id3\n/dev/video4", shape=box, style=filled, fillcolor=yellow]
+        n00000025 [label="{{} | it6801 2-0048\n/dev/v4l-subdev2 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
+        n00000025:port0 -> n00000001:port0
+        n00000029 [label="{{<port0> 0} | rockchip-mipi-csi fdfb0000.csi\n/dev/v4l-subdev3 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
+        n00000029:port1 -> n0000000a:port0
+        n0000002e [label="{{} | imx415 4-001a\n/dev/v4l-subdev4 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
+        n0000002e:port0 -> n00000029:port0
+}
diff --git a/Documentation/admin-guide/media/rkcif.rst b/Documentation/admin-guide/media/rkcif.rst
new file mode 100644
index 000000000000..f35f644a54a0
--- /dev/null
+++ b/Documentation/admin-guide/media/rkcif.rst
@@ -0,0 +1,83 @@
+.. SPDX-License-Identifier: GPL-2.0
+
+=========================================
+Rockchip Camera Interface (CIF)
+=========================================
+
+Introduction
+============
+
+The Rockchip Camera Interface (CIF) is featured in many Rockchip SoCs in
+different variants.
+The different variants are combinations of common building blocks, such as
+
+* INTERFACE blocks of different types, namely
+
+  * the Digital Video Port (DVP, a parallel data interface)
+  * the interface block for the MIPI CSI-2 receiver
+
+* CROP units
+
+* MIPI CSI-2 receiver (not available on all variants): This unit is referred
+  to as MIPI CSI HOST in the Rockchip documentation.
+  Technically, it is a separate hardware block, but it is strongly coupled to
+  the CIF and therefore included here.
+
+* MUX units (not available on all variants) that pass the video data to an
+  image signal processor (ISP)
+
+* SCALE units (not available on all variants)
+
+* DMA engines that transfer video data into system memory using a
+  double-buffering mechanism called ping-pong mode
+
+* Support for four streams per INTERFACE block (not available on all
+  variants), e.g., for MIPI CSI-2 Virtual Channels (VCs)
+
+This document describes the different variants of the CIF, their hardware
+layout, as well as their representation in the media controller centric rkcif
+device driver, which is located under drivers/media/platform/rockchip/rkcif.
+
+Variants
+========
+
+Rockchip PX30 Video Input Processor (VIP)
+-----------------------------------------
+
+The PX30 Video Input Processor (VIP) features a digital video port that accepts
+parallel video data or BT.656.
+Since these protocols do not feature multiple streams, the VIP has one DMA
+engine that transfers the input video data into system memory.
+
+The rkcif driver represents this hardware variant by exposing one V4L2 subdevice
+(the DVP INTERFACE/CROP block) and one V4L2 device (the DVP DMA engine).
+
+Rockchip RK3568 Video Capture (VICAP)
+-------------------------------------
+
+The RK3568 Video Capture (VICAP) unit features a digital video port and a MIPI
+CSI-2 receiver that can receive video data independently.
+The DVP accepts parallel video data, BT.656 and BT.1120.
+Since the BT.1120 protocol may feature more than one stream, the RK3568 VICAP
+DVP features four DMA engines that can capture different streams.
+Similarly, the RK3568 VICAP MIPI CSI-2 receiver features four DMA engines to
+handle different Virtual Channels (VCs).
+
+The rkcif driver represents this hardware variant by exposing up to three V4L2
+subdevices:
+
+* rkcif-dvp0: INTERFACE/CROP block for the DVP
+* rockchip-mipi-csi fdfb0000.csi: MIPI CSI-2 receiver
+* rkcif-mipi0: INTERFACE/CROP block for the MIPI CSI-2 receiver
+
+and up to five V4L2 devices:
+
+* rkcif-dvp0-id0: The support for multiple streams on the DVP is not yet
+  implemented, as it is hard to find test hardware. Thus, this video device
+  represents the first DMA engine of the RK3568 DVP.
+* rkcif-mipi0-id[0...3]: The four DMA engines of the RK3568 MIPI CSI-2
+  receiver. Each DMA engine can capture a certain MIPI CSI-2 Virtual Channel.
+
+.. kernel-figure:: rkcif-rk3568-vicap.dot
+    :alt:   Topology of the RK3568 Video Capture (VICAP) unit
+    :align: center
diff --git a/Documentation/admin-guide/media/v4l-drivers.rst b/Documentation/admin-guide/media/v4l-drivers.rst
index 3bac5165b134..694fad685ff5 100644
--- a/Documentation/admin-guide/media/v4l-drivers.rst
+++ b/Documentation/admin-guide/media/v4l-drivers.rst
@@ -25,6 +25,7 @@ Video4Linux (V4L) driver-specific documentation
 	qcom_camss
 	raspberrypi-pisp-be
 	rcar-fdp1
+	rkcif
 	rkisp1
 	raspberrypi-rp1-cfe
 	saa7134
diff --git a/MAINTAINERS b/MAINTAINERS
index f7351fced572..1b47d5e73f04 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -22209,6 +22209,13 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/net/can/rockchip,rk3568v2-canfd.yaml
 F:	drivers/net/can/rockchip/
 
+ROCKCHIP CAMERA INTERFACE (RKCIF) DRIVER
+M:	Mehdi Djait <mehdi.djait@linux.intel.com>
+M:	Michael Riesch <michael.riesch@collabora.com>
+L:	linux-media@vger.kernel.org
+S:	Maintained
+F:	Documentation/admin-guide/media/rkcif*
+
 ROCKCHIP CRYPTO DRIVERS
 M:	Corentin Labbe <clabbe@baylibre.com>
 L:	linux-crypto@vger.kernel.org

-- 
2.39.5




  reply	other threads:[~2025-10-24 12:51 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-24 12:51 [PATCH v14 00/18] media: rockchip: add a driver for the rockchip camera interface Michael Riesch via B4 Relay
2025-10-24 12:51 ` Michael Riesch via B4 Relay [this message]
2025-10-24 12:51 ` [PATCH v14 02/18] media: dt-bindings: video-interfaces: add defines for sampling modes Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 03/18] media: dt-bindings: add rockchip px30 vip Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 04/18] media: dt-bindings: add rockchip rk3568 vicap Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 05/18] media: dt-bindings: add rockchip rk3568 mipi csi-2 receiver Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 06/18] media: rockchip: add driver for the rockchip " Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 07/18] media: rockchip: add driver for the rockchip camera interface Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 08/18] media: rockchip: rkcif: add abstraction for interface and crop blocks Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 09/18] media: rockchip: rkcif: add abstraction for dma blocks Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 10/18] media: rockchip: rkcif: add support for px30 vip dvp capture Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 11/18] media: rockchip: rkcif: add support for rk3568 vicap " Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 12/18] media: rockchip: rkcif: add support for rk3568 vicap mipi capture Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 13/18] arm64: defconfig: enable rockchip camera interface and mipi csi-2 receiver Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 14/18] arm64: dts: rockchip: add the vip node to px30 Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 15/18] arm64: dts: rockchip: add vicap node to rk356x Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 16/18] arm64: dts: rockchip: add mipi csi-2 receiver " Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 17/18] arm64: dts: rockchip: enable vicap dvp on wolfvision pf5 io expander Michael Riesch via B4 Relay
2025-10-24 12:51 ` [PATCH v14 18/18] arm64: dts: rockchip: add radxa camera 8m on rock 3a csi port Michael Riesch via B4 Relay
2025-10-24 12:57 ` [PATCH v14 00/18] media: rockchip: add a driver for the rockchip camera interface Michael Riesch
2025-11-07 17:32 ` Sakari Ailus
2025-11-07 18:41   ` Michael Riesch
2025-11-07 18:54     ` Laurent Pinchart
2025-11-07 20:51       ` Michael Riesch
2025-11-10  8:43         ` Sakari Ailus
2025-11-10 10:29           ` Michael Riesch
2025-11-11  0:06             ` Laurent Pinchart
2025-11-11  8:37               ` Michael Riesch
2025-11-11 10:42                 ` Michael Riesch

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240220-rk3568-vicap-v14-1-b38b6da0fc80@collabora.com \
    --to=devnull+michael.riesch.collabora.com@kernel.org \
    --cc=Markus.Elfring@web.de \
    --cc=bryan.odonoghue@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eagle.alexander923@gmail.com \
    --cc=gerald.loacker@wolfvision.net \
    --cc=heiko@sntech.de \
    --cc=kernel@collabora.com \
    --cc=kever.yang@rock-chips.com \
    --cc=krzk+dt@kernel.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mchehab@kernel.org \
    --cc=mehdi.djait@linux.intel.com \
    --cc=michael.riesch@collabora.com \
    --cc=nicolas.dufresne@collabora.com \
    --cc=p.zabel@pengutronix.de \
    --cc=paulk@sys-base.io \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    --cc=sakari.ailus@linux.intel.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=theo.lebrun@bootlin.com \
    --cc=thomas.petazzoni@bootlin.com \
    --cc=val@packett.cool \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox