Patchwork [v6,3/4] ARM: dts: mvebu: Introduce a new compatible string for mv64xxx-i2c

login
register
mail settings
Submitter Gregory CLEMENT
Date Aug. 22, 2013, 2:19 p.m.
Message ID <1377181169-17483-1-git-send-email-gregory.clement@free-electrons.com>
Download mbox | patch
Permalink /patch/269084/
State Superseded
Headers show

Comments

Gregory CLEMENT - Aug. 22, 2013, 2:19 p.m.
The mv64xxx-i2c embedded in the Armada XP have a new feature to
offload i2c transaction. This new version of the IP come also with
some errata. This lead to the introduction to a another compatible
string.

This commit updates the Device Tree binding documentation accordingly.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)
Wolfram Sang - Aug. 22, 2013, 4:22 p.m.
> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> @@ -5,6 +5,8 @@ Required properties :
>  
>   - reg             : Offset and length of the register set for the device
>   - compatible      : Should be "marvell,mv64xxx-i2c" or "allwinner,sun4i-i2c"
> +                     or for controller which support the I2C Transaction
> +                     Generator "marvell,mv64xxx-i2c","marvell,mv7230-i2c"

Too complicated IMO:
+			or "marvell,mv7230-i2c".

DT creators don't need to know about transaction generators. They just
supply the compatible string and the driver knows the details.

> +For a controller which support the I2C Transaction Generator:

"For the Armada XP" - there might be later IP cores on later SoC with
transaction generators and different errata. They will just get a new
compatible and the driver know the details.

> +
> +	i2c@11000 {
> +		compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
> +		reg = <0x11000 0x100>;
> +		interrupts = <29>;
> +		clock-frequency = <100000>;
> +	};
> -- 
> 1.8.1.2
>
Gregory CLEMENT - Aug. 23, 2013, 7:07 a.m.
On 22/08/2013 18:22, Wolfram Sang wrote:
> 
>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> @@ -5,6 +5,8 @@ Required properties :
>>  
>>   - reg             : Offset and length of the register set for the device
>>   - compatible      : Should be "marvell,mv64xxx-i2c" or "allwinner,sun4i-i2c"
>> +                     or for controller which support the I2C Transaction
>> +                     Generator "marvell,mv64xxx-i2c","marvell,mv7230-i2c"
> 
> Too complicated IMO:
> +			or "marvell,mv7230-i2c".
> 
> DT creators don't need to know about transaction generators. They just
> supply the compatible string and the driver knows the details.
> 
>> +For a controller which support the I2C Transaction Generator:
> 
> "For the Armada XP" - there might be later IP cores on later SoC with
> transaction generators and different errata. They will just get a new
> compatible and the driver know the details.

You're right, I remained to close to my first version when it was a flag
and not a compatible name.

I will follow all your suggestions. A new version is coming soon.

Thanks,

> 
>> +
>> +	i2c@11000 {
>> +		compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
>> +		reg = <0x11000 0x100>;
>> +		interrupts = <29>;
>> +		clock-frequency = <100000>;
>> +	};
>> -- 
>> 1.8.1.2
>>

Patch

diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
index 6113f92..aeff1e2 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
@@ -5,6 +5,8 @@  Required properties :
 
  - reg             : Offset and length of the register set for the device
  - compatible      : Should be "marvell,mv64xxx-i2c" or "allwinner,sun4i-i2c"
+                     or for controller which support the I2C Transaction
+                     Generator "marvell,mv64xxx-i2c","marvell,mv7230-i2c"
  - interrupts      : The interrupt number
 
 Optional properties :
@@ -20,3 +22,12 @@  Examples:
 		interrupts = <29>;
 		clock-frequency = <100000>;
 	};
+
+For a controller which support the I2C Transaction Generator:
+
+	i2c@11000 {
+		compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+		reg = <0x11000 0x100>;
+		interrupts = <29>;
+		clock-frequency = <100000>;
+	};