Skip to contentSkip to conversation

ARM: dts: imx: Remove unneeded unit-addresses

PATCH New Fabio Estevam 5 participants 7 messages May 3, 2016 – Jun 6, 2016

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: imx: Remove unneeded unit-addresses

Building with W=1 option leads to several warnings like:

Warning (unit_address_vs_reg): Node /soc/aips-bus at 02000000/anatop at 020c8000/regulator-1p1 at 110 has a unit name, but no reg property

Fix them by removing the unneeded unit-addresses.

---
 arch/arm/boot/dts/imx6sl.dtsi | 12 ++++++------
 arch/arm/boot/dts/imx6sx.dtsi | 12 ++++++------
 arch/arm/boot/dts/imx6ul.dtsi |  6 +++---
 arch/arm/boot/dts/imx7d.dtsi  |  2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)
arch/arm/boot/dts/imx6sl.dtsi +6 -6
index d12b250..224c0d0 100644
@@ -461,7 +461,7 @@
 					     <0 54 IRQ_TYPE_LEVEL_HIGH>,
 					     <0 127 IRQ_TYPE_LEVEL_HIGH>;
 
-				regulator-1p1 at 110 {
+				regulator-1p1 {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vdd1p1";
 					regulator-min-microvolt = <800000>;
@@ -475,7 +475,7 @@
 					anatop-max-voltage = <1375000>;
 				};
 
-				regulator-3p0 at 120 {
+				regulator-3p0 {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vdd3p0";
 					regulator-min-microvolt = <2800000>;
@@ -489,7 +489,7 @@
 					anatop-max-voltage = <3400000>;
 				};
 
-				regulator-2p5 at 130 {
+				regulator-2p5 {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vdd2p5";
 					regulator-min-microvolt = <2100000>;
@@ -503,7 +503,7 @@
 					anatop-max-voltage = <2850000>;
 				};
 
-				reg_arm: regulator-vddcore at 140 {
+				reg_arm: regulator-vddcore {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vddarm";
 					regulator-min-microvolt = <725000>;
@@ -520,7 +520,7 @@
 					anatop-max-voltage = <1450000>;
 				};
 
-				reg_pu: regulator-vddpu at 140 {
+				reg_pu: regulator-vddpu {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vddpu";
 					regulator-min-microvolt = <725000>;
@@ -537,7 +537,7 @@
 					anatop-max-voltage = <1450000>;
 				};
 
-				reg_soc: regulator-vddsoc at 140 {
+				reg_soc: regulator-vddsoc {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vddsoc";
 					regulator-min-microvolt = <725000>;
arch/arm/boot/dts/imx6sx.dtsi +6 -6
index 6a993bfda..2863c52 100644
@@ -547,7 +547,7 @@
 					     <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
 					     <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
 
-				regulator-1p1 at 110 {
+				regulator-1p1 {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vdd1p1";
 					regulator-min-microvolt = <800000>;
@@ -561,7 +561,7 @@
 					anatop-max-voltage = <1375000>;
 				};
 
-				regulator-3p0 at 120 {
+				regulator-3p0 {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vdd3p0";
 					regulator-min-microvolt = <2800000>;
@@ -575,7 +575,7 @@
 					anatop-max-voltage = <3400000>;
 				};
 
-				regulator-2p5 at 130 {
+				regulator-2p5 {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vdd2p5";
 					regulator-min-microvolt = <2100000>;
@@ -589,7 +589,7 @@
 					anatop-max-voltage = <2875000>;
 				};
 
-				reg_arm: regulator-vddcore at 140 {
+				reg_arm: regulator-vddcore {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vddarm";
 					regulator-min-microvolt = <725000>;
@@ -606,7 +606,7 @@
 					anatop-max-voltage = <1450000>;
 				};
 
-				reg_pcie: regulator-vddpcie at 140 {
+				reg_pcie: regulator-vddpcie {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vddpcie";
 					regulator-min-microvolt = <725000>;
@@ -622,7 +622,7 @@
 					anatop-max-voltage = <1450000>;
 				};
 
-				reg_soc: regulator-vddsoc at 140 {
+				reg_soc: regulator-vddsoc {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vddsoc";
 					regulator-min-microvolt = <725000>;
arch/arm/boot/dts/imx6ul.dtsi +3 -3
index 4356b65..b15ed37 100644
@@ -512,7 +512,7 @@
 					     <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
 					     <GIC_SPI 127 IRQ_TYPE_LEVEL_HIGH>;
 
-				reg_3p0: regulator-3p0 at 120 {
+				reg_3p0: regulator-3p0 {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vdd3p0";
 					regulator-min-microvolt = <2625000>;
@@ -526,7 +526,7 @@
 					anatop-enable-bit = <0>;
 				};
 
-				reg_arm: regulator-vddcore at 140 {
+				reg_arm: regulator-vddcore {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "cpu";
 					regulator-min-microvolt = <725000>;
@@ -543,7 +543,7 @@
 					anatop-max-voltage = <1450000>;
 				};
 
-				reg_soc: regulator-vddsoc at 140 {
+				reg_soc: regulator-vddsoc {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vddsoc";
 					regulator-min-microvolt = <725000>;
arch/arm/boot/dts/imx7d.dtsi +1 -1
index 6b3faa2..d70d55d 100644
@@ -522,7 +522,7 @@
 				interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>,
 					<GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
 
-				reg_1p0d: regulator-vdd1p0d at 210 {
+				reg_1p0d: regulator-vdd1p0d {
 					compatible = "fsl,anatop-regulator";
 					regulator-name = "vdd1p0d";
 					regulator-min-microvolt = <800000>;
Signature · 1 line
1.9.1
maintainer
#1 lore raw

PATCH 1/1 ARM: dts: imx: Remove unneeded unit-addresses

Quoted 19 lines · Fabio Estevam

Building with W=1 option leads to several warnings like:

Warning (unit_address_vs_reg): Node /soc/aips-bus at 02000000/anatop at 020c8000/regulator-1p1 at 110 has a unit name, but no reg property

Fix them by removing the unneeded unit-addresses.

---
 arch/arm/boot/dts/imx6sl.dtsi | 12 ++++++------
 arch/arm/boot/dts/imx6sx.dtsi | 12 ++++++------
 arch/arm/boot/dts/imx6ul.dtsi |  6 +++---
 arch/arm/boot/dts/imx7d.dtsi  |  2 +-
 4 files changed, 16 insertions(+), 16 deletions(-)
arch/arm/boot/dts/imx6sl.dtsi +0 -0
index d12b250..224c0d0 100644

arch/arm/boot/dts/imx6sl.dtsi line 464

Quoted 5 lines
arch/arm/boot/dts/imx6sl.dtsi +1 -1
@@ -461,7 +461,7 @@
                                             <0 54 IRQ_TYPE_LEVEL_HIGH>,
                                             <0 127 IRQ_TYPE_LEVEL_HIGH>;
 
-                               regulator-1p1 at 110 {
+                               regulator-1p1 {

Presumably these are register offsets which could be useful to have even if the Linux driver doesn't use them. But either way is fine with me.

Rob

reviewer
#2 lore raw

PATCH 1/1 ARM: dts: imx: Remove unneeded unit-addresses

Quoted 3 lines · Rob Herring

Presumably these are register offsets which could be useful to have even if the Linux driver doesn't use them. But either way is fine with me.

Yes, these are register offsets.

                reg_3p0: regulator-3p0 {
                    compatible = "fsl,anatop-regulator";
                    regulator-name = "vdd3p0";
                    regulator-min-microvolt = <2625000>;
                    regulator-max-microvolt = <3400000>;
                    anatop-reg-offset = <0x120>;
reviewer
#3 lore raw

PATCH 1/1 ARM: dts: imx: Remove unneeded unit-addresses

Quoted 6 lines · Fabio Estevam
Quoted 3 lines · Rob Herring

Presumably these are register offsets which could be useful to have even if the Linux driver doesn't use them. But either way is fine with me.

Quoted 8 lines

Yes, these are register offsets.

                reg_3p0: regulator-3p0 {
                    compatible = "fsl,anatop-regulator";
                    regulator-name = "vdd3p0";
                    regulator-min-microvolt = <2625000>;
                    regulator-max-microvolt = <3400000>;
                    anatop-reg-offset = <0x120>;

Sorry, pressed the 'send' button too quickly.

There is a "anatop-reg-offset = <0x120>;" property that is used to pass the offset to the anatop regulator driver, so that's why I preferred to remove the unneeded unit-address.

Thanks

#4 lore raw

PATCH 1/1 ARM: dts: imx: Remove unneeded unit-addresses

Quoted 23 lines · On Tue, 3 May 2016 12:45:07 -0300 Fabio Estevam <[email protected]> wrote:
Quoted 6 lines · Fabio Estevam
Quoted 3 lines · Rob Herring

Presumably these are register offsets which could be useful to have even if the Linux driver doesn't use them. But either way is fine with me.

Quoted 8 lines

Yes, these are register offsets.

                reg_3p0: regulator-3p0 {
                    compatible = "fsl,anatop-regulator";
                    regulator-name = "vdd3p0";
                    regulator-min-microvolt = <2625000>;
                    regulator-max-microvolt = <3400000>;
                    anatop-reg-offset = <0x120>;  

Sorry, pressed the 'send' button too quickly.

There is a "anatop-reg-offset = <0x120>;" property that is used to pass the offset to the anatop regulator driver, so that's why I preferred to remove the unneeded unit-address.

Quoted 6 lines

Thanks

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

There are actually 2 registers (on some of them), anatop-reg-offset, and anatop-delay-reg-offset... Converting those to use reg and deprecating the anatop specific items would seem like a Good Thing (tm) to me.

...wandering into less safe territory:
I know reg is usually a memory offset in bytes, but each of the anatop memory offsets also include a bit-shift and a bit-width item, which really narrowly defines the register bits that pertain to each regulator.

would it be totally inappropriate to use
#address-cells = 2 and
#size-cells =1
where address cells would contain the byte offset and the bit shift, and the size cell would contain the bit offset?

maintainer
#5 lore raw

PATCH 1/1 ARM: dts: imx: Remove unneeded unit-addresses

Quoted 44 lines · Joshua Clayton
Quoted 23 lines · On Tue, 3 May 2016 12:45:07 -0300 Fabio Estevam <[email protected]> wrote:
Quoted 6 lines · Fabio Estevam
Quoted 3 lines · Rob Herring

Presumably these are register offsets which could be useful to have even if the Linux driver doesn't use them. But either way is fine with me.

Quoted 8 lines

Yes, these are register offsets.

                reg_3p0: regulator-3p0 {
                    compatible = "fsl,anatop-regulator";
                    regulator-name = "vdd3p0";
                    regulator-min-microvolt = <2625000>;
                    regulator-max-microvolt = <3400000>;
                    anatop-reg-offset = <0x120>;

Sorry, pressed the 'send' button too quickly.

There is a "anatop-reg-offset = <0x120>;" property that is used to pass the offset to the anatop regulator driver, so that's why I preferred to remove the unneeded unit-address.

Quoted 6 lines

Thanks

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

There are actually 2 registers (on some of them), anatop-reg-offset, and anatop-delay-reg-offset... Converting those to use reg and deprecating the anatop specific items would seem like a Good Thing (tm) to me.

...wandering into less safe territory:
I know reg is usually a memory offset in bytes, but each of the anatop memory offsets also include a bit-shift and a bit-width item, which really narrowly defines the register bits that pertain to each regulator.

Quoted 5 lines

would it be totally inappropriate to use
#address-cells = 2 and
#size-cells =1
where address cells would contain the byte offset and the bit shift, and the size cell would contain the bit offset?

Technically that is fine. However, then the standard address translation functions will not work.

Given it is also encoding bit offsets, I'd just keep this patch as is. We could also debate just not putting this in the DT at all.

Rob

Applied
#6 lore raw

PATCH 1/1 ARM: dts: imx: Remove unneeded unit-addresses

In reply to Fabio Estevam
Quoted 7 lines · Fabio Estevam

Building with W=1 option leads to several warnings like:

Warning (unit_address_vs_reg): Node /soc/aips-bus at 02000000/anatop at 020c8000/regulator-1p1 at 110 has a unit name, but no reg property

Fix them by removing the unneeded unit-addresses.

Applied, thanks.