2
0

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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. From 9ffc1d7d73609a89eb264d6066340f8b7b3b0ebe Mon Sep 17 00:00:00 2001
  2. From: Daniel Golle <[email protected]>
  3. Date: Mon, 7 Aug 2023 21:19:45 +0100
  4. Subject: [PATCH 08/15] dt-bindings: block: add basic bindings for block
  5. devices
  6. Add bindings for block devices which are used to allow referencing
  7. nvmem bits on them.
  8. Signed-off-by: Daniel Golle <[email protected]>
  9. ---
  10. .../bindings/block/block-device.yaml | 22 ++++++++
  11. .../devicetree/bindings/block/partition.yaml | 50 +++++++++++++++++++
  12. .../devicetree/bindings/block/partitions.yaml | 20 ++++++++
  13. 3 files changed, 92 insertions(+)
  14. create mode 100644 Documentation/devicetree/bindings/block/block-device.yaml
  15. create mode 100644 Documentation/devicetree/bindings/block/partition.yaml
  16. create mode 100644 Documentation/devicetree/bindings/block/partitions.yaml
  17. --- /dev/null
  18. +++ b/Documentation/devicetree/bindings/block/block-device.yaml
  19. @@ -0,0 +1,22 @@
  20. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  21. +%YAML 1.2
  22. +---
  23. +$id: http://devicetree.org/schemas/block/block-device.yaml#
  24. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  25. +
  26. +title: block storage device
  27. +
  28. +description: |
  29. + This binding is generic and describes a block-oriented storage device.
  30. +
  31. +maintainers:
  32. + - Daniel Golle <[email protected]>
  33. +
  34. +properties:
  35. + partitions:
  36. + $ref: /schemas/block/partitions.yaml
  37. +
  38. + nvmem-layout:
  39. + $ref: /schemas/nvmem/layouts/nvmem-layout.yaml#
  40. +
  41. +unevaluatedProperties: false
  42. --- /dev/null
  43. +++ b/Documentation/devicetree/bindings/block/partition.yaml
  44. @@ -0,0 +1,50 @@
  45. +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
  46. +%YAML 1.2
  47. +---
  48. +$id: http://devicetree.org/schemas/block/partition.yaml#
  49. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  50. +
  51. +title: Partition on a block device
  52. +
  53. +description: |
  54. + This binding describes a partition on a block device.
  55. + Partitions may be matched by a combination of partition number, name,
  56. + and UUID.
  57. +
  58. +maintainers:
  59. + - Daniel Golle <[email protected]>
  60. +
  61. +properties:
  62. + $nodename:
  63. + pattern: '^block-partition-.+$'
  64. +
  65. + partnum:
  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. + uuid:
  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. + - uuid
  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