diff mbox

[1/2] ARM: dts: lager: Add entries for VIN HDMI input support

Message ID 20160916130909.21225-2-ulrich.hecht+renesas@gmail.com (mailing list archive)
State Changes Requested
Delegated to: Simon Horman
Headers show

Commit Message

Ulrich Hecht Sept. 16, 2016, 1:09 p.m. UTC
From: William Towle <william.towle@codethink.co.uk>

Add DT entries for vin0, vin0_pins, and adv7612.

Sets the 'default-input' property for ADV7612, enabling image and video
capture without the need to have userspace specifying routing.

Signed-off-by: William Towle <william.towle@codethink.co.uk>
Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk>
[uli: added interrupt, renamed endpoint, merged default-input]
Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
---
 arch/arm/boot/dts/r8a7790-lager.dts | 39 +++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

Comments

Sergei Shtylyov Sept. 17, 2016, 10:25 a.m. UTC | #1
Hello.

On 9/16/2016 4:09 PM, Ulrich Hecht wrote:

> From: William Towle <william.towle@codethink.co.uk>
>
> Add DT entries for vin0, vin0_pins, and adv7612.
>
> Sets the 'default-input' property for ADV7612, enabling image and video
> capture without the need to have userspace specifying routing.
>
> Signed-off-by: William Towle <william.towle@codethink.co.uk>
> Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk>
> [uli: added interrupt, renamed endpoint, merged default-input]
> Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> ---
>  arch/arm/boot/dts/r8a7790-lager.dts | 39 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 39 insertions(+)
>
> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> index 52b56fc..fc9d129 100644
> --- a/arch/arm/boot/dts/r8a7790-lager.dts
> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
[...]
> @@ -722,6 +742,25 @@
>  	status = "okay";
>  };
>
> +/* HDMI video input */
> +&vin0 {
> +	pinctrl-0 = <&vin0_pins>;
> +	pinctrl-names = "default";
> +
> +	status = "ok";

    Should be "okay", although "ok" is also valid.

[...]

MBR, Sergei
Simon Horman Sept. 20, 2016, 9:25 a.m. UTC | #2
On Sat, Sep 17, 2016 at 01:25:47PM +0300, Sergei Shtylyov wrote:
> Hello.
> 
> On 9/16/2016 4:09 PM, Ulrich Hecht wrote:
> 
> >From: William Towle <william.towle@codethink.co.uk>
> >
> >Add DT entries for vin0, vin0_pins, and adv7612.
> >
> >Sets the 'default-input' property for ADV7612, enabling image and video
> >capture without the need to have userspace specifying routing.
> >
> >Signed-off-by: William Towle <william.towle@codethink.co.uk>
> >Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk>
> >[uli: added interrupt, renamed endpoint, merged default-input]
> >Signed-off-by: Ulrich Hecht <ulrich.hecht+renesas@gmail.com>
> >---
> > arch/arm/boot/dts/r8a7790-lager.dts | 39 +++++++++++++++++++++++++++++++++++++
> > 1 file changed, 39 insertions(+)
> >
> >diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> >index 52b56fc..fc9d129 100644
> >--- a/arch/arm/boot/dts/r8a7790-lager.dts
> >+++ b/arch/arm/boot/dts/r8a7790-lager.dts
> [...]
> >@@ -722,6 +742,25 @@
> > 	status = "okay";
> > };
> >
> >+/* HDMI video input */
> >+&vin0 {
> >+	pinctrl-0 = <&vin0_pins>;
> >+	pinctrl-names = "default";
> >+
> >+	status = "ok";
> 
>    Should be "okay", although "ok" is also valid.

Ulrich, could you fix this and repost?
diff mbox

Patch

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index 52b56fc..fc9d129 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -427,6 +427,11 @@ 
 		function = "usb2";
 	};
 
+	vin0_pins: vin0 {
+		groups = "vin0_data24", "vin0_sync", "vin0_clkenb", "vin0_clk";
+		function = "vin0";
+	};
+
 	vin1_pins: vin1 {
 		groups = "vin1_data8", "vin1_clk";
 		function = "vin1";
@@ -651,6 +656,21 @@ 
 			};
 		};
 	};
+
+	hdmi-in@4c {
+		compatible = "adi,adv7612";
+		reg = <0x4c>;
+		interrupt-parent = <&gpio1>;
+		interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+		remote = <&vin0>;
+		default-input = <0>;
+
+		port {
+			adv7612: endpoint {
+				remote-endpoint = <&vin0ep0>;
+			};
+		};
+	};
 };
 
 &iic3 {
@@ -722,6 +742,25 @@ 
 	status = "okay";
 };
 
+/* HDMI video input */
+&vin0 {
+	pinctrl-0 = <&vin0_pins>;
+	pinctrl-names = "default";
+
+	status = "ok";
+
+	port {
+		vin0ep0: endpoint {
+			remote-endpoint = <&adv7612>;
+			bus-width = <24>;
+			hsync-active = <0>;
+			vsync-active = <0>;
+			pclk-sample = <1>;
+			data-active = <1>;
+		};
+	};
+};
+
 /* composite video input */
 &vin1 {
 	pinctrl-0 = <&vin1_pins>;