diff mbox

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

Message ID 1371821529-13791-5-git-send-email-gregory.clement@free-electrons.com
State Superseded
Headers show

Commit Message

Gregory CLEMENT June 21, 2013, 1:32 p.m. UTC
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 split the i2c information into armada-370.dtsi and
armada-xp.dtsi. Most of the data remains the same and stay in the
common file Armada-370-xp.dtsi. With this new feature the size of the
registers are bigger for Armada XP and the new compatible string is
used.

The Device Tree binding documentation is updated accordingly.

Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
---
 Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 13 ++++++++++++-
 arch/arm/boot/dts/armada-370-xp.dtsi                  |  2 --
 arch/arm/boot/dts/armada-370.dtsi                     |  8 ++++++++
 arch/arm/boot/dts/armada-xp.dtsi                      | 10 ++++++++++
 4 files changed, 30 insertions(+), 3 deletions(-)

Comments

Jason Cooper June 21, 2013, 2:07 p.m. UTC | #1
On Fri, Jun 21, 2013 at 03:32:09PM +0200, Gregory CLEMENT wrote:
> 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 split the i2c information into armada-370.dtsi and
> armada-xp.dtsi. Most of the data remains the same and stay in the
> common file Armada-370-xp.dtsi. With this new feature the size of the
> registers are bigger for Armada XP and the new compatible string is
> used.
> 
> The Device Tree binding documentation is updated accordingly.
> 
> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> ---
>  Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 13 ++++++++++++-
>  arch/arm/boot/dts/armada-370-xp.dtsi                  |  2 --
>  arch/arm/boot/dts/armada-370.dtsi                     |  8 ++++++++
>  arch/arm/boot/dts/armada-xp.dtsi                      | 10 ++++++++++
>  4 files changed, 30 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> index a1ee681..ce7af6a 100644
> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> @@ -4,7 +4,8 @@
>  Required properties :
>  
>   - reg             : Offset and length of the register set for the device
> - - compatible      : Should be "marvell,mv64xxx-i2c"
> + - compatible      : Should be "marvell,mv64xxx-i2c" and "marvell,mv7230-i2c"
> +for controller which support the I2C Transaction Generator
>   - interrupts      : The interrupt number
>  
>  Optional properties :
> @@ -20,3 +21,13 @@ Examples:
>  		interrupts = <29>;
>  		clock-frequency = <100000>;
>  	};
> +
> +For a controller which support the I2C Transaction Generator:
> +
> +	i2c@11000 {
> +		compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
> +		reg = <0x11000 0x100>;
> +		compatible = "marvell,mv64xxx-i2c";

extra compatible line.  If there's nothing else, I'll fix this up when I
pull it in.

thx,

Jason.

> +		interrupts = <29>;
> +		clock-frequency = <100000>;
> +	};
> diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
> index 550eb77..b6f475c 100644
> --- a/arch/arm/boot/dts/armada-370-xp.dtsi
> +++ b/arch/arm/boot/dts/armada-370-xp.dtsi
> @@ -112,7 +112,6 @@
>  
>  			i2c0: i2c@11000 {
>  				compatible = "marvell,mv64xxx-i2c";
> -				reg = <0x11000 0x20>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
>  				interrupts = <31>;
> @@ -123,7 +122,6 @@
>  
>  			i2c1: i2c@11100 {
>  				compatible = "marvell,mv64xxx-i2c";
> -				reg = <0x11100 0x20>;
>  				#address-cells = <1>;
>  				#size-cells = <0>;
>  				interrupts = <32>;
> diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
> index aee2b18..39b26d6 100644
> --- a/arch/arm/boot/dts/armada-370.dtsi
> +++ b/arch/arm/boot/dts/armada-370.dtsi
> @@ -155,6 +155,14 @@
>  				};
>  			};
>  
> +			i2c0: i2c@11000 {
> +				reg = <0x11000 0x20>;
> +			};
> +
> +			i2c1: i2c@11100 {
> +				reg = <0x11100 0x20>;
> +			};
> +
>  			usb@50000 {
>  				clocks = <&coreclk 0>;
>  			};
> diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
> index 5b902f9..c2c357e 100644
> --- a/arch/arm/boot/dts/armada-xp.dtsi
> +++ b/arch/arm/boot/dts/armada-xp.dtsi
> @@ -134,6 +134,16 @@
>  				};
>  			};
>  
> +			i2c0: i2c@11000 {
> +				compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
> +				reg = <0x11000 0x100>;
> +			};
> +
> +			i2c1: i2c@11100 {
> +				compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
> +				reg = <0x11100 0x100>;
> +			};
> +
>  			usb@50000 {
>  				clocks = <&gateclk 18>;
>  			};
> -- 
> 1.8.1.2
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sebastian Hesselbarth June 21, 2013, 2:15 p.m. UTC | #2
On 06/21/13 16:07, Jason Cooper wrote:
> On Fri, Jun 21, 2013 at 03:32:09PM +0200, Gregory CLEMENT wrote:
>> 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 split the i2c information into armada-370.dtsi and
>> armada-xp.dtsi. Most of the data remains the same and stay in the
>> common file Armada-370-xp.dtsi. With this new feature the size of the
>> registers are bigger for Armada XP and the new compatible string is
>> used.
>>
>> The Device Tree binding documentation is updated accordingly.
>>
>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>> ---
>>   Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 13 ++++++++++++-
>>   arch/arm/boot/dts/armada-370-xp.dtsi                  |  2 --
>>   arch/arm/boot/dts/armada-370.dtsi                     |  8 ++++++++
>>   arch/arm/boot/dts/armada-xp.dtsi                      | 10 ++++++++++
>>   4 files changed, 30 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> index a1ee681..ce7af6a 100644
>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>> @@ -4,7 +4,8 @@
>>   Required properties :
>>
>>    - reg             : Offset and length of the register set for the device
>> - - compatible      : Should be "marvell,mv64xxx-i2c"
>> + - compatible      : Should be "marvell,mv64xxx-i2c" and "marvell,mv7230-i2c"
>> +for controller which support the I2C Transaction Generator

Jason, Gregory,

Also, s/mv7230/mv78230/

from a quick check of the patch set (which you forgot to send to LKML)
I am wondering why you didn't update the of matches struct with the new
compatible for "marvell,mv78230-i2c"? This will save you from still
having "marvell,mv64xxx-i2c" as additional compatible to match device
and driver. With that the above should also be s/and/or/.

>>    - interrupts      : The interrupt number
>>
>>   Optional properties :
>> @@ -20,3 +21,13 @@ Examples:
>>   		interrupts = <29>;
>>   		clock-frequency = <100000>;
>>   	};
>> +
>> +For a controller which support the I2C Transaction Generator:
>> +
>> +	i2c@11000 {
>> +		compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
>> +		reg = <0x11000 0x100>;
>> +		compatible = "marvell,mv64xxx-i2c";
>
> extra compatible line.  If there's nothing else, I'll fix this up when I
> pull it in.

--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gregory CLEMENT June 21, 2013, 2:23 p.m. UTC | #3
On 06/21/2013 04:15 PM, Sebastian Hesselbarth wrote:
> On 06/21/13 16:07, Jason Cooper wrote:
>> On Fri, Jun 21, 2013 at 03:32:09PM +0200, Gregory CLEMENT wrote:
>>> 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 split the i2c information into armada-370.dtsi and
>>> armada-xp.dtsi. Most of the data remains the same and stay in the
>>> common file Armada-370-xp.dtsi. With this new feature the size of the
>>> registers are bigger for Armada XP and the new compatible string is
>>> used.
>>>
>>> The Device Tree binding documentation is updated accordingly.
>>>
>>> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
>>> ---
>>>   Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 13 ++++++++++++-
>>>   arch/arm/boot/dts/armada-370-xp.dtsi                  |  2 --
>>>   arch/arm/boot/dts/armada-370.dtsi                     |  8 ++++++++
>>>   arch/arm/boot/dts/armada-xp.dtsi                      | 10 ++++++++++
>>>   4 files changed, 30 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> index a1ee681..ce7af6a 100644
>>> --- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> +++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
>>> @@ -4,7 +4,8 @@
>>>   Required properties :
>>>
>>>    - reg             : Offset and length of the register set for the device
>>> - - compatible      : Should be "marvell,mv64xxx-i2c"
>>> + - compatible      : Should be "marvell,mv64xxx-i2c" and "marvell,mv7230-i2c"
>>> +for controller which support the I2C Transaction Generator
> 
> Jason, Gregory,
> 
> Also, s/mv7230/mv78230/

You are right, thanks for both of you to notice it.

> 
> from a quick check of the patch set (which you forgot to send to LKML)
> I am wondering why you didn't update the of matches struct with the new
> compatible for "marvell,mv78230-i2c"? This will save you from still
> having "marvell,mv64xxx-i2c" as additional compatible to match device
> and driver. With that the above should also be s/and/or/.

From my point of view it is more an extension than an other kind of controller like
the one embedded in the AllWinner SoCs. So I thought it was more in the spirit of
the way you describe hardware in the device tree, but I am far for being an expert
so I maybe wrong.

> 
>>>    - interrupts      : The interrupt number
>>>
>>>   Optional properties :
>>> @@ -20,3 +21,13 @@ Examples:
>>>   		interrupts = <29>;
>>>   		clock-frequency = <100000>;
>>>   	};
>>> +
>>> +For a controller which support the I2C Transaction Generator:
>>> +
>>> +	i2c@11000 {
>>> +		compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
>>> +		reg = <0x11000 0x100>;
>>> +		compatible = "marvell,mv64xxx-i2c";
>>
>> extra compatible line.  If there's nothing else, I'll fix this up when I
>> pull it in.
>
Jason Cooper June 21, 2013, 2:56 p.m. UTC | #4
On Fri, Jun 21, 2013 at 04:15:29PM +0200, Sebastian Hesselbarth wrote:
> On 06/21/13 16:07, Jason Cooper wrote:
> >On Fri, Jun 21, 2013 at 03:32:09PM +0200, Gregory CLEMENT wrote:
> >>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 split the i2c information into armada-370.dtsi and
> >>armada-xp.dtsi. Most of the data remains the same and stay in the
> >>common file Armada-370-xp.dtsi. With this new feature the size of the
> >>registers are bigger for Armada XP and the new compatible string is
> >>used.
> >>
> >>The Device Tree binding documentation is updated accordingly.
> >>
> >>Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com>
> >>---
> >>  Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 13 ++++++++++++-
> >>  arch/arm/boot/dts/armada-370-xp.dtsi                  |  2 --
> >>  arch/arm/boot/dts/armada-370.dtsi                     |  8 ++++++++
> >>  arch/arm/boot/dts/armada-xp.dtsi                      | 10 ++++++++++
> >>  4 files changed, 30 insertions(+), 3 deletions(-)
> >>
> >>diff --git a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> >>index a1ee681..ce7af6a 100644
> >>--- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> >>+++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
> >>@@ -4,7 +4,8 @@
> >>  Required properties :
> >>
> >>   - reg             : Offset and length of the register set for the device
> >>- - compatible      : Should be "marvell,mv64xxx-i2c"
> >>+ - compatible      : Should be "marvell,mv64xxx-i2c" and "marvell,mv7230-i2c"
> >>+for controller which support the I2C Transaction Generator
> 
> Jason, Gregory,
> 
> Also, s/mv7230/mv78230/

noted.

> from a quick check of the patch set (which you forgot to send to LKML)
> I am wondering why you didn't update the of matches struct with the new
> compatible for "marvell,mv78230-i2c"? This will save you from still
> having "marvell,mv64xxx-i2c" as additional compatible to match device
> and driver. With that the above should also be s/and/or/.

agreed, good point.

Gregory,

I'm sending the last PRs for mvebu today.  I'll include this one with my
suggestion and Sebastian's if you're ok with it.  That means you'll have
to respin the series for the i2c folks.  Does that work for you?

thx,

Jason.

> >>   - interrupts      : The interrupt number
> >>
> >>  Optional properties :
> >>@@ -20,3 +21,13 @@ Examples:
> >>  		interrupts = <29>;
> >>  		clock-frequency = <100000>;
> >>  	};
> >>+
> >>+For a controller which support the I2C Transaction Generator:
> >>+
> >>+	i2c@11000 {
> >>+		compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
> >>+		reg = <0x11000 0x100>;
> >>+		compatible = "marvell,mv64xxx-i2c";
> >
> >extra compatible line.  If there's nothing else, I'll fix this up when I
> >pull it in.
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Wolfram Sang June 21, 2013, 3:03 p.m. UTC | #5
> > from a quick check of the patch set (which you forgot to send to LKML)
> > I am wondering why you didn't update the of matches struct with the new
> > compatible for "marvell,mv78230-i2c"? This will save you from still
> > having "marvell,mv64xxx-i2c" as additional compatible to match device
> > and driver. With that the above should also be s/and/or/.
> 
> agreed, good point.
> 
> Gregory,
> 
> I'm sending the last PRs for mvebu today.  I'll include this one with my
> suggestion and Sebastian's if you're ok with it.  That means you'll have
> to respin the series for the i2c folks.  Does that work for you?

No hurry, please. Most of the patches are 3.12 material anyhow, so we
can as well just wait until the I2C patches are okay and then update the
dts later.
Jason Cooper June 21, 2013, 3:06 p.m. UTC | #6
On Fri, Jun 21, 2013 at 05:03:23PM +0200, Wolfram Sang wrote:
> 
> > > from a quick check of the patch set (which you forgot to send to LKML)
> > > I am wondering why you didn't update the of matches struct with the new
> > > compatible for "marvell,mv78230-i2c"? This will save you from still
> > > having "marvell,mv64xxx-i2c" as additional compatible to match device
> > > and driver. With that the above should also be s/and/or/.
> > 
> > agreed, good point.
> > 
> > Gregory,
> > 
> > I'm sending the last PRs for mvebu today.  I'll include this one with my
> > suggestion and Sebastian's if you're ok with it.  That means you'll have
> > to respin the series for the i2c folks.  Does that work for you?
> 
> No hurry, please. Most of the patches are 3.12 material anyhow, so we
> can as well just wait until the I2C patches are okay and then update the
> dts later.

Ok, thanks for the heads up.  I'll put this in my v3.12 stack.

thx,

Jason.
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jason Gunthorpe June 21, 2013, 5:18 p.m. UTC | #7
On Fri, Jun 21, 2013 at 04:15:29PM +0200, Sebastian Hesselbarth wrote:

> from a quick check of the patch set (which you forgot to send to LKML)
> I am wondering why you didn't update the of matches struct with the new
> compatible for "marvell,mv78230-i2c"? This will save you from still
> having "marvell,mv64xxx-i2c" as additional compatible to match device
> and driver. With that the above should also be s/and/or/.

Agree, I noticed the same things.

Alos, the compatible string should be:

  compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";

(note the order reversal, most specific is first)

and I think it is better to use the 'data' field of of_device_id than
a of_is_compatible call. The former is sensitive to order of the
compatible string, the latter is not.

Jason
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Sebastian Hesselbarth June 22, 2013, 4:14 p.m. UTC | #8
On 06/21/2013 07:18 PM, Jason Gunthorpe wrote:
> On Fri, Jun 21, 2013 at 04:15:29PM +0200, Sebastian Hesselbarth wrote:
>> from a quick check of the patch set (which you forgot to send to LKML)
>> I am wondering why you didn't update the of matches struct with the new
>> compatible for "marvell,mv78230-i2c"? This will save you from still
>> having "marvell,mv64xxx-i2c" as additional compatible to match device
>> and driver. With that the above should also be s/and/or/.
>
> Agree, I noticed the same things.
>
> Alos, the compatible string should be:
>
>    compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
>
> (note the order reversal, most specific is first)

Actually, I suggest to use "marvell,mv78230-i2c" alone. With a new
entry in the match table it will be sufficient for matching driver and
device. BTW, is mv78230 sufficient to match all SoC variants having
this feature? Maybe mv78xx0 but that could interfere with Discovery
Innovation or even better armada-xp-i2c (or armada-370-i2c)?

> and I think it is better to use the 'data' field of of_device_id than
> a of_is_compatible call. The former is sensitive to order of the
> compatible string, the latter is not.

IMHO as long as there is only one compatible and only a bool to set,
using of_device_is_compatible without data pointer is fine here.
IIRC sunxi i2c isn't using data pointer the different register offset
struct, so we shouldn't for a simple bool. And casting a bool to
(void *) looks awkward.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-i2c" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Gregory CLEMENT June 24, 2013, 9:54 a.m. UTC | #9
On 06/22/2013 06:14 PM, Sebastian Hesselbarth wrote:
> On 06/21/2013 07:18 PM, Jason Gunthorpe wrote:
>> On Fri, Jun 21, 2013 at 04:15:29PM +0200, Sebastian Hesselbarth wrote:
>>> from a quick check of the patch set (which you forgot to send to LKML)
>>> I am wondering why you didn't update the of matches struct with the new
>>> compatible for "marvell,mv78230-i2c"? This will save you from still
>>> having "marvell,mv64xxx-i2c" as additional compatible to match device
>>> and driver. With that the above should also be s/and/or/.
>>
>> Agree, I noticed the same things.
>>
>> Alos, the compatible string should be:
>>
>>    compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
>>
>> (note the order reversal, most specific is first)
> 
> Actually, I suggest to use "marvell,mv78230-i2c" alone. With a new
> entry in the match table it will be sufficient for matching driver and

I would prefer using a specialization rather than a new entry, so I can just
use the "marvell,mv64xxx-i2c" entry for the data pointer .

> device. BTW, is mv78230 sufficient to match all SoC variants having
> this feature? Maybe mv78xx0 but that could interfere with Discovery
> Innovation or even better armada-xp-i2c (or armada-370-i2c)?

I am pretty sure that the convention in the device tree is to always use
specific product numbers, rather than wildcards. So, here, the choice of
mv78230 was just that we can see the mv78260 and mv78460 as extension of
the mv78230, so I chose the smallest common denominator.

> 
>> and I think it is better to use the 'data' field of of_device_id than
>> a of_is_compatible call. The former is sensitive to order of the
>> compatible string, the latter is not.
> 
> IMHO as long as there is only one compatible and only a bool to set,
> using of_device_is_compatible without data pointer is fine here.
> IIRC sunxi i2c isn't using data pointer the different register offset
> struct, so we shouldn't for a simple bool. And casting a bool to
> (void *) looks awkward.
> 
> Sebastian
> --
> To unsubscribe from this list: send the line "unsubscribe linux-i2c" 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/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
index a1ee681..ce7af6a 100644
--- a/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
+++ b/Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt
@@ -4,7 +4,8 @@ 
 Required properties :
 
  - reg             : Offset and length of the register set for the device
- - compatible      : Should be "marvell,mv64xxx-i2c"
+ - compatible      : Should be "marvell,mv64xxx-i2c" and "marvell,mv7230-i2c"
+for controller which support the I2C Transaction Generator
  - interrupts      : The interrupt number
 
 Optional properties :
@@ -20,3 +21,13 @@  Examples:
 		interrupts = <29>;
 		clock-frequency = <100000>;
 	};
+
+For a controller which support the I2C Transaction Generator:
+
+	i2c@11000 {
+		compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
+		reg = <0x11000 0x100>;
+		compatible = "marvell,mv64xxx-i2c";
+		interrupts = <29>;
+		clock-frequency = <100000>;
+	};
diff --git a/arch/arm/boot/dts/armada-370-xp.dtsi b/arch/arm/boot/dts/armada-370-xp.dtsi
index 550eb77..b6f475c 100644
--- a/arch/arm/boot/dts/armada-370-xp.dtsi
+++ b/arch/arm/boot/dts/armada-370-xp.dtsi
@@ -112,7 +112,6 @@ 
 
 			i2c0: i2c@11000 {
 				compatible = "marvell,mv64xxx-i2c";
-				reg = <0x11000 0x20>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				interrupts = <31>;
@@ -123,7 +122,6 @@ 
 
 			i2c1: i2c@11100 {
 				compatible = "marvell,mv64xxx-i2c";
-				reg = <0x11100 0x20>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				interrupts = <32>;
diff --git a/arch/arm/boot/dts/armada-370.dtsi b/arch/arm/boot/dts/armada-370.dtsi
index aee2b18..39b26d6 100644
--- a/arch/arm/boot/dts/armada-370.dtsi
+++ b/arch/arm/boot/dts/armada-370.dtsi
@@ -155,6 +155,14 @@ 
 				};
 			};
 
+			i2c0: i2c@11000 {
+				reg = <0x11000 0x20>;
+			};
+
+			i2c1: i2c@11100 {
+				reg = <0x11100 0x20>;
+			};
+
 			usb@50000 {
 				clocks = <&coreclk 0>;
 			};
diff --git a/arch/arm/boot/dts/armada-xp.dtsi b/arch/arm/boot/dts/armada-xp.dtsi
index 5b902f9..c2c357e 100644
--- a/arch/arm/boot/dts/armada-xp.dtsi
+++ b/arch/arm/boot/dts/armada-xp.dtsi
@@ -134,6 +134,16 @@ 
 				};
 			};
 
+			i2c0: i2c@11000 {
+				compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
+				reg = <0x11000 0x100>;
+			};
+
+			i2c1: i2c@11100 {
+				compatible = "marvell,mv64xxx-i2c", "marvell,mv78230-i2c";
+				reg = <0x11100 0x100>;
+			};
+
 			usb@50000 {
 				clocks = <&gateclk 18>;
 			};