1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/mtd/mtd.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: MTD (Memory Technology Device) 8 9maintainers: 10 - Miquel Raynal <miquel.raynal@bootlin.com> 11 - Richard Weinberger <richard@nod.at> 12 13select: false 14 15properties: 16 $nodename: 17 pattern: "^(flash|.*sram|nand)(@.*)?$" 18 19 label: 20 description: 21 User-defined MTD device name. Can be used to assign user friendly 22 names to MTD devices (instead of the flash model or flash controller 23 based name) in order to ease flash device identification and/or 24 describe what they are used for. 25 26 '#address-cells': 27 deprecated: true 28 29 '#size-cells': 30 deprecated: true 31 32 partitions: 33 type: object 34 35 required: 36 - compatible 37 38patternProperties: 39 "(^partition)?@[0-9a-f]+$": 40 $ref: /schemas/mtd/partitions/partition.yaml#/$defs/partition-node 41 deprecated: true 42 43 "^otp(-[0-9]+)?$": 44 type: object 45 46 allOf: 47 - $ref: /schemas/nvmem/nvmem.yaml# 48 - $ref: /schemas/nvmem/nvmem-deprecated-cells.yaml# 49 50 unevaluatedProperties: false 51 52 description: | 53 An OTP memory region. Some flashes provide a one-time-programmable 54 memory whose content can either be programmed by a user or is already 55 pre-programmed by the factory. Some flashes might provide both. 56 57 properties: 58 compatible: 59 enum: 60 - user-otp 61 - factory-otp 62 63 required: 64 - compatible 65 66# This is a generic file other binding inherit from 67additionalProperties: true 68 69examples: 70 - | 71 spi { 72 #address-cells = <1>; 73 #size-cells = <0>; 74 75 flash@0 { 76 reg = <0>; 77 compatible = "jedec,spi-nor"; 78 label = "System-firmware"; 79 }; 80 }; 81 82 - | 83 spi { 84 #address-cells = <1>; 85 #size-cells = <0>; 86 87 flash@0 { 88 reg = <0>; 89 compatible = "jedec,spi-nor"; 90 91 otp-1 { 92 compatible = "factory-otp"; 93 #address-cells = <1>; 94 #size-cells = <1>; 95 96 electronic-serial-number@0 { 97 reg = <0 8>; 98 }; 99 }; 100 101 otp-2 { 102 compatible = "user-otp"; 103 #address-cells = <1>; 104 #size-cells = <1>; 105 106 mac-address@0 { 107 reg = <0 6>; 108 }; 109 }; 110 }; 111 }; 112 113... 114