xref: /freebsd/sys/contrib/device-tree/Bindings/mtd/mtd.yaml (revision fac71e4e09885bb2afa3d984a0c239a52e1a7418)
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:
158bab661aSEmmanuel Vadot    pattern: "^(flash|.*sram)(@.*)?$"
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]+)?$":
465956d97fSEmmanuel Vadot    $ref: ../nvmem/nvmem.yaml#
47*fac71e4eSEmmanuel Vadot    unevaluatedProperties: false
485956d97fSEmmanuel Vadot
495956d97fSEmmanuel Vadot    description: |
505956d97fSEmmanuel Vadot      An OTP memory region. Some flashes provide a one-time-programmable
515956d97fSEmmanuel Vadot      memory whose content can either be programmed by a user or is already
525956d97fSEmmanuel Vadot      pre-programmed by the factory. Some flashes might provide both.
535956d97fSEmmanuel Vadot
545956d97fSEmmanuel Vadot    properties:
555956d97fSEmmanuel Vadot      compatible:
565956d97fSEmmanuel Vadot        enum:
575956d97fSEmmanuel Vadot          - user-otp
585956d97fSEmmanuel Vadot          - factory-otp
595956d97fSEmmanuel Vadot
605956d97fSEmmanuel Vadot    required:
615956d97fSEmmanuel Vadot      - compatible
625956d97fSEmmanuel Vadot
638bab661aSEmmanuel Vadot# This is a generic file other binding inherit from
645956d97fSEmmanuel VadotadditionalProperties: true
655956d97fSEmmanuel Vadot
665956d97fSEmmanuel Vadotexamples:
675956d97fSEmmanuel Vadot  - |
685956d97fSEmmanuel Vadot    spi {
695956d97fSEmmanuel Vadot        #address-cells = <1>;
705956d97fSEmmanuel Vadot        #size-cells = <0>;
715956d97fSEmmanuel Vadot
725956d97fSEmmanuel Vadot        flash@0 {
735956d97fSEmmanuel Vadot            reg = <0>;
745956d97fSEmmanuel Vadot            compatible = "jedec,spi-nor";
755956d97fSEmmanuel Vadot            label = "System-firmware";
765956d97fSEmmanuel Vadot        };
775956d97fSEmmanuel Vadot    };
785956d97fSEmmanuel Vadot
795956d97fSEmmanuel Vadot  - |
805956d97fSEmmanuel Vadot    spi {
815956d97fSEmmanuel Vadot        #address-cells = <1>;
825956d97fSEmmanuel Vadot        #size-cells = <0>;
835956d97fSEmmanuel Vadot
845956d97fSEmmanuel Vadot        flash@0 {
855956d97fSEmmanuel Vadot            reg = <0>;
865956d97fSEmmanuel Vadot            compatible = "jedec,spi-nor";
875956d97fSEmmanuel Vadot
885956d97fSEmmanuel Vadot            otp-1 {
895956d97fSEmmanuel Vadot                compatible = "factory-otp";
905956d97fSEmmanuel Vadot                #address-cells = <1>;
915956d97fSEmmanuel Vadot                #size-cells = <1>;
925956d97fSEmmanuel Vadot
935956d97fSEmmanuel Vadot                electronic-serial-number@0 {
945956d97fSEmmanuel Vadot                    reg = <0 8>;
955956d97fSEmmanuel Vadot                };
965956d97fSEmmanuel Vadot            };
975956d97fSEmmanuel Vadot
985956d97fSEmmanuel Vadot            otp-2 {
995956d97fSEmmanuel Vadot                compatible = "user-otp";
1005956d97fSEmmanuel Vadot                #address-cells = <1>;
1015956d97fSEmmanuel Vadot                #size-cells = <1>;
1025956d97fSEmmanuel Vadot
1035956d97fSEmmanuel Vadot                mac-address@0 {
1045956d97fSEmmanuel Vadot                    reg = <0 6>;
1055956d97fSEmmanuel Vadot                };
1065956d97fSEmmanuel Vadot            };
1075956d97fSEmmanuel Vadot        };
1085956d97fSEmmanuel Vadot    };
1095956d97fSEmmanuel Vadot
1105956d97fSEmmanuel Vadot...
111