* [PATCH] dt-bindings: riscv: firmware: Add OpenSBI configuration binding
@ 2026-08-19 9:04 Yaxing Guo
2026-08-19 9:12 ` sashiko-bot
2026-08-19 17:03 ` Conor Dooley
0 siblings, 2 replies; 3+ messages in thread
From: Yaxing Guo @ 2026-08-19 9:04 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou
Cc: Alexandre Ghiti, devicetree, inux-kernel, linux-riscv, yangyinglu,
yangyinglu
From: yangyinglu <yangyinglu@bosc.cn>
Add a Devicetree binding for OpenSBI configuration data in the
chosen node, including the cold-boot-harts property.
OpenSBI supports describing certain Generic Platform configurations in
the device tree passed by the previous boot stage. The OpenSBI source
tree documents the `opensbi,config` node and provides the corresponding
device tree parsing flow.
The `/chosen/opensbi-config` node can be used to configure OpenSBI,
including the set of harts permitted to perform a cold boot through the
`cold-boot-harts` property. OpenSBI parses this node during the boot
phase and removes it from the device tree after cold boot.
Add the Devicetree binding for this OpenSBI configuration node to
document the supported `compatible` and `cold-boot-harts` properties.
Signed-off-by: yangyinglu <yangyinglu@bosc.cn>
---
.../bindings/firmware/opensbi,config.yaml | 38 +++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 Documentation/devicetree/bindings/firmware/opensbi,config.yaml
diff --git a/Documentation/devicetree/bindings/firmware/opensbi,config.yaml b/Documentation/devicetree/bindings/firmware/opensbi,config.yaml
new file mode 100644
index 000000000000..86b1e1e673a8
--- /dev/null
+++ b/Documentation/devicetree/bindings/firmware/opensbi,config.yaml
@@ -0,0 +1,38 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/firmware/opensbi,config.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: OpenSBI Firmware Configuration
+
+maintainers:
+
+description: |
+ OpenSBI configuration data passed in the chosen node.
+
+properties:
+ compatible:
+ const: opensbi,config
+
+ cold-boot-harts:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ List of hart CPU nodes selected as cold boot harts by OpenSBI.
+
+required:
+ - compatible
+
+additionalProperties: false
+
+examples:
+ - |
+ / {
+ chosen {
+ opensbi-config {
+ compatible = "opensbi,config";
+ cold-boot-harts = <&cpu0>;
+ };
+ };
+ };
+...
--
2.43.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: riscv: firmware: Add OpenSBI configuration binding
2026-08-19 9:04 [PATCH] dt-bindings: riscv: firmware: Add OpenSBI configuration binding Yaxing Guo
@ 2026-08-19 9:12 ` sashiko-bot
2026-08-19 17:03 ` Conor Dooley
1 sibling, 0 replies; 3+ messages in thread
From: sashiko-bot @ 2026-08-19 9:12 UTC (permalink / raw)
To: Yaxing Guo; +Cc: conor+dt, devicetree, robh
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [Low] The `maintainers` field in the YAML binding is empty, which causes dt_binding_check to fail.
- [Low] The `cold-boot-harts` property lacks an items definition for the phandle-array, leading to schema validation failures.
- [Low] Undefined phandle reference `&cpu0` in the example block causes a dtc compilation error.
- [Low] The `opensbi` vendor prefix is used in the compatible string but is not documented in `vendor-prefixes.yaml`.
--
--- Patch [1]: [PATCH] dt-bindings: riscv: firmware: Add OpenSBI configuration binding ---
commit 522fb80721bbecd24711af44482fc30a1ca8189e
Author: yangyinglu <yangyinglu@bosc.cn>
dt-bindings: riscv: firmware: Add OpenSBI configuration binding
This commit adds a Devicetree binding for OpenSBI configuration data in the
chosen node. It documents the opensbi,config compatible string and the
cold-boot-harts property used by the firmware during the boot phase.
> diff --git a/Documentation/devicetree/bindings/firmware/opensbi,config.yaml b/Documentation/devicetree/bindings/firmware/opensbi,config.yaml
> new file mode 100644
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/firmware/opensbi,config.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/firmware/opensbi,config.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: OpenSBI Firmware Configuration
> +
> +maintainers:
> +
> +description: |
[Severity: Low]
Is this missing a maintainer email? The YAML parser evaluates the empty
maintainers field as a null value, which violates the core.yaml meta-schema
constraint and causes make dt_binding_check to fail immediately.
> + OpenSBI configuration data passed in the chosen node.
> +
> +properties:
> + compatible:
> + const: opensbi,config
[Severity: Low]
Should the opensbi vendor prefix be registered in vendor-prefixes.yaml?
Because this prefix is not registered, device tree tooling will emit an
unrecognized vendor prefix warning during validation.
> +
> + cold-boot-harts:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + description:
[Severity: Low]
Does this phandle-array need an explicit items constraint to indicate the
phandle entry takes zero arguments?
Because cold-boot-harts is a phandle-array with a non-standard name,
dtschema will implicitly require the target cpu node to have a
#cold-boot-harts-cells property. Since CPU nodes do not define this,
validation will fail for valid device trees.
> + List of hart CPU nodes selected as cold boot harts by OpenSBI.
[ ... ]
> +examples:
> + - |
> + / {
> + chosen {
> + opensbi-config {
> + compatible = "opensbi,config";
> + cold-boot-harts = <&cpu0>;
[Severity: Low]
Does the example block need a definition for the cpu0 label?
When make dt_binding_check extracts and attempts to compile the example, it
will fail with a fatal reference to non-existent node or label error from
dtc since cpu0 isn't defined anywhere within the example.
> + };
> + };
> + };
> +...
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260819090411.18561-1-guoyaxing@bosc.ac.cn?part=1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] dt-bindings: riscv: firmware: Add OpenSBI configuration binding
2026-08-19 9:04 [PATCH] dt-bindings: riscv: firmware: Add OpenSBI configuration binding Yaxing Guo
2026-08-19 9:12 ` sashiko-bot
@ 2026-08-19 17:03 ` Conor Dooley
1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2026-08-19 17:03 UTC (permalink / raw)
To: Yaxing Guo
Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Paul Walmsley,
Palmer Dabbelt, Albert Ou, Alexandre Ghiti, devicetree,
inux-kernel, linux-riscv, yangyinglu, yangyinglu
[-- Attachment #1: Type: text/plain, Size: 2721 bytes --]
On Wed, Aug 19, 2026 at 05:04:11PM +0800, Yaxing Guo wrote:
> From: yangyinglu <yangyinglu@bosc.cn>
>
> Add a Devicetree binding for OpenSBI configuration data in the
> chosen node, including the cold-boot-harts property.
>
> OpenSBI supports describing certain Generic Platform configurations in
> the device tree passed by the previous boot stage. The OpenSBI source
> tree documents the `opensbi,config` node and provides the corresponding
> device tree parsing flow.
>
> The `/chosen/opensbi-config` node can be used to configure OpenSBI,
> including the set of harts permitted to perform a cold boot through the
> `cold-boot-harts` property. OpenSBI parses this node during the boot
> phase and removes it from the device tree after cold boot.
>
> Add the Devicetree binding for this OpenSBI configuration node to
> document the supported `compatible` and `cold-boot-harts` properties.
>
> Signed-off-by: yangyinglu <yangyinglu@bosc.cn>
> ---
> .../bindings/firmware/opensbi,config.yaml | 38 +++++++++++++++++++
> 1 file changed, 38 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/firmware/opensbi,config.yaml
>
> diff --git a/Documentation/devicetree/bindings/firmware/opensbi,config.yaml b/Documentation/devicetree/bindings/firmware/opensbi,config.yaml
> new file mode 100644
> index 000000000000..86b1e1e673a8
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/firmware/opensbi,config.yaml
> @@ -0,0 +1,38 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/firmware/opensbi,config.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: OpenSBI Firmware Configuration
> +
> +maintainers:
You probably should've waited for a response to your question about who
should maintain it before sending, becuase I am not entirely sure this
software configuration node should be documented or if the maintainers
of opensbi would want it to be.
Cheers,
Conor.
> +
> +description: |
> + OpenSBI configuration data passed in the chosen node.
> +
> +properties:
> + compatible:
> + const: opensbi,config
> +
> + cold-boot-harts:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + description:
> + List of hart CPU nodes selected as cold boot harts by OpenSBI.
> +
> +required:
> + - compatible
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + / {
> + chosen {
> + opensbi-config {
> + compatible = "opensbi,config";
> + cold-boot-harts = <&cpu0>;
> + };
> + };
> + };
> +...
> --
> 2.43.0
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2026-08-19 17:03 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-19 9:04 [PATCH] dt-bindings: riscv: firmware: Add OpenSBI configuration binding Yaxing Guo
2026-08-19 9:12 ` sashiko-bot
2026-08-19 17:03 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox