From nobody Tue Dec 16 05:46:34 2025 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 39496330B3B; Fri, 14 Nov 2025 15:20:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763133620; cv=none; b=s4ucfJtItryUPxSe9w1HSh3HGIu2zMseN/Q1tbHKxx4rfzCztxCZ5yRIEXvYXtFv01g3FbWh9z2d9GNs5SQArHNYFzE/9oumK6pdBCZMtbcDqT1bhf5KklUjrsQ8qQOh+DmX7LN40c0la5ssSfw3SGkPC0BwwLIHbrhXVMMDpyA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1763133620; c=relaxed/simple; bh=X/qSIGjNpstppc3cO7WlUXDDm9zEONg8uCFoJGVo9oU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=A+s7Ow8bTdPw+6FgxA0kboHXKEqpBjsaWjMgVFNczzPBglACPxdMRZciC/GAY7jNbmaTpnd9JlAsxNXL1Fen9IDk1FOJgVkRfwVV+tTQFFYUMxgCSJwflnv4axbBItngK8Ua+gowjaghOFM8ANBeFObSqjufkYBPiAAVLpe9vII= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=POnOo+m/; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="POnOo+m/" Received: by smtp.kernel.org (Postfix) with ESMTPS id E6A37C4CEFB; Fri, 14 Nov 2025 15:20:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1763133620; bh=X/qSIGjNpstppc3cO7WlUXDDm9zEONg8uCFoJGVo9oU=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=POnOo+m/g94N6HSqtk+fUHzwFFhlVauDbW05op0kw1HN18RQ5+AgmrcAzwdtmgFsw SFjy1TgBfNat3n6qbV63NDHytKs5aDCkWiDbGGI/x+PSdIHFeovmqZLcm3InQaSavo 84v237RqN/dhJ06HuY7+Fedjvsmcp3MAYLbmjalipfIixyI/xfoahyHgc1DOrVGKt8 Q/nGiRR4DnT61h0N5z37p7oBwq35JXeZJDVG6lLtogDmyE3Ff9Jjy0EF/4dqO1jbbW RwY5uS3aJ6A+HDWXBy08ibxksE+lQogay7Ev3gqp5RqxL0U4HtkoKPj+/Zuo+pYOdW Zu5Zmq2E8dp5w== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id D1CF0CE7B1F; Fri, 14 Nov 2025 15:20:19 +0000 (UTC) From: Michael Riesch via B4 Relay Date: Fri, 14 Nov 2025 16:20:12 +0100 Subject: [PATCH v15 01/14] Documentation: admin-guide: media: add rockchip camera interface Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20240220-rk3568-vicap-v15-1-8f4915ee365d@collabora.com> References: <20240220-rk3568-vicap-v15-0-8f4915ee365d@collabora.com> In-Reply-To: <20240220-rk3568-vicap-v15-0-8f4915ee365d@collabora.com> To: Mehdi Djait , Maxime Chevallier , =?utf-8?q?Th=C3=A9o_Lebrun?= , Thomas Petazzoni , Gerald Loacker , Bryan O'Donoghue , Markus Elfring , Laurent Pinchart , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Heiko Stuebner , Kever Yang , Nicolas Dufresne , Sebastian Reichel , Collabora Kernel Team , Paul Kocialkowski , Alexander Shiyan , Val Packett , Rob Herring , Philipp Zabel , Sakari Ailus 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 X-Mailer: b4 0.12.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1763133617; l=5914; i=michael.riesch@collabora.com; s=20250410; h=from:subject:message-id; bh=U7iKC5Z7rC7C53Ap0NfSIOxBMvV/vyD4bqRRxsyBYTE=; b=s1irjTmQEJpMU0CABC09HN/+7EB35RhcbFy4muTxn0ZqmjeWz4B8bFTmn3c2LatGR6p1JqPjh SAVx9byzIizAAs0P33o1M4mpXI1rXzrQQJtO91n5kbhvXWxYSx4Clcz X-Developer-Key: i=michael.riesch@collabora.com; a=ed25519; pk=+MWX1fffLFZtTPG/I6XdYm/+OSvpRE8D9evQaWbiN04= X-Endpoint-Received: by B4 Relay for michael.riesch@collabora.com/20250410 with auth_id=371 X-Original-From: Michael Riesch Reply-To: michael.riesch@collabora.com From: Michael Riesch 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 Reviewed-by: Bryan O'Donoghue Signed-off-by: Michael Riesch --- .../admin-guide/media/rkcif-rk3568-vicap.dot | 8 +++ Documentation/admin-guide/media/rkcif.rst | 79 ++++++++++++++++++= ++++ Documentation/admin-guide/media/v4l-drivers.rst | 1 + MAINTAINERS | 7 ++ 4 files changed, 95 insertions(+) diff --git a/Documentation/admin-guide/media/rkcif-rk3568-vicap.dot b/Docum= entation/admin-guide/media/rkcif-rk3568-vicap.dot new file mode 100644 index 000000000000..3fac59335459 --- /dev/null +++ b/Documentation/admin-guide/media/rkcif-rk3568-vicap.dot @@ -0,0 +1,8 @@ +digraph board { + rankdir=3DTB + n00000001 [label=3D"{{ 0} | rkcif-dvp0\n/dev/v4l-subdev0 | = { 1}}", shape=3DMrecord, style=3Dfilled, fillcolor=3Dgreen] + n00000001:port1 -> n00000004 + n00000004 [label=3D"rkcif-dvp0-id0\n/dev/video0", shape=3Dbox, sty= le=3Dfilled, fillcolor=3Dyellow] + n00000025 [label=3D"{{} | it6801 2-0048\n/dev/v4l-subdev1 | { 0}}", shape=3DMrecord, style=3Dfilled, fillcolor=3Dgreen] + n00000025:port0 -> n00000001:port0 +} diff --git a/Documentation/admin-guide/media/rkcif.rst b/Documentation/admi= n-guide/media/rkcif.rst new file mode 100644 index 000000000000..2558c121abc4 --- /dev/null +++ b/Documentation/admin-guide/media/rkcif.rst @@ -0,0 +1,79 @@ +.. SPDX-License-Identifier: GPL-2.0 + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D +Rockchip Camera Interface (CIF) +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +Introduction +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D + +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 referr= ed + 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 rk= cif +device driver, which is located under drivers/media/platform/rockchip/rkci= f. + +Variants +=3D=3D=3D=3D=3D=3D=3D=3D + +Rockchip PX30 Video Input Processor (VIP) +----------------------------------------- + +The PX30 Video Input Processor (VIP) features a digital video port that ac= cepts +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 sub= device +(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 VI= CAP +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 the follo= wing +V4L2 subdevices: + +* rkcif-dvp0: INTERFACE/CROP block for the DVP + +and the following video 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. + +.. 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/Documentatio= n/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 42b20f33f3bb..2e1f959bb5f4 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -22242,6 +22242,13 @@ S: Maintained F: Documentation/devicetree/bindings/net/can/rockchip,rk3568v2-canfd.yaml F: drivers/net/can/rockchip/ =20 +ROCKCHIP CAMERA INTERFACE (RKCIF) DRIVER +M: Mehdi Djait +M: Michael Riesch +L: linux-media@vger.kernel.org +S: Maintained +F: Documentation/admin-guide/media/rkcif* + ROCKCHIP CRYPTO DRIVERS M: Corentin Labbe L: linux-crypto@vger.kernel.org --=20 2.39.5