Skip to contentSkip to conversation

sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero

PATCH Superseded Michal Suchanek 4 participants 8 messages Jul 7, 2022 – Jul 8, 2022

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero

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

---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +1 -1
index f19ed981da9d..d114bbc5f441 100644
@@ -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>;
 	};
Signature · 1 line
2.35.3
#1 lore raw

On Thu, 7 Jul 2022 18:38:55 +0200
Michal Suchanek <[email protected]> wrote:

Hi,

Quoted 13 lines

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

---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +0 -0
index f19ed981da9d..d114bbc5f441 100644

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts &spi0 { · line 172

Quoted 5 lines
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +1 -1
@@ -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

Quoted 3 lines
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +0 -0
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 	};
#2 lore raw

PATCH v2 1/1 sunxi: dts: Fix SPI NOR campatible on Orange Pi Zero

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.

---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +1 -1
index f19ed981da9d..3706216ffb40 100644
@@ -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>;
 	};
Signature · 1 line
2.35.3
maintainer Acked-by on v2 1/1
#3 lore raw

Hi Michal,

Dne četrtek, 07. julij 2022 ob 19:07:20 CEST je Michal Suchanek napisal(a):

Quoted 5 lines

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.

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

Best regards,
Jernej

maintainer
#4 lore raw
In reply to Michal Suchanek

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.

Quoted 4 lines · Michal Suchanek

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

Quoted 19 lines
---
 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +1 -1
index f19ed981da9d..3706216ffb40 100644
@@ -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>;
 	};
maintainer
#5 lore raw

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):

Quoted 10 lines

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.

Quoted 3 lines · Michal Suchanek

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

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

Regards,
Samuel

Quoted 25 lines

---

 arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts index f19ed981da9d..3706216ffb40 100644

arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +1 -1
@@ -169,7 +169,7 @@ &spi0 {
 
 	flash@0 {
 
 		#address-cells = <1>;
 		#size-cells = <1>;
 
-		compatible = "mxicy,mx25l1606e", "winbond,w25q128";
+		compatible = "mxicy,mx25l1606e", "jedec,spi-nor";
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +0 -0
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 
 	};
#6 lore raw

PATCH v2 1/1 ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero

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")

---
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(-)
arch/arm/boot/dts/sun8i-h2-plus-orangepi-zero.dts +1 -1
index f19ed981da9d..3706216ffb40 100644
@@ -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>;
 	};
Signature · 1 line
2.35.3
maintainer Applied
#7 lore raw

Re: [PATCH v2] ARM: dts: sunxi: Fix SPI NOR campatible on Orange Pi Zero

Dne petek, 08. julij 2022 ob 19:45:29 CEST je Michal Suchanek napisal(a):

Quoted 8 lines

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")

Applied, thanks!

Best regards,
Jernej