diff mbox

ARM: shmobile: koelsch: add VIN1/ADV7180 DT support

Message ID 2131152.vMTPsJUYLQ@wasted.cogentembedded.com (mailing list archive)
State Accepted
Commit 2cf088105db14c00ad69df09b9b4a37c2370ff44
Headers show

Commit Message

Sergei Shtylyov Aug. 6, 2014, 6:38 p.m. UTC
Define the Koelsch board dependent part of the VIN1 device node. Add the device
node for Analog  Devices ADV7180  video decoder to  I2C2 bus. Add the necessary
subnodes to interconnect VIN1 and ADV7180 devices.

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

---
This patch is against the 'renesas-devel-v3.16-20140804' tag of Simon Horman's
'renesas.git' repo. It requires the 'soc_camera' and 'rcar_vin' device tree
support patches (already merged to the 'media_tree.git' repo) in order to work.

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

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

Comments

Simon Horman Aug. 7, 2014, 12:47 a.m. UTC | #1
On Wed, Aug 06, 2014 at 10:38:22PM +0400, sergei.shtylyov@cogentembedded.com wrote:
> Define the Koelsch board dependent part of the VIN1 device node. Add the device
> node for Analog  Devices ADV7180  video decoder to  I2C2 bus. Add the necessary
> subnodes to interconnect VIN1 and ADV7180 devices.
> 
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
> 
> ---
> This patch is against the 'renesas-devel-v3.16-20140804' tag of Simon Horman's
> 'renesas.git' repo. It requires the 'soc_camera' and 'rcar_vin' device tree
> support patches (already merged to the 'media_tree.git' repo) in order to work.
> 
>  arch/arm/boot/dts/r8a7791-koelsch.dts |   35 ++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)

Thanks, I have queued this up for v3.18.
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Magnus Damm Aug. 7, 2014, 4:01 a.m. UTC | #2
Hi Sergei,

Thanks for your patch.

On Thu, Aug 7, 2014 at 3:38 AM,  <sergei.shtylyov@cogentembedded.com> wrote:
> Define the Koelsch board dependent part of the VIN1 device node. Add the device
> node for Analog  Devices ADV7180  video decoder to  I2C2 bus. Add the necessary
> subnodes to interconnect VIN1 and ADV7180 devices.
>
> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
>
> ---
> This patch is against the 'renesas-devel-v3.16-20140804' tag of Simon Horman's
> 'renesas.git' repo. It requires the 'soc_camera' and 'rcar_vin' device tree
> support patches (already merged to the 'media_tree.git' repo) in order to work.
>
>  arch/arm/boot/dts/r8a7791-koelsch.dts |   35 ++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
>
> Index: renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
> ===================================================================
> --- renesas.orig/arch/arm/boot/dts/r8a7791-koelsch.dts
> +++ renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
> @@ -289,6 +289,11 @@
>                 renesas,groups = "usb1";
>                 renesas,function = "usb1";
>         };
> +
> +       vin1_pins: vin1 {
> +               renesas,groups = "vin1_data8", "vin1_clk";
> +               renesas,function = "vin1";
> +       };
>  };

Quick question: Does this pin description match to the board layout? I
suspect that clock and data by themselves are not enough.

I'm not sure about Koelsch, but  in case of older SoCs using the CEU
there were signals used like horizontal and vertical sync and
sometimes even something that was used to determine interlace.

Thanks,

/ magnus
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sergei Shtylyov Aug. 7, 2014, 3:31 p.m. UTC | #3
Hello.

On 08/07/2014 08:01 AM, Magnus Damm wrote:

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

>> Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>

>> ---
>> This patch is against the 'renesas-devel-v3.16-20140804' tag of Simon Horman's
>> 'renesas.git' repo. It requires the 'soc_camera' and 'rcar_vin' device tree
>> support patches (already merged to the 'media_tree.git' repo) in order to work.

>>   arch/arm/boot/dts/r8a7791-koelsch.dts |   35 ++++++++++++++++++++++++++++++++++
>>   1 file changed, 35 insertions(+)

>> Index: renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
>> ===================================================================
>> --- renesas.orig/arch/arm/boot/dts/r8a7791-koelsch.dts
>> +++ renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
>> @@ -289,6 +289,11 @@
>>                  renesas,groups = "usb1";
>>                  renesas,function = "usb1";
>>          };
>> +
>> +       vin1_pins: vin1 {
>> +               renesas,groups = "vin1_data8", "vin1_clk";
>> +               renesas,function = "vin1";
>> +       };
>>   };

> Quick question: Does this pin description match to the board layout? I

    Yes, it does.

> suspect that clock and data by themselves are not enough.

    They are enough as BT.656 interconnect is used between VIN1 and ADV7180.

> I'm not sure about Koelsch, but  in case of older SoCs using the CEU
> there were signals used like horizontal and vertical sync and
> sometimes even something that was used to determine interlace.

    The HS and VS/FIELD pins of ADV7180 are left unconnected.  There's also 
ADV7612 connected to VIN0 on this board, there the HSYNC and VSYNC/FIELD pins 
are connected; however, ADV7612 is not supported yet.

> Thanks,

> / magnus

WBR, Sergei

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

Patch

Index: renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
===================================================================
--- renesas.orig/arch/arm/boot/dts/r8a7791-koelsch.dts
+++ renesas/arch/arm/boot/dts/r8a7791-koelsch.dts
@@ -289,6 +289,11 @@ 
 		renesas,groups = "usb1";
 		renesas,function = "usb1";
 	};
+
+	vin1_pins: vin1 {
+		renesas,groups = "vin1_data8", "vin1_clk";
+		renesas,function = "vin1";
+	};
 };
 
 &ether {
@@ -416,6 +421,19 @@ 
 	status = "okay";
 	clock-frequency = <400000>;
 
+	composite-in@20 {
+		compatible = "adi,adv7180";
+		reg = <0x20>;
+		remote = <&vin1>;
+
+		port {
+			adv7180: endpoint {
+				bus-width = <8>;
+				remote-endpoint = <&vin1ep>;
+			};
+		};
+	};
+
 	eeprom@50 {
 		compatible = "renesas,24c02";
 		reg = <0x50>;
@@ -463,3 +481,20 @@ 
 &cpu0 {
 	cpu0-supply = <&vdd_dvfs>;
 };
+
+/* composite video input */
+&vin1 {
+	status = "ok";
+	pinctrl-0 = <&vin1_pins>;
+	pinctrl-names = "default";
+
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vin1ep: endpoint {
+			remote-endpoint = <&adv7180>;
+			bus-width = <8>;
+		};
+	};
+};