devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells
@ 2024-04-02 18:32 Krzysztof Kozlowski
  2024-04-02 18:32 ` [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells Krzysztof Kozlowski
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-02 18:32 UTC (permalink / raw)
  To: Robert Marko, Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The ethernet-switch node does not have children with unit addresses, so
address/size-cells are not really correct, as reported by dtc W=1
warning:

  armada-3720-eDPU.dts:26.19-60.4: Warning (avoid_unnecessary_addr_size): /soc/internal-regs@d0000000/mdio@32004/switch@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

This probably also fixes dtbs_check warning, but I could not find it, so
not sure about that.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
index d6d37a1f6f38..91c2f8b4edfa 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
@@ -25,8 +25,6 @@ &mdio {
 	/* Actual device is MV88E6361 */
 	switch: switch@0 {
 		compatible = "marvell,mv88e6190";
-		#address-cells = <1>;
-		#size-cells = <0>;
 		reg = <0>;
 		status = "disabled";
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells
  2024-04-02 18:32 [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells Krzysztof Kozlowski
@ 2024-04-02 18:32 ` Krzysztof Kozlowski
  2024-04-02 19:10   ` Andrew Lunn
  2024-04-02 19:28   ` Marek Behún
  2024-04-02 18:32 ` [PATCH 3/3] arm64: dts: marvell: espressobin-ultra: fix Ethernet Switch unit address Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-02 18:32 UTC (permalink / raw)
  To: Robert Marko, Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Flash node uses single "partition" node to describe partitions, so
remove deprecated address/size-cells properties to also fix dtc W=1
warnings:

  armada-3720-turris-mox.dts:218.10-255.4: Warning (avoid_unnecessary_addr_size): /soc/internal-regs@d0000000/spi@10600/flash@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
 arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 2 --
 1 file changed, 2 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
index f1a9f2234359..54453b0a91f9 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
@@ -216,8 +216,6 @@ &spi0 {
 	assigned-clock-rates = <20000000>;
 
 	flash@0 {
-		#address-cells = <1>;
-		#size-cells = <1>;
 		compatible = "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <20000000>;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 3/3] arm64: dts: marvell: espressobin-ultra: fix Ethernet Switch unit address
  2024-04-02 18:32 [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells Krzysztof Kozlowski
  2024-04-02 18:32 ` [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells Krzysztof Kozlowski
@ 2024-04-02 18:32 ` Krzysztof Kozlowski
  2024-04-02 19:27   ` Andrew Lunn
  2024-04-02 19:10 ` [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells Andrew Lunn
  2024-05-05 16:06 ` Gregory CLEMENT
  3 siblings, 1 reply; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-02 18:32 UTC (permalink / raw)
  To: Robert Marko, Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

The Espressobin Ultra DTS includes Espressobin DTSI which defines
ethernet-switch@1 node.  The Ultra DTS overrides "reg" to 3, but that
leaves still old unit address which conflicts with the new phy@1 node
(W=1 dtc warning):

  armada-3720-espressobin.dtsi:148.29-203.4: Warning (unique_unit_address_if_enabled): /soc/internal-regs@d0000000/mdio@32004/ethernet-switch@1: duplicate unit-address (also used in node /soc/internal-regs@d0000000/mdio@32004/ethernet-phy@1)

Fix this by deleting ethernet-switch@1 node and merging original node
with code from Ultra DTS into new ethernet-switch@3.

Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

---

Not tested on hardware.
---
 .../marvell/armada-3720-espressobin-ultra.dts | 104 +++++++++++-------
 1 file changed, 67 insertions(+), 37 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
index 870bb380a40a..b3cc2b7b5d19 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
@@ -114,54 +114,84 @@ &usb3 {
 };
 
 &mdio {
+	/* Switch is @3, not @1 */
+	/delete-node/ ethernet-switch@1;
 	extphy: ethernet-phy@1 {
 		reg = <1>;
 
 		reset-gpios = <&gpionb 2 GPIO_ACTIVE_LOW>;
 	};
-};
 
-&switch0 {
-	reg = <3>;
+	switch0: ethernet-switch@3 {
+		compatible = "marvell,mv88e6085";
+		reg = <3>;
 
-	reset-gpios = <&gpiosb 23 GPIO_ACTIVE_LOW>;
+		reset-gpios = <&gpiosb 23 GPIO_ACTIVE_LOW>;
+		dsa,member = <0 0>;
 
-	ethernet-ports {
-		switch0port1: ethernet-port@1 {
-			reg = <1>;
-			label = "lan0";
-			phy-handle = <&switch0phy0>;
+		ethernet-ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			switch0port0: ethernet-port@0 {
+				reg = <0>;
+				label = "cpu";
+				ethernet = <&eth0>;
+				phy-mode = "rgmii-id";
+				fixed-link {
+					speed = <1000>;
+					full-duplex;
+				};
+			};
+
+			switch0port1: ethernet-port@1 {
+				reg = <1>;
+				label = "lan0";
+				phy-handle = <&switch0phy0>;
+			};
+
+			switch0port2: ethernet-port@2 {
+				reg = <2>;
+				label = "lan1";
+				phy-handle = <&switch0phy1>;
+			};
+
+			switch0port3: ethernet-port@3 {
+				reg = <3>;
+				label = "lan2";
+				phy-handle = <&switch0phy2>;
+			};
+
+			switch0port4: ethernet-port@4 {
+				reg = <4>;
+				label = "lan3";
+				phy-handle = <&switch0phy3>;
+			};
+
+			switch0port5: ethernet-port@5 {
+				reg = <5>;
+				label = "wan";
+				phy-handle = <&extphy>;
+				phy-mode = "sgmii";
+			};
 		};
 
-		switch0port2: ethernet-port@2 {
-			reg = <2>;
-			label = "lan1";
-			phy-handle = <&switch0phy1>;
-		};
+		mdio {
+			#address-cells = <1>;
+			#size-cells = <0>;
 
-		switch0port3: ethernet-port@3 {
-			reg = <3>;
-			label = "lan2";
-			phy-handle = <&switch0phy2>;
-		};
-
-		switch0port4: ethernet-port@4 {
-			reg = <4>;
-			label = "lan3";
-			phy-handle = <&switch0phy3>;
-		};
-
-		switch0port5: ethernet-port@5 {
-			reg = <5>;
-			label = "wan";
-			phy-handle = <&extphy>;
-			phy-mode = "sgmii";
-		};
-	};
-
-	mdio {
-		switch0phy3: ethernet-phy@14 {
-			reg = <0x14>;
+			switch0phy0: ethernet-phy@11 {
+				reg = <0x11>;
+			};
+			switch0phy1: ethernet-phy@12 {
+				reg = <0x12>;
+			};
+			switch0phy2: ethernet-phy@13 {
+				reg = <0x13>;
+			};
+			switch0phy3: ethernet-phy@14 {
+				reg = <0x14>;
+			};
 		};
 	};
 };
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells
  2024-04-02 18:32 [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells Krzysztof Kozlowski
  2024-04-02 18:32 ` [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells Krzysztof Kozlowski
  2024-04-02 18:32 ` [PATCH 3/3] arm64: dts: marvell: espressobin-ultra: fix Ethernet Switch unit address Krzysztof Kozlowski
@ 2024-04-02 19:10 ` Andrew Lunn
  2024-05-05 16:06 ` Gregory CLEMENT
  3 siblings, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2024-04-02 19:10 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Robert Marko, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	linux-kernel

On Tue, Apr 02, 2024 at 08:32:38PM +0200, Krzysztof Kozlowski wrote:
> The ethernet-switch node does not have children with unit addresses, so
> address/size-cells are not really correct, as reported by dtc W=1
> warning:
> 
>   armada-3720-eDPU.dts:26.19-60.4: Warning (avoid_unnecessary_addr_size): /soc/internal-regs@d0000000/mdio@32004/switch@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
> 
> This probably also fixes dtbs_check warning, but I could not find it, so
> not sure about that.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells
  2024-04-02 18:32 ` [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells Krzysztof Kozlowski
@ 2024-04-02 19:10   ` Andrew Lunn
  2024-04-02 19:28   ` Marek Behún
  1 sibling, 0 replies; 9+ messages in thread
From: Andrew Lunn @ 2024-04-02 19:10 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Robert Marko, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	linux-kernel

On Tue, Apr 02, 2024 at 08:32:39PM +0200, Krzysztof Kozlowski wrote:
> Flash node uses single "partition" node to describe partitions, so
> remove deprecated address/size-cells properties to also fix dtc W=1
> warnings:
> 
>   armada-3720-turris-mox.dts:218.10-255.4: Warning (avoid_unnecessary_addr_size): /soc/internal-regs@d0000000/spi@10600/flash@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] arm64: dts: marvell: espressobin-ultra: fix Ethernet Switch unit address
  2024-04-02 18:32 ` [PATCH 3/3] arm64: dts: marvell: espressobin-ultra: fix Ethernet Switch unit address Krzysztof Kozlowski
@ 2024-04-02 19:27   ` Andrew Lunn
  2024-04-02 20:11     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Lunn @ 2024-04-02 19:27 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Robert Marko, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	linux-kernel

On Tue, Apr 02, 2024 at 08:32:40PM +0200, Krzysztof Kozlowski wrote:
> The Espressobin Ultra DTS includes Espressobin DTSI which defines
> ethernet-switch@1 node.  The Ultra DTS overrides "reg" to 3, but that
> leaves still old unit address which conflicts with the new phy@1 node
> (W=1 dtc warning):
> 
>   armada-3720-espressobin.dtsi:148.29-203.4: Warning (unique_unit_address_if_enabled): /soc/internal-regs@d0000000/mdio@32004/ethernet-switch@1: duplicate unit-address (also used in node /soc/internal-regs@d0000000/mdio@32004/ethernet-phy@1)
> 
> Fix this by deleting ethernet-switch@1 node and merging original node
> with code from Ultra DTS into new ethernet-switch@3.

That is a bit ugly, having the exact same code twice.

Could the bulk of the switch node be put into a .dtsi file, and then
included as needed

&mdio {
        switch0: ethernet-switch@1 {
		reg = <1>;        
		include "armada-3720-espressobin-switch.dtsi"

        }
}

&mdio {
        switch0: ethernet-switch@3 {
		reg = <3>;        
		include "armada-3720-espressobin-switch.dtsi"

        }
}

	Andrew

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells
  2024-04-02 18:32 ` [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells Krzysztof Kozlowski
  2024-04-02 19:10   ` Andrew Lunn
@ 2024-04-02 19:28   ` Marek Behún
  1 sibling, 0 replies; 9+ messages in thread
From: Marek Behún @ 2024-04-02 19:28 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Robert Marko, Andrew Lunn, Gregory Clement, Sebastian Hesselbarth,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel,
	devicetree, linux-kernel

On Tue,  2 Apr 2024 20:32:39 +0200
Krzysztof Kozlowski <krzk@kernel.org> wrote:

> Flash node uses single "partition" node to describe partitions, so
> remove deprecated address/size-cells properties to also fix dtc W=1
> warnings:
> 
>   armada-3720-turris-mox.dts:218.10-255.4: Warning (avoid_unnecessary_addr_size): /soc/internal-regs@d0000000/spi@10600/flash@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> ---
>  arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> index f1a9f2234359..54453b0a91f9 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-turris-mox.dts
> @@ -216,8 +216,6 @@ &spi0 {
>  	assigned-clock-rates = <20000000>;
>  
>  	flash@0 {
> -		#address-cells = <1>;
> -		#size-cells = <1>;
>  		compatible = "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <20000000>;

Reviewed-by: Marek Behún <kabel@kernel.org>

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 3/3] arm64: dts: marvell: espressobin-ultra: fix Ethernet Switch unit address
  2024-04-02 19:27   ` Andrew Lunn
@ 2024-04-02 20:11     ` Krzysztof Kozlowski
  0 siblings, 0 replies; 9+ messages in thread
From: Krzysztof Kozlowski @ 2024-04-02 20:11 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Robert Marko, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, linux-arm-kernel, devicetree,
	linux-kernel

On 02/04/2024 21:27, Andrew Lunn wrote:
> On Tue, Apr 02, 2024 at 08:32:40PM +0200, Krzysztof Kozlowski wrote:
>> The Espressobin Ultra DTS includes Espressobin DTSI which defines
>> ethernet-switch@1 node.  The Ultra DTS overrides "reg" to 3, but that
>> leaves still old unit address which conflicts with the new phy@1 node
>> (W=1 dtc warning):
>>
>>   armada-3720-espressobin.dtsi:148.29-203.4: Warning (unique_unit_address_if_enabled): /soc/internal-regs@d0000000/mdio@32004/ethernet-switch@1: duplicate unit-address (also used in node /soc/internal-regs@d0000000/mdio@32004/ethernet-phy@1)
>>
>> Fix this by deleting ethernet-switch@1 node and merging original node
>> with code from Ultra DTS into new ethernet-switch@3.
> 
> That is a bit ugly, having the exact same code twice.
> 
> Could the bulk of the switch node be put into a .dtsi file, and then
> included as needed

There are several overrides/new nodes in espresso ultra, so this is not
the same code.

> 
> &mdio {
>         switch0: ethernet-switch@1 {
> 		reg = <1>;        
> 		include "armada-3720-espressobin-switch.dtsi"

And this DTSI would be with what? No device node? That's not readable.

> 
>         }
> }
Best regards,
Krzysztof


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells
  2024-04-02 18:32 [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2024-04-02 19:10 ` [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells Andrew Lunn
@ 2024-05-05 16:06 ` Gregory CLEMENT
  3 siblings, 0 replies; 9+ messages in thread
From: Gregory CLEMENT @ 2024-05-05 16:06 UTC (permalink / raw)
  To: Krzysztof Kozlowski, Robert Marko, Andrew Lunn,
	Sebastian Hesselbarth, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-arm-kernel, devicetree, linux-kernel
  Cc: Krzysztof Kozlowski

Krzysztof Kozlowski <krzk@kernel.org> writes:

> The ethernet-switch node does not have children with unit addresses, so
> address/size-cells are not really correct, as reported by dtc W=1
> warning:
>
>   armada-3720-eDPU.dts:26.19-60.4: Warning (avoid_unnecessary_addr_size): /soc/internal-regs@d0000000/mdio@32004/switch@0: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property
>
> This probably also fixes dtbs_check warning, but I could not find it, so
> not sure about that.
>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>

Applied on mvebu/dt64 as well as the 2 other pacthes.

Thanks,

Gregory

> ---
>  arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
> index d6d37a1f6f38..91c2f8b4edfa 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
> @@ -25,8 +25,6 @@ &mdio {
>  	/* Actual device is MV88E6361 */
>  	switch: switch@0 {
>  		compatible = "marvell,mv88e6190";
> -		#address-cells = <1>;
> -		#size-cells = <0>;
>  		reg = <0>;
>  		status = "disabled";
>  
> -- 
> 2.34.1

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-05-05 16:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-02 18:32 [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells Krzysztof Kozlowski
2024-04-02 18:32 ` [PATCH 2/3] arm64: dts: marvell: turris-mox: drop unneeded flash address/size-cells Krzysztof Kozlowski
2024-04-02 19:10   ` Andrew Lunn
2024-04-02 19:28   ` Marek Behún
2024-04-02 18:32 ` [PATCH 3/3] arm64: dts: marvell: espressobin-ultra: fix Ethernet Switch unit address Krzysztof Kozlowski
2024-04-02 19:27   ` Andrew Lunn
2024-04-02 20:11     ` Krzysztof Kozlowski
2024-04-02 19:10 ` [PATCH 1/3] arm64: dts: marvell: eDPU: drop redundant address/size-cells Andrew Lunn
2024-05-05 16:06 ` Gregory CLEMENT

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).