diff mbox

[2/5] ARM: lager: add vin1 node

Message ID 1394197299-17528-3-git-send-email-ben.dooks@codethink.co.uk (mailing list archive)
State Superseded
Headers show

Commit Message

Ben Dooks March 7, 2014, 1:01 p.m. UTC
Add device-tree for vin1 (composite video in) on the
lager board.

Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
---
 arch/arm/boot/dts/r8a7790-lager.dts | 38 +++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

Comments

Ben Dooks March 7, 2014, 4:06 p.m. UTC | #1
On 07/03/14 16:50, Sergei Shtylyov wrote:
> Hello.
>
> On 03/07/2014 04:01 PM, Ben Dooks wrote:
>
>> Add device-tree for vin1 (composite video in) on the
>> lager board.
>
>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
>
>     This patch should have been preceded by the VIN driver patch and
> bindings description, don't you think?
>
>> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts
>> b/arch/arm/boot/dts/r8a7790-lager.dts
>> index a087421..7528cfc 100644
>> --- a/arch/arm/boot/dts/r8a7790-lager.dts
>> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> [...]
>> @@ -239,8 +244,41 @@
>>       status = "ok";
>>       pinctrl-0 = <&i2c2_pins>;
>>       pinctrl-names = "default";
>> +
>> +    adv7180: adv7180@0x20 {
>
>     ePAPR standard [1] tells us that:
>
> "The name of a node should be somewhat generic, reflecting the function
> of the device and not its precise programming model."
>
>     So, I would suggest something like "video-decoder" instead. And
> remove "0x" from the address part of the node name please.

Personally I'm not fussed about names in the tree.

I will look at changing it to something like vin1_decoder
Sergei Shtylyov March 7, 2014, 4:50 p.m. UTC | #2
Hello.

On 03/07/2014 04:01 PM, Ben Dooks wrote:

> Add device-tree for vin1 (composite video in) on the
> lager board.

> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

    This patch should have been preceded by the VIN driver patch and bindings 
description, don't you think?

> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> index a087421..7528cfc 100644
> --- a/arch/arm/boot/dts/r8a7790-lager.dts
> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
[...]
> @@ -239,8 +244,41 @@
>   	status = "ok";
>   	pinctrl-0 = <&i2c2_pins>;
>   	pinctrl-names = "default";
> +
> +	adv7180: adv7180@0x20 {

    ePAPR standard [1] tells us that:

"The name of a node should be somewhat generic, reflecting the function of the 
device and not its precise programming model."

    So, I would suggest something like "video-decoder" instead. And remove 
"0x" from the address part of the node name please.

[1] http://www.power.org/resources/downloads/Power_ePAPR_APPROVED_v1.0.pdf

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
Sergei Shtylyov March 7, 2014, 5:22 p.m. UTC | #3
On 03/07/2014 07:06 PM, Ben Dooks wrote:

>>> Add device-tree for vin1 (composite video in) on the
>>> lager board.

>>> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>

>>     This patch should have been preceded by the VIN driver patch and
>> bindings description, don't you think?

>>> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts
>>> b/arch/arm/boot/dts/r8a7790-lager.dts
>>> index a087421..7528cfc 100644
>>> --- a/arch/arm/boot/dts/r8a7790-lager.dts
>>> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
>> [...]
>>> @@ -239,8 +244,41 @@
>>>       status = "ok";
>>>       pinctrl-0 = <&i2c2_pins>;
>>>       pinctrl-names = "default";
>>> +
>>> +    adv7180: adv7180@0x20 {

>>     ePAPR standard [1] tells us that:

>> "The name of a node should be somewhat generic, reflecting the function
>> of the device and not its precise programming model."

>>     So, I would suggest something like "video-decoder" instead. And
>> remove "0x" from the address part of the node name please.

> Personally I'm not fussed about names in the tree.

    I quoted the standard everybody should follow.

> I will look at changing it to something like vin1_decoder

    Please give it a generic name instead, without indexes and underscores.

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
Simon Horman March 13, 2014, 1:55 a.m. UTC | #4
On Fri, Mar 07, 2014 at 01:01:36PM +0000, Ben Dooks wrote:
> Add device-tree for vin1 (composite video in) on the
> lager board.

Please update the prefix of the subject of this patch to:
ARM: shmobile: lager: 

> 
> Signed-off-by: Ben Dooks <ben.dooks@codethink.co.uk>
> ---
>  arch/arm/boot/dts/r8a7790-lager.dts | 38 +++++++++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
> index a087421..7528cfc 100644
> --- a/arch/arm/boot/dts/r8a7790-lager.dts
> +++ b/arch/arm/boot/dts/r8a7790-lager.dts
> @@ -158,6 +158,11 @@
>  		renesas,groups = "i2c2";
>  		renesas,function = "i2c2";
>  	};
> +
> +	vin1_pins: vin {
> +		renesas,groups = "vin1_data8", "vin1_clk";
> +		renesas,function = "vin1";
> +	};
>  };
>  
>  &mmcif1 {
> @@ -239,8 +244,41 @@
>  	status = "ok";
>  	pinctrl-0 = <&i2c2_pins>;
>  	pinctrl-names = "default";
> +
> +	adv7180: adv7180@0x20 {
> +		compatible = "adi,adv7180";
> +		reg = <0x20>;
> +		remote = <&vin1>;
> +
> +		port {
> +			adv7180_1: endpoint {
> +				bus-width = <8>;
> +				remote-endpoint = <&vin1ep0>;
> +			};
> +		};
> +	};
> +
>  };
>  
>  &i2c3	{
>  	status = "ok";
>  };
> +
> +/* composite video input */
> +&vin1 {
> +	pinctrl-0 = <&vin1_pins>;
> +	pinctrl-names = "default";
> +
> +	status = "ok";
> +
> +	port {
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		vin1ep0: endpoint {
> +			remote-endpoint = <&adv7180_1>;
> +			bus-width = <8>;
> +		};
> +	};
> +};
> +
> -- 
> 1.9.0
> 
> --
> 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
> 
--
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

diff --git a/arch/arm/boot/dts/r8a7790-lager.dts b/arch/arm/boot/dts/r8a7790-lager.dts
index a087421..7528cfc 100644
--- a/arch/arm/boot/dts/r8a7790-lager.dts
+++ b/arch/arm/boot/dts/r8a7790-lager.dts
@@ -158,6 +158,11 @@ 
 		renesas,groups = "i2c2";
 		renesas,function = "i2c2";
 	};
+
+	vin1_pins: vin {
+		renesas,groups = "vin1_data8", "vin1_clk";
+		renesas,function = "vin1";
+	};
 };
 
 &mmcif1 {
@@ -239,8 +244,41 @@ 
 	status = "ok";
 	pinctrl-0 = <&i2c2_pins>;
 	pinctrl-names = "default";
+
+	adv7180: adv7180@0x20 {
+		compatible = "adi,adv7180";
+		reg = <0x20>;
+		remote = <&vin1>;
+
+		port {
+			adv7180_1: endpoint {
+				bus-width = <8>;
+				remote-endpoint = <&vin1ep0>;
+			};
+		};
+	};
+
 };
 
 &i2c3	{
 	status = "ok";
 };
+
+/* composite video input */
+&vin1 {
+	pinctrl-0 = <&vin1_pins>;
+	pinctrl-names = "default";
+
+	status = "ok";
+
+	port {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		vin1ep0: endpoint {
+			remote-endpoint = <&adv7180_1>;
+			bus-width = <8>;
+		};
+	};
+};
+