xref: /freebsd/sys/contrib/device-tree/Bindings/mtd/mtd.yaml (revision 8bab661a3316d8bd9b9fbd11a3b4371b91507bd2)
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:
15*8bab661aSEmmanuel 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
24*8bab661aSEmmanuel Vadot  '#address-cells':
25*8bab661aSEmmanuel Vadot    deprecated: true
26*8bab661aSEmmanuel Vadot
27*8bab661aSEmmanuel Vadot  '#size-cells':
28*8bab661aSEmmanuel Vadot    deprecated: true
29*8bab661aSEmmanuel Vadot
30*8bab661aSEmmanuel Vadot  partitions:
31*8bab661aSEmmanuel Vadot    $ref: /schemas/mtd/partitions/partitions.yaml
32*8bab661aSEmmanuel Vadot
33*8bab661aSEmmanuel Vadot    required:
34*8bab661aSEmmanuel Vadot      - compatible
35*8bab661aSEmmanuel Vadot
365956d97fSEmmanuel VadotpatternProperties:
37*8bab661aSEmmanuel Vadot  "@[0-9a-f]+$":
38*8bab661aSEmmanuel Vadot    $ref: partitions/partition.yaml
39*8bab661aSEmmanuel Vadot    deprecated: true
40*8bab661aSEmmanuel Vadot
41*8bab661aSEmmanuel Vadot  "^partition@[0-9a-f]+":
42*8bab661aSEmmanuel Vadot    $ref: partitions/partition.yaml
43*8bab661aSEmmanuel Vadot    deprecated: true
44*8bab661aSEmmanuel Vadot
455956d97fSEmmanuel Vadot  "^otp(-[0-9]+)?$":
465956d97fSEmmanuel Vadot    $ref: ../nvmem/nvmem.yaml#
475956d97fSEmmanuel Vadot
485956d97fSEmmanuel Vadot    description: |
495956d97fSEmmanuel Vadot      An OTP memory region. Some flashes provide a one-time-programmable
505956d97fSEmmanuel Vadot      memory whose content can either be programmed by a user or is already
515956d97fSEmmanuel Vadot      pre-programmed by the factory. Some flashes might provide both.
525956d97fSEmmanuel Vadot
535956d97fSEmmanuel Vadot    properties:
545956d97fSEmmanuel Vadot      compatible:
555956d97fSEmmanuel Vadot        enum:
565956d97fSEmmanuel Vadot          - user-otp
575956d97fSEmmanuel Vadot          - factory-otp
585956d97fSEmmanuel Vadot
595956d97fSEmmanuel Vadot    required:
605956d97fSEmmanuel Vadot      - compatible
615956d97fSEmmanuel Vadot
62*8bab661aSEmmanuel Vadot# This is a generic file other binding inherit from
635956d97fSEmmanuel VadotadditionalProperties: true
645956d97fSEmmanuel Vadot
655956d97fSEmmanuel Vadotexamples:
665956d97fSEmmanuel Vadot  - |
675956d97fSEmmanuel Vadot    spi {
685956d97fSEmmanuel Vadot        #address-cells = <1>;
695956d97fSEmmanuel Vadot        #size-cells = <0>;
705956d97fSEmmanuel Vadot
715956d97fSEmmanuel Vadot        flash@0 {
725956d97fSEmmanuel Vadot            reg = <0>;
735956d97fSEmmanuel Vadot            compatible = "jedec,spi-nor";
745956d97fSEmmanuel Vadot            label = "System-firmware";
755956d97fSEmmanuel Vadot        };
765956d97fSEmmanuel Vadot    };
775956d97fSEmmanuel Vadot
785956d97fSEmmanuel Vadot  - |
795956d97fSEmmanuel Vadot    spi {
805956d97fSEmmanuel Vadot        #address-cells = <1>;
815956d97fSEmmanuel Vadot        #size-cells = <0>;
825956d97fSEmmanuel Vadot
835956d97fSEmmanuel Vadot        flash@0 {
845956d97fSEmmanuel Vadot            reg = <0>;
855956d97fSEmmanuel Vadot            compatible = "jedec,spi-nor";
865956d97fSEmmanuel Vadot
875956d97fSEmmanuel Vadot            otp-1 {
885956d97fSEmmanuel Vadot                compatible = "factory-otp";
895956d97fSEmmanuel Vadot                #address-cells = <1>;
905956d97fSEmmanuel Vadot                #size-cells = <1>;
915956d97fSEmmanuel Vadot
925956d97fSEmmanuel Vadot                electronic-serial-number@0 {
935956d97fSEmmanuel Vadot                    reg = <0 8>;
945956d97fSEmmanuel Vadot                };
955956d97fSEmmanuel Vadot            };
965956d97fSEmmanuel Vadot
975956d97fSEmmanuel Vadot            otp-2 {
985956d97fSEmmanuel Vadot                compatible = "user-otp";
995956d97fSEmmanuel Vadot                #address-cells = <1>;
1005956d97fSEmmanuel Vadot                #size-cells = <1>;
1015956d97fSEmmanuel Vadot
1025956d97fSEmmanuel Vadot                mac-address@0 {
1035956d97fSEmmanuel Vadot                    reg = <0 6>;
1045956d97fSEmmanuel Vadot                };
1055956d97fSEmmanuel Vadot            };
1065956d97fSEmmanuel Vadot        };
1075956d97fSEmmanuel Vadot    };
1085956d97fSEmmanuel Vadot
1095956d97fSEmmanuel Vadot...
110