linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] arm64: dts: armada-3720-espressobin: correct spi node
@ 2019-05-27 11:16 Tomasz Maciej Nowak
  2019-05-29 21:01 ` Ellie Reeves
  2019-06-03 15:04 ` Gregory CLEMENT
  0 siblings, 2 replies; 3+ messages in thread
From: Tomasz Maciej Nowak @ 2019-05-27 11:16 UTC (permalink / raw)
  To: Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Rob Herring, Mark Rutland
  Cc: Ellie Reeves, Uwe Kleine-König, linux-arm-kernel,
	devicetree, linux-kernel

The manufacturer of this board, ships it with various SPI NOR chips and
increments U-Boot bootloader version along the time. There is no way to
tell which is placed on the board since no revision bump takes place.
This creates two issues.

The first, cosmetic. Since the NOR chip may differ, there's message on
boot stating that kernel expected w25q32dw and found different one. To
correct this, remove optional device-specific compatible string. Being
here lets replace bogus "spi-flash" compatible string with proper one.

The second is linked to partitions layout, it changed after commit:
81e7251252 ("arm64: mvebu: config: move env to the end of the 4MB boot
device") in Marvells downstream U-Boot fork [1], shifting environment
location to the end of boot device. Since the new boards will have U-Boot
with this change, it'll lead to improper results writing or reading from
these partitions. We can't tell if users will update bootloader to recent
version provided on manufacturer website, so lets drop partitons layout.

1. https://github.com/MarvellEmbeddedProcessors/u-boot-marvell.git

Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
---
 .../dts/marvell/armada-3720-espressobin.dts    | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
index 6be019e1888e..fbcf03f86c96 100644
--- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
+++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
@@ -95,25 +95,9 @@
 
 	flash@0 {
 		reg = <0>;
-		compatible = "winbond,w25q32dw", "jedec,spi-flash";
+		compatible = "jedec,spi-nor";
 		spi-max-frequency = <104000000>;
 		m25p,fast-read;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition@0 {
-				label = "uboot";
-				reg = <0 0x180000>;
-			};
-
-			partition@180000 {
-				label = "ubootenv";
-				reg = <0x180000 0x10000>;
-			};
-		};
 	};
 };
 
-- 
2.21.0


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

* Re: [PATCH] arm64: dts: armada-3720-espressobin: correct spi node
  2019-05-27 11:16 [PATCH] arm64: dts: armada-3720-espressobin: correct spi node Tomasz Maciej Nowak
@ 2019-05-29 21:01 ` Ellie Reeves
  2019-06-03 15:04 ` Gregory CLEMENT
  1 sibling, 0 replies; 3+ messages in thread
From: Ellie Reeves @ 2019-05-29 21:01 UTC (permalink / raw)
  To: Tomasz Maciej Nowak, Jason Cooper, Andrew Lunn, Gregory Clement,
	Sebastian Hesselbarth, Rob Herring, Mark Rutland
  Cc: Uwe Kleine-König, linux-arm-kernel, devicetree, linux-kernel

Hi,
yes, I agree on this personally. I meant to correct this myself or at 
least try to, but I didn't have time, as I was the one that found out 
how they did their partition layout previously, this used to be good so 
I asked Uwe Kleine-König if he could get this patch upstreamed, but as 
it is I myself upgraded U-Boot and cannot make use of it anymore.
Thanks

Tomasz Maciej Nowak a écrit :
> The manufacturer of this board, ships it with various SPI NOR chips and
> increments U-Boot bootloader version along the time. There is no way to
> tell which is placed on the board since no revision bump takes place.
> This creates two issues.
> 
> The first, cosmetic. Since the NOR chip may differ, there's message on
> boot stating that kernel expected w25q32dw and found different one. To
> correct this, remove optional device-specific compatible string. Being
> here lets replace bogus "spi-flash" compatible string with proper one.
> 
> The second is linked to partitions layout, it changed after commit:
> 81e7251252 ("arm64: mvebu: config: move env to the end of the 4MB boot
> device") in Marvells downstream U-Boot fork [1], shifting environment
> location to the end of boot device. Since the new boards will have U-Boot
> with this change, it'll lead to improper results writing or reading from
> these partitions. We can't tell if users will update bootloader to recent
> version provided on manufacturer website, so lets drop partitons layout.
> 
> 1. https://github.com/MarvellEmbeddedProcessors/u-boot-marvell.git
> 
> Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>
> ---
>   .../dts/marvell/armada-3720-espressobin.dts    | 18 +-----------------
>   1 file changed, 1 insertion(+), 17 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
> index 6be019e1888e..fbcf03f86c96 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
> @@ -95,25 +95,9 @@
>   
>   	flash@0 {
>   		reg = <0>;
> -		compatible = "winbond,w25q32dw", "jedec,spi-flash";
> +		compatible = "jedec,spi-nor";
>   		spi-max-frequency = <104000000>;
>   		m25p,fast-read;
> -
> -		partitions {
> -			compatible = "fixed-partitions";
> -			#address-cells = <1>;
> -			#size-cells = <1>;
> -
> -			partition@0 {
> -				label = "uboot";
> -				reg = <0 0x180000>;
> -			};
> -
> -			partition@180000 {
> -				label = "ubootenv";
> -				reg = <0x180000 0x10000>;
> -			};
> -		};
>   	};
>   };
>   
> 

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

* Re: [PATCH] arm64: dts: armada-3720-espressobin: correct spi node
  2019-05-27 11:16 [PATCH] arm64: dts: armada-3720-espressobin: correct spi node Tomasz Maciej Nowak
  2019-05-29 21:01 ` Ellie Reeves
@ 2019-06-03 15:04 ` Gregory CLEMENT
  1 sibling, 0 replies; 3+ messages in thread
From: Gregory CLEMENT @ 2019-06-03 15:04 UTC (permalink / raw)
  To: Tomasz Maciej Nowak, Jason Cooper, Andrew Lunn,
	Sebastian Hesselbarth, Rob Herring, Mark Rutland
  Cc: Ellie Reeves, Uwe Kleine-König, linux-arm-kernel,
	devicetree, linux-kernel

Tomasz Maciej Nowak <tmn505@gmail.com> writes:

> The manufacturer of this board, ships it with various SPI NOR chips and
> increments U-Boot bootloader version along the time. There is no way to
> tell which is placed on the board since no revision bump takes place.
> This creates two issues.
>
> The first, cosmetic. Since the NOR chip may differ, there's message on
> boot stating that kernel expected w25q32dw and found different one. To
> correct this, remove optional device-specific compatible string. Being
> here lets replace bogus "spi-flash" compatible string with proper one.
>
> The second is linked to partitions layout, it changed after commit:
> 81e7251252 ("arm64: mvebu: config: move env to the end of the 4MB boot
> device") in Marvells downstream U-Boot fork [1], shifting environment
> location to the end of boot device. Since the new boards will have U-Boot
> with this change, it'll lead to improper results writing or reading from
> these partitions. We can't tell if users will update bootloader to recent
> version provided on manufacturer website, so lets drop partitons layout.
>
> 1. https://github.com/MarvellEmbeddedProcessors/u-boot-marvell.git
>
> Signed-off-by: Tomasz Maciej Nowak <tmn505@gmail.com>

Applied on mvebu/dt64

Thanks,

Gregory

> ---
>  .../dts/marvell/armada-3720-espressobin.dts    | 18 +-----------------
>  1 file changed, 1 insertion(+), 17 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
> index 6be019e1888e..fbcf03f86c96 100644
> --- a/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
> +++ b/arch/arm64/boot/dts/marvell/armada-3720-espressobin.dts
> @@ -95,25 +95,9 @@
>  
>  	flash@0 {
>  		reg = <0>;
> -		compatible = "winbond,w25q32dw", "jedec,spi-flash";
> +		compatible = "jedec,spi-nor";
>  		spi-max-frequency = <104000000>;
>  		m25p,fast-read;
> -
> -		partitions {
> -			compatible = "fixed-partitions";
> -			#address-cells = <1>;
> -			#size-cells = <1>;
> -
> -			partition@0 {
> -				label = "uboot";
> -				reg = <0 0x180000>;
> -			};
> -
> -			partition@180000 {
> -				label = "ubootenv";
> -				reg = <0x180000 0x10000>;
> -			};
> -		};
>  	};
>  };
>  
> -- 
> 2.21.0
>

-- 
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com

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

end of thread, other threads:[~2019-06-03 15:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 11:16 [PATCH] arm64: dts: armada-3720-espressobin: correct spi node Tomasz Maciej Nowak
2019-05-29 21:01 ` Ellie Reeves
2019-06-03 15:04 ` 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).