From: Simon Goldschmidt Date: Fri, 9 Nov 2018 20:43:33 +0100 Subject: [U-Boot] [PATCH] mtd: sf_probe: add jedec,spi-nor compatible In-Reply-To: <1541496287-18001-1-git-send-email-narmstrong@baylibre.com> References: <1541496287-18001-1-git-send-email-narmstrong@baylibre.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 06.11.2018 10:24, Neil Armstrong wrote: > There is no reason not to use the Linux "jedec,spi-nor" binding in u-boot. > This patch adds this compatible into sf_probe and will avoid changing the > device tree files to add a u-boot specific compatible to probe a spi flash. > > This change is needed to enable SPI NOR Flash support using the non-modified > device tree file for Amlogic Meson GX SoC based boards. > > Signed-off-by: Neil Armstrong This is definitively a move in the right direction! I was only days away from sending this myself ;-) Reviewed-by: Simon Goldschmidt I would still need more changes to U-Boot to boot the Linux socfpga devicetrees without patches (they have compatible = "n25q256a" etc.), but then again, maybe it's easier to change the Linux ones to include "jedec,spi-nor" than trying the effort of changing U-Boot here... Simon > --- > 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 94fde2a..bf72aa6 100644 > --- a/drivers/mtd/spi/sf_probe.c > +++ b/drivers/mtd/spi/sf_probe.c > @@ -145,6 +145,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" }, > { } > }; >