450-dt-bindings-block-add-basic-bindings-for-block-devic.patch 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. From 3245921a87154bdfbe7a55d743ea62dd559a8fb0 Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <[email protected]>
  3. Date: Thu, 30 May 2024 03:13:09 +0100
  4. Subject: [PATCH 1/9] dt-bindings: block: add basic bindings for block devices
  5. Add bindings for block devices which are used to allow referencing
  6. nvmem bits on them.
  7. Signed-off-by: Daniel Golle <[email protected]>
  8. ---
  9. .../bindings/block/block-device.yaml | 22 ++++++++
  10. .../devicetree/bindings/block/partition.yaml | 51 +++++++++++++++++++
  11. .../devicetree/bindings/block/partitions.yaml | 20 ++++++++
  12. 3 files changed, 93 insertions(+)
  13. create mode 100644 Documentation/devicetree/bindings/block/block-device.yaml
  14. create mode 100644 Documentation/devicetree/bindings/block/partition.yaml
  15. create mode 100644 Documentation/devicetree/bindings/block/partitions.yaml
  16. --- /dev/null
  17. +++ b/Documentation/devicetree/bindings/block/block-device.yaml
  18. @@ -0,0 +1,22 @@
  19. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  20. +%YAML 1.2
  21. +---
  22. +$id: http://devicetree.org/schemas/block/block-device.yaml#
  23. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  24. +
  25. +title: block storage device
  26. +
  27. +description: |
  28. + This binding is generic and describes a block-oriented storage device.
  29. +
  30. +maintainers:
  31. + - Daniel Golle <[email protected]>
  32. +
  33. +properties:
  34. + partitions:
  35. + $ref: /schemas/block/partitions.yaml
  36. +
  37. + nvmem-layout:
  38. + $ref: /schemas/nvmem/layouts/nvmem-layout.yaml#
  39. +
  40. +unevaluatedProperties: false
  41. --- /dev/null
  42. +++ b/Documentation/devicetree/bindings/block/partition.yaml
  43. @@ -0,0 +1,51 @@
  44. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  45. +%YAML 1.2
  46. +---
  47. +$id: http://devicetree.org/schemas/block/partition.yaml#
  48. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  49. +
  50. +title: Partition on a block device
  51. +
  52. +description: |
  53. + This binding describes a partition on a block device.
  54. + Partitions may be matched by a combination of partition number, name,
  55. + and UUID.
  56. +
  57. +maintainers:
  58. + - Daniel Golle <[email protected]>
  59. +
  60. +properties:
  61. + $nodename:
  62. + pattern: '^block-partition-.+$'
  63. +
  64. + partnum:
  65. + $ref: /schemas/types.yaml#/definitions/uint32
  66. + description:
  67. + Matches partition by number if present.
  68. +
  69. + partname:
  70. + $ref: /schemas/types.yaml#/definitions/string
  71. + description:
  72. + Matches partition by PARTNAME if present.
  73. +
  74. + partuuid:
  75. + $ref: /schemas/types.yaml#/definitions/string
  76. + description:
  77. + Matches partition by PARTUUID if present.
  78. +
  79. + nvmem-layout:
  80. + $ref: /schemas/nvmem/layouts/nvmem-layout.yaml#
  81. + description:
  82. + This container may reference an NVMEM layout parser.
  83. +
  84. +anyOf:
  85. + - required:
  86. + - partnum
  87. +
  88. + - required:
  89. + - partname
  90. +
  91. + - required:
  92. + - partuuid
  93. +
  94. +unevaluatedProperties: false
  95. --- /dev/null
  96. +++ b/Documentation/devicetree/bindings/block/partitions.yaml
  97. @@ -0,0 +1,20 @@
  98. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  99. +%YAML 1.2
  100. +---
  101. +$id: http://devicetree.org/schemas/block/partitions.yaml#
  102. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  103. +
  104. +title: Partitions on block devices
  105. +
  106. +description: |
  107. + This binding is generic and describes the content of the partitions container
  108. + node.
  109. +
  110. +maintainers:
  111. + - Daniel Golle <[email protected]>
  112. +
  113. +patternProperties:
  114. + "^block-partition-.+$":
  115. + $ref: partition.yaml
  116. +
  117. +unevaluatedProperties: false