mtd.yaml 2.5 KB

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