summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuodong Xu <guodong@riscstar.com>2026-01-10 13:18:18 +0800
committerConor Dooley <conor.dooley@microchip.com>2026-01-13 22:22:56 +0000
commit0cdb7fc1879b1b858463125630f4dd5af6b111ad (patch)
treed51493eed4cd7188e4b23897aa05ee145e2aa5f9
parentfff010c776f715904ba0823bb347eac00dccffa2 (diff)
dt-bindings: riscv: Add B ISA extension description
Add description of the single-letter B extension for Bit Manipulation. B is mandatory for RVA23U64. The B extension is ratified in the 20240411 version of the unprivileged ISA specification. According to the ratified spec, the B standard extension comprises instructions provided by the Zba, Zbb, and Zbs extensions. Add two-way dependency check to enforce that B implies Zba/Zbb/Zbs; and when Zba/Zbb/Zbs (all of them) are specified, then B must be added too. The reason why B/Zba/Zbb/Zbs must coexist at the same time is that unlike other single-letter extensions, B was ratified (Apr/2024) much later than its component extensions Zba/Zbb/Zbs (Jun/2021). When "b" is specified, zba/zbb/zbs must be present to ensure backward compatibility with existing software and kernels that only look for the explicit component strings. When all three components zba/zbb/zbs are specified, "b" should also be present. Making "b" mandatory when all three components are present. Existing devicetrees with zba/zbb/zbs but without "b" will generate warnings that can be fixed in follow-up patches. Signed-off-by: Guodong Xu <guodong@riscstar.com> Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
-rw-r--r--Documentation/devicetree/bindings/riscv/extensions.yaml31
1 files changed, 31 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/riscv/extensions.yaml b/Documentation/devicetree/bindings/riscv/extensions.yaml
index 6a4697b36b8d..beeb6612db31 100644
--- a/Documentation/devicetree/bindings/riscv/extensions.yaml
+++ b/Documentation/devicetree/bindings/riscv/extensions.yaml
@@ -109,6 +109,13 @@ properties:
The standard C extension for compressed instructions, as ratified in
the 20191213 version of the unprivileged ISA specification.
+ - const: b
+ description:
+ The standard B extension for bit manipulation instructions, as
+ ratified in the 20240411 version of the unprivileged ISA
+ specification. The B standard extension comprises instructions
+ provided by the Zba, Zbb, and Zbs extensions.
+
- const: v
description:
The standard V extension for vector operations, as ratified
@@ -738,6 +745,30 @@ properties:
then:
contains:
const: f
+ # B comprises Zba, Zbb, and Zbs
+ - if:
+ contains:
+ const: b
+ then:
+ allOf:
+ - contains:
+ const: zba
+ - contains:
+ const: zbb
+ - contains:
+ const: zbs
+ # Zba, Zbb, Zbs together require B
+ - if:
+ allOf:
+ - contains:
+ const: zba
+ - contains:
+ const: zbb
+ - contains:
+ const: zbs
+ then:
+ contains:
+ const: b
# Zcb depends on Zca
- if:
contains: