diff mbox series

[v3,1/3] ramips: mt7621-dts: fix switch@1f warnings

Message ID 20220213081525.1865-2-arinc.unal@arinc9.com
State Superseded, archived
Headers show
Series ramips: mt7621-dts: fix dtc warning, links and pinctrl | expand

Commit Message

Arınç ÜNAL Feb. 13, 2022, 8:15 a.m. UTC
Remove reg property from ports node to fix this warning:

Warning (unit_address_vs_reg): /ethernet@1e100000/mdio-bus/switch@1f/ports: node has a reg or ranges property, but no unit name

Another warning surfaces afterwards. Remove #address-cells and #size-cells
from switch@1f node to fix this warning:

Warning (avoid_unnecessary_addr_size): /ethernet@1e100000/mdio-bus/switch@1f: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
---
 target/linux/ramips/dts/mt7621.dtsi | 3 ---
 1 file changed, 3 deletions(-)

Comments

Sander Vanheule Feb. 13, 2022, 12:39 p.m. UTC | #1
Hi Arınç,

On Sun, 2022-02-13 at 11:15 +0300, Arınç ÜNAL wrote:
> Remove reg property from ports node to fix this warning:
> 
> Warning (unit_address_vs_reg): /ethernet@1e100000/mdio-bus/switch@1f/ports: node has a
> reg or ranges property, but no unit name
> 
> Another warning surfaces afterwards. Remove #address-cells and #size-cells
> from switch@1f node to fix this warning:
> 
> Warning (avoid_unnecessary_addr_size): /ethernet@1e100000/mdio-bus/switch@1f:
> unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
> 
> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>

These changes make sense, and the Documentation/devicetree/bindings/net/dsa/dsa.yaml
specifies it this way, but they don't conform to the (older) mt7530.txt binding. Have you
considered converting the mt7530 binding to YAML and submitting it upstream? Then you
could have proper validation of devicetrees with mt7530 :-)

Best,
Sander

> ---
>  target/linux/ramips/dts/mt7621.dtsi | 3 ---
>  1 file changed, 3 deletions(-)
> 
> diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi
> index b784a9d60c..ec95223a62 100644
> --- a/target/linux/ramips/dts/mt7621.dtsi
> +++ b/target/linux/ramips/dts/mt7621.dtsi
> @@ -481,8 +481,6 @@
>  
>                         switch0: switch@1f {
>                                 compatible = "mediatek,mt7621";
> -                               #address-cells = <1>;
> -                               #size-cells = <0>;
>                                 reg = <0x1f>;
>                                 mediatek,mcm;
>                                 resets = <&rstctrl 2>;
> @@ -494,7 +492,6 @@
>                                 ports {
>                                         #address-cells = <1>;
>                                         #size-cells = <0>;
> -                                       reg = <0>;
>  
>                                         port@0 {
>                                                 status = "disabled";
Arınç ÜNAL Feb. 13, 2022, 1:06 p.m. UTC | #2
On 13/02/2022 15:39, Sander Vanheule wrote:
> Hi Arınç,
> 
> On Sun, 2022-02-13 at 11:15 +0300, Arınç ÜNAL wrote:
>> Remove reg property from ports node to fix this warning:
>>
>> Warning (unit_address_vs_reg): /ethernet@1e100000/mdio-bus/switch@1f/ports: node has a
>> reg or ranges property, but no unit name
>>
>> Another warning surfaces afterwards. Remove #address-cells and #size-cells
>> from switch@1f node to fix this warning:
>>
>> Warning (avoid_unnecessary_addr_size): /ethernet@1e100000/mdio-bus/switch@1f:
>> unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
>>
>> Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
> 
> These changes make sense, and the Documentation/devicetree/bindings/net/dsa/dsa.yaml
> specifies it this way, but they don't conform to the (older) mt7530.txt binding. Have you
> considered converting the mt7530 binding to YAML and submitting it upstream? Then you
> could have proper validation of devicetrees with mt7530 :-)

That's actually on my task list! I'm reading around YAML and looking at 
the examples in the meantime.
diff mbox series

Patch

diff --git a/target/linux/ramips/dts/mt7621.dtsi b/target/linux/ramips/dts/mt7621.dtsi
index b784a9d60c..ec95223a62 100644
--- a/target/linux/ramips/dts/mt7621.dtsi
+++ b/target/linux/ramips/dts/mt7621.dtsi
@@ -481,8 +481,6 @@ 
 
 			switch0: switch@1f {
 				compatible = "mediatek,mt7621";
-				#address-cells = <1>;
-				#size-cells = <0>;
 				reg = <0x1f>;
 				mediatek,mcm;
 				resets = <&rstctrl 2>;
@@ -494,7 +492,6 @@ 
 				ports {
 					#address-cells = <1>;
 					#size-cells = <0>;
-					reg = <0>;
 
 					port@0 {
 						status = "disabled";