* [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit
@ 2026-09-21 15:29 Amin Gattout
2026-09-21 15:29 ` [PATCH v2 1/5] media: dt-bindings: add rockchip rk3576 vicap Amin Gattout
` (5 more replies)
0 siblings, 6 replies; 12+ messages in thread
From: Amin Gattout @ 2026-09-21 15:29 UTC (permalink / raw)
To: Mehdi Djait, Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Amin Gattout, Conor Dooley
This series adds support for the Video Capture (VICAP) unit of the
Rockchip RK3576 to the rkcif driver.
The RK3576 VICAP features a digital video port (DVP) and five MIPI
CSI-2 capture interfaces. Compared to the RK3588 variant, the MIPI
register blocks are laid out differently, the ID_CTRL0 bit layout has
changed, the VC/DT filter has moved from ID_CTRL0 to ID_CTRL1, and the
capture size is configured in the new ID_SET_SIZE register. In
addition, the pixel clock of each MIPI port enters the VICAP through a
dedicated gate in the clock and reset unit, so the VICAP claims five
interface clocks and five interface resets.
The two driver patches that come first prepare the rkcif driver for
that, by adding a register index for the capture size and a callback
for the contents of ID_CTRL1. Neither changes the behavior of the
existing variants.
The device tree node connects the VICAP to the two MIPI CSI-2
receivers that are usable with the MIPI D-PHYs in full mode, following
the approach taken for the RK3588.
Tested on a Radxa ROCK 4D with a Radxa Camera 4K, whose Sony IMX415
sensor is wired to the first MIPI D-PHY in full mode.
This series applies on top of the RK3576 MIPI CSI-2 receiver
series [1].
[1] https://lore.kernel.org/r/20260915-csi-2-rcv-dts-v2-0-bdaf8141616a@gmail.com
Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
Changes in v2:
- Split the driver patch in three, one adding a register index for the
capture size, one adding a callback for the contents of ID_CTRL1, and
one adding the RK3576 support itself (Michael)
- Collected Acked-by from Conor and Reviewed-by from Michael on the
binding patch, and Reviewed-by from Michael on the device tree patch
- Link to v1: https://patch.msgid.link/20260915-vicap-rk3576-v1-0-d3f5eb58a0b5@gmail.com
---
Amin Gattout (5):
media: dt-bindings: add rockchip rk3576 vicap
media: rockchip: rkcif: add a register index for the MIPI capture size
media: rockchip: rkcif: add a callback for the MIPI ID_CTRL1 register
media: rockchip: rkcif: add support for rk3576 vicap mipi capture
arm64: dts: rockchip: add vicap node to rk3576
.../bindings/media/rockchip,rk3568-vicap.yaml | 46 +++++-
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 83 +++++++++++
.../platform/rockchip/rkcif/rkcif-capture-mipi.c | 155 ++++++++++++++++++++-
.../platform/rockchip/rkcif/rkcif-capture-mipi.h | 1 +
.../media/platform/rockchip/rkcif/rkcif-common.h | 4 +-
drivers/media/platform/rockchip/rkcif/rkcif-dev.c | 21 +++
drivers/media/platform/rockchip/rkcif/rkcif-regs.h | 1 +
7 files changed, 308 insertions(+), 3 deletions(-)
---
base-commit: bd5f485f3f026225b86573e559af0b7254ef4184
change-id: 20260828-vicap-rk3576-6e7118ea0246
prerequisite-change-id: 20260825-csi-2-rcv-dts-7712bd834de6:v2
prerequisite-patch-id: fbe2d84f88709b8bf846debe6b8ce62c4392ca63
prerequisite-patch-id: 9bce33933ae69e8cc7f7ef2f0d9acb969620bc85
prerequisite-patch-id: bff0c668524f94b0b7901c682d5ccdccfe18d46e
prerequisite-patch-id: 8f45701f840680a35e044f43ebd3087282847990
prerequisite-patch-id: bdbb3e9b072469900cac21031cd799265b52d734
prerequisite-patch-id: c91ceb74abc8bc79ac036990abdef4cbd7328f97
Best regards,
--
Amin Gattout <amin.gattout@gmail.com>
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 1/5] media: dt-bindings: add rockchip rk3576 vicap
2026-09-21 15:29 [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Amin Gattout
@ 2026-09-21 15:29 ` Amin Gattout
2026-09-23 14:51 ` Mehdi Djait
2026-09-21 15:29 ` [PATCH v2 2/5] media: rockchip: rkcif: add a register index for the MIPI capture size Amin Gattout
` (4 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Amin Gattout @ 2026-09-21 15:29 UTC (permalink / raw)
To: Mehdi Djait, Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Amin Gattout, Conor Dooley
Add the compatible for the Video Capture (VICAP) unit of the Rockchip
RK3576. This variant features five MIPI CSI-2 ports and a connection
to the image signal processor (ISP). The pixel clock of each MIPI port
enters the VICAP through a dedicated gate in the clock and reset unit,
so the variant takes five interface clocks and five interface resets
in addition to the aclk, hclk and dclk of the other variants.
Acked-by: Conor Dooley <conor.dooley@microchip.com>
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
.../bindings/media/rockchip,rk3568-vicap.yaml | 46 +++++++++++++++++++++-
1 file changed, 45 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
index 080b64503b1b..b7dfaf3b378d 100644
--- a/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-vicap.yaml
@@ -15,6 +15,10 @@ description:
the data from camera sensors, video decoders, or other companion ICs and
transfers it into system main memory by AXI bus.
+ The Rockchip RK3576 Video Capture (VICAP) is similar to its RK3568
+ counterpart, but features five MIPI CSI-2 ports and an additional
+ connection to the image signal processor (ISP) block.
+
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.
@@ -23,6 +27,7 @@ properties:
compatible:
enum:
- rockchip,rk3568-vicap
+ - rockchip,rk3576-vicap
- rockchip,rk3588-vicap
reg:
@@ -33,7 +38,7 @@ properties:
clocks:
minItems: 4
- maxItems: 5
+ maxItems: 8
clock-names:
items:
@@ -42,6 +47,9 @@ properties:
- const: dclk
- const: iclk
- const: iclk1
+ - const: iclk2
+ - const: iclk3
+ - const: iclk4
minItems: 4
iommus:
@@ -221,6 +229,40 @@ allOf:
port@11: false
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: rockchip,rk3576-vicap
+ then:
+ properties:
+ clocks:
+ minItems: 8
+
+ clock-names:
+ minItems: 8
+
+ resets:
+ minItems: 8
+ maxItems: 8
+
+ reset-names:
+ items:
+ - const: arst
+ - const: hrst
+ - const: drst
+ - const: irst0
+ - const: irst1
+ - const: irst2
+ - const: irst3
+ - const: irst4
+
+ ports:
+ properties:
+ port@6: false
+
+ port@11: false
+
- if:
properties:
compatible:
@@ -230,9 +272,11 @@ allOf:
properties:
clocks:
minItems: 5
+ maxItems: 5
clock-names:
minItems: 5
+ maxItems: 5
resets:
minItems: 9
--
2.43.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 2/5] media: rockchip: rkcif: add a register index for the MIPI capture size
2026-09-21 15:29 [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Amin Gattout
2026-09-21 15:29 ` [PATCH v2 1/5] media: dt-bindings: add rockchip rk3576 vicap Amin Gattout
@ 2026-09-21 15:29 ` Amin Gattout
2026-09-23 14:52 ` Mehdi Djait
2026-09-21 15:29 ` [PATCH v2 3/5] media: rockchip: rkcif: add a callback for the MIPI ID_CTRL1 register Amin Gattout
` (3 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Amin Gattout @ 2026-09-21 15:29 UTC (permalink / raw)
To: Mehdi Djait, Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Amin Gattout
The RK3568 and RK3588 variants configure the MIPI capture size in the
ID_CTRL1 register. The RK3576 has a dedicated ID_SET_SIZE register
instead.
Add a register index for the capture size and write it through that
index, in preparation for the RK3576 support. The RK3568 and RK3588
mark the index as unsupported, so the write is a no operation for them
and their behavior is unchanged.
Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c | 10 ++++++++++
drivers/media/platform/rockchip/rkcif/rkcif-regs.h | 1 +
2 files changed, 11 insertions(+)
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
index bc9518f8db50..e0acb9049ca1 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
@@ -438,6 +438,7 @@ const struct rkcif_mipi_match_data rkcif_rk3568_vicap_mipi_match_data = {
[RKCIF_MIPI_FRAME1_VLW_Y] = 0x38,
[RKCIF_MIPI_FRAME1_VLW_UV] = 0x40,
[RKCIF_MIPI_CROP_START] = 0xbc,
+ [RKCIF_MIPI_SET_SIZE] = RKCIF_REGISTER_NOTSUPPORTED,
},
[RKCIF_ID1] = {
[RKCIF_MIPI_CTRL0] = 0x08,
@@ -451,6 +452,7 @@ const struct rkcif_mipi_match_data rkcif_rk3568_vicap_mipi_match_data = {
[RKCIF_MIPI_FRAME1_VLW_Y] = 0x58,
[RKCIF_MIPI_FRAME1_VLW_UV] = 0x60,
[RKCIF_MIPI_CROP_START] = 0xc0,
+ [RKCIF_MIPI_SET_SIZE] = RKCIF_REGISTER_NOTSUPPORTED,
},
[RKCIF_ID2] = {
[RKCIF_MIPI_CTRL0] = 0x10,
@@ -464,6 +466,7 @@ const struct rkcif_mipi_match_data rkcif_rk3568_vicap_mipi_match_data = {
[RKCIF_MIPI_FRAME1_VLW_Y] = 0x78,
[RKCIF_MIPI_FRAME1_VLW_UV] = 0x80,
[RKCIF_MIPI_CROP_START] = 0xc4,
+ [RKCIF_MIPI_SET_SIZE] = RKCIF_REGISTER_NOTSUPPORTED,
},
[RKCIF_ID3] = {
[RKCIF_MIPI_CTRL0] = 0x18,
@@ -477,6 +480,7 @@ const struct rkcif_mipi_match_data rkcif_rk3568_vicap_mipi_match_data = {
[RKCIF_MIPI_FRAME1_VLW_Y] = 0x98,
[RKCIF_MIPI_FRAME1_VLW_UV] = 0xa0,
[RKCIF_MIPI_CROP_START] = 0xc8,
+ [RKCIF_MIPI_SET_SIZE] = RKCIF_REGISTER_NOTSUPPORTED,
},
},
.blocks = {
@@ -549,6 +553,7 @@ const struct rkcif_mipi_match_data rkcif_rk3588_vicap_mipi_match_data = {
[RKCIF_MIPI_FRAME1_VLW_Y] = RKCIF_REGISTER_NOTSUPPORTED,
[RKCIF_MIPI_FRAME1_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
[RKCIF_MIPI_CROP_START] = 0x8c,
+ [RKCIF_MIPI_SET_SIZE] = RKCIF_REGISTER_NOTSUPPORTED,
},
[RKCIF_ID1] = {
[RKCIF_MIPI_CTRL0] = 0x08,
@@ -562,6 +567,7 @@ const struct rkcif_mipi_match_data rkcif_rk3588_vicap_mipi_match_data = {
[RKCIF_MIPI_FRAME1_VLW_Y] = RKCIF_REGISTER_NOTSUPPORTED,
[RKCIF_MIPI_FRAME1_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
[RKCIF_MIPI_CROP_START] = 0x90,
+ [RKCIF_MIPI_SET_SIZE] = RKCIF_REGISTER_NOTSUPPORTED,
},
[RKCIF_ID2] = {
[RKCIF_MIPI_CTRL0] = 0x10,
@@ -575,6 +581,7 @@ const struct rkcif_mipi_match_data rkcif_rk3588_vicap_mipi_match_data = {
[RKCIF_MIPI_FRAME1_VLW_Y] = RKCIF_REGISTER_NOTSUPPORTED,
[RKCIF_MIPI_FRAME1_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
[RKCIF_MIPI_CROP_START] = 0x94,
+ [RKCIF_MIPI_SET_SIZE] = RKCIF_REGISTER_NOTSUPPORTED,
},
[RKCIF_ID3] = {
[RKCIF_MIPI_CTRL0] = 0x18,
@@ -588,6 +595,7 @@ const struct rkcif_mipi_match_data rkcif_rk3588_vicap_mipi_match_data = {
[RKCIF_MIPI_FRAME1_VLW_Y] = RKCIF_REGISTER_NOTSUPPORTED,
[RKCIF_MIPI_FRAME1_VLW_UV] = RKCIF_REGISTER_NOTSUPPORTED,
[RKCIF_MIPI_CROP_START] = 0x98,
+ [RKCIF_MIPI_SET_SIZE] = RKCIF_REGISTER_NOTSUPPORTED,
},
},
.blocks = {
@@ -759,6 +767,8 @@ static int rkcif_mipi_start_streaming(struct rkcif_stream *stream)
rkcif_mipi_stream_write(stream, RKCIF_MIPI_FRAME0_VLW_UV, vlw);
rkcif_mipi_stream_write(stream, RKCIF_MIPI_FRAME1_VLW_UV, vlw);
rkcif_mipi_stream_write(stream, RKCIF_MIPI_CROP_START, 0x0);
+ rkcif_mipi_stream_write(stream, RKCIF_MIPI_SET_SIZE,
+ RKCIF_XY_COORD(width, height));
rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL1, ctrl1);
rkcif_mipi_stream_write(stream, RKCIF_MIPI_CTRL0, ctrl0);
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-regs.h b/drivers/media/platform/rockchip/rkcif/rkcif-regs.h
index 3cf7ee19de30..0460e963b154 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-regs.h
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-regs.h
@@ -147,6 +147,7 @@ enum rkcif_mipi_id_register_index {
RKCIF_MIPI_FRAME1_VLW_Y,
RKCIF_MIPI_FRAME1_VLW_UV,
RKCIF_MIPI_CROP_START,
+ RKCIF_MIPI_SET_SIZE,
RKCIF_MIPI_ID_REGISTER_MAX
};
--
2.43.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 3/5] media: rockchip: rkcif: add a callback for the MIPI ID_CTRL1 register
2026-09-21 15:29 [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Amin Gattout
2026-09-21 15:29 ` [PATCH v2 1/5] media: dt-bindings: add rockchip rk3576 vicap Amin Gattout
2026-09-21 15:29 ` [PATCH v2 2/5] media: rockchip: rkcif: add a register index for the MIPI capture size Amin Gattout
@ 2026-09-21 15:29 ` Amin Gattout
2026-09-23 14:53 ` Mehdi Djait
2026-09-21 15:30 ` [PATCH v2 4/5] media: rockchip: rkcif: add support for rk3576 vicap mipi capture Amin Gattout
` (2 subsequent siblings)
5 siblings, 1 reply; 12+ messages in thread
From: Amin Gattout @ 2026-09-21 15:29 UTC (permalink / raw)
To: Mehdi Djait, Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Amin Gattout
The contents of the MIPI ID_CTRL1 register differ between variants. The
RK3568 and RK3588 hold the capture size there, while the RK3576 uses it
for the virtual channel and data type filter.
Let each variant provide a callback that builds the register value, in
preparation for the RK3576 support. Variants that do not provide one
keep writing the capture size, so their behavior is unchanged.
Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c | 5 ++++-
drivers/media/platform/rockchip/rkcif/rkcif-common.h | 2 ++
2 files changed, 6 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 e0acb9049ca1..432f47a1fc23 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
@@ -749,7 +749,10 @@ static int rkcif_mipi_start_streaming(struct rkcif_stream *stream)
if (match_data->mipi_ctrl0)
ctrl0 = match_data->mipi_ctrl0(stream, active_out_fmt);
- ctrl1 = RKCIF_XY_COORD(width, height);
+ if (match_data->mipi_ctrl1)
+ ctrl1 = match_data->mipi_ctrl1(stream, active_out_fmt);
+ else
+ ctrl1 = RKCIF_XY_COORD(width, height);
int_mask |= RKCIF_MIPI_INT_FRAME0_END(stream->id);
int_mask |= RKCIF_MIPI_INT_FRAME1_END(stream->id);
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-common.h b/drivers/media/platform/rockchip/rkcif/rkcif-common.h
index 4d9211ba9bda..f83c8099b78e 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-common.h
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-common.h
@@ -207,6 +207,8 @@ struct rkcif_mipi_match_data {
unsigned int regs_id[RKCIF_ID_MAX][RKCIF_MIPI_ID_REGISTER_MAX];
u32 (*mipi_ctrl0)(struct rkcif_stream *stream,
const struct rkcif_output_fmt *active_out_fmt);
+ u32 (*mipi_ctrl1)(struct rkcif_stream *stream,
+ const struct rkcif_output_fmt *active_out_fmt);
struct {
unsigned int offset;
} blocks[RKCIF_MIPI_MAX - RKCIF_MIPI_BASE];
--
2.43.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 4/5] media: rockchip: rkcif: add support for rk3576 vicap mipi capture
2026-09-21 15:29 [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Amin Gattout
` (2 preceding siblings ...)
2026-09-21 15:29 ` [PATCH v2 3/5] media: rockchip: rkcif: add a callback for the MIPI ID_CTRL1 register Amin Gattout
@ 2026-09-21 15:30 ` Amin Gattout
2026-09-23 14:55 ` Mehdi Djait
2026-09-21 15:30 ` [PATCH v2 5/5] arm64: dts: rockchip: add vicap node to rk3576 Amin Gattout
2026-09-23 14:35 ` [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Mehdi Djait
5 siblings, 1 reply; 12+ messages in thread
From: Amin Gattout @ 2026-09-21 15:30 UTC (permalink / raw)
To: Mehdi Djait, Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Amin Gattout
The RK3576 Video Capture (VICAP) unit features a Digital Video Port
(DVP) and five MIPI CSI-2 capture interfaces. Compared to the RK3588
variant, the MIPI register blocks are laid out differently (there is
no block at offset 0x200), the ID_CTRL0 bit layout has changed, and
the VC/DT filter has moved from ID_CTRL0 to ID_CTRL1. The capture
size, which the other variants configure in ID_CTRL1, lives in the
ID_SET_SIZE register.
On the RK3576 the pixel clock of each MIPI port enters the VICAP
through a dedicated CRU gate (CLK_VICAP_I0CLK to CLK_VICAP_I4CLK),
so the variant claims these five clocks in addition to aclk, hclk
and dclk.
Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
.../platform/rockchip/rkcif/rkcif-capture-mipi.c | 140 +++++++++++++++++++++
.../platform/rockchip/rkcif/rkcif-capture-mipi.h | 1 +
.../media/platform/rockchip/rkcif/rkcif-common.h | 2 +-
drivers/media/platform/rockchip/rkcif/rkcif-dev.c | 21 ++++
4 files changed, 163 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 432f47a1fc23..53e62d059764 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.c
@@ -30,6 +30,14 @@
#define RK3568_MIPI_CTRL0_CROP_EN BIT(5)
#define RK3568_MIPI_CTRL0_WRDDR(type) ((type) << 1)
+#define RK3576_MIPI_CTRL0_HIGH_ALIGN BIT(11)
+#define RK3576_MIPI_CTRL0_WRDDR(type) ((type) << 8)
+#define RK3576_MIPI_CTRL0_PARSE(type) ((type) << 4)
+#define RK3576_MIPI_CTRL0_DMA_EN BIT(3)
+#define RK3576_MIPI_CTRL0_CROP_EN BIT(1)
+
+#define RK3576_MIPI_CTRL1_DT(dt) ((dt) << 2)
+
#define RK3588_MIPI_CTRL0_DMA_EN BIT(28)
#define RK3588_MIPI_CTRL0_HIGH_ALIGN BIT(27)
#define RK3588_MIPI_CTRL0_WRDDR(type) ((type) << 5)
@@ -490,6 +498,138 @@ const struct rkcif_mipi_match_data rkcif_rk3568_vicap_mipi_match_data = {
},
};
+static u32
+rkcif_rk3576_mipi_ctrl0(struct rkcif_stream *stream,
+ const struct rkcif_output_fmt *active_out_fmt)
+{
+ u32 ctrl0 = RKCIF_MIPI_CTRL0_CAP_EN | RK3576_MIPI_CTRL0_DMA_EN |
+ RK3576_MIPI_CTRL0_CROP_EN;
+
+ switch (active_out_fmt->mipi.type) {
+ case RKCIF_MIPI_TYPE_RAW8:
+ break;
+ case RKCIF_MIPI_TYPE_RAW10:
+ ctrl0 |= RK3576_MIPI_CTRL0_PARSE(0x1);
+ if (!active_out_fmt->mipi.compact)
+ ctrl0 |= RK3576_MIPI_CTRL0_WRDDR(0x1);
+ break;
+ case RKCIF_MIPI_TYPE_RAW12:
+ ctrl0 |= RK3576_MIPI_CTRL0_PARSE(0x2);
+ if (!active_out_fmt->mipi.compact)
+ ctrl0 |= RK3576_MIPI_CTRL0_WRDDR(0x1);
+ break;
+ case RKCIF_MIPI_TYPE_RGB888:
+ ctrl0 |= RK3576_MIPI_CTRL0_PARSE(0x7);
+ break;
+ case RKCIF_MIPI_TYPE_YUV422SP:
+ ctrl0 |= RK3576_MIPI_CTRL0_WRDDR(0x4);
+ break;
+ case RKCIF_MIPI_TYPE_YUV420SP:
+ ctrl0 |= RK3576_MIPI_CTRL0_WRDDR(0x5);
+ break;
+ case RKCIF_MIPI_TYPE_YUV400:
+ ctrl0 |= RK3576_MIPI_CTRL0_WRDDR(0x3);
+ break;
+ default:
+ break;
+ }
+
+ return ctrl0;
+}
+
+static u32
+rkcif_rk3576_mipi_ctrl1(struct rkcif_stream *stream,
+ const struct rkcif_output_fmt *active_out_fmt)
+{
+ return RK3576_MIPI_CTRL1_DT(active_out_fmt->mipi.dt);
+}
+
+const struct rkcif_mipi_match_data rkcif_rk3576_vicap_mipi_match_data = {
+ .mipi_num = 5,
+ .mipi_ctrl0 = rkcif_rk3576_mipi_ctrl0,
+ .mipi_ctrl1 = rkcif_rk3576_mipi_ctrl1,
+ .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] = 0x90,
+ [RKCIF_MIPI_SET_SIZE] = 0xa0,
+ },
+ [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] = 0x94,
+ [RKCIF_MIPI_SET_SIZE] = 0xa4,
+ },
+ [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] = 0x98,
+ [RKCIF_MIPI_SET_SIZE] = 0xa8,
+ },
+ [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] = 0x9c,
+ [RKCIF_MIPI_SET_SIZE] = 0xac,
+ },
+ },
+ .blocks = {
+ {
+ .offset = 0x100,
+ },
+ {
+ .offset = 0x300,
+ },
+ {
+ .offset = 0x400,
+ },
+ {
+ .offset = 0x500,
+ },
+ {
+ .offset = 0x600,
+ },
+ },
+};
+
static u32
rkcif_rk3588_mipi_ctrl0(struct rkcif_stream *stream,
const struct rkcif_output_fmt *active_out_fmt)
diff --git a/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.h b/drivers/media/platform/rockchip/rkcif/rkcif-capture-mipi.h
index 7edaca44f653..4e17cbc04b76 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_rk3576_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 f83c8099b78e..08a213438d34 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 5
+#define RKCIF_CLK_MAX 8
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 be3a174b9aab..2a5758776b3e 100644
--- a/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
+++ b/drivers/media/platform/rockchip/rkcif/rkcif-dev.c
@@ -53,6 +53,23 @@ static const struct rkcif_match_data rk3568_vicap_match_data = {
.mipi = &rkcif_rk3568_vicap_mipi_match_data,
};
+static const char *const rk3576_vicap_clks[] = {
+ "aclk",
+ "hclk",
+ "dclk",
+ "iclk",
+ "iclk1",
+ "iclk2",
+ "iclk3",
+ "iclk4",
+};
+
+static const struct rkcif_match_data rk3576_vicap_match_data = {
+ .clks = rk3576_vicap_clks,
+ .clks_num = ARRAY_SIZE(rk3576_vicap_clks),
+ .mipi = &rkcif_rk3576_vicap_mipi_match_data,
+};
+
static const char *const rk3588_vicap_clks[] = {
"aclk",
"hclk",
@@ -76,6 +93,10 @@ static const struct of_device_id rkcif_plat_of_match[] = {
.compatible = "rockchip,rk3568-vicap",
.data = &rk3568_vicap_match_data,
},
+ {
+ .compatible = "rockchip,rk3576-vicap",
+ .data = &rk3576_vicap_match_data,
+ },
{
.compatible = "rockchip,rk3588-vicap",
.data = &rk3588_vicap_match_data,
--
2.43.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* [PATCH v2 5/5] arm64: dts: rockchip: add vicap node to rk3576
2026-09-21 15:29 [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Amin Gattout
` (3 preceding siblings ...)
2026-09-21 15:30 ` [PATCH v2 4/5] media: rockchip: rkcif: add support for rk3576 vicap mipi capture Amin Gattout
@ 2026-09-21 15:30 ` Amin Gattout
2026-09-23 14:56 ` Mehdi Djait
2026-09-23 14:35 ` [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Mehdi Djait
5 siblings, 1 reply; 12+ messages in thread
From: Amin Gattout @ 2026-09-21 15:30 UTC (permalink / raw)
To: Mehdi Djait, Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner
Cc: linux-media, devicetree, linux-arm-kernel, linux-rockchip,
linux-kernel, Amin Gattout
Add the device tree node for the Video Capture (VICAP) unit of the
RK3576 and its IOMMU, and connect the VICAP to the two MIPI CSI-2
receivers that are usable with the MIPI D-PHYs in full mode.
Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
arch/arm64/boot/dts/rockchip/rk3576.dtsi | 83 ++++++++++++++++++++++++++++++++
1 file changed, 83 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
index cbf8b70cc15a..0c46accf5657 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
@@ -1323,6 +1323,81 @@ vdec_mmu: iommu@27b00800 {
rockchip,disable-mmu-reset;
#iommu-cells = <0>;
};
+ vicap: video-capture@27c10000 {
+ compatible = "rockchip,rk3576-vicap";
+ reg = <0x0 0x27c10000 0x0 0x800>;
+ interrupts = <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru ACLK_VICAP>, <&cru HCLK_VICAP>,
+ <&cru DCLK_VICAP>,
+ <&cru CLK_VICAP_I0CLK>, <&cru CLK_VICAP_I1CLK>,
+ <&cru CLK_VICAP_I2CLK>, <&cru CLK_VICAP_I3CLK>,
+ <&cru CLK_VICAP_I4CLK>;
+ clock-names = "aclk", "hclk", "dclk",
+ "iclk", "iclk1", "iclk2", "iclk3", "iclk4";
+ iommus = <&vicap_mmu>;
+ power-domains = <&power RK3576_PD_VI>;
+ resets = <&cru SRST_A_VICAP>, <&cru SRST_H_VICAP>,
+ <&cru SRST_D_VICAP>,
+ <&cru SRST_VICAP_I0CLK>, <&cru SRST_VICAP_I1CLK>,
+ <&cru SRST_VICAP_I2CLK>, <&cru SRST_VICAP_I3CLK>,
+ <&cru SRST_VICAP_I4CLK>;
+ reset-names = "arst", "hrst", "drst",
+ "irst0", "irst1", "irst2", "irst3", "irst4";
+ status = "disabled";
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ vicap_dvp: port@0 {
+ reg = <0x0>;
+ };
+
+ vicap_mipi0: port@1 {
+ reg = <0x1>;
+ };
+
+ vicap_mipi1: port@2 {
+ reg = <0x2>;
+
+ vicap_mipi1_input: endpoint {
+ remote-endpoint = <&csi1_output>;
+ };
+ };
+
+ vicap_mipi2: port@3 {
+ reg = <0x3>;
+ };
+
+ vicap_mipi3: port@4 {
+ reg = <0x4>;
+
+ vicap_mipi3_input: endpoint {
+ remote-endpoint = <&csi3_output>;
+ };
+ };
+
+ vicap_mipi4: port@5 {
+ reg = <0x5>;
+ };
+
+ vicap_toisp0: port@10 {
+ reg = <0x10>;
+ };
+ };
+ };
+
+ vicap_mmu: iommu@27c10800 {
+ compatible = "rockchip,rk3576-iommu", "rockchip,rk3568-iommu";
+ reg = <0x0 0x27c10800 0x0 0x100>;
+ interrupts = <GIC_SPI 319 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru ACLK_VICAP>, <&cru HCLK_VICAP>;
+ clock-names = "aclk", "iface";
+ power-domains = <&power RK3576_PD_VI>;
+ rockchip,disable-mmu-reset;
+ #iommu-cells = <0>;
+ status = "disabled";
+ };
csi1: csi@27c90000 {
compatible = "rockchip,rk3576-mipi-csi2", "rockchip,rk3568-mipi-csi2";
@@ -1346,6 +1421,10 @@ csi1_in: port@0 {
csi1_out: port@1 {
reg = <1>;
+
+ csi1_output: endpoint {
+ remote-endpoint = <&vicap_mipi1_input>;
+ };
};
};
};
@@ -1372,6 +1451,10 @@ csi3_in: port@0 {
csi3_out: port@1 {
reg = <1>;
+
+ csi3_output: endpoint {
+ remote-endpoint = <&vicap_mipi3_input>;
+ };
};
};
};
--
2.43.0
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit
2026-09-21 15:29 [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Amin Gattout
` (4 preceding siblings ...)
2026-09-21 15:30 ` [PATCH v2 5/5] arm64: dts: rockchip: add vicap node to rk3576 Amin Gattout
@ 2026-09-23 14:35 ` Mehdi Djait
5 siblings, 0 replies; 12+ messages in thread
From: Mehdi Djait @ 2026-09-23 14:35 UTC (permalink / raw)
To: Amin Gattout
Cc: Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, linux-media,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Conor Dooley
Hello Amin,
Thank you for the series!
On Mon, Sep 21, 2026 at 05:29:56PM +0200, Amin Gattout wrote:
> This series adds support for the Video Capture (VICAP) unit of the
> Rockchip RK3576 to the rkcif driver.
>
> The RK3576 VICAP features a digital video port (DVP) and five MIPI
> CSI-2 capture interfaces. Compared to the RK3588 variant, the MIPI
> register blocks are laid out differently, the ID_CTRL0 bit layout has
> changed, the VC/DT filter has moved from ID_CTRL0 to ID_CTRL1, and the
> capture size is configured in the new ID_SET_SIZE register. In
> addition, the pixel clock of each MIPI port enters the VICAP through a
> dedicated gate in the clock and reset unit, so the VICAP claims five
> interface clocks and five interface resets.
[..]
> Amin Gattout (5):
> media: dt-bindings: add rockchip rk3576 vicap
> media: rockchip: rkcif: add a register index for the MIPI capture size
> media: rockchip: rkcif: add a callback for the MIPI ID_CTRL1 register
> media: rockchip: rkcif: add support for rk3576 vicap mipi capture
> arm64: dts: rockchip: add vicap node to rk3576
For the series:
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 1/5] media: dt-bindings: add rockchip rk3576 vicap
2026-09-21 15:29 ` [PATCH v2 1/5] media: dt-bindings: add rockchip rk3576 vicap Amin Gattout
@ 2026-09-23 14:51 ` Mehdi Djait
0 siblings, 0 replies; 12+ messages in thread
From: Mehdi Djait @ 2026-09-23 14:51 UTC (permalink / raw)
To: Amin Gattout
Cc: Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, linux-media,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel,
Conor Dooley
Hello Amin,
Thank you for the patch!
On Mon, Sep 21, 2026 at 05:29:57PM +0200, Amin Gattout wrote:
> Add the compatible for the Video Capture (VICAP) unit of the Rockchip
> RK3576. This variant features five MIPI CSI-2 ports and a connection
> to the image signal processor (ISP). The pixel clock of each MIPI port
> enters the VICAP through a dedicated gate in the clock and reset unit,
> so the variant takes five interface clocks and five interface resets
> in addition to the aclk, hclk and dclk of the other variants.
>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
> Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 2/5] media: rockchip: rkcif: add a register index for the MIPI capture size
2026-09-21 15:29 ` [PATCH v2 2/5] media: rockchip: rkcif: add a register index for the MIPI capture size Amin Gattout
@ 2026-09-23 14:52 ` Mehdi Djait
0 siblings, 0 replies; 12+ messages in thread
From: Mehdi Djait @ 2026-09-23 14:52 UTC (permalink / raw)
To: Amin Gattout
Cc: Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, linux-media,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Hello Amin,
Thank you for the patch!
On Mon, Sep 21, 2026 at 05:29:58PM +0200, Amin Gattout wrote:
> The RK3568 and RK3588 variants configure the MIPI capture size in the
> ID_CTRL1 register. The RK3576 has a dedicated ID_SET_SIZE register
> instead.
>
> Add a register index for the capture size and write it through that
> index, in preparation for the RK3576 support. The RK3568 and RK3588
> mark the index as unsupported, so the write is a no operation for them
> and their behavior is unchanged.
>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
> Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 3/5] media: rockchip: rkcif: add a callback for the MIPI ID_CTRL1 register
2026-09-21 15:29 ` [PATCH v2 3/5] media: rockchip: rkcif: add a callback for the MIPI ID_CTRL1 register Amin Gattout
@ 2026-09-23 14:53 ` Mehdi Djait
0 siblings, 0 replies; 12+ messages in thread
From: Mehdi Djait @ 2026-09-23 14:53 UTC (permalink / raw)
To: Amin Gattout
Cc: Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, linux-media,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Hello Amin,
Thank you for the patch!
On Mon, Sep 21, 2026 at 05:29:59PM +0200, Amin Gattout wrote:
> The contents of the MIPI ID_CTRL1 register differ between variants. The
> RK3568 and RK3588 hold the capture size there, while the RK3576 uses it
> for the virtual channel and data type filter.
>
> Let each variant provide a callback that builds the register value, in
> preparation for the RK3576 support. Variants that do not provide one
> keep writing the capture size, so their behavior is unchanged.
>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
> Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 4/5] media: rockchip: rkcif: add support for rk3576 vicap mipi capture
2026-09-21 15:30 ` [PATCH v2 4/5] media: rockchip: rkcif: add support for rk3576 vicap mipi capture Amin Gattout
@ 2026-09-23 14:55 ` Mehdi Djait
0 siblings, 0 replies; 12+ messages in thread
From: Mehdi Djait @ 2026-09-23 14:55 UTC (permalink / raw)
To: Amin Gattout
Cc: Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, linux-media,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Hello Amin,
Thank you for the patch!
On Mon, Sep 21, 2026 at 05:30:00PM +0200, Amin Gattout wrote:
> The RK3576 Video Capture (VICAP) unit features a Digital Video Port
> (DVP) and five MIPI CSI-2 capture interfaces. Compared to the RK3588
> variant, the MIPI register blocks are laid out differently (there is
> no block at offset 0x200), the ID_CTRL0 bit layout has changed, and
> the VC/DT filter has moved from ID_CTRL0 to ID_CTRL1. The capture
> size, which the other variants configure in ID_CTRL1, lives in the
> ID_SET_SIZE register.
>
> On the RK3576 the pixel clock of each MIPI port enters the VICAP
> through a dedicated CRU gate (CLK_VICAP_I0CLK to CLK_VICAP_I4CLK),
> so the variant claims these five clocks in addition to aclk, hclk
> and dclk.
>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
> Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH v2 5/5] arm64: dts: rockchip: add vicap node to rk3576
2026-09-21 15:30 ` [PATCH v2 5/5] arm64: dts: rockchip: add vicap node to rk3576 Amin Gattout
@ 2026-09-23 14:56 ` Mehdi Djait
0 siblings, 0 replies; 12+ messages in thread
From: Mehdi Djait @ 2026-09-23 14:56 UTC (permalink / raw)
To: Amin Gattout
Cc: Michael Riesch, Mauro Carvalho Chehab, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner, linux-media,
devicetree, linux-arm-kernel, linux-rockchip, linux-kernel
Hello Amin,
Thank you for the patch!
On Mon, Sep 21, 2026 at 05:30:01PM +0200, Amin Gattout wrote:
> Add the device tree node for the Video Capture (VICAP) unit of the
> RK3576 and its IOMMU, and connect the VICAP to the two MIPI CSI-2
> receivers that are usable with the MIPI D-PHYs in full mode.
>
Reviewed-by: Mehdi Djait <mehdi.djait@linux.intel.com>
> Reviewed-by: Michael Riesch <michael.riesch@collabora.com>
> Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
> ---
> arch/arm64/boot/dts/rockchip/rk3576.dtsi | 83 ++++++++++++++++++++++++++++++++
> 1 file changed, 83 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
> index cbf8b70cc15a..0c46accf5657 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
> @@ -1323,6 +1323,81 @@ vdec_mmu: iommu@27b00800 {
> rockchip,disable-mmu-reset;
> #iommu-cells = <0>;
> };
small nit:
Maybe add a blank line before vicap.
> + vicap: video-capture@27c10000 {
> + compatible = "rockchip,rk3576-vicap";
> + reg = <0x0 0x27c10000 0x0 0x800>;
> + interrupts = <GIC_SPI 318 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cru ACLK_VICAP>, <&cru HCLK_VICAP>,
> + <&cru DCLK_VICAP>,
> + <&cru CLK_VICAP_I0CLK>, <&cru CLK_VICAP_I1CLK>,
> + <&cru CLK_VICAP_I2CLK>, <&cru CLK_VICAP_I3CLK>,
> + <&cru CLK_VICAP_I4CLK>;
[..]
--
Kind Regards
Mehdi Djait
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2026-09-23 14:56 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-21 15:29 [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Amin Gattout
2026-09-21 15:29 ` [PATCH v2 1/5] media: dt-bindings: add rockchip rk3576 vicap Amin Gattout
2026-09-23 14:51 ` Mehdi Djait
2026-09-21 15:29 ` [PATCH v2 2/5] media: rockchip: rkcif: add a register index for the MIPI capture size Amin Gattout
2026-09-23 14:52 ` Mehdi Djait
2026-09-21 15:29 ` [PATCH v2 3/5] media: rockchip: rkcif: add a callback for the MIPI ID_CTRL1 register Amin Gattout
2026-09-23 14:53 ` Mehdi Djait
2026-09-21 15:30 ` [PATCH v2 4/5] media: rockchip: rkcif: add support for rk3576 vicap mipi capture Amin Gattout
2026-09-23 14:55 ` Mehdi Djait
2026-09-21 15:30 ` [PATCH v2 5/5] arm64: dts: rockchip: add vicap node to rk3576 Amin Gattout
2026-09-23 14:56 ` Mehdi Djait
2026-09-23 14:35 ` [PATCH v2 0/5] media: rockchip: add support for the RK3576 Video Capture unit Mehdi Djait
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®