450-01-dt-bindings-mtd-add-basic-bindings-for-UBI.patch 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. From ffbbe7d66872ff8957dad2136133e28a1fd5d437 Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <[email protected]>
  3. Date: Mon, 7 Aug 2023 22:51:05 +0100
  4. Subject: [PATCH 01/15] dt-bindings: mtd: add basic bindings for UBI
  5. Add basic bindings for UBI devices and volumes.
  6. Signed-off-by: Daniel Golle <[email protected]>
  7. ---
  8. .../bindings/mtd/partitions/linux,ubi.yaml | 65 +++++++++++++++++++
  9. .../bindings/mtd/partitions/ubi-volume.yaml | 35 ++++++++++
  10. 2 files changed, 100 insertions(+)
  11. create mode 100644 Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml
  12. create mode 100644 Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
  13. --- /dev/null
  14. +++ b/Documentation/devicetree/bindings/mtd/partitions/linux,ubi.yaml
  15. @@ -0,0 +1,65 @@
  16. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  17. +%YAML 1.2
  18. +---
  19. +$id: http://devicetree.org/schemas/mtd/partitions/linux,ubi.yaml#
  20. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  21. +
  22. +title: Unsorted Block Images
  23. +
  24. +description: |
  25. + UBI ("Unsorted Block Images") is a volume management system for raw
  26. + flash devices which manages multiple logical volumes on a single
  27. + physical flash device and spreads the I/O load (i.e wear-leveling)
  28. + across the whole flash chip.
  29. +
  30. +maintainers:
  31. + - Daniel Golle <[email protected]>
  32. +
  33. +allOf:
  34. + - $ref: partition.yaml#
  35. +
  36. +properties:
  37. + compatible:
  38. + const: linux,ubi
  39. +
  40. + volumes:
  41. + type: object
  42. + description: UBI Volumes
  43. +
  44. + patternProperties:
  45. + "^ubi-volume-.*$":
  46. + $ref: /schemas/mtd/partitions/ubi-volume.yaml#
  47. +
  48. + unevaluatedProperties: false
  49. +
  50. +required:
  51. + - compatible
  52. +
  53. +unevaluatedProperties: false
  54. +
  55. +examples:
  56. + - |
  57. + partitions {
  58. + compatible = "fixed-partitions";
  59. + #address-cells = <1>;
  60. + #size-cells = <1>;
  61. +
  62. + partition@0 {
  63. + reg = <0x0 0x100000>;
  64. + label = "bootloader";
  65. + read-only;
  66. + };
  67. +
  68. + partition@100000 {
  69. + reg = <0x100000 0x1ff00000>;
  70. + label = "ubi";
  71. + compatible = "linux,ubi";
  72. +
  73. + volumes {
  74. + ubi-volume-caldata {
  75. + volid = <2>;
  76. + volname = "rf";
  77. + };
  78. + };
  79. + };
  80. + };
  81. --- /dev/null
  82. +++ b/Documentation/devicetree/bindings/mtd/partitions/ubi-volume.yaml
  83. @@ -0,0 +1,35 @@
  84. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  85. +%YAML 1.2
  86. +---
  87. +$id: http://devicetree.org/schemas/mtd/partitions/ubi-volume.yaml#
  88. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  89. +
  90. +title: UBI volume
  91. +
  92. +description: |
  93. + This binding describes a single UBI volume. Volumes can be matches either
  94. + by their ID or their name, or both.
  95. +
  96. +maintainers:
  97. + - Daniel Golle <[email protected]>
  98. +
  99. +properties:
  100. + volid:
  101. + $ref: "/schemas/types.yaml#/definitions/uint32"
  102. + description:
  103. + Match UBI volume ID
  104. +
  105. + volname:
  106. + $ref: "/schemas/types.yaml#/definitions/string"
  107. + description:
  108. + Match UBI volume ID
  109. +
  110. +anyOf:
  111. + - required:
  112. + - volid
  113. +
  114. + - required:
  115. + - volname
  116. +
  117. +# This is a generic file other binding inherit from and extend
  118. +additionalProperties: true