linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 3/3] nvmem: eeprom: add documentation for FRAM
@ 2021-04-13 13:18 Jiri Prchal
  2021-04-15 21:10 ` Rob Herring
  0 siblings, 1 reply; 2+ messages in thread
From: Jiri Prchal @ 2021-04-13 13:18 UTC (permalink / raw)
  To: devicetree, linux-kernel; +Cc: Rob Herring, Christian Eggers, Jiri Prchal

Added dt binding documentation.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
---
-v2: fixed dt_binding_check warnings thanks to Rob Herring
---
 .../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


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

* Re: [PATCH v2 3/3] nvmem: eeprom: add documentation for FRAM
  2021-04-13 13:18 [PATCH v2 3/3] nvmem: eeprom: add documentation for FRAM Jiri Prchal
@ 2021-04-15 21:10 ` Rob Herring
  0 siblings, 0 replies; 2+ messages in thread
From: Rob Herring @ 2021-04-15 21:10 UTC (permalink / raw)
  To: Jiri Prchal; +Cc: Christian Eggers, Rob Herring, devicetree, linux-kernel

On Tue, 13 Apr 2021 15:18:48 +0200, Jiri Prchal wrote:
> Added dt binding documentation.
> 
> Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
> ---
> -v2: fixed dt_binding_check warnings thanks to Rob Herring
> ---
>  .../devicetree/bindings/eeprom/at25.yaml      | 31 +++++++++++++++----
>  1 file changed, 25 insertions(+), 6 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

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

end of thread, other threads:[~2021-04-15 21:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-13 13:18 [PATCH v2 3/3] nvmem: eeprom: add documentation for FRAM Jiri Prchal
2021-04-15 21:10 ` Rob Herring

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