Skip to contentSkip to conversation

ARM: dts: mvebu: Introduce a new compatible string for mv64xxx-i2c

PATCH Superseded Gregory CLEMENT 3 participants 7 messages Aug 22, 2013 – Sep 3, 2013

Subsystems (2)

v6 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
#0 lore raw

PATCH v6 3/4 ARM: dts: mvebu: Introduce a new compatible string for mv64xxx-i2c

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.

---
 Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 11 +++++++++++
 1 file changed, 11 insertions(+)
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +11 -0
index 6113f92..aeff1e2 100644
@@ -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 at 11000 {
+		compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+		reg = <0x11000 0x100>;
+		interrupts = <29>;
+		clock-frequency = <100000>;
+	};
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH v6 4/4 ARM: dts: mvebu: Update with the new compatible string for mv64xxx-i2c

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.

---
 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 ++++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-370-xp.dtsi +0 -2
index 90b1176..d8b24c9 100644
@@ -121,7 +121,6 @@
 
 			i2c0: i2c at 11000 {
 				compatible = "marvell,mv64xxx-i2c";
-				reg = <0x11000 0x20>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				interrupts = <31>;
@@ -132,7 +131,6 @@
 
 			i2c1: i2c at 11100 {
 				compatible = "marvell,mv64xxx-i2c";
-				reg = <0x11100 0x20>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				interrupts = <32>;
arch/arm/boot/dts/armada-370.dtsi +8 -0
index fa3dfc6..0e2eefa 100644
@@ -155,6 +155,14 @@
 				};
 			};
 
+			i2c0: i2c at 11000 {
+				reg = <0x11000 0x20>;
+			};
+
+			i2c1: i2c at 11100 {
+				reg = <0x11100 0x20>;
+			};
+
 			usb at 50000 {
 				clocks = <&coreclk 0>;
 			};
arch/arm/boot/dts/armada-xp.dtsi +10 -0
index 416eb94..e1f2547 100644
@@ -138,6 +138,16 @@
 				};
 			};
 
+			i2c0: i2c at 11000 {
+				compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+				reg = <0x11000 0x100>;
+			};
+
+			i2c1: i2c at 11100 {
+				compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+				reg = <0x11100 0x100>;
+			};
+
 			usb at 50000 {
 				clocks = <&gateclk 18>;
 			};
Signature · 1 line
1.8.1.2
#2 lore raw

PATCH v6 4/4 ARM: dts: mvebu: Update with the new compatible string for mv64xxx-i2c

Hi Jason,

Unless I missed it I didn't see this patch in your last pull request. Wolfram took the 3 others patches and Mark Rutland agreed with the binding introduced in the patch 3. So I think we are fine to take this patch in mvebu.

Thanks,

Quoted 79 lines · Gregory CLEMENT

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.

---
 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 ++++++++++
 3 files changed, 18 insertions(+), 2 deletions(-)
arch/arm/boot/dts/armada-370-xp.dtsi +0 -2
index 90b1176..d8b24c9 100644
@@ -121,7 +121,6 @@
 
 			i2c0: i2c at 11000 {
 				compatible = "marvell,mv64xxx-i2c";
-				reg = <0x11000 0x20>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				interrupts = <31>;
@@ -132,7 +131,6 @@
 
 			i2c1: i2c at 11100 {
 				compatible = "marvell,mv64xxx-i2c";
-				reg = <0x11100 0x20>;
 				#address-cells = <1>;
 				#size-cells = <0>;
 				interrupts = <32>;
arch/arm/boot/dts/armada-370.dtsi +8 -0
index fa3dfc6..0e2eefa 100644
@@ -155,6 +155,14 @@
 				};
 			};
 
+			i2c0: i2c at 11000 {
+				reg = <0x11000 0x20>;
+			};
+
+			i2c1: i2c at 11100 {
+				reg = <0x11100 0x20>;
+			};
+
 			usb at 50000 {
 				clocks = <&coreclk 0>;
 			};
arch/arm/boot/dts/armada-xp.dtsi +10 -0
index 416eb94..e1f2547 100644
@@ -138,6 +138,16 @@
 				};
 			};
 
+			i2c0: i2c at 11000 {
+				compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+				reg = <0x11000 0x100>;
+			};
+
+			i2c1: i2c at 11100 {
+				compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+				reg = <0x11100 0x100>;
+			};
+
 			usb at 50000 {
 				clocks = <&gateclk 18>;
 			};
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
#3 lore raw

PATCH v6 4/4 ARM: dts: mvebu: Update with the new compatible string for mv64xxx-i2c

Quoted 6 lines · Gregory CLEMENT

Hi Jason,

Unless I missed it I didn't see this patch in your last pull request. Wolfram took the 3 others patches and Mark Rutland agreed with the binding introduced in the patch 3. So I think we are fine to take this patch in mvebu.

Ahh, good. Thanks for keeping an eye on this. I'll submit a PR tonight or tomorrow. And for the couple of patches remaining in mvebu/fixes-non-critical...

thx,

Jason.

#4 lore raw

PATCH v6 4/4 ARM: dts: mvebu: Update with the new compatible string for mv64xxx-i2c

In reply to Gregory CLEMENT
Quoted 6 lines · Gregory CLEMENT

Hi Jason,

Unless I missed it I didn't see this patch in your last pull request. Wolfram took the 3 others patches and Mark Rutland agreed with the binding introduced in the patch 3. So I think we are fine to take this patch in mvebu.

Ok, I had dropped it before until the dust settled. I've re-applied it and will be sending the last pull shortly.

thx,

Jason.

#5 lore raw

PATCH v6 3/4 ARM: dts: mvebu: Introduce a new compatible string for mv64xxx-i2c

In reply to Gregory CLEMENT

Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt Required properties : · line 9

Quoted 9 lines
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +2 -0
@@ -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.

Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt Examples: · line 26

Quoted 1 line
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +1 -0
+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.

Quoted 10 lines
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +7 -0
+
+	i2c at 11000 {
+		compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+		reg = <0x11000 0x100>;
+		interrupts = <29>;
+		clock-frequency = <100000>;
+	};
Signature · 1 line
1.8.1.2

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20130822/bf59dad4/attachment.sig>

#6 lore raw

PATCH v6 3/4 ARM: dts: mvebu: Introduce a new compatible string for mv64xxx-i2c

Quoted 13 lines · Wolfram Sang

Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt Required properties : · line 9

Quoted 9 lines
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +2 -0
@@ -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:

(quoted diff) +1 -0
+			or "marvell,mv7230-i2c".
Quoted 8 lines

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

Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt Examples: · line 26

Quoted 1 line
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +1 -0
+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,

Quoted 11 lines
Quoted 11 lines
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +7 -0
+
+	i2c at 11000 {
+		compatible = "marvell,mv78230-i2c", "marvell,mv64xxx-i2c";
+		reg = <0x11000 0x100>;
+		interrupts = <29>;
+		clock-frequency = <100000>;
+	};
Signature · 1 line
1.8.1.2
Signature · 4 lines
Gregory Clement, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com