Skip to contentSkip to conversation

i2c: sunxi: Change compatibles pattern

PATCH Superseded Maxime Ripard 2 participants 9 messages Feb 6, 2014 – Feb 14, 2014

Subsystems (4)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

v2 cover i2c: sunxi: Change compatibles pattern

Hi,

This is the second version of the i2c compatible changes.
The only difference with the v1 being that we're now droping the old compatibles, instead of keeping them, since the DT maintainers said it was fine.

Thanks,
Maxime

Maxime Ripard (2):
i2c: sunxi: Change i2c compatibles
ARM: sunxi: dt: Convert to the new i2c compatibles

 Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt |  2 +-
 arch/arm/boot/dts/sun4i-a10.dtsi                      |  6 +++---
 arch/arm/boot/dts/sun5i-a10s.dtsi                     |  6 +++---
 arch/arm/boot/dts/sun5i-a13.dtsi                      |  6 +++---
 arch/arm/boot/dts/sun7i-a20.dtsi                      | 10 +++++-----
 drivers/i2c/busses/i2c-mv64xxx.c                      |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)
Signature · 1 line
1.8.4.2
#1 lore raw

PATCH v2 1/2 i2c: sunxi: Change i2c compatibles

The Allwinner A10 compatibles were following a slightly different compatible patterns than the rest of the SoCs for historical reasons. Move to the other pattern for consistency across all Allwinner Socs.

---
 Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt | 2 +-
 drivers/i2c/busses/i2c-mv64xxx.c                      | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/i2c/i2c-mv64xxx.txt +1 -1
index 582b465..5f4c0c8 100644
@@ -4,7 +4,7 @@
 Required properties :
 
  - reg             : Offset and length of the register set for the device
- - compatible      : Should be "marvell,mv64xxx-i2c" or "allwinner,sun4i-i2c"
+ - compatible      : Should be "marvell,mv64xxx-i2c" or "allwinner,sun4i-a10-i2c"
                      or "marvell,mv78230-i2c" or "marvell,mv78230-a0-i2c"
                      Note: Only use "marvell,mv78230-a0-i2c" for a very rare,
                      initial version of the SoC which had broken offload
drivers/i2c/busses/i2c-mv64xxx.c +1 -1
index b8c5187..eb72301 100644
@@ -689,7 +689,7 @@ static const struct i2c_algorithm mv64xxx_i2c_algo = {
  *****************************************************************************
  */
 static const struct of_device_id mv64xxx_i2c_of_match_table[] = {
-	{ .compatible = "allwinner,sun4i-i2c", .data = &mv64xxx_i2c_regs_sun4i},
+	{ .compatible = "allwinner,sun4i-a10-i2c", .data = &mv64xxx_i2c_regs_sun4i},
 	{ .compatible = "marvell,mv64xxx-i2c", .data = &mv64xxx_i2c_regs_mv64xxx},
 	{ .compatible = "marvell,mv78230-i2c", .data = &mv64xxx_i2c_regs_mv64xxx},
 	{ .compatible = "marvell,mv78230-a0-i2c", .data = &mv64xxx_i2c_regs_mv64xxx},
Signature · 1 line
1.8.4.2
#2 lore raw

PATCH v2 2/2 ARM: sunxi: dt: Convert to the new i2c compatibles

In reply to Maxime Ripard

Switch the device tree to the new compatibles introduced in the i2c drivers to have a common pattern accross all Allwinner SoCs.

---
 arch/arm/boot/dts/sun4i-a10.dtsi  |  6 +++---
 arch/arm/boot/dts/sun5i-a10s.dtsi |  6 +++---
 arch/arm/boot/dts/sun5i-a13.dtsi  |  6 +++---
 arch/arm/boot/dts/sun7i-a20.dtsi  | 10 +++++-----
 4 files changed, 14 insertions(+), 14 deletions(-)
arch/arm/boot/dts/sun4i-a10.dtsi +3 -3
index 28273f9..ac65c8a 100644
@@ -518,7 +518,7 @@
 		};
 
 		i2c0: i2c at 01c2ac00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2ac00 0x400>;
 			interrupts = <7>;
 			clocks = <&apb1_gates 0>;
@@ -527,7 +527,7 @@
 		};
 
 		i2c1: i2c at 01c2b000 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b000 0x400>;
 			interrupts = <8>;
 			clocks = <&apb1_gates 1>;
@@ -536,7 +536,7 @@
 		};
 
 		i2c2: i2c at 01c2b400 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b400 0x400>;
 			interrupts = <9>;
 			clocks = <&apb1_gates 2>;
arch/arm/boot/dts/sun5i-a10s.dtsi +3 -3
index 2318082..a2005c7 100644
@@ -435,7 +435,7 @@
 		i2c0: i2c at 01c2ac00 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2ac00 0x400>;
 			interrupts = <7>;
 			clocks = <&apb1_gates 0>;
@@ -446,7 +446,7 @@
 		i2c1: i2c at 01c2b000 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b000 0x400>;
 			interrupts = <8>;
 			clocks = <&apb1_gates 1>;
@@ -457,7 +457,7 @@
 		i2c2: i2c at 01c2b400 {
 			#address-cells = <1>;
 			#size-cells = <0>;
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b400 0x400>;
 			interrupts = <9>;
 			clocks = <&apb1_gates 2>;
arch/arm/boot/dts/sun5i-a13.dtsi +3 -3
index 6de40b6..537072c 100644
@@ -377,7 +377,7 @@
 		};
 
 		i2c0: i2c at 01c2ac00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2ac00 0x400>;
 			interrupts = <7>;
 			clocks = <&apb1_gates 0>;
@@ -386,7 +386,7 @@
 		};
 
 		i2c1: i2c at 01c2b000 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b000 0x400>;
 			interrupts = <8>;
 			clocks = <&apb1_gates 1>;
@@ -395,7 +395,7 @@
 		};
 
 		i2c2: i2c at 01c2b400 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b400 0x400>;
 			interrupts = <9>;
 			clocks = <&apb1_gates 2>;
arch/arm/boot/dts/sun7i-a20.dtsi +5 -5
index bfb2cf2..ec4463f 100644
@@ -564,7 +564,7 @@
 		};
 
 		i2c0: i2c at 01c2ac00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2ac00 0x400>;
 			interrupts = <0 7 4>;
 			clocks = <&apb1_gates 0>;
@@ -573,7 +573,7 @@
 		};
 
 		i2c1: i2c at 01c2b000 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b000 0x400>;
 			interrupts = <0 8 4>;
 			clocks = <&apb1_gates 1>;
@@ -582,7 +582,7 @@
 		};
 
 		i2c2: i2c at 01c2b400 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b400 0x400>;
 			interrupts = <0 9 4>;
 			clocks = <&apb1_gates 2>;
@@ -591,7 +591,7 @@
 		};
 
 		i2c3: i2c at 01c2b800 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b800 0x400>;
 			interrupts = <0 88 4>;
 			clocks = <&apb1_gates 3>;
@@ -600,7 +600,7 @@
 		};
 
 		i2c4: i2c at 01c2bc00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2bc00 0x400>;
 			interrupts = <0 89 4>;
 			clocks = <&apb1_gates 15>;
Signature · 1 line
1.8.4.2
#3 lore raw

PATCH v2 2/2 ARM: sunxi: dt: Convert to the new i2c compatibles

Why is the devicetree list not on CC? (Added now)

Quoted 16 lines · Maxime Ripard

Switch the device tree to the new compatibles introduced in the i2c drivers to have a common pattern accross all Allwinner SoCs.

---
 arch/arm/boot/dts/sun4i-a10.dtsi  |  6 +++---
 arch/arm/boot/dts/sun5i-a10s.dtsi |  6 +++---
 arch/arm/boot/dts/sun5i-a13.dtsi  |  6 +++---
 arch/arm/boot/dts/sun7i-a20.dtsi  | 10 +++++-----
 4 files changed, 14 insertions(+), 14 deletions(-)
arch/arm/boot/dts/sun4i-a10.dtsi +0 -0
index 28273f9..ac65c8a 100644

arch/arm/boot/dts/sun4i-a10.dtsi line 521

Quoted 5 lines
arch/arm/boot/dts/sun4i-a10.dtsi +1 -1
@@ -518,7 +518,7 @@
 		};
 
 		i2c0: i2c at 01c2ac00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";

Can't we have:

	compatible = "allwinner,sun4i-a10-i2c", "allwinner,sun4i-i2c";

? And keep the old "allwinner,sun4i-i2c" and extend it with a SoC specific a10 compatible entry when a distinction is needed?

arch/arm/boot/dts/sun5i-a13.dtsi line 380

Quoted 10 lines
arch/arm/boot/dts/sun5i-a13.dtsi +1 -1
index 6de40b6..537072c 100644
@@ -377,7 +377,7 @@
 		};
 
 		i2c0: i2c at 01c2ac00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";

For non-a10, That should be at least

	compatible = "allwinner,sun4i-a13-i2c", "allwinner,sun4i-a10-i2c";

or

	compatible = "allwinner,sun4i-a13-i2c", "allwinner,sun4i-i2c";

depending on the outcome above.

Or is my knowledge outdated already?

-------------- 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/20140213/a0ffedbe/attachment.sig>

#4 lore raw

PATCH v2 2/2 ARM: sunxi: dt: Convert to the new i2c compatibles

Quoted 28 lines · Wolfram Sang

Why is the devicetree list not on CC? (Added now)

Quoted 16 lines · Maxime Ripard

Switch the device tree to the new compatibles introduced in the i2c drivers to have a common pattern accross all Allwinner SoCs.

---
 arch/arm/boot/dts/sun4i-a10.dtsi  |  6 +++---
 arch/arm/boot/dts/sun5i-a10s.dtsi |  6 +++---
 arch/arm/boot/dts/sun5i-a13.dtsi  |  6 +++---
 arch/arm/boot/dts/sun7i-a20.dtsi  | 10 +++++-----
 4 files changed, 14 insertions(+), 14 deletions(-)
arch/arm/boot/dts/sun4i-a10.dtsi +0 -0
index 28273f9..ac65c8a 100644

arch/arm/boot/dts/sun4i-a10.dtsi line 521

Quoted 5 lines
arch/arm/boot/dts/sun4i-a10.dtsi +1 -1
@@ -518,7 +518,7 @@
 		};
 
 		i2c0: i2c at 01c2ac00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";

Can't we have:

Quoted 4 lines
	compatible = "allwinner,sun4i-a10-i2c", "allwinner,sun4i-i2c";

? And keep the old "allwinner,sun4i-i2c" and extend it with a SoC specific a10 compatible entry when a distinction is needed?

Actually, the two are exactly equivalent. The point is that the compatible naming scheme doesn't follow what we are using (which is <family>-<soc>-i2c), so we wan't to get rid of the old naming scheme all together.

Quoted 15 lines

arch/arm/boot/dts/sun5i-a13.dtsi line 380

Quoted 10 lines
arch/arm/boot/dts/sun5i-a13.dtsi +1 -1
index 6de40b6..537072c 100644
@@ -377,7 +377,7 @@
 		};
 
 		i2c0: i2c at 01c2ac00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";

For non-a10, That should be at least

	compatible = "allwinner,sun4i-a13-i2c", "allwinner,sun4i-a10-i2c";
Quoted 8 lines

or

	compatible = "allwinner,sun4i-a13-i2c", "allwinner,sun4i-i2c";

depending on the outcome above.

Or is my knowledge outdated already?

Since they are strictly compatible, we don't need to introduce any different compatible string here.

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- 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/20140213/e625a811/attachment.sig>
#5 lore raw

PATCH v2 2/2 ARM: sunxi: dt: Convert to the new i2c compatibles

Quoted 9 lines
Quoted 9 lines

For non-a10, That should be at least

	compatible = "allwinner,sun4i-a13-i2c", "allwinner,sun4i-a10-i2c";

or

	compatible = "allwinner,sun4i-a13-i2c", "allwinner,sun4i-i2c";
Quoted 7 lines
Quoted 4 lines

depending on the outcome above.

Or is my knowledge outdated already?

Since they are strictly compatible, we don't need to introduce any different compatible string here.

You never know all errata in advance. From what I know, one should always use the specfic naming first, and then the generic fallback. So, in case a distinction is needed later (think errata), then one doesn't need to change the devicetrees.

-------------- 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/20140214/23f31104/attachment.sig>

#6 lore raw

PATCH v2 2/2 ARM: sunxi: dt: Convert to the new i2c compatibles

Quoted 14 lines · Wolfram Sang
Quoted 14 lines
Quoted 13 lines

For non-a10, That should be at least

	compatible = "allwinner,sun4i-a13-i2c", "allwinner,sun4i-a10-i2c";

or

	compatible = "allwinner,sun4i-a13-i2c", "allwinner,sun4i-i2c";

depending on the outcome above.

Or is my knowledge outdated already?

Quoted 8 lines
Quoted 2 lines

Since they are strictly compatible, we don't need to introduce any different compatible string here.

You never know all errata in advance. From what I know, one should always use the specfic naming first, and then the generic fallback. So, in case a distinction is needed later (think errata), then one doesn't need to change the devicetrees.

And adding a A13-specific compatible wouldn't change anything, because it does work on at least one revision of them, so if you'd have to deal with an errata, you'd have to introduce a new compatible for this revision only anyway.

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- 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/20140214/357283a9/attachment.sig>
#7 lore raw

v2 cover i2c: sunxi: Change compatibles pattern

In reply to Maxime Ripard
Quoted 5 lines

This is the second version of the i2c compatible changes.
The only difference with the v1 being that we're now droping the old compatibles, instead of keeping them, since the DT maintainers said it was fine.

Please provide a pointer to that discussion.

-------------- 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/20140213/34f6179e/attachment.sig>

#8 lore raw

v2 cover i2c: sunxi: Change compatibles pattern

Quoted 8 lines · Wolfram Sang
Quoted 5 lines

This is the second version of the i2c compatible changes.
The only difference with the v1 being that we're now droping the old compatibles, instead of keeping them, since the DT maintainers said it was fine.

Please provide a pointer to that discussion.

http://lists.infradead.org/pipermail/linux-arm-kernel/2014-February/229438.html

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
-------------- 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/20140213/5f8a90e9/attachment.sig>