Message ID | 1541496287-18001-1-git-send-email-narmstrong@baylibre.com |
---|---|
State | Superseded, archived |
Delegated to: | Neil Armstrong |
Headers | show |
Series | [U-Boot] mtd: sf_probe: add jedec,spi-nor compatible | expand |
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 <narmstrong@baylibre.com> This is definitively a move in the right direction! I was only days away from sending this myself ;-) Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> 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" }, > { } > }; >
On Sat, Nov 10, 2018 at 1:14 AM Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> wrote: > > 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 <narmstrong@baylibre.com> > > This is definitively a move in the right direction! I was only days away > from sending this myself ;-) > > Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> > > 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... It's better to revert/remove "spi-flash" from Linux sync dts(s) files along with this compatible change, u-boot specific stuff like sandbox still use the legacy.
On Wed, Nov 14, 2018 at 9:59 AM Jagan Teki <jagan@amarulasolutions.com> wrote: > > On Sat, Nov 10, 2018 at 1:14 AM Simon Goldschmidt > <simon.k.r.goldschmidt@gmail.com> wrote: > > > > 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 <narmstrong@baylibre.com> > > > > This is definitively a move in the right direction! I was only days away > > from sending this myself ;-) > > > > Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> > > > > 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... > > It's better to revert/remove "spi-flash" from Linux sync dts(s) files > along with this compatible change, u-boot specific stuff like sandbox > still use the legacy. Is this a reply to me to change the scofpga dts files or to Neil to remove "spi-flash" from U-Boot with his patch? Because, sure, once U-Boot supports "jedec-spi-nor", I'll make sure the Linux devicetrees get that, too (in addition to the "n25q..." compatibles) so that they just work in U-Boot and can be synced again. Simon
On Wed, Nov 14, 2018 at 2:39 PM Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> wrote: > > On Wed, Nov 14, 2018 at 9:59 AM Jagan Teki <jagan@amarulasolutions.com> wrote: > > > > On Sat, Nov 10, 2018 at 1:14 AM Simon Goldschmidt > > <simon.k.r.goldschmidt@gmail.com> wrote: > > > > > > 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 <narmstrong@baylibre.com> > > > > > > This is definitively a move in the right direction! I was only days away > > > from sending this myself ;-) > > > > > > Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> > > > > > > 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... > > > > It's better to revert/remove "spi-flash" from Linux sync dts(s) files > > along with this compatible change, u-boot specific stuff like sandbox > > still use the legacy. > > Is this a reply to me to change the scofpga dts files or to Neil to > remove "spi-flash" from U-Boot with his patch? Not to remove as of now. > > Because, sure, once U-Boot supports "jedec-spi-nor", I'll make sure > the Linux devicetrees get that, too (in addition to the "n25q..." > compatibles) so that they just work in U-Boot and can be synced again. I think it's better to go with all respective changes in one patch? do you think it's risky? because many of Linux sync dts on respective driver will work straightaway. I have no objection to add this "jedec-spi-nor" below of "spi-flash". Once all moved we can drop the "spi-flash"
On 14.11.2018 10:15, Jagan Teki wrote: > On Wed, Nov 14, 2018 at 2:39 PM Simon Goldschmidt > <simon.k.r.goldschmidt@gmail.com> wrote: >> On Wed, Nov 14, 2018 at 9:59 AM Jagan Teki <jagan@amarulasolutions.com> wrote: >>> On Sat, Nov 10, 2018 at 1:14 AM Simon Goldschmidt >>> <simon.k.r.goldschmidt@gmail.com> wrote: >>>> 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 <narmstrong@baylibre.com> >>>> This is definitively a move in the right direction! I was only days away >>>> from sending this myself ;-) >>>> >>>> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> >>>> >>>> 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... >>> It's better to revert/remove "spi-flash" from Linux sync dts(s) files >>> along with this compatible change, u-boot specific stuff like sandbox >>> still use the legacy. >> Is this a reply to me to change the scofpga dts files or to Neil to >> remove "spi-flash" from U-Boot with his patch? > Not to remove as of now. > >> Because, sure, once U-Boot supports "jedec-spi-nor", I'll make sure >> the Linux devicetrees get that, too (in addition to the "n25q..." >> compatibles) so that they just work in U-Boot and can be synced again. > I think it's better to go with all respective changes in one patch? do > you think it's risky? because many of Linux sync dts on respective > driver will work straightaway. I have no objection to add this > "jedec-spi-nor" below of "spi-flash". Once all moved we can drop the > "spi-flash" Neil, are you planning to send a conversion patch for the ~100 dts files using "spi-flash" today? I think it would be good to have this as one series with 3 patches where 1 introduces "jedec-spi-nor", 2 converts existing boards and 3 removes "spi-flash". Simon
Hi Simon, On 25/11/2018 19:57, Simon Goldschmidt wrote: > On 14.11.2018 10:15, Jagan Teki wrote: >> On Wed, Nov 14, 2018 at 2:39 PM Simon Goldschmidt >> <simon.k.r.goldschmidt@gmail.com> wrote: >>> On Wed, Nov 14, 2018 at 9:59 AM Jagan Teki <jagan@amarulasolutions.com> wrote: >>>> On Sat, Nov 10, 2018 at 1:14 AM Simon Goldschmidt >>>> <simon.k.r.goldschmidt@gmail.com> wrote: >>>>> 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 <narmstrong@baylibre.com> >>>>> This is definitively a move in the right direction! I was only days away >>>>> from sending this myself ;-) >>>>> >>>>> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> >>>>> >>>>> 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... >>>> It's better to revert/remove "spi-flash" from Linux sync dts(s) files >>>> along with this compatible change, u-boot specific stuff like sandbox >>>> still use the legacy. >>> Is this a reply to me to change the scofpga dts files or to Neil to >>> remove "spi-flash" from U-Boot with his patch? >> Not to remove as of now. >> >>> Because, sure, once U-Boot supports "jedec-spi-nor", I'll make sure >>> the Linux devicetrees get that, too (in addition to the "n25q..." >>> compatibles) so that they just work in U-Boot and can be synced again. >> I think it's better to go with all respective changes in one patch? do >> you think it's risky? because many of Linux sync dts on respective >> driver will work straightaway. I have no objection to add this >> "jedec-spi-nor" below of "spi-flash". Once all moved we can drop the >> "spi-flash" > > Neil, are you planning to send a conversion patch for the ~100 dts files using "spi-flash" today? I think it would be good to have this as one series with 3 patches where 1 introduces "jedec-spi-nor", 2 converts existing boards and 3 removes "spi-flash". Sorry I missed your reply, I didn't plan that, but I can evaluate and do it if it's simple enough. Neil > > Simon
On Fri, Nov 30, 2018 at 5:12 PM Neil Armstrong <narmstrong@baylibre.com> wrote: > > Hi Simon, > > On 25/11/2018 19:57, Simon Goldschmidt wrote: > > On 14.11.2018 10:15, Jagan Teki wrote: > >> On Wed, Nov 14, 2018 at 2:39 PM Simon Goldschmidt > >> <simon.k.r.goldschmidt@gmail.com> wrote: > >>> On Wed, Nov 14, 2018 at 9:59 AM Jagan Teki <jagan@amarulasolutions.com> wrote: > >>>> On Sat, Nov 10, 2018 at 1:14 AM Simon Goldschmidt > >>>> <simon.k.r.goldschmidt@gmail.com> wrote: > >>>>> 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 <narmstrong@baylibre.com> > >>>>> This is definitively a move in the right direction! I was only days away > >>>>> from sending this myself ;-) > >>>>> > >>>>> Reviewed-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com> > >>>>> > >>>>> 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... > >>>> It's better to revert/remove "spi-flash" from Linux sync dts(s) files > >>>> along with this compatible change, u-boot specific stuff like sandbox > >>>> still use the legacy. > >>> Is this a reply to me to change the scofpga dts files or to Neil to > >>> remove "spi-flash" from U-Boot with his patch? > >> Not to remove as of now. > >> > >>> Because, sure, once U-Boot supports "jedec-spi-nor", I'll make sure > >>> the Linux devicetrees get that, too (in addition to the "n25q..." > >>> compatibles) so that they just work in U-Boot and can be synced again. > >> I think it's better to go with all respective changes in one patch? do > >> you think it's risky? because many of Linux sync dts on respective > >> driver will work straightaway. I have no objection to add this > >> "jedec-spi-nor" below of "spi-flash". Once all moved we can drop the > >> "spi-flash" > > > > Neil, are you planning to send a conversion patch for the ~100 dts files using "spi-flash" today? I think it would be good to have this as one series with 3 patches where 1 introduces "jedec-spi-nor", 2 converts existing boards and 3 removes "spi-flash". > > Sorry I missed your reply, I didn't plan that, but I can evaluate and do it if it's simple enough. I would have thought it's a matter of just search&replace. But I don't know what's the procedure of reviewing & pushing such a big change throughout the U-Boot sources... Simon
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" }, { } };
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 <narmstrong@baylibre.com> --- drivers/mtd/spi/sf_probe.c | 1 + 1 file changed, 1 insertion(+)