402-v5.12-0001-dt-bindings-mtd-move-partition-binding-to-its-own-fi.patch 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. From 6418522022c706fd867b00b2571edba48b8fa8c7 Mon Sep 17 00:00:00 2001
  2. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  3. Date: Thu, 11 Feb 2021 23:04:25 +0100
  4. Subject: [PATCH] dt-bindings: mtd: move partition binding to its own file
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Single partition binding is quite common and may be:
  9. 1. Used by multiple parsers
  10. 2. Extended for more specific cases
  11. Move it to separated file to avoid code duplication.
  12. Signed-off-by: Rafał Miłecki <[email protected]>
  13. Reviewed-by: Rob Herring <[email protected]>
  14. Signed-off-by: Richard Weinberger <[email protected]>
  15. ---
  16. .../mtd/partitions/fixed-partitions.yaml | 33 +------------
  17. .../bindings/mtd/partitions/partition.yaml | 47 +++++++++++++++++++
  18. 2 files changed, 48 insertions(+), 32 deletions(-)
  19. create mode 100644 Documentation/devicetree/bindings/mtd/partitions/partition.yaml
  20. --- a/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
  21. +++ b/Documentation/devicetree/bindings/mtd/partitions/fixed-partitions.yaml
  22. @@ -27,38 +27,7 @@ properties:
  23. patternProperties:
  24. "@[0-9a-f]+$":
  25. - description: node describing a single flash partition
  26. - type: object
  27. -
  28. - properties:
  29. - reg:
  30. - description: partition's offset and size within the flash
  31. - maxItems: 1
  32. -
  33. - label:
  34. - description: The label / name for this partition. If omitted, the label
  35. - is taken from the node name (excluding the unit address).
  36. -
  37. - read-only:
  38. - description: This parameter, if present, is a hint that this partition
  39. - should only be mounted read-only. This is usually used for flash
  40. - partitions containing early-boot firmware images or data which should
  41. - not be clobbered.
  42. - type: boolean
  43. -
  44. - lock:
  45. - description: Do not unlock the partition at initialization time (not
  46. - supported on all devices)
  47. - type: boolean
  48. -
  49. - slc-mode:
  50. - description: This parameter, if present, allows one to emulate SLC mode
  51. - on a partition attached to an MLC NAND thus making this partition
  52. - immune to paired-pages corruptions
  53. - type: boolean
  54. -
  55. - required:
  56. - - reg
  57. + $ref: "partition.yaml#"
  58. required:
  59. - "#address-cells"
  60. --- /dev/null
  61. +++ b/Documentation/devicetree/bindings/mtd/partitions/partition.yaml
  62. @@ -0,0 +1,47 @@
  63. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  64. +%YAML 1.2
  65. +---
  66. +$id: http://devicetree.org/schemas/mtd/partitions/partition.yaml#
  67. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  68. +
  69. +title: Partition
  70. +
  71. +description: |
  72. + This binding describes a single flash partition. Each partition must have its
  73. + relative offset and size specified. Depending on partition function extra
  74. + properties can be used.
  75. +
  76. +maintainers:
  77. + - Rafał Miłecki <[email protected]>
  78. +
  79. +properties:
  80. + reg:
  81. + description: partition's offset and size within the flash
  82. + maxItems: 1
  83. +
  84. + label:
  85. + description: The label / name for this partition. If omitted, the label
  86. + is taken from the node name (excluding the unit address).
  87. +
  88. + read-only:
  89. + description: This parameter, if present, is a hint that this partition
  90. + should only be mounted read-only. This is usually used for flash
  91. + partitions containing early-boot firmware images or data which should
  92. + not be clobbered.
  93. + type: boolean
  94. +
  95. + lock:
  96. + description: Do not unlock the partition at initialization time (not
  97. + supported on all devices)
  98. + type: boolean
  99. +
  100. + slc-mode:
  101. + description: This parameter, if present, allows one to emulate SLC mode
  102. + on a partition attached to an MLC NAND thus making this partition
  103. + immune to paired-pages corruptions
  104. + type: boolean
  105. +
  106. +required:
  107. + - reg
  108. +
  109. +additionalProperties: true