[v10 PATCH 2/2] dt-bindings: arm: cpus: Add edac-enabled property

From: Vijay Balakrishna
Date: Tue May 27 2025 - 19:16:45 EST


From: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>

Some ARM Cortex CPUs including A72 have Error Detection And
Correction (EDAC) support on their L1 and L2 caches. This is implemented
in implementation defined registers, so usage of this functionality is
not safe in virtualized environments or when EL3 already uses these
registers. This patch adds a edac-enabled flag which can be explicitly
set when EDAC can be used.

Signed-off-by: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
[vijayb: Added A72 to the commit message]
Signed-off-by: Vijay Balakrishna <vijayb@xxxxxxxxxxxxxxxxxxx>
---
.../devicetree/bindings/arm/cpus.yaml | 51 +++++++++++++------
1 file changed, 35 insertions(+), 16 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/cpus.yaml b/Documentation/devicetree/bindings/arm/cpus.yaml
index 2e666b2a4dcd..8f42c4fec59b 100644
--- a/Documentation/devicetree/bindings/arm/cpus.yaml
+++ b/Documentation/devicetree/bindings/arm/cpus.yaml
@@ -331,6 +331,13 @@ properties:
corresponding to the index of an SCMI performance domain provider, must be
"perf".

+ edac-enabled:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ A72 CPUs support Error Detection And Correction (EDAC) on their L1 and
+ L2 caches. This flag marks this function as usable.
+# type: boolean
+
qcom,saw:
$ref: /schemas/types.yaml#/definitions/phandle
description: |
@@ -378,22 +385,34 @@ properties:
formed by encoding the target CPU id into the low bits of the
physical start address it should jump to.

-if:
- # If the enable-method property contains one of those values
- properties:
- enable-method:
- contains:
- enum:
- - brcm,bcm11351-cpu-method
- - brcm,bcm23550
- - brcm,bcm-nsp-smp
- # and if enable-method is present
- required:
- - enable-method
-
-then:
- required:
- - secondary-boot-reg
+allOf:
+ - if:
+ not:
+ properties:
+ compatible:
+ contains:
+ const: arm,cortex-a72
+ then:
+ # Allow edac-enabled only for Cortex A72
+ properties:
+ edac-enabled: false
+
+ - if:
+ # If the enable-method property contains one of those values
+ properties:
+ enable-method:
+ contains:
+ enum:
+ - brcm,bcm11351-cpu-method
+ - brcm,bcm23550
+ - brcm,bcm-nsp-smp
+ # and if enable-method is present
+ required:
+ - enable-method
+
+ then:
+ required:
+ - secondary-boot-reg

required:
- device_type
--
2.49.0