Peios Learn
Documentation

Peios

Peios Peios Kernel Universal Directory Project

Developer Tools

Trail Acta Provium clackatoo CAF GCSL Pekit

Applications

Framewright

Standards and Conventions

Standards and Conventions Peios Specifications
Peios Kernel

Eeprom bindings

Single-page view · as markdown

I2C EEPROMs compatible with Atmel's AT24

Peios Kernel / Hardware and drivers / Device-tree binding reference / Eeprom bindings

Schema identifier ($id): "http://devicetree.org/schemas/eeprom/at24.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Bartosz Golaszewski <bgolaszewski@baylibre.com>"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/nvmem/nvmem.yaml

Rule 2 #

Shared schema rule ($ref): /schemas/nvmem/nvmem-deprecated-cells.yaml

Automatic schema selection (select) #

Properties and child nodes (properties) #

compatible — required here #

Rule for matching array elements (contains)

At least one of these rules must match (anyOf)

Rule 1

String pattern (pattern): "^atmel,(24(c|cs|mac)[0-9]+|spd)$"

Rule 2

Allowed values (enum): "microchip,24aa025e48", "microchip,24aa025e64"

Required in this object (required): "compatible"

Properties and child nodes (properties) #

$nodename — not listed as required here #

String pattern (pattern): "^eeprom@[0-9a-f]{1,2}$"

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

All of these rules must match (allOf)

Rule 1

Minimum number of items (minItems): 1

Array item rules (items)

Item 1

String pattern (pattern): "^(atmel|catalyst|microchip|nxp|ramtron|renesas|rohm|st),(24(c|cs|lc|mac)[0-9]+|spd)$"

Item 2

String pattern (pattern): "^atmel,(24(c|cs|mac)[0-9]+|spd)$"

Rule 2

Exactly one of these rules must match (oneOf)

Rule 1

Array item rules (items)

String pattern (pattern): "c00$"

Rule 2

Array item rules (items)

String pattern (pattern): "c01$"

Rule 3

Array item rules (items)

String pattern (pattern): "cs01$"

Rule 4

Array item rules (items)

String pattern (pattern): "c02$"

Rule 5

Array item rules (items)

String pattern (pattern): "cs02$"

Rule 6

Array item rules (items)

String pattern (pattern): "mac402$"

Rule 7

Array item rules (items)

String pattern (pattern): "mac602$"

Rule 8

Array item rules (items)

String pattern (pattern): "c04$"

Rule 9

Array item rules (items)

String pattern (pattern): "cs04$"

Rule 10

Array item rules (items)

String pattern (pattern): "c08$"

Rule 11

Array item rules (items)

String pattern (pattern): "cs08$"

Rule 12

Array item rules (items)

String pattern (pattern): "c16$"

Rule 13

Array item rules (items)

String pattern (pattern): "cs16$"

Rule 14

Array item rules (items)

String pattern (pattern): "c32$"

Rule 15

Array item rules (items)

String pattern (pattern): "cs32$"

Rule 16

Array item rules (items)

String pattern (pattern): "c64$"

Rule 17

Array item rules (items)

String pattern (pattern): "cs64$"

Rule 18

Array item rules (items)

String pattern (pattern): "c128$"

Rule 19

Array item rules (items)

String pattern (pattern): "cs128$"

Rule 20

Array item rules (items)

String pattern (pattern): "c256$"

Rule 21

Array item rules (items)

String pattern (pattern): "cs256$"

Rule 22

Array item rules (items)

String pattern (pattern): "c512$"

Rule 23

Array item rules (items)

String pattern (pattern): "cs512$"

Rule 24

Array item rules (items)

String pattern (pattern): "c1024$"

Rule 25

Array item rules (items)

String pattern (pattern): "cs1024$"

Rule 26

Array item rules (items)

String pattern (pattern): "c1025$"

Rule 27

Array item rules (items)

String pattern (pattern): "cs1025$"

Rule 28

Array item rules (items)

String pattern (pattern): "c2048$"

Rule 29

Array item rules (items)

String pattern (pattern): "cs2048$"

Rule 30

Array item rules (items)

String pattern (pattern): "spd$"

Rule 2

Array item rules (items)

Item 1

Allowed values (enum): "rohm,br24g01", "rohm,br24t01"

Item 2

Exact value (const): "atmel,24c01"

Rule 3

Array item rules (items)

Item 1

Allowed values (enum): "nxp,se97b", "renesas,r1ex24002"

Item 2

Exact value (const): "atmel,24c02"

Rule 4

Array item rules (items)

Item 1

Allowed values (enum): "belling,bl24c04a", "giantec,gt24c04a", "onnn,cat24c04", "onnn,cat24c05", "rohm,br24g04"

Item 2

Exact value (const): "atmel,24c04"

Rule 5

Array item rules (items)

Item 1

Allowed values (enum): "belling,bl24c16a", "belling,bl24c16f", "renesas,r1ex24016"

Item 2

Exact value (const): "atmel,24c16"

Rule 6

Array item rules (items)

Item 1

Exact value (const): "giantec,gt24c32a"

Item 2

Exact value (const): "atmel,24c32"

Rule 7

Array item rules (items)

Item 1

Allowed values (enum): "belling,bl24s64", "giantec,gt24p64a", "onnn,n24s64b", "puya,p24c64f"

Item 2

Exact value (const): "atmel,24c64"

Rule 8

Array item rules (items)

Item 1

Allowed values (enum): "giantec,gt24p128e", "giantec,gt24p128f", "puya,p24c128f", "renesas,r1ex24128", "samsung,s524ad0xd1"

Item 2

Exact value (const): "atmel,24c128"

Rule 9

Array item rules (items)

Item 1

Allowed values (enum): "giantec,gt24c256c", "puya,p24c256c"

Item 2

Exact value (const): "atmel,24c256"

Rule 10

Array item rules (items)

Item 1

Exact value (const): "microchip,24aa025e48"

Rule 11

Array item rules (items)

Item 1

Exact value (const): "microchip,24aa025e64"

Rule 12

Array item rules (items)

Item 1

Exact value (const): "st,24256e-wl"

Rule 13

String pattern (pattern): "^atmel,24c(32|64)d-wl$"

label — not listed as required here #

Descriptive name of the EEPROM.

reg — required here #

Maximum number of items (maxItems): 1

pagesize — not listed as required here #

The length of the pagesize for writing. Please consult the manual of your device, that value varies a lot. A wrong value may result in data loss! If not specified, a safety value of '1' is used which will be very slow.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 1, 8, 16, 32, 64, 128, 256

Default value (default): 1

read-only — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

Disables writes to the eeprom.

size — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Total eeprom size in bytes.

no-read-rollover — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

Indicates that the multi-address eeprom does not automatically roll over reads to the next slave address. Please consult the manual of your device.

wp-gpios — not listed as required here #

true — No constraints added by this property rule.

address-width — not listed as required here #

Number of address bits.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Default value (default): 8

Allowed values (enum): 8, 16

num-addresses — not listed as required here #

Total number of i2c slave addresses this device takes.

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Default value (default): 1

Minimum value (minimum): 1

Maximum value (maximum): 8

vcc-supply — not listed as required here #

phandle of the regulator that provides the supply voltage.

Required in this object (required): "compatible", "reg"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

i2c {
  #address-cells = <1>;
  #size-cells = <0>;

  eeprom@52 {
      compatible = "microchip,24c32", "atmel,24c32";
      reg = <0x52>;
      pagesize = <32>;
      wp-gpios = <&gpio1 3 0>;
      num-addresses = <8>;
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only

Line 2: Copyright 2019 BayLibre SAS

Line 31: There are multiple known vendors who manufacture EEPROM chips compatible

Line 32: with Atmel's AT24. The compatible string requires either a single item

Line 33: if the memory comes from Atmel (in which case the vendor part must be

Line 34: 'atmel') or two items with the same 'model' part where the vendor part of

Line 35: the first one is the actual manufacturer and the second item is the

Line 36: corresponding 'atmel,<model>' from Atmel.

Line 105: These are special cases that don't conform to the above pattern.

Line 106: Each requires a standard at24 model as fallback.

Line 160: Actual vendor is st

SPI EEPROMs or FRAMs compatible with Atmel's AT25

Peios Kernel / Hardware and drivers / Device-tree binding reference / Eeprom bindings

Schema identifier ($id): "http://devicetree.org/schemas/eeprom/at25.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Christian Eggers <ceggers@arri.de>"

Properties and child nodes (properties) #

$nodename — not listed as required here #

At least one of these rules must match (anyOf) #

Rule 1

String pattern (pattern): "^eeprom@[0-9a-f]{1,2}$"

Rule 2

String pattern (pattern): "^fram@[0-9a-f]{1,2}$"

compatible — required here #

Exactly one of these rules must match (oneOf) #

Rule 1

Array item rules (items)

Item 1

Allowed values (enum): "anvo,anv32c81w", "anvo,anv32e61w", "atmel,at25256B", "fujitsu,mb85rs1mt", "fujitsu,mb85rs256", "fujitsu,mb85rs64", "microchip,25aa010a", "microchip,at25160bn", "microchip,25lc040", "st,m95m02", "st,m95256", "st,m95640", "cypress,fm25"

Item 2

Exact value (const): "atmel,at25"

Rule 2

Array item rules (items)

Item 1

Exact value (const): "atmel,at25"

reg — required here #

Maximum number of items (maxItems): 1

pagesize — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 1, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536, 131072

Size of the eeprom page. FRAMs don't have pages.

size — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Total eeprom size in bytes. Also used for FRAMs without device ID where the size cannot be detected.

address-width — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 8, 9, 16, 24

Number of address bits. For 9 bits, the MSB of the address is sent as bit 3 of the instruction byte, before the address byte.

spi-cpha — not listed as required here #

true — No constraints added by this property rule.

spi-cpol — not listed as required here #

true — No constraints added by this property rule.

read-only — not listed as required here #

Disable writes to the eeprom.

Value type (type): "boolean"

wp-gpios — not listed as required here #

Maximum number of items (maxItems): 1

GPIO to which the write-protect pin of the chip is connected.

at25,byte-len — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Total eeprom size in bytes. Deprecated, use "size" property instead.

Deprecated (deprecated): true

at25,addr-mode — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Addr-mode flags, as defined in include/linux/spi/eeprom.h. Deprecated, use "address-width" property instead.

Deprecated (deprecated): true

at25,page-size — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Size of the eeprom page. Deprecated, use "pagesize" property instead.

Deprecated (deprecated): true

Required in this object (required): "compatible", "reg", "spi-max-frequency"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/spi/spi-peripheral-props.yaml#

Rule 2 #

Shared schema rule ($ref): /schemas/nvmem/nvmem.yaml

Rule 3 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

This rule must not match (not)

Rule for matching array elements (contains)

Exact value (const): "cypress,fm25"

When the condition matches (then) #

Required in this object (required): "pagesize", "size", "address-width"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>
spi {
    #address-cells = <1>;
    #size-cells = <0>;

    eeprom@0 {
        compatible = "st,m95256", "atmel,at25";
        reg = <0>;
        spi-max-frequency = <5000000>;
        spi-cpha;
        spi-cpol;
        wp-gpios = <&gpio1 3 0>;

        pagesize = <64>;
        size = <32768>;
        address-width = <16>;
    };

    fram@1 {
        compatible = "cypress,fm25", "atmel,at25";
        reg = <1>;
        spi-max-frequency = <40000000>;
    };

    fram@2 {
        compatible = "cypress,fm25", "atmel,at25";
        reg = <2>;
        spi-max-frequency = <20000000>;
        size = <2048>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause

Line 18: There are multiple known vendors who manufacture EEPROM chips compatible

Line 19: with Atmel's AT25. The compatible string requires two items where the

Line 20: 'vendor' and 'model' parts of the first are the actual chip and the second

Line 21: item is fixed to "atmel,at25". Some existing bindings only have the

Line 22: "atmel,at25" part and should be fixed by somebody who knows vendor and

Line 23: product.

Line 44: Please don't use this alternative for new bindings.

Line 85: Deprecated: at25,byte-len, at25,addr-mode, at25,page-size

Microchip 93xx46 SPI compatible EEPROM family

Peios Kernel / Hardware and drivers / Device-tree binding reference / Eeprom bindings

Schema identifier ($id): "http://devicetree.org/schemas/eeprom/microchip,93lc46b.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Cory Tusar <cory.tusar@pid1solutions.com>"

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "atmel,at93c46", "atmel,at93c46d", "atmel,at93c56", "atmel,at93c66", "eeprom-93xx46", "microchip,93lc46b"

data-size — required here #

number of data bits per word

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Allowed values (enum): 8, 16

reg — required here #

chip select of EEPROM

Maximum number of items (maxItems): 1

read-only — not listed as required here #

parameter-less property which disables writes to the EEPROM

Value type (type): "boolean"

select-gpios — not listed as required here #

specifies the GPIO that needs to be asserted prior to each access of EEPROM (e.g. for SPI bus multiplexing)

Maximum number of items (maxItems): 1

Required in this object (required): "compatible", "reg", "data-size", "spi-max-frequency"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/spi/spi-peripheral-props.yaml#

Rule 2 #

Shared schema rule ($ref): /schemas/nvmem/nvmem.yaml

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>

spi {
  #address-cells = <1>;
  #size-cells = <0>;

  eeprom@0 {
    compatible = "eeprom-93xx46";
    reg = <0>;
    spi-max-frequency = <1000000>;
    spi-cs-high;
    data-size = <8>;
    select-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

STMicroelectronics M24LR NFC/RFID EEPROM

Peios Kernel / Hardware and drivers / Device-tree binding reference / Eeprom bindings

Schema identifier ($id): "http://devicetree.org/schemas/eeprom/st,m24lr.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Abd-Alrhman Masalkhi <abd.masalkhi@gmail.com>"

STMicroelectronics M24LR series are dual-interface (RF + I2C) EEPROM chips. These devices support I2C-based access to both memory and a system area that controls authentication and configuration. They expose two I2C addresses, one for the system parameter sector and one for the EEPROM.

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/nvmem/nvmem.yaml#

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "st,m24lr04e-r", "st,m24lr16e-r", "st,m24lr64e-r"

reg — required here #

Array item rules (items) #

Item 1

I2C address used for control/system registers

Item 2

I2C address used for EEPROM memory access

Required in this object (required): "compatible", "reg"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

i2c {
  #address-cells = <1>;
  #size-cells = <0>;

  eeprom@57 {
    compatible = "st,m24lr04e-r";
    reg = <0x57>, /* primary-device */
          <0x53>; /* secondary-device */
  };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Peios Learn — documentation for Peios software.

Built with Trail.