[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240220-rk3568-vicap-v6-0-d2f5fbee1551@collabora.com>
Date: Wed, 30 Apr 2025 11:15:49 +0200
From: Michael Riesch via B4 Relay <devnull+michael.riesch.collabora.com@...nel.org>
To: Mehdi Djait <mehdi.djait@...ux.intel.com>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
Théo Lebrun <theo.lebrun@...tlin.com>,
Gerald Loacker <gerald.loacker@...fvision.net>,
Thomas Petazzoni <thomas.petazzoni@...tlin.com>,
Laurent Pinchart <laurent.pinchart@...asonboard.com>,
Mauro Carvalho Chehab <mchehab@...nel.org>,
Rob Herring <robh+dt@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Heiko Stuebner <heiko@...ech.de>,
Kever Yang <kever.yang@...k-chips.com>,
Nicolas Dufresne <nicolas.dufresne@...labora.com>,
Sebastian Reichel <sebastian.reichel@...labora.com>,
Collabora Kernel Team <kernel@...labora.com>,
Paul Kocialkowski <paulk@...-base.io>,
Alexander Shiyan <eagle.alexander923@...il.com>,
Val Packett <val@...kett.cool>, Rob Herring <robh@...nel.org>,
Philipp Zabel <p.zabel@...gutronix.de>,
Sakari Ailus <sakari.ailus@...ux.intel.com>
Cc: linux-media@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org,
Michael Riesch <michael.riesch@...fvision.net>,
Michael Riesch <michael.riesch@...labora.com>,
Mehdi Djait <mehdi.djait@...tlin.com>
Subject: [PATCH v6 00/13] media: rockchip: add a driver for the rockchip
camera interface
Habidere,
This series introduces support for the Rockchip Camera Interface (CIF),
which is featured in many Rockchip SoCs in different variations.
For example, the PX30 Video Input Processor (VIP) is able to receive
video data via the Digital Video Port (DVP, a parallel data interface)
and transfer it into system memory using a double-buffering mechanism
called ping-pong mode.
The RK3568 Video Capture (VICAP) unit, on the other hand, features a
DVP and a MIPI CSI-2 receiver that can receive video data independently
(both using the ping-pong scheme).
The different variants may have additional features, such as scaling
and/or cropping.
Finally, the RK3588 VICAP unit constitutes an essential piece of the
camera interface with one DVP, six MIPI CSI-2 receivers, scale/crop
units, and a data path multiplexer (to scaler units, to ISP, ...).
The v6 of the series adds a media controller centric V4L2 driver for
the Rockchip CIF with
- support for the PX30 VIP (not tested, though, due to the lack of HW)
- support for the RK3568 VICAP DVP
- support for the RK3568 VICAP MIPI CSI-2 receiver
- abstraction for the ping-pong scheme to allow for future extensions
- abstraction for the INTERFACE and CROP parts to allow for future
extensions
- initial support for different virtual channels (not tested, though,
due to the lack of HW)
The patches are functional and have been tested successfully on a
custom RK3568 board including the ITE Tech. IT6801 HDMI receiver and
the Sony IMX415 image sensor as subdevices attached to the DVP and the
MIPI CSI-2 receiver, respectively.
The IT6801 driver still needs some loving care but shall be submitted
as well at some point.
However, several features are not yet addressed, such as
- support for the RK3588 variant (-> next item on my TODO)
- support for the scaling unit in the PX30 (-> cannot do due to the
lack of HW)
- support for the interface to the Rockchip ISP in the RK3568
(apparently, data receive via VICAP DVP and the VICAP MIPI CSI-2
receiver can be processed by the RK3568 ISP)
- support for the MUX/SCALE/TOISP block in the RK3588 VICAP (which
provides the base for image processing on the RK3588)
Looking forward to your comments!
To: Mehdi Djait <mehdi.djait@...ux.intel.com>
To: Maxime Chevallier <maxime.chevallier@...tlin.com>
To: Théo Lebrun <theo.lebrun@...tlin.com>
To: Gerald Loacker <gerald.loacker@...fvision.net>
To: Thomas Petazzoni <thomas.petazzoni@...tlin.com>
To: Sakari Ailus <sakari.ailus@....fi>
To: Laurent Pinchart <laurent.pinchart@...asonboard.com>
To: Mauro Carvalho Chehab <mchehab@...nel.org>
To: Rob Herring <robh+dt@...nel.org>
To: Krzysztof Kozlowski <krzk+dt@...nel.org>
To: Conor Dooley <conor+dt@...nel.org>
To: Heiko Stuebner <heiko@...ech.de>
To: Kever Yang <kever.yang@...k-chips.com>
To: Nicolas Dufresne <nicolas.dufresne@...labora.com>
To: Sebastian Reichel <sebastian.reichel@...labora.com>
To: Collabora Kernel Team <kernel@...labora.com>
To: Paul Kocialkowski <paulk@...-base.io>
To: Alexander Shiyan <eagle.alexander923@...il.com>
To: Val Packett <val@...kett.cool>
To: Rob Herring <robh@...nel.org>
To: Philipp Zabel <p.zabel@...gutronix.de>
Cc: linux-media@...r.kernel.org
Cc: devicetree@...r.kernel.org
Cc: linux-kernel@...r.kernel.org
Cc: linux-arm-kernel@...ts.infradead.org
Cc: linux-rockchip@...ts.infradead.org
Signed-off-by: Michael Riesch <michael.riesch@...fvision.net>
Signed-off-by: Michael Riesch <michael.riesch@...labora.com>
Changes in v6:
- rebased onto v6.15-rc1
- renamed "MIPI CSI HOST" -> "MIPI CSI RECEIVER" (Laurent)
- s/@...fvision.net/@...labora.com where appropriate
- renamed DVP delay property and moved it to the endpoint (Sakari)
- implemented DT review comments (Krzysztof and Sakari)
- implemented driver review comments (Sakari)
- fixed issues raised by media-ci (yet again)
- added documentation including a RK3568 topology (new patch 1)
(Sakari)
- added patch that enables rkcif in the defconfig (new patch 9)
- Link to v5: https://lore.kernel.org/r/20250306-v6-8-topic-rk3568-vicap-v5-0-f02152534f3c@wolfvision.net
Changes in v5:
- fixed issues raised by media-ci
- fixed dt bindings (comments by Rob and Sakari)
- fixed probe on systems with no DVP in DT (comment by Alexander)
- fixed error path in register offset calculation
- split off MIPI CSI host driver into separate module (comment
by Mehdi)
- added MODULE_DEVICE_TABLE() for both drivers (comment by Mehdi)
- Link to v4: https://lore.kernel.org/r/20250219-v6-8-topic-rk3568-vicap-v4-0-e906600ae3b0@wolfvision.net
Changes in v4:
- added support for the MIPI CSI-2 receiver (new patches 4, 6, 7, 10)
- fixed asserts on stream stop
- fixed register address lookup
- fixed link validiation callback
- fixed issues raised by Rob's bot, kernel test robot, and media-ci
- Link to v3: https://lore.kernel.org/r/20250206-v6-8-topic-rk3568-vicap-v3-0-69d1f19e5c40@wolfvision.net
Changes in v3:
- renamed the driver "cif" -> "rkcif"
- rebased onto v6.14-rc1
- abstracted the generic INTERFACE+CROP part
- addressed comments by Rob and Sakari
- added V4L2 MPLANE formats to DVP
- added patch that enables the RK3568 VICAP DVP on PF5 IO Expander
- fixed formatting issues raised by media-ci bot
- Link to v2: https://lore.kernel.org/r/20241217-v6-8-topic-rk3568-vicap-v2-0-b1d488fcc0d3@wolfvision.net
Changes in v2:
- merged with Mehdi's v13
- refactored the complete driver towards a media controller centric driver
- abstracted the generic ping-pong stream (can be used for DVP as well as for CSI-2)
- switched to MPLANE API
- added support for notifications
- Link to v1: https://lore.kernel.org/r/20240220-v6-8-topic-rk3568-vicap-v1-0-2680a1fa640b@wolfvision.net
---
Mehdi Djait (2):
media: dt-bindings: add rockchip px30 vip
arm64: dts: rockchip: add the vip node to px30
Michael Riesch (11):
Documentation: admin-guide: media: add rockchip camera interface
media: dt-bindings: video-interfaces: add defines for sampling modes
media: dt-bindings: add rockchip rk3568 vicap
media: dt-bindings: add rockchip rk3568 mipi csi receiver
media: rockchip: add a driver for the rockchip camera interface
media: rockchip: rkcif: add driver for mipi csi-2 receiver
media: rockchip: rkcif: add support for mipi csi-2 capture
arm64: defconfig: enable rockchip camera interface
arm64: dts: rockchip: add vicap node to rk356x
arm64: dts: rockchip: add mipi csi receiver node to rk356x
arm64: dts: rockchip: enable vicap dvp on wolfvision pf5 io expander
.../admin-guide/media/rkcif-rk3568-vicap.dot | 21 +
Documentation/admin-guide/media/rkcif.rst | 83 ++
Documentation/admin-guide/media/v4l-drivers.rst | 1 +
.../bindings/media/rockchip,px30-vip.yaml | 122 +++
.../bindings/media/rockchip,rk3568-mipi-csi.yaml | 113 +++
.../bindings/media/rockchip,rk3568-vicap.yaml | 170 ++++
MAINTAINERS | 11 +
arch/arm64/boot/dts/rockchip/px30.dtsi | 12 +
.../rk3568-wolfvision-pf5-io-expander.dtso | 20 +
arch/arm64/boot/dts/rockchip/rk356x-base.dtsi | 75 ++
arch/arm64/configs/defconfig | 1 +
drivers/media/platform/rockchip/Kconfig | 1 +
drivers/media/platform/rockchip/Makefile | 1 +
drivers/media/platform/rockchip/rkcif/Kconfig | 15 +
drivers/media/platform/rockchip/rkcif/Makefile | 10 +
.../platform/rockchip/rkcif/rkcif-capture-dvp.c | 858 +++++++++++++++++++++
.../platform/rockchip/rkcif/rkcif-capture-dvp.h | 24 +
.../platform/rockchip/rkcif/rkcif-capture-mipi.c | 722 +++++++++++++++++
.../platform/rockchip/rkcif/rkcif-capture-mipi.h | 22 +
.../media/platform/rockchip/rkcif/rkcif-common.h | 236 ++++++
drivers/media/platform/rockchip/rkcif/rkcif-dev.c | 300 +++++++
.../platform/rockchip/rkcif/rkcif-interface.c | 426 ++++++++++
.../platform/rockchip/rkcif/rkcif-interface.h | 30 +
.../rockchip/rkcif/rkcif-mipi-csi-receiver.c | 731 ++++++++++++++++++
drivers/media/platform/rockchip/rkcif/rkcif-regs.h | 154 ++++
.../media/platform/rockchip/rkcif/rkcif-stream.c | 622 +++++++++++++++
.../media/platform/rockchip/rkcif/rkcif-stream.h | 31 +
include/dt-bindings/media/video-interfaces.h | 4 +
28 files changed, 4816 insertions(+)
---
base-commit: 0af2f6be1b4281385b618cb86ad946eded089ac8
change-id: 20240220-rk3568-vicap-b9b3f9925f44
Best regards,
--
Michael Riesch <michael.riesch@...labora.com>
Powered by blists - more mailing lists