Skip to contentSkip to conversation

spi: aspeed: Use "jedec,spi-nor" compatible to count devices

PATCH Applied Cédric Le Goater 2 participants 5 messages Jun 8, 2022 – Jun 16, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 spi: aspeed: Use "jedec,spi-nor" compatible to count devices

The SoC device trees use the "jedec,spi-nor" compatible property to describe the flash devices and the board device trees override this property with "spi-flash", "sst,w25q256". This comes from the initial driver which was first written when spi-nor support had not been merged in U-boot yet.

"jedec,spi-nor" should be preferred since it is used by Linux and the latest U-boot. Use it to count devices. We will clean up the board device trees later.

---
 drivers/spi/aspeed_spi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/aspeed_spi.c +2 -1
index 65d69105e8e8..45f6a8dd6850 100644
@@ -1241,7 +1241,8 @@ static int aspeed_spi_count_flash_devices(struct udevice *bus)
 
 	dev_for_each_subnode(node, bus) {
 		if (ofnode_is_available(node) &&
-		    ofnode_device_is_compatible(node, "spi-flash"))
+		    (ofnode_device_is_compatible(node, "spi-flash") ||
+		     ofnode_device_is_compatible(node, "jedec,spi-nor")))
 			count++;
 	}
 
Signature · 1 line
2.35.3
#1 lore raw

PATCH 2/2 ARM: dts: aspeed: Remove "spi-flash" compatible

The underlying SoC definitions use compatible "jedec,spi-nor", so does the aspeed SPI driver, this to be in sync with Linux and the latest U-Boot.

---
 arch/arm/dts/ast2400-evb.dts       | 4 ----
 arch/arm/dts/ast2400-palmetto.dts  | 4 ----
 arch/arm/dts/ast2500-evb.dts       | 4 ----
 arch/arm/dts/ast2600-bletchley.dts | 8 --------
 arch/arm/dts/ast2600-evb.dts       | 8 --------
 arch/arm/dts/ast2600-fpga.dts      | 2 --
 arch/arm/dts/ast2600-intel.dts     | 8 --------
 arch/arm/dts/ast2600-ncsi.dts      | 8 --------
 arch/arm/dts/ast2600-pfr.dts       | 8 --------
 arch/arm/dts/ast2600-rainier.dts   | 2 --
 arch/arm/dts/ast2600-s6q.dts       | 2 --
 arch/arm/dts/ast2600-slt.dts       | 8 --------
 arch/arm/dts/ast2600-tacoma.dts    | 2 --
 arch/arm/dts/ast2600a0-evb.dts     | 8 --------
 arch/arm/dts/ast2600a1-evb.dts     | 8 --------
 15 files changed, 84 deletions(-)
arch/arm/dts/ast2400-evb.dts +0 -4
index 2ba15d17deda..402a1fa924a3 100644
@@ -60,7 +60,6 @@
 &fmc {
 	status = "okay";
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -68,7 +67,6 @@
 	};
 
 	flash@1 {
-                compatible = "spi-flash", "sst,w25q256";
                 status = "okay";
                 spi-max-frequency = <50000000>;
                 spi-tx-bus-width = <2>;
@@ -81,7 +79,6 @@
 	flash@0 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_spi1_default>;
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -90,7 +87,6 @@
 	flash@1 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_spi1_default &pinctrl_spi1cs1_default>;
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
arch/arm/dts/ast2400-palmetto.dts +0 -4
index a512f602d2f1..db566f899f63 100644
@@ -63,7 +63,6 @@
 &fmc {
 	status = "okay";
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -71,7 +70,6 @@
 	};
 
 	flash@1 {
-                compatible = "spi-flash", "sst,w25q256";
                 status = "okay";
                 spi-max-frequency = <50000000>;
                 spi-tx-bus-width = <2>;
@@ -84,7 +82,6 @@
 	flash@0 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_spi1_default>;
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -93,7 +90,6 @@
 	flash@1 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_spi1_default &pinctrl_spi1cs1_default>;
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
arch/arm/dts/ast2500-evb.dts +0 -4
index f668eec5c137..a6cd74d41c78 100644
@@ -65,7 +65,6 @@
 &fmc {
 	status = "okay";
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -73,7 +72,6 @@
 	};
 
 	flash@1 {
-                compatible = "spi-flash", "sst,w25q256";
                 status = "okay";
                 spi-max-frequency = <50000000>;
                 spi-tx-bus-width = <2>;
@@ -86,7 +84,6 @@
 	flash@0 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_spi1_default>;
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -95,7 +92,6 @@
 	flash@1 {
 		pinctrl-names = "default";
 		pinctrl-0 = <&pinctrl_spi1_default &pinctrl_spi1cs1_default>;
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
arch/arm/dts/ast2600-bletchley.dts +0 -8
index 57ca845b94a7..bc907e213481 100644
@@ -87,7 +87,6 @@
 	pinctrl-0 = <&pinctrl_fmcquad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -95,7 +94,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -103,7 +101,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -120,7 +117,6 @@
 			&pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -128,7 +124,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -144,7 +139,6 @@
 			&pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -152,7 +146,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -160,7 +153,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
arch/arm/dts/ast2600-evb.dts +0 -8
index 3aeef78df22d..14a001daee95 100644
@@ -122,7 +122,6 @@
 	pinctrl-0 = <&pinctrl_fmcquad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -130,7 +129,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -138,7 +136,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -155,7 +152,6 @@
 			&pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -163,7 +159,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -179,7 +174,6 @@
 			&pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -187,7 +181,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -195,7 +188,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
arch/arm/dts/ast2600-fpga.dts +0 -2
index be0788d92473..5ff27b78a4de 100644
@@ -76,7 +76,6 @@
 &fmc {
 	status = "okay";
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -84,7 +83,6 @@
 	};
 
 	flash@1 {
-                compatible = "spi-flash", "sst,w25q256";
                 status = "okay";
                 spi-max-frequency = <50000000>;
                 spi-tx-bus-width = <2>;
arch/arm/dts/ast2600-intel.dts +0 -8
index 19d19f6ef52a..d2c8bc2cd45f 100644
@@ -123,7 +123,6 @@
 	pinctrl-0 = <&pinctrl_fmcquad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -131,7 +130,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -139,7 +137,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -156,7 +153,6 @@
 			&pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -164,7 +160,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -180,7 +175,6 @@
 			&pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -188,7 +182,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -196,7 +189,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
arch/arm/dts/ast2600-ncsi.dts +0 -8
index f55294cdf95e..000fd796764f 100644
@@ -124,7 +124,6 @@
 	pinctrl-0 = <&pinctrl_fmcquad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -132,7 +131,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -140,7 +138,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -157,7 +154,6 @@
 			&pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -165,7 +161,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -181,7 +176,6 @@
 			&pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -189,7 +183,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -197,7 +190,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
arch/arm/dts/ast2600-pfr.dts +0 -8
index 8596207f5463..e035a68e970f 100644
@@ -124,7 +124,6 @@
 	timing-calibration-disabled;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <25000000>;
 		spi-tx-bus-width = <1>;
@@ -132,7 +131,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <25000000>;
 		spi-tx-bus-width = <1>;
@@ -140,7 +138,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <25000000>;
 		spi-tx-bus-width = <1>;
@@ -158,7 +155,6 @@
 	timing-calibration-disabled;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <25000000>;
 		spi-tx-bus-width = <1>;
@@ -166,7 +162,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <25000000>;
 		spi-tx-bus-width = <1>;
@@ -183,7 +178,6 @@
 	timing-calibration-disabled;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <25000000>;
 		spi-tx-bus-width = <1>;
@@ -191,7 +185,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <25000000>;
 		spi-tx-bus-width = <1>;
@@ -199,7 +192,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <25000000>;
 		spi-tx-bus-width = <1>;
arch/arm/dts/ast2600-rainier.dts +0 -2
index aa91b12ed399..d1e99aa2d066 100755
@@ -74,7 +74,6 @@
 
 	flash@0 {
 		// TODO: what compatible strings should be here?
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -82,7 +81,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
arch/arm/dts/ast2600-s6q.dts +0 -2
index 52b620d3b4fe..b98cd8c980c2 100644
@@ -92,7 +92,6 @@
 	pinctrl-0 = <&pinctrl_fmcquad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -108,7 +107,6 @@
 			&pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
arch/arm/dts/ast2600-slt.dts +0 -8
index 93c5d86ce379..332620dc1aec 100644
@@ -122,7 +122,6 @@
 	pinctrl-0 = <&pinctrl_fmcquad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -130,7 +129,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -138,7 +136,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -155,7 +152,6 @@
 			&pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -163,7 +159,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -179,7 +174,6 @@
 			&pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -187,7 +181,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -195,7 +188,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
arch/arm/dts/ast2600-tacoma.dts +0 -2
index 67b3e3013c6b..a29e7e7fa23a 100755
@@ -65,7 +65,6 @@
 
 	flash@0 {
 		// TODO: what compatible strings should be here?
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
@@ -73,7 +72,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <2>;
arch/arm/dts/ast2600a0-evb.dts +0 -8
index b242215536a5..08b71ab29984 100644
@@ -115,7 +115,6 @@
 	pinctrl-0 = <&pinctrl_fmcquad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -123,7 +122,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -131,7 +129,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -148,7 +145,6 @@
 			&pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -156,7 +152,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -172,7 +167,6 @@
 			&pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -180,7 +174,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -188,7 +181,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
arch/arm/dts/ast2600a1-evb.dts +0 -8
index 6bd498d471e2..61decb539e6f 100644
@@ -122,7 +122,6 @@
 	pinctrl-0 = <&pinctrl_fmcquad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -130,7 +129,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -138,7 +136,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -155,7 +152,6 @@
 			&pinctrl_spi1wp_default &pinctrl_spi1quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -163,7 +159,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -179,7 +174,6 @@
 			&pinctrl_spi2cs2_default &pinctrl_spi2quad_default>;
 
 	flash@0 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "okay";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -187,7 +181,6 @@
 	};
 
 	flash@1 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
@@ -195,7 +188,6 @@
 	};
 
 	flash@2 {
-		compatible = "spi-flash", "sst,w25q256";
 		status = "disabled";
 		spi-max-frequency = <50000000>;
 		spi-tx-bus-width = <4>;
Signature · 1 line
2.35.3
maintainer Reviewed-by on v1 2/2
#2 lore raw

Re: [PATCH 2/2] ARM: dts: aspeed: Remove "spi-flash" compatible

Quoted 10 lines · Cédric Le Goater

The underlying SoC definitions use compatible "jedec,spi-nor", so does the aspeed SPI driver, this to be in sync with Linux and the latest U-Boot.

arch/arm/dts/ast2600-tacoma.dts +0 -0
index 67b3e3013c6b..a29e7e7fa23a 100755

arch/arm/dts/ast2600-tacoma.dts line 68

Quoted 4 lines
arch/arm/dts/ast2600-tacoma.dts +0 -1
@@ -65,7 +65,6 @@
 
        flash@0 {
                // TODO: what compatible strings should be here?
-               compatible = "spi-flash", "sst,w25q256";

Thanks. I had a similar version that also removed these todos. I'll merge yours and remove the TODOs too.

Quoted 3 lines
arch/arm/dts/ast2600-tacoma.dts +0 -0
                status = "okay";
                spi-max-frequency = <50000000>;
                spi-tx-bus-width = <2>;
maintainer Applied
#3 lore raw

Re: [PATCH 2/2] ARM: dts: aspeed: Remove "spi-flash" compatible

Quoted 13 lines · Joel Stanley
Quoted 11 lines · Cédric Le Goater

The underlying SoC definitions use compatible "jedec,spi-nor", so does the aspeed SPI driver, this to be in sync with Linux and the latest U-Boot.

arch/arm/dts/ast2600-tacoma.dts +0 -0
index 67b3e3013c6b..a29e7e7fa23a 100755
@@ -65,7 +65,6 @@
 
Quoted 8 lines

arch/arm/dts/ast2600-tacoma.dts line 68

Quoted 3 lines
arch/arm/dts/ast2600-tacoma.dts +0 -1
        flash@0 {
                // TODO: what compatible strings should be here?
-               compatible = "spi-flash", "sst,w25q256";

Thanks. I had a similar version that also removed these todos. I'll merge yours and remove the TODOs too.

I have applied these two, thanks.

Quoted 5 lines
Quoted 5 lines
arch/arm/dts/ast2600-tacoma.dts +0 -0
                status = "okay";
                spi-max-frequency = <50000000>;
                spi-tx-bus-width = <2>;
maintainer Reviewed-by on v1 1/2
#4 lore raw
In reply to Cédric Le Goater
Quoted 7 lines · Cédric Le Goater

The SoC device trees use the "jedec,spi-nor" compatible property to describe the flash devices and the board device trees override this property with "spi-flash", "sst,w25q256". This comes from the initial driver which was first written when spi-nor support had not been merged in U-boot yet.

Quoted 6 lines

"jedec,spi-nor" should be preferred since it is used by Linux and the latest U-boot. Use it to count devices. We will clean up the board device trees later.

Quoted 21 lines
---
 drivers/spi/aspeed_spi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/spi/aspeed_spi.c +2 -2
index 65d69105e8e8..45f6a8dd6850 100644
@@ -1241,7 +1241,8 @@ static int aspeed_spi_count_flash_devices(struct udevice *bus)
 
        dev_for_each_subnode(node, bus) {
                if (ofnode_is_available(node) &&
-                   ofnode_device_is_compatible(node, "spi-flash"))
+                   (ofnode_device_is_compatible(node, "spi-flash") ||
+                    ofnode_device_is_compatible(node, "jedec,spi-nor")))
                        count++;
        }
 
--

2.35.3