Skip to contentSkip to conversation

Add VIN and ADV7180 DT support for R8A7791/Henninger board

PATCH New Sergei Shtylyov 2 participants 7 messages Jun 10, 2014 – Jun 12, 2014

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

cover Add VIN and ADV7180 DT support for R8A7791/Henninger board

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.15-20140610' tag plus the Henninger I2C2 DT support patch that I posted earlier. Here we add the VIN and ADV7180 video decoder device tree support on the R8A7791/Henninger board. The patchset requires Ben Dooks' adv7180, rcar_vin, and soc_camera DT support patches posted back in April in order to work.

[1/2] ARM: shmobile: r8a7791: add VIN DT support [2/2] ARM: shmobile: henninger: add VIN0/ADV7180 DT support

WBR, Sergei

#1 lore raw

PATCH 1/2 ARM: shmobile: r8a7791: add VIN DT support

Define the generic R8A7791 parts of the VIN[0-2] device nodes. Add aliases for the VIN[0-2] device nodes.

---
 arch/arm/boot/dts/r8a7791.dtsi |   27 +++++++++++++++++++++++++++
 1 file changed, 27 insertions(+)
arch/arm/boot/dts/r8a7791.dtsi +27 -0
Index: renesas/arch/arm/boot/dts/r8a7791.dtsi
===================================================================
@@ -34,6 +34,9 @@
 		spi1 = &msiof0;
 		spi2 = &msiof1;
 		spi3 = &msiof2;
+		vin0 = &vin0;
+		vin1 = &vin1;
+		vin2 = &vin2;
 	};
 
 	cpus {
@@ -518,6 +521,30 @@
 		status = "disabled";
 	};
 
+	vin0: video at e6ef0000 {
+		compatible = "renesas,vin-r8a7790";
+		clocks = <&mstp8_clks R8A7791_CLK_VIN0>;
+		reg = <0 0xe6ef0000 0 0x1000>;
+		interrupts = <0 188 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	vin1: video at e6ef1000 {
+		compatible = "renesas,vin-r8a7790";
+		clocks = <&mstp8_clks R8A7791_CLK_VIN1>;
+		reg = <0 0xe6ef1000 0 0x1000>;
+		interrupts = <0 189 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
+	vin2: video at e6ef2000 {
+		compatible = "renesas,vin-r8a7790";
+		clocks = <&mstp8_clks R8A7791_CLK_VIN2>;
+		reg = <0 0xe6ef2000 0 0x1000>;
+		interrupts = <0 190 IRQ_TYPE_LEVEL_HIGH>;
+		status = "disabled";
+	};
+
 	clocks {
 		#address-cells = <2>;
 		#size-cells = <2>;
#2 lore raw

PATCH 1/2 ARM: shmobile: r8a7791: add VIN DT support

Hello.

Quoted 13 lines · Sergei Shtylyov

Define the generic R8A7791 parts of the VIN[0-2] device nodes. Add aliases for the VIN[0-2] device nodes.

---
  arch/arm/boot/dts/r8a7791.dtsi |   27 +++++++++++++++++++++++++++
  1 file changed, 27 insertions(+)

Index: renesas/arch/arm/boot/dts/r8a7791.dtsi
===================================================================

arch/arm/boot/dts/r8a7791.dtsi +0 -0

[...]

arch/arm/boot/dts/r8a7791.dtsi line 525

Quoted 6 lines
arch/arm/boot/dts/r8a7791.dtsi +2 -0
@@ -518,6 +521,30 @@
  		status = "disabled";
  	};
 
+	vin0: video at e6ef0000 {
+		compatible = "renesas,vin-r8a7790";
    Duh, should have been "renesas,vin-r8a7791"...

WBR, Sergei

#3 lore raw

PATCH 2/2 ARM: shmobile: henninger: add VIN0/ADV7180 DT support

In reply to Sergei Shtylyov

Define the Henninger board dependent part of the VIN0 device node. Add the device node for Analog Devices ADV7180 video decoder to I2C2 bus. Add the necessary subnodes to interconnect VIN0 and ADV7180 devices.

---
 arch/arm/boot/dts/r8a7791-henninger.dts |   35 ++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)
arch/arm/boot/dts/r8a7791-henninger.dts +35 -0
Index: renesas/arch/arm/boot/dts/r8a7791-henninger.dts
===================================================================
@@ -125,6 +125,11 @@
 				 "msiof0_tx";
 		renesas,function = "msiof0";
 	};
+
+	vin0_pins: vin0 {
+		renesas,groups = "vin0_data8", "vin0_clk";
+		renesas,function = "vin0";
+	};
 };
 
 &scif0 {
@@ -181,6 +186,19 @@
 
 	status = "okay";
 	clock-frequency = <400000>;
+
+	composite-in at 20 {
+		compatible = "adi,adv7180";
+		reg = <0x20>;
+		remote = <&vin0>;
+
+		port {
+			adv7180: endpoint {
+				bus-width = <8>;
+				remote-endpoint = <&vin0ep>;
+			};
+		};
+	};
 };
 
 &qspi {
@@ -230,3 +248,20 @@
 		spi-cpha;
 	};
 };
+
+/* composite video input */
+&vin0 {
+	status = "ok";
+	pinctrl-0 = <&vin0_pins>;
+	pinctrl-names = "default";
+
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vin0ep: endpoint {
+			remote-endpoint = <&adv7180>;
+			bus-width = <8>;
+		};
+	};
+};
#4 lore raw

cover Add VIN and ADV7180 DT support for R8A7791/Henninger board

In reply to Sergei Shtylyov
Quoted 8 lines · Sergei Shtylyov

Hello.

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.15-20140610' tag plus the Henninger I2C2 DT support patch that I posted earlier. Here we add the VIN and ADV7180 video decoder device tree support on the R8A7791/Henninger board. The patchset requires Ben Dooks' adv7180, rcar_vin, and soc_camera DT support patches posted back in April in order to work.

I wonder what the status of those (driver?) patches are.

In general I prefer bindings to be accepted before they are used.

Quoted 9 lines

[1/2] ARM: shmobile: r8a7791: add VIN DT support [2/2] ARM: shmobile: henninger: add VIN0/ADV7180 DT support

WBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html

#5 lore raw

cover Add VIN and ADV7180 DT support for R8A7791/Henninger board

Hello.

Quoted 8 lines · Simon Horman
Quoted 6 lines

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.15-20140610' tag plus the Henninger I2C2 DT support patch that I posted earlier. Here we add the VIN and ADV7180 video decoder device tree support on the R8A7791/Henninger board. The patchset requires Ben Dooks' adv7180, rcar_vin, and soc_camera DT support patches posted back in April in order to work.

I wonder what the status of those (driver?) patches are.

Someone in CodeThink is working on them, I was told. I had to fix them up
somewhat in order for them to compile.

Quoted 1 line

In general I prefer bindings to be accepted before they are used.

No argument here. I just have my own schedule.

WBR, Sergei

#6 lore raw

cover Add VIN and ADV7180 DT support for R8A7791/Henninger board

Quoted 11 lines · Sergei Shtylyov

Hello.

Quoted 6 lines · Simon Horman
Quoted 6 lines

Here's the set of 2 patches against Simon Horman's 'renesas.git' repo,
'renesas-devel-v3.15-20140610' tag plus the Henninger I2C2 DT support patch that I posted earlier. Here we add the VIN and ADV7180 video decoder device tree support on the R8A7791/Henninger board. The patchset requires Ben Dooks' adv7180, rcar_vin, and soc_camera DT support patches posted back in April in order to work.

Quoted 8 lines
Quoted 1 line

I wonder what the status of those (driver?) patches are.

Someone in CodeThink is working on them, I was told. I had to fix them up
somewhat in order for them to compile.

Quoted 1 line

In general I prefer bindings to be accepted before they are used.

No argument here. I just have my own schedule.

No argument there either :)