All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] Documentation: devicetree: m25p80: add "nor-jedec" binding
@ 2015-03-11 21:57 ` Brian Norris
  0 siblings, 0 replies; 26+ messages in thread
From: Brian Norris @ 2015-03-11 21:57 UTC (permalink / raw)
  To: linux-mtd-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Ezequiel Garcia, Brian Norris,
	Marek Vasut, Rafał Miłecki

Almost all flash that are "compatible" with m25p80 support the JEDEC
READ ID opcode (0x95), and in fact, that is often the only thing that is
used to differentiate them. Let's add a compatible string that
represents this lowest common denominator of compatibility.

Device trees can still specify manufacturer/device names in addition,
but (until some reason is found to differentiate between them through
device tree) software will likely want to bind just against the generic
name, and avoid unnecessarily growing its device ID binding tables.

This is related to the work of commit a5b7616c55e1 ("mtd:
m25p80,spi-nor: Fix module aliases for m25p80"), which showed that
maintaining these device tables as stable device-tree/modalias binding
tables is not a worthwhile burden for mostly-comptatible flash.

At the same time, let's update the binding doc to point to the
m25p_ids[] ID list instead of spi_nor_ids[]. The former can be used for
device tree bindings, but the latter cannot. In the future, we should
pare down the m25p_ids[] list to only those IDs which are actually used
in device trees.

Signed-off-by: Brian Norris <computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Rafał Miłecki <zajec5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 Documentation/devicetree/bindings/mtd/m25p80.txt | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/mtd/m25p80.txt b/Documentation/devicetree/bindings/mtd/m25p80.txt
index 4611aa83531b..1b2997d4cee4 100644
--- a/Documentation/devicetree/bindings/mtd/m25p80.txt
+++ b/Documentation/devicetree/bindings/mtd/m25p80.txt
@@ -3,9 +3,12 @@
 Required properties:
 - #address-cells, #size-cells : Must be present if the device has sub-nodes
   representing partitions.
-- compatible : Should be the manufacturer and the name of the chip. Bear in mind
+- compatible : Should be "nor-jedec" for any SPI NOR flash that can be
+               identified by the JEDEC READ ID opcode (0x95).
+               Additionally, may include a device-specific string consisting of
+               the manufacturer and name of the chip. Bear in mind
                the DT binding is not Linux-only, but in case of Linux, see the
-               "spi_nor_ids" table in drivers/mtd/spi-nor/spi-nor.c for the list
+               "m25p_ids" table in drivers/mtd/devices/m25p80.c for the list
                of supported chips.
 - reg : Chip-Select number
 - spi-max-frequency : Maximum frequency of the SPI bus the chip can operate at
@@ -22,7 +25,7 @@ Example:
 	flash: m25p80@0 {
 		#address-cells = <1>;
 		#size-cells = <1>;
-		compatible = "spansion,m25p80";
+		compatible = "spansion,m25p80", "nor-jedec";
 		reg = <0>;
 		spi-max-frequency = <40000000>;
 		m25p,fast-read;
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2015-03-25  0:55 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-11 21:57 [PATCH 1/2] Documentation: devicetree: m25p80: add "nor-jedec" binding Brian Norris
2015-03-11 21:57 ` Brian Norris
     [not found] ` <1426111046-29900-1-git-send-email-computersforpeace-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-03-11 21:57   ` [PATCH 2/2] mtd: m25p80: bind to "nor-jedec" ID, for auto-detection Brian Norris
2015-03-11 21:57     ` Brian Norris
2015-03-11 22:22   ` [PATCH 1/2] Documentation: devicetree: m25p80: add "nor-jedec" binding Marek Vasut
2015-03-11 22:22     ` Marek Vasut
     [not found]     ` <201503112322.46491.marex-ynQEQJNshbs@public.gmane.org>
2015-03-11 22:46       ` Brian Norris
2015-03-11 22:46         ` Brian Norris
2015-03-12 10:19   ` Geert Uytterhoeven
2015-03-12 10:19     ` Geert Uytterhoeven
     [not found]     ` <CAMuHMdUv2w0chGPK37oYaY5f64X4XK+Ab+aP7egxv2fnWa8k-g-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-12 10:36       ` Rafał Miłecki
2015-03-12 10:36         ` Rafał Miłecki
     [not found]         ` <CACna6rz-4nKE_iV2-8aG3ZEcrpN88A0iX4cHC+FudJ-==H9p7w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-12 10:40           ` Geert Uytterhoeven
2015-03-12 10:40             ` Geert Uytterhoeven
2015-03-12 10:53           ` Mark Rutland
2015-03-12 10:53             ` Mark Rutland
2015-03-20 19:02             ` Brian Norris
2015-03-20 19:02               ` Brian Norris
2015-03-12 10:58   ` Mark Rutland
2015-03-12 10:58     ` Mark Rutland
2015-03-20 19:12     ` Brian Norris
2015-03-20 19:12       ` Brian Norris
2015-03-21 23:30       ` Rafał Miłecki
2015-03-21 23:30         ` Rafał Miłecki
     [not found]         ` <CACna6ryvD2Dn2eQPMvoJ+1Yt75=w1J6OR=tvOSZsMsBgD2O4yg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-25  0:55           ` Brian Norris
2015-03-25  0:55             ` Brian Norris

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.