From: Vignesh R Date: Tue, 8 Aug 2017 19:03:34 +0530 Subject: [U-Boot] [PATCH] spi: add "jedec,spi-nor" to spi_flash_std_ids In-Reply-To: <20170808045727.11468-1-judge.packham@gmail.com> References: <20170808045727.11468-1-judge.packham@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Tuesday 08 August 2017 10:27 AM, Chris Packham wrote: > "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 > --- +1 Use of U-Boot specific compatible "spi-flash" has caused quite a bit of confusions and also problems while syncing U-Boot and kernel DTs. IMO, its better if we could probe JEDEC SPI NOR flashes based on generic "jedec,spi-nor" compatible as well like Linux. > 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" }, > { } > }; > > -- Regards Vignesh