Commit 8947e396 authored by Brian Norris's avatar Brian Norris

Documentation: dt: mtd: replace "nor-jedec" binding with "jedec, spi-nor"

In commit 8ff16cf7 ("Documentation: devicetree: m25p80: add "nor-jedec"
binding"), we added a generic "nor-jedec" binding to catch all
mostly-compatible SPI NOR flash which can be detected via the READ ID
opcode (0x9F). This was discussed and reviewed at the time, however
objections have come up since then as part of this discussion:

  http://lkml.kernel.org/g/20150511224646.GJ32500@ld-irv-0074

It seems the parties involved agree that "jedec,spi-nor" does a better
job of capturing the fact that this is SPI-specific, not just any NOR
flash.

This binding was only merged for v4.1-rc1, so it's still OK to change
the naming.

At the same time, let's move the documentation to a better name.

Next up: stop referring to code (drivers/mtd/devices/m25p80.c) from the
documentation.
Signed-off-by: default avatarBrian Norris <computersforpeace@gmail.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Rafał Miłecki <zajec5@gmail.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: devicetree@vger.kernel.org
Acked-by: default avatarStephen Warren <swarren@nvidia.com>
Acked-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Acked-by: default avatarMark Rutland <mark.rutland@arm.com>
parent db7c7274
...@@ -8,8 +8,8 @@ Required properties: ...@@ -8,8 +8,8 @@ Required properties:
is not Linux-only, but in case of Linux, see the "m25p_ids" is not Linux-only, but in case of Linux, see the "m25p_ids"
table in drivers/mtd/devices/m25p80.c for the list of supported table in drivers/mtd/devices/m25p80.c for the list of supported
chips. chips.
Must also include "nor-jedec" for any SPI NOR flash that can be Must also include "jedec,spi-nor" for any SPI NOR flash that can
identified by the JEDEC READ ID opcode (0x9F). be identified by the JEDEC READ ID opcode (0x9F).
- reg : Chip-Select number - reg : Chip-Select number
- spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
...@@ -25,7 +25,7 @@ Example: ...@@ -25,7 +25,7 @@ Example:
flash: m25p80@0 { flash: m25p80@0 {
#address-cells = <1>; #address-cells = <1>;
#size-cells = <1>; #size-cells = <1>;
compatible = "spansion,m25p80", "nor-jedec"; compatible = "spansion,m25p80", "jedec,spi-nor";
reg = <0>; reg = <0>;
spi-max-frequency = <40000000>; spi-max-frequency = <40000000>;
m25p,fast-read; m25p,fast-read;
......
...@@ -223,7 +223,7 @@ static int m25p_probe(struct spi_device *spi) ...@@ -223,7 +223,7 @@ static int m25p_probe(struct spi_device *spi)
*/ */
if (data && data->type) if (data && data->type)
flash_name = data->type; flash_name = data->type;
else if (!strcmp(spi->modalias, "nor-jedec")) else if (!strcmp(spi->modalias, "spi-nor"))
flash_name = NULL; /* auto-detect */ flash_name = NULL; /* auto-detect */
else else
flash_name = spi->modalias; flash_name = spi->modalias;
...@@ -255,7 +255,7 @@ static int m25p_remove(struct spi_device *spi) ...@@ -255,7 +255,7 @@ static int m25p_remove(struct spi_device *spi)
* since most of these flash are compatible to some extent, and their * since most of these flash are compatible to some extent, and their
* differences can often be differentiated by the JEDEC read-ID command, we * differences can often be differentiated by the JEDEC read-ID command, we
* encourage new users to add support to the spi-nor library, and simply bind * encourage new users to add support to the spi-nor library, and simply bind
* against a generic string here (e.g., "nor-jedec"). * against a generic string here (e.g., "jedec,spi-nor").
* *
* Many flash names are kept here in this list (as well as in spi-nor.c) to * Many flash names are kept here in this list (as well as in spi-nor.c) to
* keep them available as module aliases for existing platforms. * keep them available as module aliases for existing platforms.
...@@ -305,7 +305,7 @@ static const struct spi_device_id m25p_ids[] = { ...@@ -305,7 +305,7 @@ static const struct spi_device_id m25p_ids[] = {
* Generic support for SPI NOR that can be identified by the JEDEC READ * Generic support for SPI NOR that can be identified by the JEDEC READ
* ID opcode (0x9F). Use this, if possible. * ID opcode (0x9F). Use this, if possible.
*/ */
{"nor-jedec"}, {"spi-nor"},
{ }, { },
}; };
MODULE_DEVICE_TABLE(spi, m25p_ids); MODULE_DEVICE_TABLE(spi, m25p_ids);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment