[PATCH v3 1/5] dt-bindings: arm: ras: Introduce ARM RAS error sources
From: Umang Chheda
Date: Fri Sep 18 2026 - 06:04:36 EST
ARMv8 and later processors implement the RAS (Reliability,
Availability and Serviceability) extensions, exposing hardware
error records through a standardised register interface.
Add Device Tree bindings to describe RAS error sources.
Signed-off-by: Umang Chheda <umang.chheda@xxxxxxxxxxxxxxxx>
---
.../devicetree/bindings/arm/arm,ras.yaml | 235 ++++++++++++++++++
include/dt-bindings/arm/arm,ras.h | 11 +
2 files changed, 246 insertions(+)
create mode 100644 Documentation/devicetree/bindings/arm/arm,ras.yaml
create mode 100644 include/dt-bindings/arm/arm,ras.h
diff --git a/Documentation/devicetree/bindings/arm/arm,ras.yaml b/Documentation/devicetree/bindings/arm/arm,ras.yaml
new file mode 100644
index 000000000000..8bff222f77c3
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/arm,ras.yaml
@@ -0,0 +1,235 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/arm,ras.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ARM RAS error source
+
+maintainers:
+ - Umang Chheda <umang.chheda@xxxxxxxxxxxxxxxx>
+
+description: |
+ ARMv8 and later processors implement the Reliability, Availability and
+ Serviceability (RAS) extensions. Hardware blocks that support RAS expose
+ one or more error records through a standardised register interface. Each
+ error record captures information about a detected hardware error (cache
+ ECC fault, TLB parity error, interconnect error, etc.) and can optionally
+ signal the OS via an interrupt.
+
+ Each DT node described by this binding represents one RAS error source —
+ a hardware block that exposes a set of error records. Error records are
+ accessed either through system registers (for processor-local resources
+ such as L1/L2 caches and TLBs) or through a memory-mapped register window
+ (for shared or off-core resources such as L3 caches, SMMUs and GICs).
+
+properties:
+ compatible:
+ description:
+ Identifies the class of hardware block this error source belongs to.
+ arm,ras-processor covers processor error sources (cache, TLB, etc.).
+ arm,ras-smmu covers SMMU error sources.
+ arm,ras-gic covers GIC error sources.
+ enum:
+ - arm,ras-processor
+ - arm,ras-smmu
+ - arm,ras-gic
+
+ reg:
+ description:
+ Register windows for this error source. When absent the error records
+ are accessed through system registers (ERRSELR_EL1 + ERX*_EL1).
+ When present, each range must have a corresponding entry in reg-names.
+ The primary error-record window is named "err-records"; additional
+ optional windows are named "err-group", "fault-inject", and "irq-config".
+ minItems: 1
+ maxItems: 4
+
+ reg-names:
+ description:
+ Names for the register windows listed in reg. The first entry must be
+ "err-records" for the primary error-record window.
+ err-group is the error group status register window (ERRGSR).
+ fault-inject is the fault injection register window (ERXPFG*).
+ irq-config is the interrupt routing configuration window.
+ minItems: 1
+ maxItems: 4
+ items:
+ enum:
+ - err-records
+ - err-group
+ - fault-inject
+ - irq-config
+
+ interrupts:
+ minItems: 1
+ items:
+ - description:
+ Fault Handling Interrupt (FHI), fired when a corrected error
+ counter overflows or a deferred error is detected.
+ - description:
+ Error Recovery Interrupt (ERI), fired when an uncorrected
+ recoverable error is detected.
+
+ interrupt-names:
+ minItems: 1
+ items:
+ - const: fhi
+ - const: eri
+
+ arm,group-format:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Layout of the memory-mapped error-record group window.
+ Determines the number of ERRGSR registers available.
+ A 4 KiB group provides 1 ERRGSR, a 16 KiB group provides
+ 4 ERRGSRs, and a 64 KiB group provides 14 ERRGSRs.
+ Each ERRGSR reports status for up to 56 error records.
+ enum: [0, 1, 2]
+
+ arm,num-records:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description:
+ Total number of error records in this error source, including both
+ implemented and unimplemented slots.
+ minimum: 1
+
+ arm,record-impl:
+ $ref: /schemas/types.yaml#/definitions/uint64-array
+ description:
+ Bitmap of implemented error records. Bit N set to 1 means error
+ record N is present and active in this error source. Bit N set to 0
+ means record N is not implemented and must be skipped. The array
+ length must equal the number of ERRGSRs implied by arm,group-format
+ (1 element for 4K, 4 for 16K, 14 for 64K). For system-register
+ nodes (no reg property) a single u64 element is used.
+ minItems: 1
+ maxItems: 14
+
+ arm,status-reporting:
+ $ref: /schemas/types.yaml#/definitions/uint64-array
+ description:
+ Bitmap indicating which implemented error records require direct
+ polling of ERX_STATUS by software. Bit N set to 1 means error
+ record N is not represented in an ERRGSR status register and must
+ be checked by reading ERX_STATUS directly. Bit N set to 0 means
+ error record N is represented in an ERRGSR status register and can
+ be discovered through the ERRGSR scan path.
+ For system-register error sources (no reg property), ERRGSR
+ registers are not present. Therefore all implemented error records
+ must be polled directly and arm,status-reporting shall be identical
+ to arm,record-impl.
+ The number of array elements shall match arm,record-impl.
+ minItems: 1
+ maxItems: 14
+
+ arm,addressing-mode:
+ $ref: /schemas/types.yaml#/definitions/uint64-array
+ description:
+ Bitmap indicating the address type reported in ERR_ADDR for each
+ implemented error record. Bit N set to 1 means error record N
+ reports a Logical Address (LA); bit N set to 0 means it reports a
+ System Physical Address (SPA). When absent all records are assumed
+ to report SPA. The number of array elements shall match
+ arm,record-impl.
+ minItems: 1
+ maxItems: 14
+
+ # Processor error source properties (arm,ras-processor only)
+ arm,cache-ref:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the cache node (L1, L2, or L3) that this processor error
+ source monitors.
+
+ # SMMU error source properties (arm,ras-smmu only)
+ arm,smmu-ref:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the SMMU node that this error source monitors.
+
+ # GIC error source properties (arm,ras-gic only)
+ arm,gic-ref:
+ $ref: /schemas/types.yaml#/definitions/phandle
+ description:
+ Phandle to the GIC node that this error source monitors.
+
+required:
+ - compatible
+ - arm,num-records
+ - arm,record-impl
+ - arm,status-reporting
+
+dependentRequired:
+ reg: ['arm,group-format']
+
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: arm,ras-processor
+ then:
+ required:
+ - arm,cache-ref
+ else:
+ properties:
+ arm,cache-ref: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: arm,ras-smmu
+ then:
+ required:
+ - arm,smmu-ref
+ else:
+ properties:
+ arm,smmu-ref: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: arm,ras-gic
+ then:
+ required:
+ - arm,gic-ref
+ else:
+ properties:
+ arm,gic-ref: false
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/arm/arm,ras.h>
+
+ cache-error-l2 {
+ compatible = "arm,ras-processor";
+ arm,num-records = <1>;
+ arm,record-impl = /bits/ 64 <0x1>;
+ arm,status-reporting = /bits/ 64 <0x1>;
+ arm,cache-ref = <&l2_0>;
+ interrupts = <GIC_PPI 0 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "fhi";
+ };
+
+ - |
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/arm/arm,ras.h>
+
+ gic-error@17a00000 {
+ compatible = "arm,ras-gic";
+ reg = <0x0 0x17a00000 0x0 0x10000>;
+ reg-names = "err-records";
+ arm,group-format = <ARM_RAS_GROUP_4K>;
+ arm,num-records = <1>;
+ arm,record-impl = /bits/ 64 <0x1>;
+ arm,status-reporting = /bits/ 64 <0x0>;
+ arm,gic-ref = <&gic>;
+ interrupts = <GIC_SPI 200 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "fhi";
+ };
diff --git a/include/dt-bindings/arm/arm,ras.h b/include/dt-bindings/arm/arm,ras.h
new file mode 100644
index 000000000000..cd11e360fdae
--- /dev/null
+++ b/include/dt-bindings/arm/arm,ras.h
@@ -0,0 +1,11 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+
+#ifndef _DT_BINDINGS_ARM_RAS_H
+#define _DT_BINDINGS_ARM_RAS_H
+
+/* arm,group-format - error record group register window layout */
+#define ARM_RAS_GROUP_4K 0 /* 4 KiB, 1 ERRGSR */
+#define ARM_RAS_GROUP_16K 1 /* 16 KiB, 4 ERRGSRs */
+#define ARM_RAS_GROUP_64K 2 /* 64 KiB, 14 ERRGSRs */
+
+#endif /* _DT_BINDINGS_ARM_RAS_H */
--
2.34.1