diff options
| author | Jiri Prchal <jiri.prchal@aksignal.cz> | 2021-06-11 11:45:58 +0200 | 
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2021-06-11 12:23:10 +0200 | 
| commit | fd307a4ad332ef50be5569c92490219e7cd84ce5 (patch) | |
| tree | 6683353455acad103535cdbceb9af084ff50531a /Documentation | |
| parent | 989f77e3fdee2e8f414dd1da9b6397d8763d414e (diff) | |
| download | linux-fd307a4ad332ef50be5569c92490219e7cd84ce5.tar.bz2 | |
nvmem: prepare basics for FRAM support
Added enum and string for FRAM (ferroelectric RAM) to expose it as file
named "fram".
Added documentation of sysfs file.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Link: https://lore.kernel.org/r/20210611094601.95131-2-jiri.prchal@aksignal.cz
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/ABI/testing/sysfs-class-spi-eeprom | 19 | ||||
| -rw-r--r-- | Documentation/devicetree/bindings/eeprom/at25.yaml | 31 | 
2 files changed, 44 insertions, 6 deletions
diff --git a/Documentation/ABI/testing/sysfs-class-spi-eeprom b/Documentation/ABI/testing/sysfs-class-spi-eeprom new file mode 100644 index 000000000000..1ff757982079 --- /dev/null +++ b/Documentation/ABI/testing/sysfs-class-spi-eeprom @@ -0,0 +1,19 @@ +What:		/sys/class/spi_master/spi<bus>/spi<bus>.<dev>/fram +Date:		June 2021 +KernelVersion:	5.14 +Contact:	Jiri Prchal <jiri.prchal@aksignal.cz> +Description: +	Contains the FRAM binary data. Same as EEPROM, just another file +	name to indicate that it employs ferroelectric process. +	It performs write operations at bus speed - no write delays. + +What:		/sys/class/spi_master/spi<bus>/spi<bus>.<dev>/sernum +Date:		May 2021 +KernelVersion:	5.14 +Contact:	Jiri Prchal <jiri.prchal@aksignal.cz> +Description: +	Contains the serial number of the Cypress FRAM (FM25VN) if it is +	present.  It will be displayed as a 8 byte hex string, as read +	from the device. + +	This is a read-only attribute. diff --git a/Documentation/devicetree/bindings/eeprom/at25.yaml b/Documentation/devicetree/bindings/eeprom/at25.yaml index 6a2dc8b3ed14..fbf99e346966 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 @@ -47,7 +50,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 @@ -100,9 +103,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 @@ -125,4 +138,10 @@ examples:              size = <32768>;              address-width = <16>;          }; + +        fram@1 { +            compatible = "cypress,fm25", "atmel,at25"; +            reg = <1>; +            spi-max-frequency = <40000000>; +        };      };  |