spi: aspeed: Use "jedec,spi-nor" compatible to count devices
Subsystems (3)
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
@@ -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
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
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
-0status = "okay"; spi-max-frequency = <50000000>; spi-tx-bus-width = <2>;
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@@ -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
-1flash@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.
Reviewed-by Joel Stanley <[email protected]>
I have applied these two, thanks.
Quoted 5 lines
Quoted 5 lines
arch/arm/dts/ast2600-tacoma.dts +0
-0status = "okay"; spi-max-frequency = <50000000>; spi-tx-bus-width = <2>;
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.
Cc Chin-Ting Kuo <[email protected]>Signed-off-by Cédric Le Goater <[email protected]>
Quoted 21 lines
--- drivers/spi/aspeed_spi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/spi/aspeed_spi.c +2
-2@@ -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