linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jiri Prchal <jiri.prchal@aksignal.cz>
To: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	Christian Eggers <ceggers@arri.de>, Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Prchal <jiri.prchal@aksignal.cz>,
	Rob Herring <robh@kernel.org>
Subject: [PATCH v8 3/5] dt-bindings: nvmem: at25: add for FRAM support
Date: Mon,  7 Jun 2021 18:11:59 +0200	[thread overview]
Message-ID: <20210607161201.223697-4-jiri.prchal@aksignal.cz> (raw)
In-Reply-To: <20210607161201.223697-1-jiri.prchal@aksignal.cz>

Added dt binding documentation.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Reviewed-by: Rob Herring <robh@kernel.org>
---
v2: fixed dt_binding_check warnings thanks to Rob Herring
v3: resend and added more recipients
v4: resend
v5: no change here
v6: no change here
v7: no change here
v8: changed subject
---
 .../devicetree/bindings/eeprom/at25.yaml      | 31 +++++++++++++++----
 1 file changed, 25 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml b/Documentation/devicetree/bindings/eeprom/at25.yaml
index 121a601db22e..840ee7a83a14 100644
--- a/Documentation/devicetree/bindings/eeprom/at25.yaml
+++ b/Documentation/devicetree/bindings/eeprom/at25.yaml
@@ -4,14 +4,16 @@
 $id: "http://devicetree.org/schemas/eeprom/at25.yaml#"
 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
 
-title: SPI EEPROMs compatible with Atmel's AT25
+title: SPI EEPROMs or FRAMs compatible with Atmel's AT25
 
 maintainers:
   - Christian Eggers <ceggers@arri.de>
 
 properties:
   $nodename:
-    pattern: "^eeprom@[0-9a-f]{1,2}$"
+    anyOf:
+      - pattern: "^eeprom@[0-9a-f]{1,2}$"
+      - pattern: "^fram@[0-9a-f]{1,2}$"
 
   # There are multiple known vendors who manufacture EEPROM chips compatible
   # with Atmel's AT25. The compatible string requires two items where the
@@ -31,6 +33,7 @@ properties:
               - microchip,25lc040
               - st,m95m02
               - st,m95256
+              - cypress,fm25
 
           - const: atmel,at25
 
@@ -48,7 +51,7 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32
     enum: [1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072]
     description:
-      Size of the eeprom page.
+      Size of the eeprom page. FRAMs don't have pages.
 
   size:
     $ref: /schemas/types.yaml#/definitions/uint32
@@ -101,9 +104,19 @@ required:
   - compatible
   - reg
   - spi-max-frequency
-  - pagesize
-  - size
-  - address-width
+
+allOf:
+  - if:
+      properties:
+        compatible:
+          not:
+            contains:
+              const: cypress,fm25
+    then:
+      required:
+        - pagesize
+        - size
+        - address-width
 
 additionalProperties: false
 
@@ -126,4 +139,10 @@ examples:
             size = <32768>;
             address-width = <16>;
         };
+
+        fram@1 {
+            compatible = "cypress,fm25", "atmel,at25";
+            reg = <1>;
+            spi-max-frequency = <40000000>;
+        };
     };
-- 
2.25.1


  parent reply	other threads:[~2021-06-07 16:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-07 16:11 [PATCH v8 0/5] add support for FRAM Jiri Prchal
2021-06-07 16:11 ` [PATCH v8 1/5] nvmem: prepare basics for FRAM support Jiri Prchal
2021-06-07 16:11 ` [PATCH v8 2/5] nvmem: eeprom: at25: add support for FRAM Jiri Prchal
2021-06-08  9:07   ` Greg Kroah-Hartman
2021-06-08  9:57     ` Jiří Prchal
2021-06-07 16:11 ` Jiri Prchal [this message]
2021-06-07 16:12 ` [PATCH v8 4/5] nvmem: eeprom: at25: export FRAM serial num Jiri Prchal
2021-06-08  9:05   ` Greg Kroah-Hartman
2021-06-07 16:12 ` [PATCH v8 5/5] nvmem: eeprom: add documentation of sysfs fram and sernum file Jiri Prchal
2021-06-08  9:05   ` Greg Kroah-Hartman
2021-06-08  9:50     ` Jiří Prchal
2021-06-08 10:04       ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210607161201.223697-4-jiri.prchal@aksignal.cz \
    --to=jiri.prchal@aksignal.cz \
    --cc=arnd@arndb.de \
    --cc=ceggers@arri.de \
    --cc=devicetree@vger.kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=robh@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).