Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/mtd/mtd.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: MTD (Memory Technology Device) Device Tree Bindings
0008 
0009 maintainers:
0010   - Miquel Raynal <miquel.raynal@bootlin.com>
0011   - Richard Weinberger <richard@nod.at>
0012 
0013 properties:
0014   $nodename:
0015     pattern: "^flash(@.*)?$"
0016 
0017   label:
0018     description:
0019       User-defined MTD device name. Can be used to assign user friendly
0020       names to MTD devices (instead of the flash model or flash controller
0021       based name) in order to ease flash device identification and/or
0022       describe what they are used for.
0023 
0024 patternProperties:
0025   "^otp(-[0-9]+)?$":
0026     type: object
0027     $ref: ../nvmem/nvmem.yaml#
0028 
0029     description: |
0030       An OTP memory region. Some flashes provide a one-time-programmable
0031       memory whose content can either be programmed by a user or is already
0032       pre-programmed by the factory. Some flashes might provide both.
0033 
0034     properties:
0035       compatible:
0036         enum:
0037           - user-otp
0038           - factory-otp
0039 
0040     required:
0041       - compatible
0042 
0043 additionalProperties: true
0044 
0045 examples:
0046   - |
0047     spi {
0048         #address-cells = <1>;
0049         #size-cells = <0>;
0050 
0051         flash@0 {
0052             reg = <0>;
0053             compatible = "jedec,spi-nor";
0054             label = "System-firmware";
0055         };
0056     };
0057 
0058   - |
0059     spi {
0060         #address-cells = <1>;
0061         #size-cells = <0>;
0062 
0063         flash@0 {
0064             reg = <0>;
0065             compatible = "jedec,spi-nor";
0066 
0067             otp-1 {
0068                 compatible = "factory-otp";
0069                 #address-cells = <1>;
0070                 #size-cells = <1>;
0071 
0072                 electronic-serial-number@0 {
0073                     reg = <0 8>;
0074                 };
0075             };
0076 
0077             otp-2 {
0078                 compatible = "user-otp";
0079                 #address-cells = <1>;
0080                 #size-cells = <1>;
0081 
0082                 mac-address@0 {
0083                     reg = <0 6>;
0084                 };
0085             };
0086         };
0087     };
0088 
0089 ...