diff mbox series

[3/3] nvmem: eeprom: add documentation for FRAM

Message ID 20210409154720.130902-4-jiri.prchal@aksignal.cz
State Changes Requested, archived
Headers show
Series nvmem: eeprom: add support for FRAM | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Jiri Prchal April 9, 2021, 3:47 p.m. UTC
Added dt binding documentation.

Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
---
 Documentation/devicetree/bindings/eeprom/at25.yaml | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

Comments

Rob Herring (Arm) April 9, 2021, 6:57 p.m. UTC | #1
On Fri, 09 Apr 2021 17:47:20 +0200, Jiri Prchal wrote:
> Added dt binding documentation.
> 
> Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
> ---
>  Documentation/devicetree/bindings/eeprom/at25.yaml | 12 ++++++++++--
>  1 file changed, 10 insertions(+), 2 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
Documentation/devicetree/bindings/eeprom/at25.example.dts:40.17-27: Warning (reg_format): /example-0/fram@1:reg: property has invalid length (4 bytes) (#address-cells == 1, #size-cells == 1)
Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: Warning (pci_device_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: example-0: fram@1:reg:0: [1] is too short
	From schema: /usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: fram@1: $nodename:0: 'fram@1' does not match '^eeprom@[0-9a-f]{1,2}$'
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: fram@1: compatible: 'oneOf' conditional failed, one must be fixed:
	['cypress,fm25'] is too short
	'atmel,at25' was expected
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: fram@1: 'pagesize' is a required property
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: fram@1: 'size' is a required property
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.example.dt.yaml: fram@1: 'address-width' is a required property
	From schema: /builds/robherring/linux-dt-review/Documentation/devicetree/bindings/eeprom/at25.yaml

See https://patchwork.ozlabs.org/patch/1464448

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml b/Documentation/devicetree/bindings/eeprom/at25.yaml
index 121a601db22e..f9191b67080d 100644
--- a/Documentation/devicetree/bindings/eeprom/at25.yaml
+++ b/Documentation/devicetree/bindings/eeprom/at25.yaml
@@ -4,7 +4,7 @@ 
 $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>
@@ -31,6 +31,7 @@  properties:
               - microchip,25lc040
               - st,m95m02
               - st,m95256
+              - cypress,fm25
 
           - const: atmel,at25
 
@@ -48,7 +49,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,6 +102,7 @@  required:
   - compatible
   - reg
   - spi-max-frequency
+  # these are for eeproms only
   - pagesize
   - size
   - address-width
@@ -127,3 +129,9 @@  examples:
             address-width = <16>;
         };
     };
+
+        fram@1 {
+            compatible = "cypress,fm25";
+            reg = <1>;
+            spi-max-frequency = <40000000>;
+        };