diff mbox

[v2,2/2] ARM: sunxi: dt: Convert to the new i2c compatibles

Message ID 1391680285-16668-3-git-send-email-maxime.ripard@free-electrons.com
State Superseded
Headers show

Commit Message

Maxime Ripard Feb. 6, 2014, 9:51 a.m. UTC
Switch the device tree to the new compatibles introduced in the i2c drivers
to have a common pattern accross all Allwinner SoCs.

Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
---
 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(-)

Comments

Wolfram Sang Feb. 13, 2014, 8:26 a.m. UTC | #1
Why is the devicetree list not on CC? (Added now)

On Thu, Feb 06, 2014 at 10:51:25AM +0100, Maxime Ripard wrote:
> Switch the device tree to the new compatibles introduced in the i2c drivers
> to have a common pattern accross all Allwinner SoCs.
> 
> Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> ---
>  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(-)
> 
> diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
> index 28273f9..ac65c8a 100644
> --- a/arch/arm/boot/dts/sun4i-a10.dtsi
> +++ b/arch/arm/boot/dts/sun4i-a10.dtsi
> @@ -518,7 +518,7 @@
>  		};
>  
>  		i2c0: i2c@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?

> diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
> index 6de40b6..537072c 100644
> --- a/arch/arm/boot/dts/sun5i-a13.dtsi
> +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
> @@ -377,7 +377,7 @@
>  		};
>  
>  		i2c0: i2c@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?
Maxime Ripard Feb. 13, 2014, 10:52 p.m. UTC | #2
On Thu, Feb 13, 2014 at 09:26:30AM +0100, Wolfram Sang wrote:
> 
> Why is the devicetree list not on CC? (Added now)
> 
> On Thu, Feb 06, 2014 at 10:51:25AM +0100, Maxime Ripard wrote:
> > Switch the device tree to the new compatibles introduced in the i2c drivers
> > to have a common pattern accross all Allwinner SoCs.
> > 
> > Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
> > ---
> >  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(-)
> > 
> > diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
> > index 28273f9..ac65c8a 100644
> > --- a/arch/arm/boot/dts/sun4i-a10.dtsi
> > +++ b/arch/arm/boot/dts/sun4i-a10.dtsi
> > @@ -518,7 +518,7 @@
> >  		};
> >  
> >  		i2c0: i2c@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?

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.

> > diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
> > index 6de40b6..537072c 100644
> > --- a/arch/arm/boot/dts/sun5i-a13.dtsi
> > +++ b/arch/arm/boot/dts/sun5i-a13.dtsi
> > @@ -377,7 +377,7 @@
> >  		};
> >  
> >  		i2c0: i2c@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?
> 

Since they are strictly compatible, we don't need to introduce any
different compatible string here.
Wolfram Sang Feb. 14, 2014, 7:44 a.m. UTC | #3
> > 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?
> > 
> 
> 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.
Maxime Ripard Feb. 14, 2014, 8:36 p.m. UTC | #4
On Fri, Feb 14, 2014 at 08:44:07AM +0100, Wolfram Sang wrote:
> 
> > > 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?
> > > 
> > 
> > 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.
diff mbox

Patch

diff --git a/arch/arm/boot/dts/sun4i-a10.dtsi b/arch/arm/boot/dts/sun4i-a10.dtsi
index 28273f9..ac65c8a 100644
--- a/arch/arm/boot/dts/sun4i-a10.dtsi
+++ b/arch/arm/boot/dts/sun4i-a10.dtsi
@@ -518,7 +518,7 @@ 
 		};
 
 		i2c0: i2c@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@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@01c2b400 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b400 0x400>;
 			interrupts = <9>;
 			clocks = <&apb1_gates 2>;
diff --git a/arch/arm/boot/dts/sun5i-a10s.dtsi b/arch/arm/boot/dts/sun5i-a10s.dtsi
index 2318082..a2005c7 100644
--- a/arch/arm/boot/dts/sun5i-a10s.dtsi
+++ b/arch/arm/boot/dts/sun5i-a10s.dtsi
@@ -435,7 +435,7 @@ 
 		i2c0: i2c@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@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@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>;
diff --git a/arch/arm/boot/dts/sun5i-a13.dtsi b/arch/arm/boot/dts/sun5i-a13.dtsi
index 6de40b6..537072c 100644
--- a/arch/arm/boot/dts/sun5i-a13.dtsi
+++ b/arch/arm/boot/dts/sun5i-a13.dtsi
@@ -377,7 +377,7 @@ 
 		};
 
 		i2c0: i2c@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@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@01c2b400 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2b400 0x400>;
 			interrupts = <9>;
 			clocks = <&apb1_gates 2>;
diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi
index bfb2cf2..ec4463f 100644
--- a/arch/arm/boot/dts/sun7i-a20.dtsi
+++ b/arch/arm/boot/dts/sun7i-a20.dtsi
@@ -564,7 +564,7 @@ 
 		};
 
 		i2c0: i2c@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@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@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@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@01c2bc00 {
-			compatible = "allwinner,sun4i-i2c";
+			compatible = "allwinner,sun4i-a10-i2c";
 			reg = <0x01c2bc00 0x400>;
 			interrupts = <0 89 4>;
 			clocks = <&apb1_gates 15>;