xref: /freebsd/sys/contrib/device-tree/Bindings/mtd/mtd.yaml (revision 84943d6f38e936ac3b7a3947ca26eeb27a39f938)
15956d97fSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
25956d97fSEmmanuel Vadot%YAML 1.2
35956d97fSEmmanuel Vadot---
45956d97fSEmmanuel Vadot$id: http://devicetree.org/schemas/mtd/mtd.yaml#
55956d97fSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
65956d97fSEmmanuel Vadot
77ef62cebSEmmanuel Vadottitle: MTD (Memory Technology Device)
85956d97fSEmmanuel Vadot
95956d97fSEmmanuel Vadotmaintainers:
105956d97fSEmmanuel Vadot  - Miquel Raynal <miquel.raynal@bootlin.com>
115956d97fSEmmanuel Vadot  - Richard Weinberger <richard@nod.at>
125956d97fSEmmanuel Vadot
135956d97fSEmmanuel Vadotproperties:
145956d97fSEmmanuel Vadot  $nodename:
15f126890aSEmmanuel Vadot    pattern: "^(flash|.*sram|nand)(@.*)?$"
165956d97fSEmmanuel Vadot
175956d97fSEmmanuel Vadot  label:
185956d97fSEmmanuel Vadot    description:
195956d97fSEmmanuel Vadot      User-defined MTD device name. Can be used to assign user friendly
205956d97fSEmmanuel Vadot      names to MTD devices (instead of the flash model or flash controller
215956d97fSEmmanuel Vadot      based name) in order to ease flash device identification and/or
225956d97fSEmmanuel Vadot      describe what they are used for.
235956d97fSEmmanuel Vadot
248bab661aSEmmanuel Vadot  '#address-cells':
258bab661aSEmmanuel Vadot    deprecated: true
268bab661aSEmmanuel Vadot
278bab661aSEmmanuel Vadot  '#size-cells':
288bab661aSEmmanuel Vadot    deprecated: true
298bab661aSEmmanuel Vadot
308bab661aSEmmanuel Vadot  partitions:
318bab661aSEmmanuel Vadot    $ref: /schemas/mtd/partitions/partitions.yaml
328bab661aSEmmanuel Vadot
338bab661aSEmmanuel Vadot    required:
348bab661aSEmmanuel Vadot      - compatible
358bab661aSEmmanuel Vadot
365956d97fSEmmanuel VadotpatternProperties:
378bab661aSEmmanuel Vadot  "@[0-9a-f]+$":
388bab661aSEmmanuel Vadot    $ref: partitions/partition.yaml
398bab661aSEmmanuel Vadot    deprecated: true
408bab661aSEmmanuel Vadot
418bab661aSEmmanuel Vadot  "^partition@[0-9a-f]+":
428bab661aSEmmanuel Vadot    $ref: partitions/partition.yaml
438bab661aSEmmanuel Vadot    deprecated: true
448bab661aSEmmanuel Vadot
455956d97fSEmmanuel Vadot  "^otp(-[0-9]+)?$":
46*84943d6fSEmmanuel Vadot    type: object
47*84943d6fSEmmanuel Vadot
48*84943d6fSEmmanuel Vadot    allOf:
49*84943d6fSEmmanuel Vadot      - $ref: ../nvmem/nvmem.yaml#
50*84943d6fSEmmanuel Vadot      - $ref: ../nvmem/nvmem-deprecated-cells.yaml#
51*84943d6fSEmmanuel Vadot
52fac71e4eSEmmanuel Vadot    unevaluatedProperties: false
535956d97fSEmmanuel Vadot
545956d97fSEmmanuel Vadot    description: |
555956d97fSEmmanuel Vadot      An OTP memory region. Some flashes provide a one-time-programmable
565956d97fSEmmanuel Vadot      memory whose content can either be programmed by a user or is already
575956d97fSEmmanuel Vadot      pre-programmed by the factory. Some flashes might provide both.
585956d97fSEmmanuel Vadot
595956d97fSEmmanuel Vadot    properties:
605956d97fSEmmanuel Vadot      compatible:
615956d97fSEmmanuel Vadot        enum:
625956d97fSEmmanuel Vadot          - user-otp
635956d97fSEmmanuel Vadot          - factory-otp
645956d97fSEmmanuel Vadot
655956d97fSEmmanuel Vadot    required:
665956d97fSEmmanuel Vadot      - compatible
675956d97fSEmmanuel Vadot
688bab661aSEmmanuel Vadot# This is a generic file other binding inherit from
695956d97fSEmmanuel VadotadditionalProperties: true
705956d97fSEmmanuel Vadot
715956d97fSEmmanuel Vadotexamples:
725956d97fSEmmanuel Vadot  - |
735956d97fSEmmanuel Vadot    spi {
745956d97fSEmmanuel Vadot        #address-cells = <1>;
755956d97fSEmmanuel Vadot        #size-cells = <0>;
765956d97fSEmmanuel Vadot
775956d97fSEmmanuel Vadot        flash@0 {
785956d97fSEmmanuel Vadot            reg = <0>;
795956d97fSEmmanuel Vadot            compatible = "jedec,spi-nor";
805956d97fSEmmanuel Vadot            label = "System-firmware";
815956d97fSEmmanuel Vadot        };
825956d97fSEmmanuel Vadot    };
835956d97fSEmmanuel Vadot
845956d97fSEmmanuel Vadot  - |
855956d97fSEmmanuel Vadot    spi {
865956d97fSEmmanuel Vadot        #address-cells = <1>;
875956d97fSEmmanuel Vadot        #size-cells = <0>;
885956d97fSEmmanuel Vadot
895956d97fSEmmanuel Vadot        flash@0 {
905956d97fSEmmanuel Vadot            reg = <0>;
915956d97fSEmmanuel Vadot            compatible = "jedec,spi-nor";
925956d97fSEmmanuel Vadot
935956d97fSEmmanuel Vadot            otp-1 {
945956d97fSEmmanuel Vadot                compatible = "factory-otp";
955956d97fSEmmanuel Vadot                #address-cells = <1>;
965956d97fSEmmanuel Vadot                #size-cells = <1>;
975956d97fSEmmanuel Vadot
985956d97fSEmmanuel Vadot                electronic-serial-number@0 {
995956d97fSEmmanuel Vadot                    reg = <0 8>;
1005956d97fSEmmanuel Vadot                };
1015956d97fSEmmanuel Vadot            };
1025956d97fSEmmanuel Vadot
1035956d97fSEmmanuel Vadot            otp-2 {
1045956d97fSEmmanuel Vadot                compatible = "user-otp";
1055956d97fSEmmanuel Vadot                #address-cells = <1>;
1065956d97fSEmmanuel Vadot                #size-cells = <1>;
1075956d97fSEmmanuel Vadot
1085956d97fSEmmanuel Vadot                mac-address@0 {
1095956d97fSEmmanuel Vadot                    reg = <0 6>;
1105956d97fSEmmanuel Vadot                };
1115956d97fSEmmanuel Vadot            };
1125956d97fSEmmanuel Vadot        };
1135956d97fSEmmanuel Vadot    };
1145956d97fSEmmanuel Vadot
1155956d97fSEmmanuel Vadot...
116