Skip to contentSkip to conversation

mtd: sf_probe: add jedec,spi-nor compatible

PATCH New Neil Armstrong 3 participants 8 messages Nov 6, 2018 – Dec 1, 2018 Memory technology devices (MTD)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mtd: sf_probe: add jedec,spi-nor compatible

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.

---
 drivers/mtd/spi/sf_probe.c | 1 +
 1 file changed, 1 insertion(+)
drivers/mtd/spi/sf_probe.c +1 -0
index 94fde2a..bf72aa6 100644
@@ -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" },
 	{ }
 };
 
Signature · 1 line
2.7.4
#1 lore raw

PATCH 1/1 mtd: sf_probe: add jedec,spi-nor compatible

Quoted 8 lines · Neil Armstrong

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.

This is definitively a move in the right direction! I was only days away from sending this myself ;-)

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

Quoted 16 lines
---
  drivers/mtd/spi/sf_probe.c | 1 +
  1 file changed, 1 insertion(+)
drivers/mtd/spi/sf_probe.c +1 -0
index 94fde2a..bf72aa6 100644
@@ -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" },
  	{ }
  };
 
#2 lore raw

PATCH 1/1 mtd: sf_probe: add jedec,spi-nor compatible

Quoted 14 lines · Simon Goldschmidt
Quoted 8 lines · Neil Armstrong

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.

This is definitively a move in the right direction! I was only days away from sending this myself ;-)

Quoted 6 lines

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.

#3 lore raw

PATCH 1/1 mtd: sf_probe: add jedec,spi-nor compatible

Quoted 19 lines · Jagan Teki
Quoted 16 lines · Simon Goldschmidt
Quoted 8 lines · Neil Armstrong

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.

This is definitively a move in the right direction! I was only days away from sending this myself ;-)

Quoted 8 lines
Quoted 4 lines

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

#4 lore raw

PATCH 1/1 mtd: sf_probe: add jedec,spi-nor compatible

Quoted 26 lines · Simon Goldschmidt
Quoted 24 lines · Jagan Teki
Quoted 20 lines · Simon Goldschmidt
Quoted 8 lines · Neil Armstrong

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.

This is definitively a move in the right direction! I was only days away from sending this myself ;-)

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...

Quoted 6 lines
Quoted 3 lines

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.

Quoted 4 lines

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"

#5 lore raw

PATCH 1/1 mtd: sf_probe: add jedec,spi-nor compatible

Quoted 30 lines · Jagan Teki
Quoted 21 lines · Simon Goldschmidt
Quoted 20 lines · Jagan Teki
Quoted 18 lines · Simon Goldschmidt
Quoted 8 lines · Neil Armstrong

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.

This is definitively a move in the right direction! I was only days away from sending this myself ;-)

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...

Quoted 5 lines
Quoted 3 lines

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.

Quoted 8 lines
Quoted 3 lines

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

#6 lore raw

PATCH 1/1 mtd: sf_probe: add jedec,spi-nor compatible

Hi Simon,

Quoted 34 lines · Simon Goldschmidt
Quoted 33 lines · Jagan Teki
Quoted 21 lines · Simon Goldschmidt
Quoted 20 lines · Jagan Teki
Quoted 18 lines · Simon Goldschmidt
Quoted 8 lines · Neil Armstrong

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.

This is definitively a move in the right direction! I was only days away from sending this myself ;-)

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...

Quoted 5 lines
Quoted 3 lines

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.

Quoted 3 lines

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.

Quoted 7 lines
Quoted 5 lines

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

Quoted 2 lines

Simon

#7 lore raw

PATCH 1/1 mtd: sf_probe: add jedec,spi-nor compatible

Quoted 44 lines · Neil Armstrong

Hi Simon,

Quoted 40 lines · Simon Goldschmidt
Quoted 38 lines · Jagan Teki
Quoted 21 lines · Simon Goldschmidt
Quoted 20 lines · Jagan Teki
Quoted 18 lines · Simon Goldschmidt
Quoted 8 lines · Neil Armstrong

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.

This is definitively a move in the right direction! I was only days away from sending this myself ;-)

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...

Quoted 5 lines
Quoted 3 lines

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.

Quoted 3 lines

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"

Quoted 3 lines
Quoted 1 line

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