ARM: dts: vexpress: Replace '_' with '-' in node names
Subsystems (2)
PATCH 1/1 ARM: dts: vexpress: Replace '_' with '-' in node names
The latest DTC throws warnings for character '_' in the node names.
Warning (node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node name
The general recommendation is to use character '-' for all the node names. This patch fixes the warnings following the recommendation.
--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +3 -3
@@ -77,19 +77,19 @@ compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>; - v2m_led_gpios: sys_led { + v2m_led_gpios: sys-led { compatible = "arm,vexpress-sysreg,sys_led"; gpio-controller; #gpio-cells = <2>; }; - v2m_mmc_gpios: sys_mci { + v2m_mmc_gpios: sys-mci { compatible = "arm,vexpress-sysreg,sys_mci"; gpio-controller; #gpio-cells = <2>; }; - v2m_flash_gpios: sys_flash { + v2m_flash_gpios: sys-flash { compatible = "arm,vexpress-sysreg,sys_flash"; gpio-controller; #gpio-cells = <2>;
Signature · 1 line
2.7.4
PATCH 1/1 ARM: dts: vexpress: Replace '_' with '-' in node names
Quoted 20 lines · Sudeep Holla
The latest DTC throws warnings for character '_' in the node names.
Warning (
node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node nameThe general recommendation is to use character '-' for all the node names. This patch fixes the warnings following the recommendation.
Cc Liviu Dudau <[email protected]>Signed-off-by Sudeep Holla <[email protected]>--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +0
-0
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi line 80
Quoted 5 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +1
-1@@ -77,19 +77,19 @@ compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>; - v2m_led_gpios: sys_led { + v2m_led_gpios: sys-led {
Except this is a gpio-controller so it should have 'gpio' for its node name. (I have a dtc check written for that, but there are too many false positives.)
But then you have 3 of them and no addressing, so you need to add reg property (with the register's offset and size) and unit-address.
I'm surprised Linus W accepted these a GPIO when they are not really general purpose, but then lots of things slip in.
Rob
PATCH 1/1 ARM: dts: vexpress: Replace '_' with '-' in node names
Quoted 24 lines · Rob Herring
Quoted 23 lines · Sudeep Holla
The latest DTC throws warnings for character '_' in the node names.
Warning (
node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node nameThe general recommendation is to use character '-' for all the node names. This patch fixes the warnings following the recommendation.
Cc Liviu Dudau <[email protected]>Signed-off-by Sudeep Holla <[email protected]>--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +0
-0@@ -77,19 +77,19 @@ compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>;
Quoted 7 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi line 80
Quoted 2 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +1
-1- v2m_led_gpios: sys_led { + v2m_led_gpios: sys-led {Except this is a gpio-controller so it should have 'gpio' for its node name. (I have a dtc check written for that, but there are too many false positives.)
True, sorry I didn't look at it in detail.
Quoted 3 lines
But then you have 3 of them and no addressing, so you need to add reg property (with the register's offset and size) and unit-address.
Indeed. I had a look at the history but couldn't gather much. All I could get is that this is one of those weird mix of all functionality on ARM Ltd platforms which fits no subsystem. Me and Lorenzo has similar issue on TC2 platform. Pawel seem to have plumed this system control registers block into MFD and GPIO long back.
Quoted 3 lines
I'm surprised Linus W accepted these a GPIO when they are not really general purpose, but then lots of things slip in.
I assume all these happened in early days of DT.
I will drop this for now. I will take a look if these nodes can be made better to align with standard gpio controller nodes.
Signature · 2 lines
Regards, Sudeep
PATCH 1/1 ARM: dts: vexpress: Replace '_' with '-' in node names
Quoted 47 lines · Sudeep Holla
Quoted 24 lines · Rob Herring
Quoted 23 lines · Sudeep Holla
The latest DTC throws warnings for character '_' in the node names.
Warning (
node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node nameThe general recommendation is to use character '-' for all the node names. This patch fixes the warnings following the recommendation.
Cc Liviu Dudau <[email protected]>Signed-off-by Sudeep Holla <[email protected]>--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +0
-0@@ -77,19 +77,19 @@ compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>;Quoted 7 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi line 80
Quoted 2 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +1
-1- v2m_led_gpios: sys_led { + v2m_led_gpios: sys-led {Except this is a gpio-controller so it should have 'gpio' for its node name. (I have a dtc check written for that, but there are too many false positives.)
True, sorry I didn't look at it in detail.
Quoted 3 lines
But then you have 3 of them and no addressing, so you need to add reg property (with the register's offset and size) and unit-address.
Indeed. I had a look at the history but couldn't gather much. All I could get is that this is one of those weird mix of all functionality on ARM Ltd platforms which fits no subsystem. Me and Lorenzo has similar issue on TC2 platform. Pawel seem to have plumed this system control registers block into MFD and GPIO long back.
Quoted 8 lines
Quoted 3 lines
I'm surprised Linus W accepted these a GPIO when they are not really general purpose, but then lots of things slip in.
I assume all these happened in early days of DT.
I will drop this for now. I will take a look if these nodes can be made better to align with standard gpio controller nodes.
Why not just make the changes I suggested? It shouldn't break anything. You can add reg property even though the kernel doesn't use it.
Rob
PATCH 1/1 ARM: dts: vexpress: Replace '_' with '-' in node names
Quoted 52 lines · Rob Herring
Quoted 51 lines · Sudeep Holla
Quoted 24 lines · Rob Herring
Quoted 23 lines · Sudeep Holla
The latest DTC throws warnings for character '_' in the node names.
Warning (
node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node nameThe general recommendation is to use character '-' for all the node names. This patch fixes the warnings following the recommendation.
Cc Liviu Dudau <[email protected]>Signed-off-by Sudeep Holla <[email protected]>--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +0
-0@@ -77,19 +77,19 @@ compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>;Quoted 7 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi line 80
Quoted 2 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +1
-1- v2m_led_gpios: sys_led { + v2m_led_gpios: sys-led {Except this is a gpio-controller so it should have 'gpio' for its node name. (I have a dtc check written for that, but there are too many false positives.)
True, sorry I didn't look at it in detail.
Quoted 3 lines
But then you have 3 of them and no addressing, so you need to add reg property (with the register's offset and size) and unit-address.
Indeed. I had a look at the history but couldn't gather much. All I could get is that this is one of those weird mix of all functionality on ARM Ltd platforms which fits no subsystem. Me and Lorenzo has similar issue on TC2 platform. Pawel seem to have plumed this system control registers block into MFD and GPIO long back.
Quoted 3 lines
I'm surprised Linus W accepted these a GPIO when they are not really general purpose, but then lots of things slip in.
Quoted 9 lines
Quoted 4 lines
I assume all these happened in early days of DT.
I will drop this for now. I will take a look if these nodes can be made better to align with standard gpio controller nodes.
Why not just make the changes I suggested? It shouldn't break anything. You can add reg property even though the kernel doesn't use it.
Ah OK. That makes sense. IIRC it used to have some @<offset> value previously which has some correlation to HW block. I will dig that out. Sorry I missed that you were suggesting to add reg property.
Signature · 2 lines
Regards, Sudeep
PATCH 1/1 ARM: dts: vexpress: Replace '_' with '-' in node names
In reply to Rob HerringQuoted 31 lines · Rob Herring
Quoted 20 lines · Sudeep Holla
The latest DTC throws warnings for character '_' in the node names.
Warning (
node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node nameThe general recommendation is to use character '-' for all the node names. This patch fixes the warnings following the recommendation.
Cc Liviu Dudau <[email protected]>Signed-off-by Sudeep Holla <[email protected]>--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +0
-0arch/arm/boot/dts/vexpress-v2m-rs1.dtsi line 80
Quoted 5 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +1
-1@@ -77,19 +77,19 @@ compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>; - v2m_led_gpios: sys_led { + v2m_led_gpios: sys-led {Except this is a gpio-controller so it should have 'gpio' for its node name. (I have a dtc check written for that, but there are too many false positives.)
Quoted 5 lines
But then you have 3 of them and no addressing, so you need to add reg property (with the register's offset and size) and unit-address.
I'm surprised Linus W accepted these a GPIO when they are not really general purpose, but then lots of things slip in.
I guess is was back in this day when we had a finger constantly on the fastforward button for DT conversion, and a few not so elegant things slipped in.
I was annoyed by this thing later, especially since others started to use it as a consistency argument "well you allowed this so now allow this other crazy thing that looks the same" :D
I suspect I either was not CC:ed or I just sucked at shepherding this, I try to do better these days.
Yours,
Linus Walleij
PATCH v2 1/2 ARM: dts: vexpress: use standard gpio bindings for sys_{led, mci, flash}
In reply to Sudeep HollaCommit 2cff6dba57b7 ("ARM: dts: vexpress: fix node name unit-address presence warnings") removed the unit address as there was no associated reg property in
these sysreg nodes.
Also the latest DTC throws warnings for character '_' in the node names.
Warning (node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node name
The correct way to fix this as well as the original unit-address presence warnings is to use the standard gpio controller binding and specify the reg properties as per the hardware as it was before.
However note that Vexpress sysreg MFD driver will still continue to use the hardcoded values for compatibility reasons.
--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 11 ++++++++--- arch/arm/boot/dts/vexpress-v2m.dtsi | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-)
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +8 -3
@@ -76,21 +76,26 @@ v2m_sysreg: sysreg at 10000 { compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; - v2m_led_gpios: sys_led { + v2m_led_gpios: gpio at 8 { compatible = "arm,vexpress-sysreg,sys_led"; + reg = <0x008 4>; gpio-controller; #gpio-cells = <2>; }; - v2m_mmc_gpios: sys_mci { + v2m_mmc_gpios: gpio at 48 { compatible = "arm,vexpress-sysreg,sys_mci"; + reg = <0x048 4>; gpio-controller; #gpio-cells = <2>; }; - v2m_flash_gpios: sys_flash { + v2m_flash_gpios: gpio at 4c { compatible = "arm,vexpress-sysreg,sys_flash"; + reg = <0x04c 4>; gpio-controller; #gpio-cells = <2>; };
arch/arm/boot/dts/vexpress-v2m.dtsi +8 -3
@@ -76,21 +76,26 @@ v2m_sysreg: sysreg at 0 { compatible = "arm,vexpress-sysreg"; reg = <0x00000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; - v2m_led_gpios: sys_led { + v2m_led_gpios: gpio at 8 { compatible = "arm,vexpress-sysreg,sys_led"; + reg = <0x008 4>; gpio-controller; #gpio-cells = <2>; }; - v2m_mmc_gpios: sys_mci { + v2m_mmc_gpios: gpio at 48 { compatible = "arm,vexpress-sysreg,sys_mci"; + reg = <0x048 4>; gpio-controller; #gpio-cells = <2>; }; - v2m_flash_gpios: sys_flash { + v2m_flash_gpios: gpio at 4c { compatible = "arm,vexpress-sysreg,sys_flash"; + reg = <0x04c 4>; gpio-controller; #gpio-cells = <2>; };
--
2.7.4
PATCH v2 2/2 ARM: dts: vexpress: replace '_' with '-' in node names
The latest DTC throws warnings for character '_' in the node names.
Warning (node_name_chars_strict): /pmu_a15: Character '_' not recommended in node name Warning (node_name_chars_strict): /pmu_a7: Character '_' not recommended in node name
The general recommendation is to use character '-' for all the node names. This patch fixes the warnings following the recommendation.
--- arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
v1->v2:
- This patch is newly added in v2 and was missing earlier
arch/arm/boot/dts/vexpress-v2p-ca15_a7.dts +2 -2
@@ -204,7 +204,7 @@ <1 10 0xf08>; }; - pmu_a15 { + pmu-a15 { compatible = "arm,cortex-a15-pmu"; interrupts = <0 68 4>, <0 69 4>;
@@ -212,7 +212,7 @@ <&cpu1>; }; - pmu_a7 { + pmu-a7 { compatible = "arm,cortex-a7-pmu"; interrupts = <0 128 4>, <0 129 4>,
--
2.7.4
PATCH v2 1/2 ARM: dts: vexpress: use standard gpio bindings for sys_{led, mci, flash}
In reply to Sudeep HollaQuoted 30 lines · Sudeep Holla
Commit
2cff6dba57b7("ARM: dts: vexpress: fix node name unit-address presence warnings") removed the unit address as there was no associated reg property in
these sysreg nodes.Also the latest DTC throws warnings for character '_' in the node names.
Warning (
node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node nameThe correct way to fix this as well as the original unit-address presence warnings is to use the standard gpio controller binding and specify the reg properties as per the hardware as it was before.
However note that Vexpress sysreg MFD driver will still continue to use the hardcoded values for compatibility reasons.
Cc Liviu Dudau <[email protected]>Suggested-by Rob Herring <[email protected]>Signed-off-by Sudeep Holla <[email protected]>--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 11 ++++++++--- arch/arm/boot/dts/vexpress-v2m.dtsi | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-)arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +0
-0
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi line 80
Quoted 5 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +2
-0@@ -76,21 +76,26 @@ v2m_sysreg: sysreg at 10000 { compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>; + #address-cells = <1>; + #size-cells = <1>;
You need a ranges here and below to translate from 0-0x10000 range.
With that,
Quoted 61 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +6
-3- v2m_led_gpios: sys_led { + v2m_led_gpios: gpio at 8 { compatible = "arm,vexpress-sysreg,sys_led"; + reg = <0x008 4>; gpio-controller; #gpio-cells = <2>; }; - v2m_mmc_gpios: sys_mci { + v2m_mmc_gpios: gpio at 48 { compatible = "arm,vexpress-sysreg,sys_mci"; + reg = <0x048 4>; gpio-controller; #gpio-cells = <2>; }; - v2m_flash_gpios: sys_flash { + v2m_flash_gpios: gpio at 4c { compatible = "arm,vexpress-sysreg,sys_flash"; + reg = <0x04c 4>; gpio-controller; #gpio-cells = <2>; };arch/arm/boot/dts/vexpress-v2m.dtsi +8
-4@@ -76,21 +76,26 @@ v2m_sysreg: sysreg at 0 { compatible = "arm,vexpress-sysreg"; reg = <0x00000 0x1000>; + #address-cells = <1>; + #size-cells = <1>; - v2m_led_gpios: sys_led { + v2m_led_gpios: gpio at 8 { compatible = "arm,vexpress-sysreg,sys_led"; + reg = <0x008 4>; gpio-controller; #gpio-cells = <2>; }; - v2m_mmc_gpios: sys_mci { + v2m_mmc_gpios: gpio at 48 { compatible = "arm,vexpress-sysreg,sys_mci"; + reg = <0x048 4>; gpio-controller; #gpio-cells = <2>; }; - v2m_flash_gpios: sys_flash { + v2m_flash_gpios: gpio at 4c { compatible = "arm,vexpress-sysreg,sys_flash"; + reg = <0x04c 4>; gpio-controller; #gpio-cells = <2>; }; --2.7.4
PATCH v2 1/2 ARM: dts: vexpress: use standard gpio bindings for sys_{led,mci,flash}
Quoted 39 lines · Rob Herring
Quoted 30 lines · Sudeep Holla
Commit
2cff6dba57b7("ARM: dts: vexpress: fix node name unit-address presence warnings") removed the unit address as there was no associated reg property in
these sysreg nodes.Also the latest DTC throws warnings for character '_' in the node names.
Warning (
node_name_chars_strict): /sysreg at 10000/sys_led: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_mci: Character '_' not recommended in node name Warning (node_name_chars_strict): /sysreg at 10000/sys_flash: Character '_' not recommended in node nameThe correct way to fix this as well as the original unit-address presence warnings is to use the standard gpio controller binding and specify the reg properties as per the hardware as it was before.
However note that Vexpress sysreg MFD driver will still continue to use the hardcoded values for compatibility reasons.
Cc Liviu Dudau <[email protected]>Suggested-by Rob Herring <[email protected]>Signed-off-by Sudeep Holla <[email protected]>--- arch/arm/boot/dts/vexpress-v2m-rs1.dtsi | 11 ++++++++--- arch/arm/boot/dts/vexpress-v2m.dtsi | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-)arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +0
-0arch/arm/boot/dts/vexpress-v2m-rs1.dtsi line 80
Quoted 5 lines
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +2
-0@@ -76,21 +76,26 @@ v2m_sysreg: sysreg at 10000 { compatible = "arm,vexpress-sysreg"; reg = <0x010000 0x1000>; + #address-cells = <1>; + #size-cells = <1>;You need a ranges here and below to translate from 0-0x10000 range.
Quoted 4 lines
With that,
Reviewed-by Rob Herring <[email protected]>
Thanks, I have appended it with below change
Regards,
Sudeep
--
(quoted diff) +0 -0
w/arch/arm/boot/dts/vexpress-v2m-rs1.dtsi
index a8586a0b957d..4488c8fe213a 100644
arch/arm/boot/dts/vexpress-v2m-rs1.dtsi +1 -0
@@ -78,6 +78,7 @@ reg = <0x010000 0x1000>; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0x10000 0x1000>; v2m_led_gpios: gpio at 8 { compatible =
"arm,vexpress-sysreg,sys_led";
(quoted diff) +0 -0
w/arch/arm/boot/dts/vexpress-v2m.dtsi
index 37ecccebd937..4db42f6326a3 100644
arch/arm/boot/dts/vexpress-v2m.dtsi +1 -0
@@ -78,6 +78,7 @@ reg = <0x00000 0x1000>; #address-cells = <1>; #size-cells = <1>; + ranges = <0 0 0x1000>; v2m_led_gpios: gpio at 8 { compatible =
"arm,vexpress-sysreg,sys_led";