[U-Boot] [PATCH] spi: add "jedec,spi-nor" to spi_flash_std_ids

Chris Packham judge.packham at gmail.com
Tue Aug 8 04:57:27 UTC 2017

"jedec,spi-nor" is used by Linux for many boards with spi flash. In fact
according to the binding documentation this must be included for any SPI
NOR flash that can be identified by the JEDEC READ ID opcode (0x9F).
Make device trees more portable between Linux an U-Boot by supporting
"jedec,spi-nor" in addition to the U-Boot specific "spi-flash".

Signed-off-by: Chris Packham <judge.packham at gmail.com>
This fixes my issues with the spi speed selection on db-88f6820-amc. I
didn't find anything in the commit message from the initial
implementation saying that "jedec,spi-nor" was omitted intentionally so
I've settled on this instead of updating armada-385-amc.dts.

If there is a good reason not to make this change I'm happy to submit a patch
that just updates armada-385-amc.dts.

 drivers/mtd/spi/sf_probe.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/spi/sf_probe.c b/drivers/mtd/spi/sf_probe.c
index 7b296378d2be..1953ec3cb748 100644
--- a/drivers/mtd/spi/sf_probe.c
+++ b/drivers/mtd/spi/sf_probe.c
@@ -164,6 +164,7 @@ static const struct dm_spi_flash_ops spi_flash_std_ops = {
 static const struct udevice_id spi_flash_std_ids[] = {
 	{ .compatible = "spi-flash" },
+	{ .compatible = "jedec,spi-nor" },
 	{ }

More information about the U-Boot mailing list