* [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap
@ 2026-03-17 9:32 Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 1/9] Documentation: admin-guide: media: add " Michael Riesch via B4 Relay
` (8 more replies)
0 siblings, 9 replies; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
Habidere,
The RK3588 Video Capture (VICAP) constitutes an essential piece of the
RK3588 camera interface with one DVP, six MIPI CSI-2 receivers,
scale/crop units, and a data path multiplexer (to scaler units, to ISP,
...). This series introduces basic support for the RK3588 VICAP unit
to the rkcif driver, thus paving the way for video capture in general
and for camera sensor image processing in particular.
The changes have been tested successfully on a Radxa ROCK 5B+ with two
Radxa 4K cameras attached to it. The raw images from the sensors can
be streamed after configuring the hardware pipeline with
media-ctl -d 0 --set-v4l2 '"dw-mipi-csi2rx fdd30000.csi":0 \
[fmt:SGBRG10_1X10/3864x2192 field:none colorspace:raw xfer:none]'
media-ctl -d 0 --set-v4l2 '"rkcif-mipi2":0 \
[fmt:SGBRG10_1X10/3864x2192 field:none colorspace:raw xfer:none]'
media-ctl -d 0 --set-v4l2 '"dw-mipi-csi2rx fdd50000.csi":0 \
[fmt:SGBRG10_1X10/3864x2192 field:none colorspace:raw xfer:none]'
media-ctl -d 0 --set-v4l2 '"rkcif-mipi4":0 \
[fmt:SGBRG10_1X10/3864x2192 field:none colorspace:raw xfer:none]'
and using e.g., GStreamer
gst-launch-1.0 v4l2src \
device=/dev/v4l/by-path/platform-fdce0000.video-capture-video-index0 \
! video/x-bayer,format=gbrg10le,width=3864,height=2192 ! bayer2rgb \
! ...
(or -index4 for the other camera sensor).
Note that this series requires the RK3588 MIPI CSI-2 receiver patches
[0]. I included them here to provide the possibility to test the changes
without any nasty merge conflicts.
Looking forward to your comments!
[0] https://lore.kernel.org/all/20260305-rk3588-csi2rx-v2-0-79d01b615486@collabora.com
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
Changes in v2:
- modified rockchip,rk3568-vicap binding instead of creating a new one
(Conor)
- aligned clock names and reset names with rockchip,rk3568-vicap
- Link to v1: https://lore.kernel.org/r/20250430-rk3588-vicap-v1-0-b3bddf749914@collabora.com
---
Michael Riesch (9):
Documentation: admin-guide: media: add rk3588 vicap
media: dt-bindings: add rockchip rk3588 vicap
media: rockchip: rkcif: add support for rk3588 vicap mipi capture
[DONOTMERGE] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3588 compatible
[DONOTMERGE] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3588
arm64: dts: rockchip: add vicap node to rk3588
arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam0
arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam1
arm64: defconfig: enable designware mipi csi-2 receiver
.../admin-guide/media/rkcif-rk3588-vicap.dot | 29 ++++
Documentation/admin-guide/media/rkcif.rst | 32 ++++
.../bindings/media/rockchip,rk3568-mipi-csi2.yaml | 8 +-
.../bindings/media/rockchip,rk3568-vicap.yaml | 191 ++++++++++++++++++---
arch/arm64/boot/dts/rockchip/Makefile | 7 +
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 143 +++++++++++++++
.../rk3588-rock-5b-plus-radxa-cam4k-cam0.dtso | 89 ++++++++++
.../rk3588-rock-5b-plus-radxa-cam4k-cam1.dtso | 89 ++++++++++
arch/arm64/configs/defconfig | 1 +
.../platform/rockchip/rkcif/rkcif-capture-mipi.c | 136 +++++++++++++++
.../platform/rockchip/rkcif/rkcif-capture-mipi.h | 1 +
.../media/platform/rockchip/rkcif/rkcif-common.h | 2 +-
drivers/media/platform/rockchip/rkcif/rkcif-dev.c | 18 ++
13 files changed, 719 insertions(+), 27 deletions(-)
---
base-commit: bb2a3912549d3b5cef5ed27200402fe8f6fb0694
change-id: 20250430-rk3588-vicap-9d164c8528a7
Best regards,
--
Michael Riesch <michael.riesch@collabora.com>
^ permalink raw reply [flat|nested] 21+ messages in thread
* [PATCH v2 1/9] Documentation: admin-guide: media: add rk3588 vicap
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-17 13:25 ` Mehdi Djait
2026-03-19 19:30 ` Charalampos Mitrodimas
2026-03-17 9:32 ` [PATCH v2 2/9] media: dt-bindings: add rockchip " Michael Riesch via B4 Relay
` (7 subsequent siblings)
8 siblings, 2 replies; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
Add a section that describes the Rockchip RK3588 VICAP.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
.../admin-guide/media/rkcif-rk3588-vicap.dot | 29 ++++++++++++++++++++
Documentation/admin-guide/media/rkcif.rst | 32 ++++++++++++++++++++++
2 files changed, 61 insertions(+)
diff --git a/Documentation/admin-guide/media/rkcif-rk3588-vicap.dot b/Documentation/admin-guide/media/rkcif-rk3588-vicap.dot
new file mode 100644
index 000000000000..f6d3404920b5
--- /dev/null
+++ b/Documentation/admin-guide/media/rkcif-rk3588-vicap.dot
@@ -0,0 +1,29 @@
+digraph board {
+ rankdir=TB
+ n00000007 [label="{{<port0> 0} | rkcif-mipi2\n/dev/v4l-subdev0 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
+ n00000007:port1 -> n0000000a
+ n00000007:port1 -> n00000010 [style=dashed]
+ n00000007:port1 -> n00000016 [style=dashed]
+ n00000007:port1 -> n0000001c [style=dashed]
+ n0000000a [label="rkcif-mipi2-id0\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
+ n00000010 [label="rkcif-mipi2-id1\n/dev/video1", shape=box, style=filled, fillcolor=yellow]
+ n00000016 [label="rkcif-mipi2-id2\n/dev/video2", shape=box, style=filled, fillcolor=yellow]
+ n0000001c [label="rkcif-mipi2-id3\n/dev/video3", shape=box, style=filled, fillcolor=yellow]
+ n00000025 [label="{{<port0> 0} | rkcif-mipi4\n/dev/v4l-subdev1 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
+ n00000025:port1 -> n00000028
+ n00000025:port1 -> n0000002e [style=dashed]
+ n00000025:port1 -> n00000034 [style=dashed]
+ n00000025:port1 -> n0000003a [style=dashed]
+ n00000028 [label="rkcif-mipi4-id0\n/dev/video4", shape=box, style=filled, fillcolor=yellow]
+ n0000002e [label="rkcif-mipi4-id1\n/dev/video5", shape=box, style=filled, fillcolor=yellow]
+ n00000034 [label="rkcif-mipi4-id2\n/dev/video6", shape=box, style=filled, fillcolor=yellow]
+ n0000003a [label="rkcif-mipi4-id3\n/dev/video7", shape=box, style=filled, fillcolor=yellow]
+ n00000043 [label="{{<port0> 0} | dw-mipi-csi2rx fdd30000.csi\n/dev/v4l-subdev2 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
+ n00000043:port1 -> n00000007:port0
+ n00000048 [label="{{<port0> 0} | dw-mipi-csi2rx fdd50000.csi\n/dev/v4l-subdev3 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
+ n00000048:port1 -> n00000025:port0
+ n0000004d [label="{{} | imx415 3-001a\n/dev/v4l-subdev4 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
+ n0000004d:port0 -> n00000043:port0
+ n00000051 [label="{{} | imx415 4-001a\n/dev/v4l-subdev5 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
+ n00000051:port0 -> n00000048:port0
+}
diff --git a/Documentation/admin-guide/media/rkcif.rst b/Documentation/admin-guide/media/rkcif.rst
index 2558c121abc4..fcd7f8cfc5d3 100644
--- a/Documentation/admin-guide/media/rkcif.rst
+++ b/Documentation/admin-guide/media/rkcif.rst
@@ -77,3 +77,35 @@ and the following video devices:
.. kernel-figure:: rkcif-rk3568-vicap.dot
:alt: Topology of the RK3568 Video Capture (VICAP) unit
:align: center
+
+Rockchip RK3588 Video Capture (VICAP)
+-------------------------------------
+
+The RK3588 Video Capture (VICAP) unit features a digital video port and six
+MIPI CSI-2 capture interfaces 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 RK3588 VICAP MIPI CSI-2 receivers feature four DMA engines each
+to handle different Virtual Channels (VCs).
+
+The rkcif driver represents this hardware variant by exposing the following
+V4L2 subdevices:
+
+* dw-mipi-csi2rx fdd30000.csi: MIPI CSI-2 receiver connected to MIPI DPHY0
+* dw-mipi-csi2rx fdd50000.csi: MIPI CSI-2 receiver connected to MIPI DPHY1
+* rkcif-mipi2: INTERFACE/CROP block for the MIPI CSI-2 receiver connected to
+ MIPI DPHY0
+* rkcif-mipi4: INTERFACE/CROP block for the MIPI CSI-2 receiver connected to
+ MIPI DPHY1
+
+and the following video devices:
+
+* rkcif-mipi2-id{0,1,2,3}: The DMA engines connected to the rkcif-mipi2
+ INTERFACE/CROP block.
+* rkcif-mipi4-id{0,1,2,3}: The DMA engines connected to the rkcif-mipi4
+ INTERFACE/CROP block.
+
+.. kernel-figure:: rkcif-rk3588-vicap.dot
+ :alt: Topology of the RK3588 Video Capture (VICAP) unit
+ :align: center
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 2/9] media: dt-bindings: add rockchip rk3588 vicap
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 1/9] Documentation: admin-guide: media: add " Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-18 17:52 ` Conor Dooley
2026-03-17 9:32 ` [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture Michael Riesch via B4 Relay
` (6 subsequent siblings)
8 siblings, 1 reply; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
Add documentation for the Rockchip RK3588 Video Capture (VICAP) unit.
To that end, make the existing rockchip,rk3568-vicap documentation
more general and introduce variant specific constraints.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
.../bindings/media/rockchip,rk3568-vicap.yaml | 191 ++++++++++++++++++---
1 file changed, 167 insertions(+), 24 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
index 18cd0a5a5318..15a889ff8e52 100644
--- a/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
@@ -15,9 +15,15 @@ description:
the data from camera sensors, video decoders, or other companion ICs and
transfers it into system main memory by AXI bus.
+ The Rockchip RK3588 Video Capture (VICAP) is similar to its RK3568
+ counterpart, but features six MIPI CSI-2 ports and additional connections
+ to the image signal processor (ISP) blocks.
+
properties:
compatible:
- const: rockchip,rk3568-vicap
+ enum:
+ - rockchip,rk3568-vicap
+ - rockchip,rk3588-vicap
reg:
maxItems: 1
@@ -26,37 +32,23 @@ properties:
maxItems: 1
clocks:
- items:
- - description: ACLK
- - description: HCLK
- - description: DCLK
- - description: ICLK
+ minItems: 4
+ maxItems: 5
clock-names:
- items:
- - const: aclk
- - const: hclk
- - const: dclk
- - const: iclk
+ minItems: 4
+ maxItems: 5
iommus:
maxItems: 1
resets:
- items:
- - description: ARST
- - description: HRST
- - description: DRST
- - description: PRST
- - description: IRST
+ minItems: 5
+ maxItems: 9
reset-names:
- items:
- - const: arst
- - const: hrst
- - const: drst
- - const: prst
- - const: irst
+ minItems: 5
+ maxItems: 9
rockchip,grf:
$ref: /schemas/types.yaml#/definitions/phandle
@@ -67,8 +59,15 @@ properties:
ports:
$ref: /schemas/graph.yaml#/properties/ports
+ additionalProperties: false
properties:
+ "#address-cells":
+ const: 1
+
+ "#size-cells":
+ const: 0
+
port@0:
$ref: /schemas/graph.yaml#/$defs/port-base
unevaluatedProperties: false
@@ -100,13 +99,75 @@ properties:
port@1:
$ref: /schemas/graph.yaml#/properties/port
- description: Port connected to the MIPI CSI-2 receiver output.
+ description: Port connected to the MIPI CSI-2 receiver 0 output.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ port@2:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Port connected to the MIPI CSI-2 receiver 1 output.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ port@3:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Port connected to the MIPI CSI-2 receiver 2 output.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ port@4:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Port connected to the MIPI CSI-2 receiver 3 output.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ port@5:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Port connected to the MIPI CSI-2 receiver 4 output.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ port@6:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Port connected to the MIPI CSI-2 receiver 5 output.
properties:
endpoint:
$ref: video-interfaces.yaml#
unevaluatedProperties: false
+ port@10:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Port connected to the ISP0 input.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
+
+ port@11:
+ $ref: /schemas/graph.yaml#/properties/port
+ description: Port connected to the ISP1 input.
+
+ properties:
+ endpoint:
+ $ref: video-interfaces.yaml#
+ unevaluatedProperties: false
required:
- compatible
- reg
@@ -114,6 +175,88 @@ required:
- clocks
- ports
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3568-vicap
+ then:
+ properties:
+ clocks:
+ minItems: 4
+ maxItems: 4
+
+ clock-names:
+ items:
+ - const: aclk
+ - const: hclk
+ - const: dclk
+ - const: iclk
+
+ resets:
+ minItems: 5
+ maxItems: 5
+
+ reset-names:
+ items:
+ - const: arst
+ - const: hrst
+ - const: drst
+ - const: prst
+ - const: irst
+
+ ports:
+ properties:
+ port@2: false
+
+ port@3: false
+
+ port@4: false
+
+ port@5: false
+
+ port@6: false
+
+ port@10: false
+
+ port@11: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3588-vicap
+ then:
+ properties:
+ clocks:
+ minItems: 5
+ maxItems: 5
+
+ clock-names:
+ items:
+ - const: aclk
+ - const: hclk
+ - const: dclk
+ - const: iclk0
+ - const: iclk1
+
+ resets:
+ minItems: 9
+ maxItems: 9
+
+ reset-names:
+ items:
+ - const: arst
+ - const: hrst
+ - const: drst
+ - const: irst0
+ - const: irst1
+ - const: irst2
+ - const: irst3
+ - const: irst4
+ - const: irst5
+
additionalProperties: false
examples:
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 1/9] Documentation: admin-guide: media: add " Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 2/9] media: dt-bindings: add rockchip " Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-17 13:08 ` Mehdi Djait
2026-03-17 9:32 ` [PATCH DONOTMERGE v2 4/9] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3588 compatible Michael Riesch via B4 Relay
` (5 subsequent siblings)
8 siblings, 1 reply; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
The RK3588 Video Capture (VICAP) unit features a Digital Video Port
(DVP) and six MIPI CSI-2 capture interfaces. Add initial support
for this variant to the rkcif driver and enable the MIPI CSI-2
capture interfaces.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
.../platform/rockchip/rkcif/rkcif-capture-mipi.c | 136 +++++++++++++++++++++
.../platform/rockchip/rkcif/rkcif-capture-mipi.h | 1 +
.../media/platform/rockchip/rkcif/rkcif-common.h | 2 +-
drivers/media/platform/rockchip/rkcif/rkcif-dev.c | 18 +++
4 files changed, 156 insertions(+), 1 deletion(-)
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
index 9e67160a16e4..aa70d3e9db04 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
@@ -30,10 +30,18 @@
#define RK3568_MIPI_CTRL0_CROP_EN BIT(5)
#define RK3568_MIPI_CTRL0_WRDDR(type) ((type) << 1)
+#define RK3588_MIPI_CTRL0_DMA_EN BIT(28)
+#define RK3588_MIPI_CTRL0_HIGH_ALIGN BIT(27)
+#define RK3588_MIPI_CTRL0_WRDDR(type) ((type) << 5)
+#define RK3588_MIPI_CTRL0_CROP_EN BIT(4)
+#define RK3588_MIPI_CTRL0_PARSE(type) ((type) << 1)
+
#define RKCIF_MIPI_CTRL0_DT_ID(id) ((id) << 10)
#define RKCIF_MIPI_CTRL0_VC_ID(id) ((id) << 8)
#define RKCIF_MIPI_CTRL0_CAP_EN BIT(0)
+#define RKCIF_MIPI_CTRL_CAP_EN BIT(0)
+
#define RKCIF_MIPI_INT_FRAME0_END(id) BIT(8 + (id) * 2 + 0)
#define RKCIF_MIPI_INT_FRAME1_END(id) BIT(8 + (id) * 2 + 1)
@@ -481,6 +489,132 @@ const struct rkcif_mipi_match_data rkcif_rk3568_vicap_mipi_match_data = {
},
};
+static u32
+rkcif_rk3588_mipi_ctrl0(struct rkcif_stream *stream,
+ const struct rkcif_output_fmt *active_out_fmt)
+{
+ u32 ctrl0 = 0;
+
+ ctrl0 |= RK3588_MIPI_CTRL0_DMA_EN;
+ ctrl0 |= RKCIF_MIPI_CTRL0_DT_ID(active_out_fmt->mipi.dt);
+ ctrl0 |= RK3588_MIPI_CTRL0_CROP_EN;
+ ctrl0 |= RKCIF_MIPI_CTRL0_CAP_EN;
+
+ switch (active_out_fmt->mipi.type) {
+ case RKCIF_MIPI_TYPE_RAW8:
+ break;
+ case RKCIF_MIPI_TYPE_RAW10:
+ ctrl0 |= RK3588_MIPI_CTRL0_PARSE(0x1);
+ if (!active_out_fmt->mipi.compact)
+ ctrl0 |= RK3588_MIPI_CTRL0_WRDDR(0x1);
+ break;
+ case RKCIF_MIPI_TYPE_RAW12:
+ ctrl0 |= RK3588_MIPI_CTRL0_PARSE(0x2);
+ if (!active_out_fmt->mipi.compact)
+ ctrl0 |= RK3588_MIPI_CTRL0_WRDDR(0x1);
+ break;
+ case RKCIF_MIPI_TYPE_RGB888:
+ break;
+ case RKCIF_MIPI_TYPE_YUV422SP:
+ ctrl0 |= RK3588_MIPI_CTRL0_WRDDR(0x4);
+ break;
+ case RKCIF_MIPI_TYPE_YUV420SP:
+ ctrl0 |= RK3588_MIPI_CTRL0_WRDDR(0x5);
+ break;
+ case RKCIF_MIPI_TYPE_YUV400:
+ ctrl0 |= RK3588_MIPI_CTRL0_WRDDR(0x3);
+ break;
+ default:
+ break;
+ }
+
+ return ctrl0;
+}
+
+const struct rkcif_mipi_match_data rkcif_rk3588_vicap_mipi_match_data = {
+ .mipi_num = 6,
+ .mipi_ctrl0 = rkcif_rk3588_mipi_ctrl0,
+ .regs = {
+ [RKCIF_MIPI_CTRL] = 0x20,
+ [RKCIF_MIPI_INTEN] = 0x74,
+ [RKCIF_MIPI_INTSTAT] = 0x78,
+ },
+ .regs_id = {
+ [RKCIF_ID0] = {
+ [RKCIF_MIPI_CTRL0] = 0x00,
+ [RKCIF_MIPI_CTRL1] = 0x04,
+ [RKCIF_MIPI_FRAME0_ADDR_Y] = 0x24,
+ [RKCIF_MIPI_FRAME0_ADDR_UV] = 0x2c,
+ [RKCIF_MIPI_FRAME0_VLW_Y] = 0x34,
+ [RKCIF_MIPI_FRAME0_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_FRAME1_ADDR_Y] = 0x28,
+ [RKCIF_MIPI_FRAME1_ADDR_UV] = 0x30,
+ [RKCIF_MIPI_FRAME1_VLW_Y] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_FRAME1_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_CROP_START] = 0x8c,
+ },
+ [RKCIF_ID1] = {
+ [RKCIF_MIPI_CTRL0] = 0x08,
+ [RKCIF_MIPI_CTRL1] = 0x0c,
+ [RKCIF_MIPI_FRAME0_ADDR_Y] = 0x38,
+ [RKCIF_MIPI_FRAME0_ADDR_UV] = 0x40,
+ [RKCIF_MIPI_FRAME0_VLW_Y] = 0x48,
+ [RKCIF_MIPI_FRAME0_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_FRAME1_ADDR_Y] = 0x3c,
+ [RKCIF_MIPI_FRAME1_ADDR_UV] = 0x44,
+ [RKCIF_MIPI_FRAME1_VLW_Y] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_FRAME1_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_CROP_START] = 0x90,
+ },
+ [RKCIF_ID2] = {
+ [RKCIF_MIPI_CTRL0] = 0x10,
+ [RKCIF_MIPI_CTRL1] = 0x14,
+ [RKCIF_MIPI_FRAME0_ADDR_Y] = 0x4c,
+ [RKCIF_MIPI_FRAME0_ADDR_UV] = 0x54,
+ [RKCIF_MIPI_FRAME0_VLW_Y] = 0x5c,
+ [RKCIF_MIPI_FRAME0_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_FRAME1_ADDR_Y] = 0x50,
+ [RKCIF_MIPI_FRAME1_ADDR_UV] = 0x58,
+ [RKCIF_MIPI_FRAME1_VLW_Y] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_FRAME1_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_CROP_START] = 0x94,
+ },
+ [RKCIF_ID3] = {
+ [RKCIF_MIPI_CTRL0] = 0x18,
+ [RKCIF_MIPI_CTRL1] = 0x1c,
+ [RKCIF_MIPI_FRAME0_ADDR_Y] = 0x60,
+ [RKCIF_MIPI_FRAME0_ADDR_UV] = 0x68,
+ [RKCIF_MIPI_FRAME0_VLW_Y] = 0x70,
+ [RKCIF_MIPI_FRAME0_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_FRAME1_ADDR_Y] = 0x64,
+ [RKCIF_MIPI_FRAME1_ADDR_UV] = 0x6c,
+ [RKCIF_MIPI_FRAME1_VLW_Y] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_FRAME1_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
+ [RKCIF_MIPI_CROP_START] = 0x98,
+ },
+ },
+ .blocks = {
+ {
+ .offset = 0x100,
+ },
+ {
+ .offset = 0x200,
+ },
+ {
+ .offset = 0x300,
+ },
+ {
+ .offset = 0x400,
+ },
+ {
+ .offset = 0x500,
+ },
+ {
+ .offset = 0x600,
+ },
+ },
+};
+
static inline unsigned int rkcif_mipi_get_reg(struct rkcif_interface *interface,
unsigned int index)
{
@@ -631,6 +765,8 @@ static int rkcif_mipi_start_streaming(struct rkcif_stream *stream)
rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL1, ctrl1);
rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL0, ctrl0);
+ rkcif_mipi_write(interface, RKCIF_MIPI_CTRL, RKCIF_MIPI_CTRL_CAP_EN);
+
ret = 0;
out:
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.h b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.h
index 7f16eadc474c..7edaca44f653 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.h
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.h
@@ -13,6 +13,7 @@
#include "rkcif-common.h"
extern const struct rkcif_mipi_match_data rkcif_rk3568_vicap_mipi_match_data;
+extern const struct rkcif_mipi_match_data rkcif_rk3588_vicap_mipi_match_data;
int rkcif_mipi_register(struct rkcif_device *rkcif);
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-common.h b/drivers/media/platform/rockchip/rkcif/rkcif-common.h
index dd92cfbc879f..4d9211ba9bda 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-common.h
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-common.h
@@ -27,7 +27,7 @@
#include "rkcif-regs.h"
#define RKCIF_DRIVER_NAME "rockchip-cif"
-#define RKCIF_CLK_MAX 4
+#define RKCIF_CLK_MAX 5
enum rkcif_format_type {
RKCIF_FMT_TYPE_INVALID,
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-dev.c b/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
index b4cf1146f131..c8542398b7f0 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
@@ -53,6 +53,20 @@ static const struct rkcif_match_data rk3568_vicap_match_data = {
.mipi = &rkcif_rk3568_vicap_mipi_match_data,
};
+static const char *const rk3588_vicap_clks[] = {
+ "aclk",
+ "hclk",
+ "dclk",
+ "iclk0",
+ "iclk1",
+};
+
+static const struct rkcif_match_data rk3588_vicap_match_data = {
+ .clks = rk3588_vicap_clks,
+ .clks_num = ARRAY_SIZE(rk3588_vicap_clks),
+ .mipi = &rkcif_rk3588_vicap_mipi_match_data,
+};
+
static const struct of_device_id rkcif_plat_of_match[] = {
{
.compatible = "rockchip,px30-vip",
@@ -62,6 +76,10 @@ static const struct of_device_id rkcif_plat_of_match[] = {
.compatible = "rockchip,rk3568-vicap",
.data = &rk3568_vicap_match_data,
},
+ {
+ .compatible = "rockchip,rk3588-vicap",
+ .data = &rk3588_vicap_match_data,
+ },
{}
};
MODULE_DEVICE_TABLE(of, rkcif_plat_of_match);
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH DONOTMERGE v2 4/9] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3588 compatible
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
` (2 preceding siblings ...)
2026-03-17 9:32 ` [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH DONOTMERGE v2 5/9] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3588 Michael Riesch via B4 Relay
` (4 subsequent siblings)
8 siblings, 0 replies; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
This patch is discussed over at
https://lore.kernel.org/all/20260305-rk3588-csi2rx-v2-0-79d01b615486@collabora.com
included here for testing purposes only.
The RK3588 MIPI CSI-2 receivers are compatible to the ones found in
the RK3568.
Introduce a list of compatible variants and add the RK3588 variant to
it.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
.../devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
index 2c2bd87582eb..5e864e92f8a8 100644
--- a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
@@ -16,8 +16,12 @@ description:
properties:
compatible:
- enum:
- - rockchip,rk3568-mipi-csi2
+ oneOf:
+ - const: rockchip,rk3568-mipi-csi2
+ - items:
+ - enum:
+ - rockchip,rk3588-mipi-csi2
+ - const: rockchip,rk3568-mipi-csi2
reg:
maxItems: 1
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH DONOTMERGE v2 5/9] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3588
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
` (3 preceding siblings ...)
2026-03-17 9:32 ` [PATCH DONOTMERGE v2 4/9] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3588 compatible Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 6/9] arm64: dts: rockchip: add vicap node " Michael Riesch via B4 Relay
` (3 subsequent siblings)
8 siblings, 0 replies; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
This patch is discussed over at
https://lore.kernel.org/all/20260305-rk3588-csi2rx-v2-0-79d01b615486@collabora.com
included here for testing purposes only.
The Rockchip RK3588 features six MIPI CSI-2 receiver units:
- MIPI0: connected to MIPI DCPHY0 (not supported)
- MIPI1: connected to MIPI DCPHY1 (not supported)
- MIPI2: connected to MIPI DPHY0
- MIPI3: connected to MIPI DPHY0-1 (not supported)
- MIPI4: connected to MIPI DPHY1
- MIPI5: connected to MIPI DPHY1-1 (not supported)
As the MIPI DCPHYs as well as the split DPHY mode of the DPHYs
are not yet supported, add only the device tree nodes for the
MIPI2 and MIPI4 units.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 52 +++++++++++++++++++++++++++
1 file changed, 52 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
index 7fe9593d8c19..6c593b0255c3 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
@@ -1430,6 +1430,58 @@ av1d: video-codec@fdc70000 {
resets = <&cru SRST_A_AV1>, <&cru SRST_P_AV1>, <&cru SRST_A_AV1_BIU>, <&cru SRST_P_AV1_BIU>;
};
+ csi2: csi@fdd30000 {
+ compatible = "rockchip,rk3588-mipi-csi2", "rockchip,rk3568-mipi-csi2";
+ reg = <0x0 0xfdd30000 0x0 0x10000>;
+ interrupts = <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "err1", "err2";
+ clocks = <&cru PCLK_CSI_HOST_2>;
+ phys = <&csi_dphy0>;
+ power-domains = <&power RK3588_PD_VI>;
+ resets = <&cru SRST_P_CSI_HOST_2>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi2_in: port@0 {
+ reg = <0>;
+ };
+
+ csi2_out: port@1 {
+ reg = <1>;
+ };
+ };
+ };
+
+ csi4: csi@fdd50000 {
+ compatible = "rockchip,rk3588-mipi-csi2", "rockchip,rk3568-mipi-csi2";
+ reg = <0x0 0xfdd50000 0x0 0x10000>;
+ interrupts = <GIC_SPI 151 IRQ_TYPE_LEVEL_HIGH 0>,
+ <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH 0>;
+ interrupt-names = "err1", "err2";
+ clocks = <&cru PCLK_CSI_HOST_4>;
+ phys = <&csi_dphy1>;
+ power-domains = <&power RK3588_PD_VI>;
+ resets = <&cru SRST_P_CSI_HOST_4>;
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ csi4_in: port@0 {
+ reg = <0>;
+ };
+
+ csi4_out: port@1 {
+ reg = <1>;
+ };
+ };
+ };
+
vop: vop@fdd90000 {
compatible = "rockchip,rk3588-vop";
reg = <0x0 0xfdd90000 0x0 0x4200>, <0x0 0xfdd95000 0x0 0x1000>;
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 6/9] arm64: dts: rockchip: add vicap node to rk3588
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
` (4 preceding siblings ...)
2026-03-17 9:32 ` [PATCH DONOTMERGE v2 5/9] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3588 Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 7/9] arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam0 Michael Riesch via B4 Relay
` (2 subsequent siblings)
8 siblings, 0 replies; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
Add the device tree node for the RK3588 Video Capture (VICAP) unit.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 91 +++++++++++++++++++++++++++
1 file changed, 91 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
index 6c593b0255c3..9c5b68fd02c7 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
@@ -1430,6 +1430,89 @@ av1d: video-codec@fdc70000 {
resets = <&cru SRST_A_AV1>, <&cru SRST_P_AV1>, <&cru SRST_A_AV1_BIU>, <&cru SRST_P_AV1_BIU>;
};
+ vicap: video-capture@fdce0000 {
+ compatible = "rockchip,rk3588-vicap";
+ reg = <0x0 0xfdce0000 0x0 0x800>;
+ interrupts = <GIC_SPI 155 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru ACLK_VICAP>, <&cru HCLK_VICAP>,
+ <&cru DCLK_VICAP>, <&cru ICLK_CSIHOST0>,
+ <&cru ICLK_CSIHOST1>;
+ clock-names = "aclk", "hclk", "dclk", "iclk0", "iclk1";
+ iommus = <&vicap_mmu>;
+ power-domains = <&power RK3588_PD_VI>;
+ resets = <&cru SRST_A_VICAP>, <&cru SRST_H_VICAP>,
+ <&cru SRST_D_VICAP>, <&cru SRST_CSIHOST0_VICAP>,
+ <&cru SRST_CSIHOST1_VICAP>,
+ <&cru SRST_CSIHOST2_VICAP>,
+ <&cru SRST_CSIHOST3_VICAP>,
+ <&cru SRST_CSIHOST4_VICAP>,
+ <&cru SRST_CSIHOST5_VICAP>;
+ reset-names = "arst", "hrst", "drst", "irst0", "irst1",
+ "irst2", "irst3", "irst4", "irst5";
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vicap_dvp: port@0 {
+ reg = <0>;
+ };
+
+ vicap_mipi0: port@1 {
+ reg = <1>;
+ };
+
+ vicap_mipi1: port@2 {
+ reg = <2>;
+ };
+
+ vicap_mipi2: port@3 {
+ reg = <3>;
+
+ vicap_mipi2_input: endpoint {
+ remote-endpoint = <&csi2_output>;
+ };
+ };
+
+ vicap_mipi3: port@4 {
+ reg = <4>;
+ };
+
+ vicap_mipi4: port@5 {
+ reg = <5>;
+
+ vicap_mipi4_input: endpoint {
+ remote-endpoint = <&csi4_output>;
+ };
+ };
+
+ vicap_mipi5: port@6 {
+ reg = <6>;
+ };
+
+ vicap_toisp0: port@10 {
+ reg = <10>;
+ };
+
+ vicap_toisp1: port@11 {
+ reg = <11>;
+ };
+ };
+ };
+
+ vicap_mmu: iommu@fdce0800 {
+ compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu";
+ reg = <0x0 0xfdce0800 0x0 0x40>, <0x0 0xfdce0900 0x0 0x40>;
+ interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru ACLK_VICAP>, <&cru HCLK_VICAP>;
+ clock-names = "aclk", "iface";
+ #iommu-cells = <0>;
+ power-domains = <&power RK3588_PD_VI>;
+ rockchip,disable-mmu-reset;
+ status = "disabled";
+ };
+
csi2: csi@fdd30000 {
compatible = "rockchip,rk3588-mipi-csi2", "rockchip,rk3568-mipi-csi2";
reg = <0x0 0xfdd30000 0x0 0x10000>;
@@ -1452,6 +1535,10 @@ csi2_in: port@0 {
csi2_out: port@1 {
reg = <1>;
+
+ csi2_output: endpoint {
+ remote-endpoint = <&vicap_mipi2_input>;
+ };
};
};
};
@@ -1478,6 +1565,10 @@ csi4_in: port@0 {
csi4_out: port@1 {
reg = <1>;
+
+ csi4_output: endpoint {
+ remote-endpoint = <&vicap_mipi4_input>;
+ };
};
};
};
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 7/9] arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam0
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
` (5 preceding siblings ...)
2026-03-17 9:32 ` [PATCH v2 6/9] arm64: dts: rockchip: add vicap node " Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 8/9] arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam1 Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 9/9] arm64: defconfig: enable designware mipi csi-2 receiver Michael Riesch via B4 Relay
8 siblings, 0 replies; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
Add device tree overlay for the Radxa Camera 4K (featuring the
Sony IMX415 image sensor) to applied on the Radxa ROCK 5B+
CAM0 port.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
arch/arm64/boot/dts/rockchip/Makefile | 5 ++
.../rk3588-rock-5b-plus-radxa-cam4k-cam0.dtso | 89 ++++++++++++++++++++++
2 files changed, 94 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 4d384f153c13..77c587f43dda 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -199,6 +199,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-pcie-ep.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-pcie-srns.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-plus.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-plus-radxa-cam4k-cam0.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5t.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-tiger-haikou.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-tiger-haikou-video-demo.dtbo
@@ -298,6 +299,10 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-pcie-srns.dtb
rk3588-rock-5b-pcie-srns-dtbs := rk3588-rock-5b.dtb \
rk3588-rock-5b-pcie-srns.dtbo
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-plus-radxa-4k-cam.dtb
+rk3588-rock-5b-plus-radxa-4k-cam-dtbs := rk3588-rock-5b-plus.dtb \
+ rk3588-rock-5b-plus-radxa-cam4k-cam0.dtbo
+
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-tiger-haikou-haikou-video-demo.dtb
rk3588-tiger-haikou-haikou-video-demo-dtbs := rk3588-tiger-haikou.dtb \
rk3588-tiger-haikou-video-demo.dtbo
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus-radxa-cam4k-cam0.dtso b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus-radxa-cam4k-cam0.dtso
new file mode 100644
index 000000000000..c107c74c2188
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus-radxa-cam4k-cam0.dtso
@@ -0,0 +1,89 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device tree overlay for the Radxa Camera 4K attached to the CAM0 port of
+ * the Radxa ROCK 5B+.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/clock/rockchip,rk3588-cru.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+
+&{/} {
+ vcc_cam0: regulator-vcc-cam0 {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&cam0_power0_en>;
+ regulator-name = "vcc_cam0";
+ vin-supply = <&vcc_3v3_s3>;
+ };
+};
+
+&i2c3 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ imx415: camera-sensor@1a {
+ compatible = "sony,imx415";
+ reg = <0x1a>;
+ assigned-clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
+ assigned-clock-rates = <37125000>;
+ avdd-supply = <&vcc_cam0>;
+ clocks = <&cru CLK_MIPI_CAMARAOUT_M3>;
+ dvdd-supply = <&vcc_cam0>;
+ orientation = <2>; /* External */
+ ovdd-supply = <&vcc_cam0>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&cam0_rstn &mipim0_camera3_clk>;
+ reset-gpios = <&gpio4 RK_PA0 GPIO_ACTIVE_LOW>;
+
+ port {
+ imx415_output: endpoint {
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 <445500000>;
+ remote-endpoint = <&csi2_input>;
+ };
+ };
+ };
+};
+
+&pinctrl {
+ cam0 {
+ cam0_power0_en: cam0-power0-en-pinctrl {
+ rockchip,pins = <1 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ cam0_rstn: cam0-rstn-pinctrl {
+ rockchip,pins = <4 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&csi2 {
+ status = "okay";
+};
+
+&csi2_in {
+ csi2_input: endpoint {
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 <445500000>;
+ remote-endpoint = <&imx415_output>;
+ };
+};
+
+&csi_dphy0 {
+ status = "okay";
+};
+
+&vicap {
+ status = "okay";
+};
+
+&vicap_mmu {
+ status = "okay";
+};
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 8/9] arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam1
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
` (6 preceding siblings ...)
2026-03-17 9:32 ` [PATCH v2 7/9] arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam0 Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 9/9] arm64: defconfig: enable designware mipi csi-2 receiver Michael Riesch via B4 Relay
8 siblings, 0 replies; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
Add device tree overlay for the Radxa Camera 4K (featuring the
Sony IMX415 image sensor) to applied on the Radxa ROCK 5B+
CAM1 port.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
arch/arm64/boot/dts/rockchip/Makefile | 4 +-
.../rk3588-rock-5b-plus-radxa-cam4k-cam1.dtso | 89 ++++++++++++++++++++++
2 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 77c587f43dda..191666821a80 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -200,6 +200,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-pcie-ep.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-pcie-srns.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-plus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-plus-radxa-cam4k-cam0.dtbo
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-plus-radxa-cam4k-cam1.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5t.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-tiger-haikou.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-tiger-haikou-video-demo.dtbo
@@ -301,7 +302,8 @@ rk3588-rock-5b-pcie-srns-dtbs := rk3588-rock-5b.dtb \
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-rock-5b-plus-radxa-4k-cam.dtb
rk3588-rock-5b-plus-radxa-4k-cam-dtbs := rk3588-rock-5b-plus.dtb \
- rk3588-rock-5b-plus-radxa-cam4k-cam0.dtbo
+ rk3588-rock-5b-plus-radxa-cam4k-cam0.dtbo \
+ rk3588-rock-5b-plus-radxa-cam4k-cam1.dtbo
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-tiger-haikou-haikou-video-demo.dtb
rk3588-tiger-haikou-haikou-video-demo-dtbs := rk3588-tiger-haikou.dtb \
diff --git a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus-radxa-cam4k-cam1.dtso b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus-radxa-cam4k-cam1.dtso
new file mode 100644
index 000000000000..8e586950d0c0
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b-plus-radxa-cam4k-cam1.dtso
@@ -0,0 +1,89 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device tree overlay for the Radxa Camera 4K attached to the CAM1 port of
+ * the Radxa ROCK 5B+.
+ */
+
+/dts-v1/;
+/plugin/;
+
+#include <dt-bindings/clock/rockchip,rk3588-cru.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
+
+&{/} {
+ vcc_cam1: regulator-vcc-cam1 {
+ compatible = "regulator-fixed";
+ enable-active-high;
+ gpio = <&gpio2 RK_PA6 GPIO_ACTIVE_HIGH>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&cam1_power0_en>;
+ regulator-name = "vcc_cam1";
+ vin-supply = <&vcc_3v3_s3>;
+ };
+};
+
+&i2c4 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ status = "okay";
+
+ cam1_imx415: camera-sensor@1a {
+ compatible = "sony,imx415";
+ reg = <0x1a>;
+ assigned-clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
+ assigned-clock-rates = <37125000>;
+ avdd-supply = <&vcc_cam1>;
+ clocks = <&cru CLK_MIPI_CAMARAOUT_M4>;
+ dvdd-supply = <&vcc_cam1>;
+ orientation = <2>; /* External */
+ ovdd-supply = <&vcc_cam1>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&cam1_rstn &mipim0_camera4_clk>;
+ reset-gpios = <&gpio2 RK_PB0 GPIO_ACTIVE_LOW>;
+
+ port {
+ cam1_imx415_output: endpoint {
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 <445500000>;
+ remote-endpoint = <&csi4_input>;
+ };
+ };
+ };
+};
+
+&pinctrl {
+ cam1 {
+ cam1_power0_en: cam1-power0-en-pinctrl {
+ rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+
+ cam1_rstn: cam1-rstn-pinctrl {
+ rockchip,pins = <2 RK_PB0 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+};
+
+&csi4 {
+ status = "okay";
+};
+
+&csi4_in {
+ csi4_input: endpoint {
+ data-lanes = <1 2 3 4>;
+ link-frequencies = /bits/ 64 <445500000>;
+ remote-endpoint = <&cam1_imx415_output>;
+ };
+};
+
+&csi_dphy1 {
+ status = "okay";
+};
+
+&vicap {
+ status = "okay";
+};
+
+&vicap_mmu {
+ status = "okay";
+};
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* [PATCH v2 9/9] arm64: defconfig: enable designware mipi csi-2 receiver
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
` (7 preceding siblings ...)
2026-03-17 9:32 ` [PATCH v2 8/9] arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam1 Michael Riesch via B4 Relay
@ 2026-03-17 9:32 ` Michael Riesch via B4 Relay
2026-03-17 13:23 ` Mehdi Djait
8 siblings, 1 reply; 21+ messages in thread
From: Michael Riesch via B4 Relay @ 2026-03-17 9:32 UTC (permalink / raw)
To: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Michael Riesch
From: Michael Riesch <michael.riesch@collabora.com>
The Synopsys DesignWare MIPI CSI-2 Receiver is integrated into
recent Rockchip SoCs, such as the RK3568 and the RK3588.
As a consequence, they are used on a lot of Rockchip-based
single board computers and/or corresponding camera modules, such
as the Radxa Camera 4K.
Enable the driver for it in the default configuration.
Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
---
arch/arm64/configs/defconfig | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index b67d5b1fc45b..a93ff73ae52c 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -907,6 +907,7 @@ CONFIG_SDR_PLATFORM_DRIVERS=y
CONFIG_V4L_MEM2MEM_DRIVERS=y
CONFIG_VIDEO_AMPHION_VPU=m
CONFIG_VIDEO_CADENCE_CSI2RX=m
+CONFIG_VIDEO_DW_MIPI_CSI2RX=m
CONFIG_VIDEO_MEDIATEK_JPEG=m
CONFIG_VIDEO_MEDIATEK_VCODEC=m
CONFIG_VIDEO_WAVE_VPU=m
--
2.39.5
^ permalink raw reply related [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture
2026-03-17 9:32 ` [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture Michael Riesch via B4 Relay
@ 2026-03-17 13:08 ` Mehdi Djait
2026-03-17 13:21 ` Michael Riesch
0 siblings, 1 reply; 21+ messages in thread
From: Mehdi Djait @ 2026-03-17 13:08 UTC (permalink / raw)
To: michael.riesch
Cc: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Michael,
Thank you for this nice patch!
On Tue, Mar 17, 2026 at 10:32:21AM +0100, Michael Riesch via B4 Relay wrote:
> From: Michael Riesch <michael.riesch@collabora.com>
>
> The RK3588 Video Capture (VICAP) unit features a Digital Video Port
> (DVP) and six MIPI CSI-2 capture interfaces. Add initial support
> for this variant to the rkcif driver and enable the MIPI CSI-2
> capture interfaces.
>
> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
[...]
> static inline unsigned int rkcif_mipi_get_reg(struct rkcif_interface *interface,
> unsigned int index)
> {
> @@ -631,6 +765,8 @@ static int rkcif_mipi_start_streaming(struct rkcif_stream *stream)
> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL1, ctrl1);
> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL0, ctrl0);
>
> + rkcif_mipi_write(interface, RKCIF_MIPI_CTRL, RKCIF_MIPI_CTRL_CAP_EN);
> +
while this is the correct solution for rk3588, for the rk3568 vicap this
will write 0x1 to the VICAP_MIPI_CTRL : 0x00A0 which will enable the water line.
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture
2026-03-17 13:08 ` Mehdi Djait
@ 2026-03-17 13:21 ` Michael Riesch
2026-03-17 13:28 ` Mehdi Djait
0 siblings, 1 reply; 21+ messages in thread
From: Michael Riesch @ 2026-03-17 13:21 UTC (permalink / raw)
To: Mehdi Djait
Cc: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Mehdi,
On 3/17/26 14:08, Mehdi Djait wrote:
> Hi Michael,
>
> Thank you for this nice patch!
>
> On Tue, Mar 17, 2026 at 10:32:21AM +0100, Michael Riesch via B4 Relay wrote:
>> From: Michael Riesch <michael.riesch@collabora.com>
>>
>> The RK3588 Video Capture (VICAP) unit features a Digital Video Port
>> (DVP) and six MIPI CSI-2 capture interfaces. Add initial support
>> for this variant to the rkcif driver and enable the MIPI CSI-2
>> capture interfaces.
>>
>> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
>
> [...]
>
>> static inline unsigned int rkcif_mipi_get_reg(struct rkcif_interface *interface,
>> unsigned int index)
>> {
>> @@ -631,6 +765,8 @@ static int rkcif_mipi_start_streaming(struct rkcif_stream *stream)
>> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL1, ctrl1);
>> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL0, ctrl0);
>>
>> + rkcif_mipi_write(interface, RKCIF_MIPI_CTRL, RKCIF_MIPI_CTRL_CAP_EN);
>> +
>
> while this is the correct solution for rk3588, for the rk3568 vicap this
> will write 0x1 to the VICAP_MIPI_CTRL : 0x00A0 which will enable the water line.
nice catch ;-) However, the TRM (at least my version) claims that this
bit has a reset value of 0x1, so the bit in question should be already
set in the first place. Thus I decided to *not* make variant specific
code paths.
Do you see problems in your setup?
>
> --
> Kind Regards
> Mehdi Djait
Best regards,
Michael
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 9/9] arm64: defconfig: enable designware mipi csi-2 receiver
2026-03-17 9:32 ` [PATCH v2 9/9] arm64: defconfig: enable designware mipi csi-2 receiver Michael Riesch via B4 Relay
@ 2026-03-17 13:23 ` Mehdi Djait
0 siblings, 0 replies; 21+ messages in thread
From: Mehdi Djait @ 2026-03-17 13:23 UTC (permalink / raw)
To: michael.riesch
Cc: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Michael,
Thank you for the patch!
On Tue, Mar 17, 2026 at 10:32:27AM +0100, Michael Riesch via B4 Relay wrote:
> From: Michael Riesch <michael.riesch@collabora.com>
>
> The Synopsys DesignWare MIPI CSI-2 Receiver is integrated into
> recent Rockchip SoCs, such as the RK3568 and the RK3588.
> As a consequence, they are used on a lot of Rockchip-based
> single board computers and/or corresponding camera modules, such
> as the Radxa Camera 4K.
> Enable the driver for it in the default configuration.
>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/9] Documentation: admin-guide: media: add rk3588 vicap
2026-03-17 9:32 ` [PATCH v2 1/9] Documentation: admin-guide: media: add " Michael Riesch via B4 Relay
@ 2026-03-17 13:25 ` Mehdi Djait
2026-03-19 19:30 ` Charalampos Mitrodimas
1 sibling, 0 replies; 21+ messages in thread
From: Mehdi Djait @ 2026-03-17 13:25 UTC (permalink / raw)
To: michael.riesch
Cc: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hello Michael,
Thank you for the patch!
On Tue, Mar 17, 2026 at 10:32:19AM +0100, Michael Riesch via B4 Relay wrote:
> From: Michael Riesch <michael.riesch@collabora.com>
>
> Add a section that describes the Rockchip RK3588 VICAP.
>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture
2026-03-17 13:21 ` Michael Riesch
@ 2026-03-17 13:28 ` Mehdi Djait
2026-03-25 8:04 ` Michael Riesch
0 siblings, 1 reply; 21+ messages in thread
From: Mehdi Djait @ 2026-03-17 13:28 UTC (permalink / raw)
To: Michael Riesch
Cc: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Michael,
On Tue, Mar 17, 2026 at 02:21:20PM +0100, Michael Riesch wrote:
> Hi Mehdi,
>
> On 3/17/26 14:08, Mehdi Djait wrote:
> > Hi Michael,
> >
> > Thank you for this nice patch!
> >
> > On Tue, Mar 17, 2026 at 10:32:21AM +0100, Michael Riesch via B4 Relay wrote:
> >> From: Michael Riesch <michael.riesch@collabora.com>
> >>
> >> The RK3588 Video Capture (VICAP) unit features a Digital Video Port
> >> (DVP) and six MIPI CSI-2 capture interfaces. Add initial support
> >> for this variant to the rkcif driver and enable the MIPI CSI-2
> >> capture interfaces.
> >>
> >> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
> >
> > [...]
> >
> >> static inline unsigned int rkcif_mipi_get_reg(struct rkcif_interface *interface,
> >> unsigned int index)
> >> {
> >> @@ -631,6 +765,8 @@ static int rkcif_mipi_start_streaming(struct rkcif_stream *stream)
> >> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL1, ctrl1);
> >> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL0, ctrl0);
> >>
> >> + rkcif_mipi_write(interface, RKCIF_MIPI_CTRL, RKCIF_MIPI_CTRL_CAP_EN);
> >> +
> >
> > while this is the correct solution for rk3588, for the rk3568 vicap this
> > will write 0x1 to the VICAP_MIPI_CTRL : 0x00A0 which will enable the water line.
>
> nice catch ;-) However, the TRM (at least my version) claims that this
> bit has a reset value of 0x1, so the bit in question should be already
> set in the first place. Thus I decided to *not* make variant specific
> code paths.
Yes, the reset value is indeed 0x1
>
> Do you see problems in your setup?
>
No problems, it works as expected, I was just confused to see the
mipi capture enable added with this rk3588 patch and not before.
I just find it a bit confusing but if a nicer solution is too much
hassle we can leave it like this.
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 2/9] media: dt-bindings: add rockchip rk3588 vicap
2026-03-17 9:32 ` [PATCH v2 2/9] media: dt-bindings: add rockchip " Michael Riesch via B4 Relay
@ 2026-03-18 17:52 ` Conor Dooley
2026-03-19 8:04 ` Michael Riesch
0 siblings, 1 reply; 21+ messages in thread
From: Conor Dooley @ 2026-03-18 17:52 UTC (permalink / raw)
To: michael.riesch
Cc: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 4368 bytes --]
On Tue, Mar 17, 2026 at 10:32:20AM +0100, Michael Riesch via B4 Relay wrote:
> From: Michael Riesch <michael.riesch@collabora.com>
>
> Add documentation for the Rockchip RK3588 Video Capture (VICAP) unit.
> To that end, make the existing rockchip,rk3568-vicap documentation
> more general and introduce variant specific constraints.
>
> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
> ---
> .../bindings/media/rockchip,rk3568-vicap.yaml | 191 ++++++++++++++++++---
> 1 file changed, 167 insertions(+), 24 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
> index 18cd0a5a5318..15a889ff8e52 100644
> --- a/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
> +++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
> @@ -15,9 +15,15 @@ description:
> the data from camera sensors, video decoders, or other companion ICs and
> transfers it into system main memory by AXI bus.
>
> + The Rockchip RK3588 Video Capture (VICAP) is similar to its RK3568
> + counterpart, but features six MIPI CSI-2 ports and additional connections
> + to the image signal processor (ISP) blocks.
> +
> properties:
> compatible:
> - const: rockchip,rk3568-vicap
> + enum:
> + - rockchip,rk3568-vicap
> + - rockchip,rk3588-vicap
>
> reg:
> maxItems: 1
> @@ -26,37 +32,23 @@ properties:
> maxItems: 1
>
> clocks:
> - items:
> - - description: ACLK
> - - description: HCLK
> - - description: DCLK
> - - description: ICLK
> + minItems: 4
> + maxItems: 5
>
> clock-names:
> - items:
> - - const: aclk
> - - const: hclk
> - - const: dclk
> - - const: iclk
> + minItems: 4
> + maxItems: 5
>
> iommus:
> maxItems: 1
>
> resets:
> - items:
> - - description: ARST
> - - description: HRST
> - - description: DRST
> - - description: PRST
> - - description: IRST
> + minItems: 5
> + maxItems: 9
>
> reset-names:
> - items:
> - - const: arst
> - - const: hrst
> - - const: drst
> - - const: prst
> - - const: irst
> + minItems: 5
> + maxItems: 9
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: rockchip,rk3568-vicap
> + then:
> + properties:
> + clocks:
> + minItems: 4
> + maxItems: 4
Anything here that repeats the outermost constraint should be dropped,
so no minItems here..
> +
> + clock-names:
> + items:
> + - const: aclk
> + - const: hclk
> + - const: dclk
> + - const: iclk
> +
> + resets:
> + minItems: 5
> + maxItems: 5
...or here...
> +
> + reset-names:
> + items:
> + - const: arst
> + - const: hrst
> + - const: drst
> + - const: prst
> + - const: irst
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: rockchip,rk3588-vicap
> + then:
> + properties:
> + clocks:
> + minItems: 5
> + maxItems: 5
...or maxItems here...
> +
> + clock-names:
> + items:
> + - const: aclk
> + - const: hclk
> + - const: dclk
> + - const: iclk0
> + - const: iclk1
> +
> + resets:
> + minItems: 9
> + maxItems: 9
...or here.
> +
> + reset-names:
> + items:
> + - const: arst
> + - const: hrst
> + - const: drst
> + - const: irst0
Were you willing to reuse "irst" for the 0th irst, all the repetition
wouldn't be needed. I assume it represents the reset for the port at
address 0, so it wouldn't even be a different meaning on each device.
> + - const: irst1
> + - const: irst2
> + - const: irst3
> + - const: irst4
> + - const: irst5
> +
> additionalProperties: false
>
> examples:
>
> --
> 2.39.5
>
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 2/9] media: dt-bindings: add rockchip rk3588 vicap
2026-03-18 17:52 ` Conor Dooley
@ 2026-03-19 8:04 ` Michael Riesch
2026-03-19 14:38 ` Conor Dooley
0 siblings, 1 reply; 21+ messages in thread
From: Michael Riesch @ 2026-03-19 8:04 UTC (permalink / raw)
To: Conor Dooley
Cc: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Conor,
On 3/18/26 18:52, Conor Dooley wrote:
> [...]
>>
>> resets:
>> - items:
>> - - description: ARST
>> - - description: HRST
>> - - description: DRST
>> - - description: PRST
>> - - description: IRST
>> + minItems: 5
>> + maxItems: 9
>>
>> reset-names:
>> - items:
>> - - const: arst
>> - - const: hrst
>> - - const: drst
>> - - const: prst
>> - - const: irst
>> + minItems: 5
>> + maxItems: 9
>
>> +allOf:
>> + - if:
>> + properties:
>> + compatible:
>> + contains:
>> + const: rockchip,rk3568-vicap
>> + then:
>> + properties:
>> + clocks:
>> + minItems: 4
>> + maxItems: 4
>
> Anything here that repeats the outermost constraint should be dropped,
> so no minItems here..
I already took a look at similar VICAPs (e.g., R3576) that will have
more clocks. This is way I left this one in here.
But I guess I will remove it and add it again when e.g. RK3576 VICAP
support is added.
>> [...]
>
>> +
>> + reset-names:
>> + items:
>> + - const: arst
>> + - const: hrst
>> + - const: drst
>> + - const: irst0
>
> Were you willing to reuse "irst" for the 0th irst, all the repetition
> wouldn't be needed. I assume it represents the reset for the port at
> address 0, so it wouldn't even be a different meaning on each device.
Not quite I think. "{a,h,d}rst" are the same on all variants, then there
is "prst" and "irst" on RK3568 and "irst{0-5}" on RK3588. So I thought
that writing it out explicitly for each variant is more readable (even
though it may need a few characters more).
OK?
I'll try to send out a new version later today.
Best regards,
Michael
>
>> + - const: irst1
>> + - const: irst2
>> + - const: irst3
>> + - const: irst4
>> + - const: irst5
>> +
>> additionalProperties: false
>>
>> examples:
>>
>> --
>> 2.39.5
>>
>>
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 2/9] media: dt-bindings: add rockchip rk3588 vicap
2026-03-19 8:04 ` Michael Riesch
@ 2026-03-19 14:38 ` Conor Dooley
0 siblings, 0 replies; 21+ messages in thread
From: Conor Dooley @ 2026-03-19 14:38 UTC (permalink / raw)
To: Michael Riesch
Cc: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 2020 bytes --]
On Thu, Mar 19, 2026 at 09:04:06AM +0100, Michael Riesch wrote:
> Hi Conor,
>
> On 3/18/26 18:52, Conor Dooley wrote:
> > [...]
> >>
> >> resets:
> >> - items:
> >> - - description: ARST
> >> - - description: HRST
> >> - - description: DRST
> >> - - description: PRST
> >> - - description: IRST
> >> + minItems: 5
> >> + maxItems: 9
> >>
> >> reset-names:
> >> - items:
> >> - - const: arst
> >> - - const: hrst
> >> - - const: drst
> >> - - const: prst
> >> - - const: irst
> >> + minItems: 5
> >> + maxItems: 9
> >
> >> +allOf:
> >> + - if:
> >> + properties:
> >> + compatible:
> >> + contains:
> >> + const: rockchip,rk3568-vicap
> >> + then:
> >> + properties:
> >> + clocks:
> >> + minItems: 4
> >> + maxItems: 4
> >
> > Anything here that repeats the outermost constraint should be dropped,
> > so no minItems here..
>
> I already took a look at similar VICAPs (e.g., R3576) that will have
> more clocks. This is way I left this one in here.
>
> But I guess I will remove it and add it again when e.g. RK3576 VICAP
> support is added.
>
> >> [...]
> >
> >> +
> >> + reset-names:
> >> + items:
> >> + - const: arst
> >> + - const: hrst
> >> + - const: drst
> >> + - const: irst0
> >
> > Were you willing to reuse "irst" for the 0th irst, all the repetition
> > wouldn't be needed. I assume it represents the reset for the port at
> > address 0, so it wouldn't even be a different meaning on each device.
>
> Not quite I think. "{a,h,d}rst" are the same on all variants, then there
> is "prst" and "irst" on RK3568 and "irst{0-5}" on RK3588. So I thought
> that writing it out explicitly for each variant is more readable (even
> though it may need a few characters more).
Ah right, I didn't see the prst one somehow. Ignore me so.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 1/9] Documentation: admin-guide: media: add rk3588 vicap
2026-03-17 9:32 ` [PATCH v2 1/9] Documentation: admin-guide: media: add " Michael Riesch via B4 Relay
2026-03-17 13:25 ` Mehdi Djait
@ 2026-03-19 19:30 ` Charalampos Mitrodimas
1 sibling, 0 replies; 21+ messages in thread
From: Charalampos Mitrodimas @ 2026-03-19 19:30 UTC (permalink / raw)
To: Michael Riesch via B4 Relay
Cc: Mehdi Djait, Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, michael.riesch, linux-media, devicetree,
linux-arm-kernel, linux-rockchip, linux-kernel
Michael Riesch via B4 Relay <devnull+michael.riesch.collabora.com@kernel.org> writes:
> From: Michael Riesch <michael.riesch@collabora.com>
>
> Add a section that describes the Rockchip RK3588 VICAP.
>
> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
> ---
> .../admin-guide/media/rkcif-rk3588-vicap.dot | 29 ++++++++++++++++++++
> Documentation/admin-guide/media/rkcif.rst | 32 ++++++++++++++++++++++
> 2 files changed, 61 insertions(+)
>
> diff --git a/Documentation/admin-guide/media/rkcif-rk3588-vicap.dot b/Documentation/admin-guide/media/rkcif-rk3588-vicap.dot
> new file mode 100644
> index 000000000000..f6d3404920b5
> --- /dev/null
> +++ b/Documentation/admin-guide/media/rkcif-rk3588-vicap.dot
> @@ -0,0 +1,29 @@
> +digraph board {
> + rankdir=TB
> + n00000007 [label="{{<port0> 0} | rkcif-mipi2\n/dev/v4l-subdev0 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
> + n00000007:port1 -> n0000000a
> + n00000007:port1 -> n00000010 [style=dashed]
> + n00000007:port1 -> n00000016 [style=dashed]
> + n00000007:port1 -> n0000001c [style=dashed]
> + n0000000a [label="rkcif-mipi2-id0\n/dev/video0", shape=box, style=filled, fillcolor=yellow]
> + n00000010 [label="rkcif-mipi2-id1\n/dev/video1", shape=box, style=filled, fillcolor=yellow]
> + n00000016 [label="rkcif-mipi2-id2\n/dev/video2", shape=box, style=filled, fillcolor=yellow]
> + n0000001c [label="rkcif-mipi2-id3\n/dev/video3", shape=box, style=filled, fillcolor=yellow]
> + n00000025 [label="{{<port0> 0} | rkcif-mipi4\n/dev/v4l-subdev1 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
> + n00000025:port1 -> n00000028
> + n00000025:port1 -> n0000002e [style=dashed]
> + n00000025:port1 -> n00000034 [style=dashed]
> + n00000025:port1 -> n0000003a [style=dashed]
> + n00000028 [label="rkcif-mipi4-id0\n/dev/video4", shape=box, style=filled, fillcolor=yellow]
> + n0000002e [label="rkcif-mipi4-id1\n/dev/video5", shape=box, style=filled, fillcolor=yellow]
> + n00000034 [label="rkcif-mipi4-id2\n/dev/video6", shape=box, style=filled, fillcolor=yellow]
> + n0000003a [label="rkcif-mipi4-id3\n/dev/video7", shape=box, style=filled, fillcolor=yellow]
> + n00000043 [label="{{<port0> 0} | dw-mipi-csi2rx fdd30000.csi\n/dev/v4l-subdev2 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
> + n00000043:port1 -> n00000007:port0
> + n00000048 [label="{{<port0> 0} | dw-mipi-csi2rx fdd50000.csi\n/dev/v4l-subdev3 | {<port1> 1}}", shape=Mrecord, style=filled, fillcolor=green]
> + n00000048:port1 -> n00000025:port0
> + n0000004d [label="{{} | imx415 3-001a\n/dev/v4l-subdev4 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
> + n0000004d:port0 -> n00000043:port0
> + n00000051 [label="{{} | imx415 4-001a\n/dev/v4l-subdev5 | {<port0> 0}}", shape=Mrecord, style=filled, fillcolor=green]
> + n00000051:port0 -> n00000048:port0
> +}
> diff --git a/Documentation/admin-guide/media/rkcif.rst b/Documentation/admin-guide/media/rkcif.rst
> index 2558c121abc4..fcd7f8cfc5d3 100644
> --- a/Documentation/admin-guide/media/rkcif.rst
> +++ b/Documentation/admin-guide/media/rkcif.rst
> @@ -77,3 +77,35 @@ and the following video devices:
> .. kernel-figure:: rkcif-rk3568-vicap.dot
> :alt: Topology of the RK3568 Video Capture (VICAP) unit
> :align: center
> +
> +Rockchip RK3588 Video Capture (VICAP)
> +-------------------------------------
> +
> +The RK3588 Video Capture (VICAP) unit features a digital video port and six
> +MIPI CSI-2 capture interfaces 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
Nit, should this be RK3588 instead of RK3568?
> +DVP features four DMA engines that can capture different streams.
> +Similarly, the RK3588 VICAP MIPI CSI-2 receivers feature four DMA engines each
> +to handle different Virtual Channels (VCs).
> +
> +The rkcif driver represents this hardware variant by exposing the following
> +V4L2 subdevices:
> +
> +* dw-mipi-csi2rx fdd30000.csi: MIPI CSI-2 receiver connected to MIPI DPHY0
> +* dw-mipi-csi2rx fdd50000.csi: MIPI CSI-2 receiver connected to MIPI DPHY1
> +* rkcif-mipi2: INTERFACE/CROP block for the MIPI CSI-2 receiver connected to
> + MIPI DPHY0
> +* rkcif-mipi4: INTERFACE/CROP block for the MIPI CSI-2 receiver connected to
> + MIPI DPHY1
> +
> +and the following video devices:
> +
> +* rkcif-mipi2-id{0,1,2,3}: The DMA engines connected to the rkcif-mipi2
> + INTERFACE/CROP block.
> +* rkcif-mipi4-id{0,1,2,3}: The DMA engines connected to the rkcif-mipi4
> + INTERFACE/CROP block.
> +
> +.. kernel-figure:: rkcif-rk3588-vicap.dot
> + :alt: Topology of the RK3588 Video Capture (VICAP) unit
> + :align: center
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture
2026-03-17 13:28 ` Mehdi Djait
@ 2026-03-25 8:04 ` Michael Riesch
2026-03-25 9:00 ` Mehdi Djait
0 siblings, 1 reply; 21+ messages in thread
From: Michael Riesch @ 2026-03-25 8:04 UTC (permalink / raw)
To: Mehdi Djait
Cc: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Mehdi,
On 3/17/26 14:28, Mehdi Djait wrote:
> Hi Michael,
>
> On Tue, Mar 17, 2026 at 02:21:20PM +0100, Michael Riesch wrote:
>> Hi Mehdi,
>>
>> On 3/17/26 14:08, Mehdi Djait wrote:
>>> Hi Michael,
>>>
>>> Thank you for this nice patch!
>>>
>>> On Tue, Mar 17, 2026 at 10:32:21AM +0100, Michael Riesch via B4 Relay wrote:
>>>> From: Michael Riesch <michael.riesch@collabora.com>
>>>>
>>>> The RK3588 Video Capture (VICAP) unit features a Digital Video Port
>>>> (DVP) and six MIPI CSI-2 capture interfaces. Add initial support
>>>> for this variant to the rkcif driver and enable the MIPI CSI-2
>>>> capture interfaces.
>>>>
>>>> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
>>>
>>> [...]
>>>
>>>> static inline unsigned int rkcif_mipi_get_reg(struct rkcif_interface *interface,
>>>> unsigned int index)
>>>> {
>>>> @@ -631,6 +765,8 @@ static int rkcif_mipi_start_streaming(struct rkcif_stream *stream)
>>>> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL1, ctrl1);
>>>> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL0, ctrl0);
>>>>
>>>> + rkcif_mipi_write(interface, RKCIF_MIPI_CTRL, RKCIF_MIPI_CTRL_CAP_EN);
>>>> +
>>>
>>> while this is the correct solution for rk3588, for the rk3568 vicap this
>>> will write 0x1 to the VICAP_MIPI_CTRL : 0x00A0 which will enable the water line.
>>
>> nice catch ;-) However, the TRM (at least my version) claims that this
>> bit has a reset value of 0x1, so the bit in question should be already
>> set in the first place. Thus I decided to *not* make variant specific
>> code paths.
>
> Yes, the reset value is indeed 0x1
>
>>
>> Do you see problems in your setup?
>>
>
> No problems, it works as expected, I was just confused to see the
> mipi capture enable added with this rk3588 patch and not before.
>
> I just find it a bit confusing but if a nicer solution is too much
> hassle we can leave it like this.
I agree that this is (while correct) not the nicest way. I am still
bringing up the remaining features of the RK3588 VICAP (MUX + TOISP +
SCALER) and it looks like I need to do some refactoring anyway to
support them. When I do that, I shall rewrite this part. For the time
being it would be great to have this merged in order to provide initial
mainline support for this unit.
Best regards,
Michael
^ permalink raw reply [flat|nested] 21+ messages in thread
* Re: [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture
2026-03-25 8:04 ` Michael Riesch
@ 2026-03-25 9:00 ` Mehdi Djait
0 siblings, 0 replies; 21+ messages in thread
From: Mehdi Djait @ 2026-03-25 9:00 UTC (permalink / raw)
To: Michael Riesch
Cc: Laurent Pinchart, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, Kever Yang,
Jagan Teki,
Кузнецов Михаил,
Sebastian Reichel, Nicolas Dufresne, Collabora Kernel Team,
Sakari Ailus, linux-media, devicetree, linux-arm-kernel,
linux-rockchip, linux-kernel
Hi Michael,
On Wed, Mar 25, 2026 at 09:04:57AM +0100, Michael Riesch wrote:
> Hi Mehdi,
>
> On 3/17/26 14:28, Mehdi Djait wrote:
> > Hi Michael,
> >
> > On Tue, Mar 17, 2026 at 02:21:20PM +0100, Michael Riesch wrote:
> >> Hi Mehdi,
> >>
> >> On 3/17/26 14:08, Mehdi Djait wrote:
> >>> Hi Michael,
> >>>
> >>> Thank you for this nice patch!
> >>>
> >>> On Tue, Mar 17, 2026 at 10:32:21AM +0100, Michael Riesch via B4 Relay wrote:
> >>>> From: Michael Riesch <michael.riesch@collabora.com>
> >>>>
> >>>> The RK3588 Video Capture (VICAP) unit features a Digital Video Port
> >>>> (DVP) and six MIPI CSI-2 capture interfaces. Add initial support
> >>>> for this variant to the rkcif driver and enable the MIPI CSI-2
> >>>> capture interfaces.
> >>>>
> >>>> Signed-off-by: Michael Riesch <michael.riesch@collabora.com>
> >>>
> >>> [...]
> >>>
> >>>> static inline unsigned int rkcif_mipi_get_reg(struct rkcif_interface *interface,
> >>>> unsigned int index)
> >>>> {
> >>>> @@ -631,6 +765,8 @@ static int rkcif_mipi_start_streaming(struct rkcif_stream *stream)
> >>>> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL1, ctrl1);
> >>>> rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL0, ctrl0);
> >>>>
> >>>> + rkcif_mipi_write(interface, RKCIF_MIPI_CTRL, RKCIF_MIPI_CTRL_CAP_EN);
> >>>> +
> >>>
> >>> while this is the correct solution for rk3588, for the rk3568 vicap this
> >>> will write 0x1 to the VICAP_MIPI_CTRL : 0x00A0 which will enable the water line.
> >>
> >> nice catch ;-) However, the TRM (at least my version) claims that this
> >> bit has a reset value of 0x1, so the bit in question should be already
> >> set in the first place. Thus I decided to *not* make variant specific
> >> code paths.
> >
> > Yes, the reset value is indeed 0x1
> >
> >>
> >> Do you see problems in your setup?
> >>
> >
> > No problems, it works as expected, I was just confused to see the
> > mipi capture enable added with this rk3588 patch and not before.
> >
> > I just find it a bit confusing but if a nicer solution is too much
> > hassle we can leave it like this.
>
> I agree that this is (while correct) not the nicest way. I am still
> bringing up the remaining features of the RK3588 VICAP (MUX + TOISP +
> SCALER) and it looks like I need to do some refactoring anyway to
> support them. When I do that, I shall rewrite this part. For the time
> being it would be great to have this merged in order to provide initial
> mainline support for this unit.
That sounds good.
How about adding a TODO comment ?
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2026-03-25 9:00 UTC | newest]
Thread overview: 21+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-17 9:32 [PATCH v2 0/9] media: rockchip: rkcif: add support for rk3588 vicap Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 1/9] Documentation: admin-guide: media: add " Michael Riesch via B4 Relay
2026-03-17 13:25 ` Mehdi Djait
2026-03-19 19:30 ` Charalampos Mitrodimas
2026-03-17 9:32 ` [PATCH v2 2/9] media: dt-bindings: add rockchip " Michael Riesch via B4 Relay
2026-03-18 17:52 ` Conor Dooley
2026-03-19 8:04 ` Michael Riesch
2026-03-19 14:38 ` Conor Dooley
2026-03-17 9:32 ` [PATCH v2 3/9] media: rockchip: rkcif: add support for rk3588 vicap mipi capture Michael Riesch via B4 Relay
2026-03-17 13:08 ` Mehdi Djait
2026-03-17 13:21 ` Michael Riesch
2026-03-17 13:28 ` Mehdi Djait
2026-03-25 8:04 ` Michael Riesch
2026-03-25 9:00 ` Mehdi Djait
2026-03-17 9:32 ` [PATCH DONOTMERGE v2 4/9] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3588 compatible Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH DONOTMERGE v2 5/9] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3588 Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 6/9] arm64: dts: rockchip: add vicap node " Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 7/9] arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam0 Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 8/9] arm64: dts: rockchip: add radxa camera 4k on rock 5b+ cam1 Michael Riesch via B4 Relay
2026-03-17 9:32 ` [PATCH v2 9/9] arm64: defconfig: enable designware mipi csi-2 receiver Michael Riesch via B4 Relay
2026-03-17 13:23 ` Mehdi Djait
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox