[PATCH RFC 01/12] dt-bindings: riscv: Add SiFive pre-ratified trace components
From: Eric Lin
Date: Tue Jun 30 2026 - 05:52:35 EST
Add compatible strings for the SiFive pre-ratified encoder and funnel
trace components. These implement version 0.x of the RISC-V trace
specification and do not support the generic riscv,trace-component
fallback.
Co-developed-by: Nick Hu <nick.hu@xxxxxxxxxx>
Signed-off-by: Nick Hu <nick.hu@xxxxxxxxxx>
Co-developed-by: Vincent Chen <vincent.chen@xxxxxxxxxx>
Signed-off-by: Vincent Chen <vincent.chen@xxxxxxxxxx>
Signed-off-by: Eric Lin <eric.lin@xxxxxxxxxx>
---
.../bindings/riscv/riscv,trace-component.yaml | 73 +++++++++++++++++++---
1 file changed, 66 insertions(+), 7 deletions(-)
diff --git a/Documentation/devicetree/bindings/riscv/riscv,trace-component.yaml b/Documentation/devicetree/bindings/riscv/riscv,trace-component.yaml
index bb519bc4a163..70c8d257b46f 100644
--- a/Documentation/devicetree/bindings/riscv/riscv,trace-component.yaml
+++ b/Documentation/devicetree/bindings/riscv/riscv,trace-component.yaml
@@ -16,16 +16,23 @@ description:
The RISC-V trace components have implementation specific directed acyclic
graph style interdependency where output of one component serves as input
to another component and certain components (such as funnel) can take inputs
- from multiple components. The type and version of a RISC-V trace component
- can be discovered from it's IMPL memory mapped register hence component
- specific compatible strings are not needed.
+ from multiple components. While the type and version of a RISC-V trace component
+ can be discovered from it's IMPL memory mapped register, specific compatible strings
+ are used for pre-ratified trace components.
properties:
compatible:
- items:
- - enum:
- - qemu,trace-component
- - const: riscv,trace-component
+ oneOf:
+ - items:
+ - enum:
+ - qemu,trace-component
+ - const: riscv,trace-component
+ - items:
+ - const: sifive,trace-encoder0
+ description: SiFive Pre-ratified Encoder Trace Component
+ - items:
+ - const: sifive,trace-funnel0
+ description: SiFive Pre-ratified Funnel Trace Component
reg:
maxItems: 1
@@ -117,4 +124,56 @@ examples:
};
};
+ - |
+ // Example 2: SiFive trace encoder and funnel connection
+ encoder-0@2000000 {
+ compatible = "sifive,trace-encoder0";
+ reg = <0x2000000 0x1000>;
+ cpus = <&CPU0>;
+
+ out-ports {
+ port {
+ encoder0_out: endpoint {
+ remote-endpoint = <&funnel_in0>;
+ };
+ };
+ };
+ };
+
+ encoder-1@2001000 {
+ compatible = "sifive,trace-encoder0";
+ reg = <0x2001000 0x1000>;
+ cpus = <&CPU1>;
+
+ out-ports {
+ port {
+ encoder1_out: endpoint {
+ remote-endpoint = <&funnel_in1>;
+ };
+ };
+ };
+ };
+
+ funnel-0@2002000 {
+ compatible = "sifive,trace-funnel0";
+ reg = <0x2002000 0x1000>;
+
+ in-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ port@0 {
+ reg = <0x0>;
+ funnel_in0: endpoint {
+ remote-endpoint = <&encoder0_out>;
+ };
+ };
+
+ port@1 {
+ reg = <0x1>;
+ funnel_in1: endpoint {
+ remote-endpoint = <&encoder1_out>;
+ };
+ };
+ };
+ };
...
--
2.34.1