[PATCH RFC v3 2/9] dt-bindings: board: Introduce board-id

Elliot Berman
2024-05-21T18:40:47Z

Device manufcturers frequently ship multiple boards or SKUs under a
single softwre package. These software packages ship multiple devicetree
blobs and require some mechanims to pick the correct DTB for the boards
that use the software package. This patch introduces a common language
for adding board identifiers to devicetrees.

Signed-off-by: Elliot Berman <quic_eberman@quicinc.com>
---
.../devicetree/bindings/board/board-id.yaml | 24 ++++++++++++++++++++++
1 file changed, 24 insertions(+)

diff --git a/Documentation/devicetree/bindings/board/board-id.yaml b/Documentation/devicetree/bindings/board/board-id.yaml
new file mode 100644
index 000000000000..99514aef9718
--- /dev/null
+++ b/Documentation/devicetree/bindings/board/board-id.yaml
@@ -0,0 +1,24 @@
+# SPDX-License-Identifier: BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/board/board-id.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: board identifiers
+description: Common property for board-id subnode
+
+maintainers:
+ - Elliot Berman <quic_eberman@quicinc.com>
+
+properties:
+ $nodename:
+ const: '/'
+ board-id:
+ type: object
+ patternProperties:
+ "^.*(?!_str)$":
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ "^.*_str$":
+ $ref: /schemas/types.yaml#/definitions/string-array
+
+additionalProperties: true

--
2.34.1