diff mbox series

[RFT,v2,09/10] arm64: dts: microchip: sparx5_pcb134: drop duplicated NOR flash

Message ID 20240405190419.74162-9-krzk@kernel.org (mailing list archive)
State New
Headers show
Series [v2,01/10] arm64: dts: microchip: sparx5: fix mdio reg | expand

Commit Message

Krzysztof Kozlowski April 5, 2024, 7:04 p.m. UTC
Since beginning the DTS extended the SPI0 in two places adding two SPI
muxes, each with same SPI NOR flash.  Both used exactly the same
chip-selects, so this was clearly buggy code.  Then in commit
d0f482bb06f9 ("arm64: dts: sparx5: Add the Sparx5 switch node") one SPI
mux was removed, while keeping the SPI NOR flash node.

This still leaves duplicated SPI nodes under same chip select 0,
reported by dtc W=1 warnings:

  sparx5_pcb134_board.dtsi:277.10-281.4: Warning (unique_unit_address_if_enabled): /axi@600000000/spi@600104000/flash@0: duplicate unit-address (also used in node /axi@600000000/spi@600104000/spi@0)

Steen Hegelund confirmed that in fact there is a SPI mux, thus remove
the duplicated node without the mux.

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

---

Not tested on hardware

Changes in v2:
1. Remove SPI node without mux.
---
 arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi | 9 ---------
 1 file changed, 9 deletions(-)

Comments

Steen Hegelund April 8, 2024, 8:44 a.m. UTC | #1
Hi Krzysztof,


On Fri, 2024-04-05 at 21:04 +0200, Krzysztof Kozlowski wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you
> know the content is safe
> 
> Since beginning the DTS extended the SPI0 in two places adding two
> SPI
> muxes, each with same SPI NOR flash.  Both used exactly the same
> chip-selects, so this was clearly buggy code.  Then in commit
> d0f482bb06f9 ("arm64: dts: sparx5: Add the Sparx5 switch node") one
> SPI
> mux was removed, while keeping the SPI NOR flash node.
> 
> This still leaves duplicated SPI nodes under same chip select 0,
> reported by dtc W=1 warnings:
> 
>   sparx5_pcb134_board.dtsi:277.10-281.4: Warning
> (unique_unit_address_if_enabled):
> /axi@600000000/spi@600104000/flash@0: duplicate unit-address (also
> used in node /axi@600000000/spi@600104000/spi@0)
> 
> Steen Hegelund confirmed that in fact there is a SPI mux, thus remove
> the duplicated node without the mux.
> 
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> 
> ---
> 
> Not tested on hardware
> 
> Changes in v2:
> 1. Remove SPI node without mux.
> ---
>  arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi | 9 ---------
>  1 file changed, 9 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi
> b/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi
> index f165a409bc1d..2c5574734c9e 100644
> --- a/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi
> +++ b/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi
> @@ -272,15 +272,6 @@ gpio@1 {
>         };
>  };
> 
> -&spi0 {
> -       status = "okay";
> -       flash@0 {
> -               compatible = "jedec,spi-nor";
> -               spi-max-frequency = <8000000>;
> -               reg = <0>;
> -       };
> -};
> -
>  &spi0 {
>         status = "okay";
>         spi@0 {
> --
> 2.34.1
> 

This works fine on my setup now.
Thanks for the patch series.

For this patch:
Tested-by: Steen Hegelund <Steen.Hegelund@microchip.com>

For whole series:
Reviewed-by: Steen Hegelund <Steen.Hegelund@microchip.com>
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi b/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi
index f165a409bc1d..2c5574734c9e 100644
--- a/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi
+++ b/arch/arm64/boot/dts/microchip/sparx5_pcb134_board.dtsi
@@ -272,15 +272,6 @@  gpio@1 {
 	};
 };
 
-&spi0 {
-	status = "okay";
-	flash@0 {
-		compatible = "jedec,spi-nor";
-		spi-max-frequency = <8000000>;
-		reg = <0>;
-	};
-};
-
 &spi0 {
 	status = "okay";
 	spi@0 {