All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-07 16:38 ` Michal Suchanek
  0 siblings, 0 replies; 18+ messages in thread
From: Michal Suchanek @ 2022-07-07 16:38 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, devicetree, linux-arm-kernel, linux-kernel

Without "jedec,spi-nor" compatible the flash memory cannot be probed by
u-boot.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index f19ed981da9d..d114bbc5f441 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -169,7 +169,7 @@ &spi0 {
 	flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		compatible = "mxicy,mx25l1606e", "winbond,w25q128", "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 	};
-- 
2.35.3


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

* [PATCH] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-07 16:38 ` Michal Suchanek
  0 siblings, 0 replies; 18+ messages in thread
From: Michal Suchanek @ 2022-07-07 16:38 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, devicetree, linux-arm-kernel, linux-kernel

Without "jedec,spi-nor" compatible the flash memory cannot be probed by
u-boot.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index f19ed981da9d..d114bbc5f441 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -169,7 +169,7 @@ &spi0 {
 	flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		compatible = "mxicy,mx25l1606e", "winbond,w25q128", "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 	};
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-07 16:38 ` Michal Suchanek
@ 2022-07-07 16:48   ` Andre Przywara
  -1 siblings, 0 replies; 18+ messages in thread
From: Andre Przywara @ 2022-07-07 16:48 UTC (permalink / raw)
  To: Michal Suchanek
  Cc: linux-sunxi, Icenowy Zheng, Rob Herring, Krzysztof Kozlowski,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, devicetree,
	linux-arm-kernel, linux-kernel

On Thu,  7 Jul 2022 18:38:55 +0200
Michal Suchanek <msuchanek@suse.de> wrote:

Hi,

> Without "jedec,spi-nor" compatible the flash memory cannot be probed by
> u-boot.
> 
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
>  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index f19ed981da9d..d114bbc5f441 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -169,7 +169,7 @@ &spi0 {
>  	flash@0 {
>  		#address-cells = <1>;
>  		#size-cells = <1>;
> -		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
> +		compatible = "mxicy,mx25l1606e", "winbond,w25q128", "jedec,spi-nor";

Naming three compatible strings violates the binding:
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dtb: flash@0: compatible: 'oneOf' conditional failed, one must be fixed:
        ['mxicy,mx25l1606e', 'winbond,w25q128', 'jedec,spi-nor'] is too long
        'mxicy,mx25l1606e' is not one of ['issi,is25lp016d', 'micron,mt25qu02g', 'mxicy,mx25r1635f', 'mxicy,mx25u6435f', 'mxicy,mx25v8035f', 'spansion,s25sl12801', 'spansion,s25fs512s']
        'jedec,spi-nor' was expected
        From schema: Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml

Not entirely sure why it didn't scream before, actually, because to me it
looks like ending in jedec,spi-nor is mandatory.
Anyway, IIUC the Macronix chip was the one shipped with the (later)
boards, so we should use just that and "jedec,spi-nor".
The actual vendor would be detected at runtime anyway.

Cheers,
Andre

>  		reg = <0>;
>  		spi-max-frequency = <40000000>;
>  	};


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

* Re: [PATCH] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-07 16:48   ` Andre Przywara
  0 siblings, 0 replies; 18+ messages in thread
From: Andre Przywara @ 2022-07-07 16:48 UTC (permalink / raw)
  To: Michal Suchanek
  Cc: linux-sunxi, Icenowy Zheng, Rob Herring, Krzysztof Kozlowski,
	Chen-Yu Tsai, Jernej Skrabec, Samuel Holland, devicetree,
	linux-arm-kernel, linux-kernel

On Thu,  7 Jul 2022 18:38:55 +0200
Michal Suchanek <msuchanek@suse.de> wrote:

Hi,

> Without "jedec,spi-nor" compatible the flash memory cannot be probed by
> u-boot.
> 
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
>  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index f19ed981da9d..d114bbc5f441 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -169,7 +169,7 @@ &spi0 {
>  	flash@0 {
>  		#address-cells = <1>;
>  		#size-cells = <1>;
> -		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
> +		compatible = "mxicy,mx25l1606e", "winbond,w25q128", "jedec,spi-nor";

Naming three compatible strings violates the binding:
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dtb: flash@0: compatible: 'oneOf' conditional failed, one must be fixed:
        ['mxicy,mx25l1606e', 'winbond,w25q128', 'jedec,spi-nor'] is too long
        'mxicy,mx25l1606e' is not one of ['issi,is25lp016d', 'micron,mt25qu02g', 'mxicy,mx25r1635f', 'mxicy,mx25u6435f', 'mxicy,mx25v8035f', 'spansion,s25sl12801', 'spansion,s25fs512s']
        'jedec,spi-nor' was expected
        From schema: Documentation/devicetree/bindings/mtd/jedec,spi-nor.yaml

Not entirely sure why it didn't scream before, actually, because to me it
looks like ending in jedec,spi-nor is mandatory.
Anyway, IIUC the Macronix chip was the one shipped with the (later)
boards, so we should use just that and "jedec,spi-nor".
The actual vendor would be detected at runtime anyway.

Cheers,
Andre

>  		reg = <0>;
>  		spi-max-frequency = <40000000>;
>  	};


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-07 16:48   ` Andre Przywara
@ 2022-07-07 17:07     ` Michal Suchanek
  -1 siblings, 0 replies; 18+ messages in thread
From: Michal Suchanek @ 2022-07-07 17:07 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, devicetree, linux-arm-kernel, linux-kernel

Without "jedec,spi-nor" compatible the flash memory cannot be probed by
u-boot. The macronix part is what is shipped on the boards that come
with a flash chip.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index f19ed981da9d..3706216ffb40 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -169,7 +169,7 @@ &spi0 {
 	flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 	};
-- 
2.35.3


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

* [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-07 17:07     ` Michal Suchanek
  0 siblings, 0 replies; 18+ messages in thread
From: Michal Suchanek @ 2022-07-07 17:07 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, devicetree, linux-arm-kernel, linux-kernel

Without "jedec,spi-nor" compatible the flash memory cannot be probed by
u-boot. The macronix part is what is shipped on the boards that come
with a flash chip.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index f19ed981da9d..3706216ffb40 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -169,7 +169,7 @@ &spi0 {
 	flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 	};
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-07 17:07     ` Michal Suchanek
@ 2022-07-08  4:53       ` Jernej Škrabec
  -1 siblings, 0 replies; 18+ messages in thread
From: Jernej Škrabec @ 2022-07-08  4:53 UTC (permalink / raw)
  To: linux-sunxi, Michal Suchanek
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Samuel Holland, devicetree,
	linux-arm-kernel, linux-kernel

Hi Michal,

Dne četrtek, 07. julij 2022 ob 19:07:20 CEST je Michal Suchanek napisal(a):
> Without "jedec,spi-nor" compatible the flash memory cannot be probed by
> u-boot. The macronix part is what is shipped on the boards that come
> with a flash chip.
> 
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Next time, please add changelog below --- line.

Best regards,
Jernej



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

* Re: [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-08  4:53       ` Jernej Škrabec
  0 siblings, 0 replies; 18+ messages in thread
From: Jernej Škrabec @ 2022-07-08  4:53 UTC (permalink / raw)
  To: linux-sunxi, Michal Suchanek
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Samuel Holland, devicetree,
	linux-arm-kernel, linux-kernel

Hi Michal,

Dne četrtek, 07. julij 2022 ob 19:07:20 CEST je Michal Suchanek napisal(a):
> Without "jedec,spi-nor" compatible the flash memory cannot be probed by
> u-boot. The macronix part is what is shipped on the boards that come
> with a flash chip.
> 
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>

Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Next time, please add changelog below --- line.

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-07 17:07     ` Michal Suchanek
@ 2022-07-08  7:36       ` Samuel Holland
  -1 siblings, 0 replies; 18+ messages in thread
From: Samuel Holland @ 2022-07-08  7:36 UTC (permalink / raw)
  To: Michal Suchanek, Jernej Skrabec
  Cc: linux-sunxi, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, devicetree, linux-arm-kernel,
	linux-kernel

Hi Michal,

The subject prefix should start with "ARM: dts:" (e.g. "ARM: dts: sunxi:").
Generally it is a good idea to look at the log of the file and follow the
pattern you see there.

On 7/7/22 12:07 PM, Michal Suchanek wrote:
> Without "jedec,spi-nor" compatible the flash memory cannot be probed by
> u-boot. The macronix part is what is shipped on the boards that come
> with a flash chip.
> 

Fixes: 45857ae95478 ("ARM: dts: orange-pi-zero: add node for SPI NOR")

Regards,
Samuel

> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
>  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index f19ed981da9d..3706216ffb40 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -169,7 +169,7 @@ &spi0 {
>  	flash@0 {
>  		#address-cells = <1>;
>  		#size-cells = <1>;
> -		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
> +		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <40000000>;
>  	};
> 


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

* Re: [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-08  7:36       ` Samuel Holland
  0 siblings, 0 replies; 18+ messages in thread
From: Samuel Holland @ 2022-07-08  7:36 UTC (permalink / raw)
  To: Michal Suchanek, Jernej Skrabec
  Cc: linux-sunxi, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, devicetree, linux-arm-kernel,
	linux-kernel

Hi Michal,

The subject prefix should start with "ARM: dts:" (e.g. "ARM: dts: sunxi:").
Generally it is a good idea to look at the log of the file and follow the
pattern you see there.

On 7/7/22 12:07 PM, Michal Suchanek wrote:
> Without "jedec,spi-nor" compatible the flash memory cannot be probed by
> u-boot. The macronix part is what is shipped on the boards that come
> with a flash chip.
> 

Fixes: 45857ae95478 ("ARM: dts: orange-pi-zero: add node for SPI NOR")

Regards,
Samuel

> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
>  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> index f19ed981da9d..3706216ffb40 100644
> --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -169,7 +169,7 @@ &spi0 {
>  	flash@0 {
>  		#address-cells = <1>;
>  		#size-cells = <1>;
> -		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
> +		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <40000000>;
>  	};
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-08  7:36       ` Samuel Holland
@ 2022-07-08 14:13         ` Jernej Škrabec
  -1 siblings, 0 replies; 18+ messages in thread
From: Jernej Škrabec @ 2022-07-08 14:13 UTC (permalink / raw)
  To: Michal Suchanek, Samuel Holland
  Cc: linux-sunxi, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, devicetree, linux-arm-kernel,
	linux-kernel

Hi Michal,

sorry, but I was a bit too quick with giving r-b line. See comments below.

Dne petek, 08. julij 2022 ob 09:36:26 CEST je Samuel Holland napisal(a):
> Hi Michal,
> 
> The subject prefix should start with "ARM: dts:" (e.g. "ARM: dts: sunxi:").
> Generally it is a good idea to look at the log of the file and follow the
> pattern you see there.
> 
> On 7/7/22 12:07 PM, Michal Suchanek wrote:
> > Without "jedec,spi-nor" compatible the flash memory cannot be probed by
> > u-boot. The macronix part is what is shipped on the boards that come
> > with a flash chip.

Please reword this a bit. DT isn't user specific, so U-Boot should not be 
mentioned. But you can write about compatible being wrong. According to DT 
bindings, it should be manufacturer specific compatible, followed by 
"jedec,spi-nor".

Once both issues are addressed, you can keep my r-b tag and include fixes tag 
posted by Sameul.

Best regards,
Jernej

> 
> Fixes: 45857ae95478 ("ARM: dts: orange-pi-zero: add node for SPI NOR")
> 
> Regards,
> Samuel
> 
> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> > ---
> > 
> >  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts index
> > f19ed981da9d..3706216ffb40 100644
> > --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > @@ -169,7 +169,7 @@ &spi0 {
> > 
> >  	flash@0 {
> >  	
> >  		#address-cells = <1>;
> >  		#size-cells = <1>;
> > 
> > -		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
> > +		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
> > 
> >  		reg = <0>;
> >  		spi-max-frequency = <40000000>;
> >  	
> >  	};





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

* Re: [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-08 14:13         ` Jernej Škrabec
  0 siblings, 0 replies; 18+ messages in thread
From: Jernej Škrabec @ 2022-07-08 14:13 UTC (permalink / raw)
  To: Michal Suchanek, Samuel Holland
  Cc: linux-sunxi, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, devicetree, linux-arm-kernel,
	linux-kernel

Hi Michal,

sorry, but I was a bit too quick with giving r-b line. See comments below.

Dne petek, 08. julij 2022 ob 09:36:26 CEST je Samuel Holland napisal(a):
> Hi Michal,
> 
> The subject prefix should start with "ARM: dts:" (e.g. "ARM: dts: sunxi:").
> Generally it is a good idea to look at the log of the file and follow the
> pattern you see there.
> 
> On 7/7/22 12:07 PM, Michal Suchanek wrote:
> > Without "jedec,spi-nor" compatible the flash memory cannot be probed by
> > u-boot. The macronix part is what is shipped on the boards that come
> > with a flash chip.

Please reword this a bit. DT isn't user specific, so U-Boot should not be 
mentioned. But you can write about compatible being wrong. According to DT 
bindings, it should be manufacturer specific compatible, followed by 
"jedec,spi-nor".

Once both issues are addressed, you can keep my r-b tag and include fixes tag 
posted by Sameul.

Best regards,
Jernej

> 
> Fixes: 45857ae95478 ("ARM: dts: orange-pi-zero: add node for SPI NOR")
> 
> Regards,
> Samuel
> 
> > Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> > ---
> > 
> >  arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts index
> > f19ed981da9d..3706216ffb40 100644
> > --- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > +++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
> > @@ -169,7 +169,7 @@ &spi0 {
> > 
> >  	flash@0 {
> >  	
> >  		#address-cells = <1>;
> >  		#size-cells = <1>;
> > 
> > -		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
> > +		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
> > 
> >  		reg = <0>;
> >  		spi-max-frequency = <40000000>;
> >  	
> >  	};





_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH v2] ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-08 14:13         ` Jernej Škrabec
@ 2022-07-08 17:45           ` Michal Suchanek
  -1 siblings, 0 replies; 18+ messages in thread
From: Michal Suchanek @ 2022-07-08 17:45 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, devicetree, linux-arm-kernel, linux-kernel

The device tree should include generic "jedec,spi-nor" compatible, and a
manufacturer-specific one.
The macronix part is what is shipped on the boards that come with a
flash chip.

Fixes: 45857ae95478 ("ARM: dts: orange-pi-zero: add node for SPI NOR")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
v2: drop winbond compatible
v3: reword commit message
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index f19ed981da9d..3706216ffb40 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -169,7 +169,7 @@ &spi0 {
 	flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 	};
-- 
2.35.3


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

* [PATCH v2] ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-08 17:45           ` Michal Suchanek
  0 siblings, 0 replies; 18+ messages in thread
From: Michal Suchanek @ 2022-07-08 17:45 UTC (permalink / raw)
  To: linux-sunxi
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Jernej Skrabec,
	Samuel Holland, devicetree, linux-arm-kernel, linux-kernel

The device tree should include generic "jedec,spi-nor" compatible, and a
manufacturer-specific one.
The macronix part is what is shipped on the boards that come with a
flash chip.

Fixes: 45857ae95478 ("ARM: dts: orange-pi-zero: add node for SPI NOR")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
---
v2: drop winbond compatible
v3: reword commit message
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
index f19ed981da9d..3706216ffb40 100644
--- a/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -169,7 +169,7 @@ &spi0 {
 	flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 	};
-- 
2.35.3


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-08 17:45           ` Michal Suchanek
@ 2022-07-08 18:31             ` Jernej Škrabec
  -1 siblings, 0 replies; 18+ messages in thread
From: Jernej Škrabec @ 2022-07-08 18:31 UTC (permalink / raw)
  To: linux-sunxi, Michal Suchanek
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Samuel Holland, devicetree,
	linux-arm-kernel, linux-kernel

Dne petek, 08. julij 2022 ob 19:45:29 CEST je Michal Suchanek napisal(a):
> The device tree should include generic "jedec,spi-nor" compatible, and a
> manufacturer-specific one.
> The macronix part is what is shipped on the boards that come with a
> flash chip.
> 
> Fixes: 45857ae95478 ("ARM: dts: orange-pi-zero: add node for SPI NOR")
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Applied, thanks!

Best regards,
Jernej



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

* Re: [PATCH v2] ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero
@ 2022-07-08 18:31             ` Jernej Škrabec
  0 siblings, 0 replies; 18+ messages in thread
From: Jernej Škrabec @ 2022-07-08 18:31 UTC (permalink / raw)
  To: linux-sunxi, Michal Suchanek
  Cc: Michal Suchanek, Icenowy Zheng, Andre Przywara, Rob Herring,
	Krzysztof Kozlowski, Chen-Yu Tsai, Samuel Holland, devicetree,
	linux-arm-kernel, linux-kernel

Dne petek, 08. julij 2022 ob 19:45:29 CEST je Michal Suchanek napisal(a):
> The device tree should include generic "jedec,spi-nor" compatible, and a
> manufacturer-specific one.
> The macronix part is what is shipped on the boards that come with a
> flash chip.
> 
> Fixes: 45857ae95478 ("ARM: dts: orange-pi-zero: add node for SPI NOR")
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>

Applied, thanks!

Best regards,
Jernej



_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-09  6:59 ` [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero Michal Suchanek
@ 2022-07-09 19:53   ` Andre Przywara
  0 siblings, 0 replies; 18+ messages in thread
From: Andre Przywara @ 2022-07-09 19:53 UTC (permalink / raw)
  To: Michal Suchanek; +Cc: u-boot, Matthias Brugger, Jernej Skrabec, Jagan Teki

On Sat,  9 Jul 2022 08:59:45 +0200
Michal Suchanek <msuchanek@suse.de> wrote:

Hi Michal,

> The device tree should include generic "jedec,spi-nor" compatible, and a
> manufacturer-specific one.
> The macronix part is what is shipped on the boards that come with a
> flash chip.

thanks for taking care and trying to bring those fixes upstream!

It seems that this patch alone doesn't do anything, as SPI0 is still
disabled in the DT. Also we normally don't pick single DT changes from
Linux, unless they fix a very particular U-Boot issue. Instead we try to
sync the DT files in batches, once they reached a certain maturity
state in the Linux tree (for instance merged into Linus' tree).

So as this one here doesn't do anything, we will just pick it up as
part of the next sync, which I guess is around Linux 5.20-rc1, due in
about a month.

As mentioned on IRC, I would be interested in solving this "SPI flash is
optional" issue. IIUC there was pushback in Linux against blanketly
enabling the SPI flash on this board, as there were boards sold without
the chip? (Do you have a link to that discussion?) So the plan would be
to detect the availability of the SPI flash in U-Boot, and then disable
it (in the DT passed to the kernel), when the chip is not populated.
Then we can send a patch to Linux to enable it in the DT, and sync that
back.
I would be grateful if someone could investigate the code it
takes to pull this off.

Thanks,
Andre

> 
> Fixes: 280294c5df ("sunxi: boards: Enable SPI flash support in U-Boot proper")
> Signed-off-by: Michal Suchanek <msuchanek@suse.de>
> ---
> v2: cherry-pick from Linux
>  arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> index b08e84c616..80c1e66b38 100644
> --- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> +++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
> @@ -170,7 +170,7 @@
>  	flash@0 {
>  		#address-cells = <1>;
>  		#size-cells = <1>;
> -		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
> +		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
>  		reg = <0>;
>  		spi-max-frequency = <40000000>;
>  	};


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

* [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero
  2022-07-07  8:25 [PATCH] sunxi: dts: OrangePi Zero: Fixup SPI flash device node Michal Suchanek
@ 2022-07-09  6:59 ` Michal Suchanek
  2022-07-09 19:53   ` Andre Przywara
  0 siblings, 1 reply; 18+ messages in thread
From: Michal Suchanek @ 2022-07-09  6:59 UTC (permalink / raw)
  To: u-boot
  Cc: Michal Suchanek, Matthias Brugger, Jernej Skrabec,
	Andre Przywara, Jagan Teki

The device tree should include generic "jedec,spi-nor" compatible, and a
manufacturer-specific one.
The macronix part is what is shipped on the boards that come with a
flash chip.

Fixes: 280294c5df ("sunxi: boards: Enable SPI flash support in U-Boot proper")
Signed-off-by: Michal Suchanek <msuchanek@suse.de>
---
v2: cherry-pick from Linux
 arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
index b08e84c616..80c1e66b38 100644
--- a/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
+++ b/arch/arm/dts/sun8i-h2-plus-orangepi-zero.dts
@@ -170,7 +170,7 @@
 	flash@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 	};
-- 
2.36.1


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

end of thread, other threads:[~2022-07-09 19:54 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 16:38 [PATCH] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero Michal Suchanek
2022-07-07 16:38 ` Michal Suchanek
2022-07-07 16:48 ` Andre Przywara
2022-07-07 16:48   ` Andre Przywara
2022-07-07 17:07   ` [PATCH v2] " Michal Suchanek
2022-07-07 17:07     ` Michal Suchanek
2022-07-08  4:53     ` Jernej Škrabec
2022-07-08  4:53       ` Jernej Škrabec
2022-07-08  7:36     ` Samuel Holland
2022-07-08  7:36       ` Samuel Holland
2022-07-08 14:13       ` Jernej Škrabec
2022-07-08 14:13         ` Jernej Škrabec
2022-07-08 17:45         ` [PATCH v2] ARM: dts: sunxi: " Michal Suchanek
2022-07-08 17:45           ` Michal Suchanek
2022-07-08 18:31           ` Jernej Škrabec
2022-07-08 18:31             ` Jernej Škrabec
  -- strict thread matches above, loose matches on Subject: below --
2022-07-07  8:25 [PATCH] sunxi: dts: OrangePi Zero: Fixup SPI flash device node Michal Suchanek
2022-07-09  6:59 ` [PATCH v2] sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero Michal Suchanek
2022-07-09 19:53   ` Andre Przywara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.