Skip to contentSkip to conversation

arm64: dts: renesas: r8a77970: connect VIN to CSI40

PATCH In review Niklas Söderlund 3 participants 7 messages Nov 26, 2017 – Nov 30, 2017

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: renesas: r8a77970: connect VIN to CSI40

Hi,

This series describes how to connect VIN0-3 to CSI40 and the HDMI input of the adv7482 on the expansion board. It is tested on V3M together with V3M enablement for VIN and CSI-2 drivers on-top of Kieran's renesas-drivers-next-v3m branch [1].

It works and it's possible to program the EDID and capture frame frames. Remember to switch SW18 to the off position to route the CSI-2 bus to the expansion board instead of the MAX9286 for GMSL input.

1. git://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git

Niklas Söderlund (3):
arm64: dts: renesas: r8a77970: add VIN and CSI-2
arm64: dts: renesas: eagle: expansion: enable and connect CSI40
arm64: dts: renesas: eagle: enable VIN

 .../boot/dts/renesas/r8a77970-eagle-expansion.dtsi |  18 ++-
 arch/arm64/boot/dts/renesas/r8a77970-eagle.dts     |  16 +++
 arch/arm64/boot/dts/renesas/r8a77970.dtsi          | 151 +++++++++++++++++++++
 3 files changed, 184 insertions(+), 1 deletion(-)
Signature · 1 line
2.15.0
#1 lore raw

PATCH 1/3 arm64: dts: renesas: r8a77970: add VIN and CSI-2

Define the nodes for CSI40 and VIN0-3.

---
 arch/arm64/boot/dts/renesas/r8a77970.dtsi | 151 ++++++++++++++++++++++++++++++
 1 file changed, 151 insertions(+)
arch/arm64/boot/dts/renesas/r8a77970.dtsi +151 -0
index b70649b7acd05c98..505a9a9c0c4f5a68 100644
@@ -624,5 +624,156 @@
 			#size-cells = <0>;
 			status = "disabled";
 		};
+
+		csi40: csi2@feaa0000 {
+			compatible = "renesas,r8a7795-csi2", "renesas,rcar-gen3-csi2";
+			reg = <0 0xfeaa0000 0 0x10000>;
+			interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 716>;
+			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+			resets = <&cpg 716>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@1 {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					reg = <1>;
+
+					csi40vin0: endpoint@0 {
+						reg = <0>;
+						remote-endpoint = <&vin0csi40>;
+					};
+					csi40vin1: endpoint@1 {
+						reg = <1>;
+						remote-endpoint = <&vin1csi40>;
+					};
+					csi40vin2: endpoint@2 {
+						reg = <2>;
+						remote-endpoint = <&vin2csi40>;
+					};
+					csi40vin3: endpoint@3 {
+						reg = <3>;
+						remote-endpoint = <&vin3csi40>;
+					};
+				};
+			};
+		};
+
+		vin0: video@e6ef0000 {
+			compatible = "renesas,vin-r8a7795";
+			reg = <0 0xe6ef0000 0 0x1000>;
+			interrupts = <GIC_SPI 188 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 811>;
+			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+			resets = <&cpg 811>;
+			renesas,id = <0>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@1 {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					reg = <1>;
+
+					vin0csi40: endpoint@2 {
+						reg = <2>;
+						remote-endpoint= <&csi40vin0>;
+					};
+				};
+			};
+		};
+
+		vin1: video@e6ef1000 {
+			compatible = "renesas,vin-r8a7795";
+			reg = <0 0xe6ef1000 0 0x1000>;
+			interrupts = <GIC_SPI 189 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 810>;
+			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+			resets = <&cpg 810>;
+			renesas,id = <1>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@1 {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					reg = <1>;
+
+					vin1csi40: endpoint@2 {
+						reg = <2>;
+						remote-endpoint= <&csi40vin1>;
+					};
+				};
+			};
+		};
+
+		vin2: video@e6ef2000 {
+			compatible = "renesas,vin-r8a7795";
+			reg = <0 0xe6ef2000 0 0x1000>;
+			interrupts = <GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 809>;
+			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+			resets = <&cpg 809>;
+			renesas,id = <2>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@1 {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					reg = <1>;
+
+					vin2csi40: endpoint@2 {
+						reg = <2>;
+						remote-endpoint= <&csi40vin2>;
+					};
+				};
+			};
+		};
+
+		vin3: video@e6ef3000 {
+			compatible = "renesas,vin-r8a7795";
+			reg = <0 0xe6ef3000 0 0x1000>;
+			interrupts = <GIC_SPI 191 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 808>;
+			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
+			resets = <&cpg 808>;
+			renesas,id = <3>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@1 {
+					#address-cells = <1>;
+					#size-cells = <0>;
+
+					reg = <1>;
+
+					vin3csi40: endpoint@2 {
+						reg = <2>;
+						remote-endpoint= <&csi40vin3>;
+					};
+				};
+			};
+		};
 	};
 };
Signature · 1 line
2.15.0
#2 lore raw

PATCH 2/3 arm64: dts: renesas: eagle: expansion: enable and connect CSI40

In reply to Niklas Söderlund

On the extension board CSI40 is connected to the adv7482.

---
 .../boot/dts/renesas/r8a77970-eagle-expansion.dtsi     | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/renesas/r8a77970-eagle-expansion.dtsi +17 -1
index e3dc5c32433014c9..565008595a6ce81b 100644
@@ -44,6 +44,22 @@
 	};
 };
 
+&csi40 {
+	status = "okay";
+
+	ports {
+		port@0 {
+			reg = <0>;
+
+			csi40_in: endpoint {
+				clock-lanes = <0>;
+				data-lanes = <1 2 3 4>;
+				remote-endpoint = <&adv7482_txa>;
+			};
+		};
+	};
+};
+
 &i2c0 {
 	/* GPIO Expander@27:
 	 *   IO.0: ROUTE_I2C_ENn
@@ -94,7 +110,7 @@
 			adv7482_txa: endpoint {
 				clock-lanes = <0>;
 				data-lanes = <1 2 3 4>;
-				// remote-endpoint = <&csi40_in>;
+				remote-endpoint = <&csi40_in>;
 			};
 		};
 	};
Signature · 1 line
2.15.0
#3 lore raw

PATCH 3/3 arm64: dts: renesas: eagle: enable VIN

In reply to Niklas Söderlund
---
 arch/arm64/boot/dts/renesas/r8a77970-eagle.dts | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
arch/arm64/boot/dts/renesas/r8a77970-eagle.dts +16 -0
index 41e3b4521a5aa39e..d3c6bcb82a5176c6 100644
@@ -226,5 +226,21 @@
 	status = "okay";
 };
 
+&vin0 {
+	status = "okay";
+};
+
+&vin1 {
+	status = "okay";
+};
+
+&vin2 {
+	status = "okay";
+};
+
+&vin3 {
+	status = "okay";
+};
+
 /* FAKRA Overlay */
 #include "eagle-fakra.dtsi"
\ No newline at end of file
Signature · 1 line
2.15.0
#4 lore raw
In reply to Niklas Söderlund
Quoted 7 lines · Niklas Söderlund

Hi,

This series describes how to connect VIN0-3 to CSI40 and the HDMI input of the adv7482 on the expansion board. It is tested on V3M together with V3M enablement for VIN and CSI-2 drivers on-top of Kieran's renesas-drivers-next-v3m branch [1].

Quoted 5 lines

It works and it's possible to program the EDID and capture frame frames. Remember to switch SW18 to the off position to route the CSI-2 bus to the expansion board instead of the MAX9286 for GMSL input.

1. git://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git

Hi Niklas,

how do you view the path to upstream of this patch-set?

#5 lore raw

Hi Simon,

Quoted 12 lines · Simon Horman
Quoted 11 lines · Niklas S�derlund

Hi,

This series describes how to connect VIN0-3 to CSI40 and the HDMI input of the adv7482 on the expansion board. It is tested on V3M together with V3M enablement for VIN and CSI-2 drivers on-top of Kieran's renesas-drivers-next-v3m branch [1].

It works and it's possible to program the EDID and capture frame frames. Remember to switch SW18 to the off position to route the CSI-2 bus to the expansion board instead of the MAX9286 for GMSL input.

Quoted 5 lines
Quoted 1 line

1. git://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git

Hi Niklas,

how do you view the path to upstream of this patch-set?

I think there are a few things that needs to go upstream before this set.

- The VIN and CSI-2 Gen3 driver support.
- All or some of the V3M DT patches from renesas-drivers-next-v3m.

I would mark this as deferred as I expect some of the patches in renesas-drivers-next-v3m needs more work and therefor this set also needs to be updated before it's ready to go upstream.

Signature · 2 lines
Regards,
Niklas S�derlund
#6 lore raw
Quoted 24 lines · Niklas Söderlund

Hi Simon,

Quoted 12 lines · Simon Horman
Quoted 11 lines · Niklas Söderlund

Hi,

This series describes how to connect VIN0-3 to CSI40 and the HDMI input of the adv7482 on the expansion board. It is tested on V3M together with V3M enablement for VIN and CSI-2 drivers on-top of Kieran's renesas-drivers-next-v3m branch [1].

It works and it's possible to program the EDID and capture frame frames. Remember to switch SW18 to the off position to route the CSI-2 bus to the expansion board instead of the MAX9286 for GMSL input.

Quoted 5 lines
Quoted 1 line

1. git://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git

Hi Niklas,

how do you view the path to upstream of this patch-set?

I think there are a few things that needs to go upstream before this set.

Quoted 6 lines

- The VIN and CSI-2 Gen3 driver support.
- All or some of the V3M DT patches from renesas-drivers-next-v3m.

I would mark this as deferred as I expect some of the patches in renesas-drivers-next-v3m needs more work and therefor this set also needs to be updated before it's ready to go upstream.

Understood, I have marked them as deferred as you suggest.