Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/2] Add MIPI CSI-2 receiver support for RK3576
@ 2026-08-26 12:33 Amin Gattout
  2026-08-26 12:33 ` [PATCH 1/2] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3576 compatible Amin Gattout
  2026-08-26 12:33 ` [PATCH 2/2] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3576 Amin Gattout
  0 siblings, 2 replies; 5+ messages in thread
From: Amin Gattout @ 2026-08-26 12:33 UTC (permalink / raw)
  To: 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

This series adds the device tree binding and the SoC nodes for the
MIPI CSI-2 receiver units of the Rockchip RK3576. The receiver is the
same Synopsys DesignWare IP as in the RK3568 and the register map is
identical, so the existing driver is used unchanged via a fallback
compatible.

Only the two receivers fed by the Innosilicon D-PHYs in full mode
(MIPI1 and MIPI3) are added; see patch 2 for the details.

This series depends on the RK3576 CSI D-PHY series [1], which provides
the csi_dphy0/csi_dphy1 nodes referenced here.

[1] https://lore.kernel.org/r/20260820-rk3576-dphy-v1-0-70e25e8d5e78@gmail.com

Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
Amin Gattout (2):
      media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3576 compatible
      arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3576

 .../bindings/media/rockchip,rk3568-mipi-csi2.yaml  |  1 +
 arch/arm64/boot/dts/rockchip/rk3576.dtsi           | 52 ++++++++++++++++++++++
 2 files changed, 53 insertions(+)
---
base-commit: bd5f485f3f026225b86573e559af0b7254ef4184
change-id: 20260825-csi-2-rcv-dts-7712bd834de6
prerequisite-change-id: 20260819-rk3576-dphy-2304f848215b:v1
prerequisite-patch-id: fbe2d84f88709b8bf846debe6b8ce62c4392ca63
prerequisite-patch-id: 9bce33933ae69e8cc7f7ef2f0d9acb969620bc85
prerequisite-patch-id: aca697161c21e19fe3a7f62f208da0f6c3b666e1
prerequisite-patch-id: 8f45701f840680a35e044f43ebd3087282847990

Best regards,
--  
Amin Gattout <amin.gattout@gmail.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3576 compatible
  2026-08-26 12:33 [PATCH 0/2] Add MIPI CSI-2 receiver support for RK3576 Amin Gattout
@ 2026-08-26 12:33 ` Amin Gattout
  2026-08-26 16:02   ` Conor Dooley
  2026-08-26 12:33 ` [PATCH 2/2] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3576 Amin Gattout
  1 sibling, 1 reply; 5+ messages in thread
From: Amin Gattout @ 2026-08-26 12:33 UTC (permalink / raw)
  To: 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 MIPI CSI-2 receivers are compatible to the ones found in the
RK3568: the register map is identical. Add the RK3576 variant to the list
of compatible variants falling back to the RK3568 one.

Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
 Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
index 8bfad0fca3b7..1898f3787a98 100644
--- a/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,rk3568-mipi-csi2.yaml
@@ -23,6 +23,7 @@ properties:
           - rockchip,rk3568-mipi-csi2
       - items:
           - enum:
+              - rockchip,rk3576-mipi-csi2
               - rockchip,rk3588-mipi-csi2
           - const: rockchip,rk3568-mipi-csi2
 

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* [PATCH 2/2] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3576
  2026-08-26 12:33 [PATCH 0/2] Add MIPI CSI-2 receiver support for RK3576 Amin Gattout
  2026-08-26 12:33 ` [PATCH 1/2] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3576 compatible Amin Gattout
@ 2026-08-26 12:33 ` Amin Gattout
  2026-08-26 12:45   ` sashiko-bot
  1 sibling, 1 reply; 5+ messages in thread
From: Amin Gattout @ 2026-08-26 12:33 UTC (permalink / raw)
  To: 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 Rockchip RK3576 features five MIPI CSI-2 receiver units:
 - MIPI0: connected to MIPI DCPHY0 (not supported)
 - MIPI1: connected to MIPI DPHY0
 - MIPI2: connected to MIPI DPHY0 lanes 2-3 in split mode (not supported)
 - MIPI3: connected to MIPI DPHY1
 - MIPI4: connected to MIPI DPHY1 lanes 2-3 in split mode (not supported)

The PHY to receiver routing is fixed. Only the full/split mode of each
DPHY is selectable, via SYS_GRF_SOC_CON5 bits 1 and 2, whose reset value
selects full mode, so no software configuration is required.

As the MIPI DCPHY as well as the split DPHY mode are not yet supported,
add only the device tree nodes for the MIPI1 and MIPI3 units.

Signed-off-by: Amin Gattout <amin.gattout@gmail.com>
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 52 ++++++++++++++++++++++++++++++++
 1 file changed, 52 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
index b7a527614243..cbf8b70cc15a 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
@@ -1324,6 +1324,58 @@ vdec_mmu: iommu@27b00800 {
 			#iommu-cells = <0>;
 		};
 
+		csi1: csi@27c90000 {
+			compatible = "rockchip,rk3576-mipi-csi2", "rockchip,rk3568-mipi-csi2";
+			reg = <0x0 0x27c90000 0x0 0x10000>;
+			interrupts = <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "err1", "err2";
+			clocks = <&cru PCLK_CSI_HOST_1>;
+			phys = <&csi_dphy0>;
+			power-domains = <&power RK3576_PD_VI>;
+			resets = <&cru SRST_P_CSI_HOST_1>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				csi1_in: port@0 {
+					reg = <0>;
+				};
+
+				csi1_out: port@1 {
+					reg = <1>;
+				};
+			};
+		};
+
+		csi3: csi@27cb0000 {
+			compatible = "rockchip,rk3576-mipi-csi2", "rockchip,rk3568-mipi-csi2";
+			reg = <0x0 0x27cb0000 0x0 0x10000>;
+			interrupts = <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>;
+			interrupt-names = "err1", "err2";
+			clocks = <&cru PCLK_CSI_HOST_3>;
+			phys = <&csi_dphy1>;
+			power-domains = <&power RK3576_PD_VI>;
+			resets = <&cru SRST_P_CSI_HOST_3>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				csi3_in: port@0 {
+					reg = <0>;
+				};
+
+				csi3_out: port@1 {
+					reg = <1>;
+				};
+			};
+		};
+
 		vop: vop@27d00000 {
 			compatible = "rockchip,rk3576-vop";
 			reg = <0x0 0x27d00000 0x0 0x3000>, <0x0 0x27d05000 0x0 0x1000>;

-- 
2.43.0


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3576
  2026-08-26 12:33 ` [PATCH 2/2] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3576 Amin Gattout
@ 2026-08-26 12:45   ` sashiko-bot
  0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-08-26 12:45 UTC (permalink / raw)
  To: Amin Gattout; +Cc: robh, devicetree, conor+dt, media-ci

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The device tree nodes `csi1` and `csi3` reference undefined phandles `&csi_dphy0` and `&csi_dphy1`, which will cause `dtc` compilation failures.
--

commit 2763e4828ff081f08fc3dbfa496335676826e8a1
Author: Amin Gattout <amin.gattout@gmail.com>

arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3576

This commit adds device tree nodes for the MIPI1 and MIPI3 CSI-2 receiver
units on the Rockchip RK3576. It intentionally omits other MIPI units
which are either unsupported DCPHYs or split-mode DPHY lanes.

> diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
> index b0c0d3c8b1b14..adec5c762673b 100644
> --- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
> +++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
> @@ -1314,6 +1314,58 @@ vdec_mmu: iommu@27b00800 {
>  			#iommu-cells = <0>;
>  		};
>  
> +		csi1: csi@27c90000 {
> +			compatible = "rockchip,rk3576-mipi-csi2", "rockchip,rk3568-mipi-csi2";
> +			reg = <0x0 0x27c90000 0x0 0x10000>;
> +			interrupts = <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 315 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "err1", "err2";
> +			clocks = <&cru PCLK_CSI_HOST_1>;
> +			phys = <&csi_dphy0>;

[Severity: Low]
Does this introduce a regression by causing a dtc compilation failure? The
csi_dphy0 phandle does not appear to be defined anywhere in rk3576.dtsi or
its included headers.

> +			power-domains = <&power RK3576_PD_VI>;
> +			resets = <&cru SRST_P_CSI_HOST_1>;
> +			status = "disabled";

[ ... ]

> +		csi3: csi@27cb0000 {
> +			compatible = "rockchip,rk3576-mipi-csi2", "rockchip,rk3568-mipi-csi2";
> +			reg = <0x0 0x27cb0000 0x0 0x10000>;
> +			interrupts = <GIC_SPI 383 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 384 IRQ_TYPE_LEVEL_HIGH>;
> +			interrupt-names = "err1", "err2";
> +			clocks = <&cru PCLK_CSI_HOST_3>;
> +			phys = <&csi_dphy1>;

[Severity: Low]
Will this also cause a dtc compilation error for boards including this file?
Similar to the csi1 node, the csi_dphy1 phandle appears to be undefined at
this point.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260826-csi-2-rcv-dts-v1-0-bcd8d459684d@gmail.com?part=2

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 1/2] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3576 compatible
  2026-08-26 12:33 ` [PATCH 1/2] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3576 compatible Amin Gattout
@ 2026-08-26 16:02   ` Conor Dooley
  0 siblings, 0 replies; 5+ messages in thread
From: Conor Dooley @ 2026-08-26 16:02 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

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

Acked-by: Conor Dooley <conor.dooley@microchip.com>
pw-bot: not-applicable

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-08-26 16:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-26 12:33 [PATCH 0/2] Add MIPI CSI-2 receiver support for RK3576 Amin Gattout
2026-08-26 12:33 ` [PATCH 1/2] media: dt-bindings: rockchip,rk3568-mipi-csi2: add rk3576 compatible Amin Gattout
2026-08-26 16:02   ` Conor Dooley
2026-08-26 12:33 ` [PATCH 2/2] arm64: dts: rockchip: add mipi csi-2 receiver nodes to rk3576 Amin Gattout
2026-08-26 12:45   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox