diff mbox series

[RESEND,v2] dt-bindings: timer: exynos4210-mct: describe known hardware and its interrupts

Message ID 20220407194127.19004-1-krzysztof.kozlowski@linaro.org
State New
Headers show
Series [RESEND,v2] dt-bindings: timer: exynos4210-mct: describe known hardware and its interrupts | expand

Commit Message

Krzysztof Kozlowski April 7, 2022, 7:41 p.m. UTC
Most of the Samsung Exynos SoCs use almost the same Multi-Core Timer
block, so only two compatibles were used so far (for Exynos4210 and
Exynos4412 flavors) with Exynos4210-one being used in most of the SoCs.
However the Exynos4210 flavor actually differs by number of interrupts.

Add new compatibles, maintaining backward compatibility with Exynos4210,
and constraints for number of interrupts.  This allows to exactly match
the Exynos MCT hardware.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Alim Akhtar <alim.akhtar@samsung.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
 .../timer/samsung,exynos4210-mct.yaml         | 67 ++++++++++++++++++-
 1 file changed, 64 insertions(+), 3 deletions(-)

Comments

Krzysztof Kozlowski April 24, 2022, 2:54 p.m. UTC | #1
On Thu, 7 Apr 2022 21:41:27 +0200, Krzysztof Kozlowski wrote:
> Most of the Samsung Exynos SoCs use almost the same Multi-Core Timer
> block, so only two compatibles were used so far (for Exynos4210 and
> Exynos4412 flavors) with Exynos4210-one being used in most of the SoCs.
> However the Exynos4210 flavor actually differs by number of interrupts.
> 
> Add new compatibles, maintaining backward compatibility with Exynos4210,
> and constraints for number of interrupts.  This allows to exactly match
> the Exynos MCT hardware.
> 
> [...]

Applied, thanks!

[1/1] dt-bindings: timer: exynos4210-mct: describe known hardware and its interrupts
      commit: 5fe580196dd9b7d8eb2a99629055bb4ffa00f262

Best regards,
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml
index f11cbc7ccc14..1584944c7ac4 100644
--- a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml
+++ b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml
@@ -19,9 +19,20 @@  description: |+
 
 properties:
   compatible:
-    enum:
-      - samsung,exynos4210-mct
-      - samsung,exynos4412-mct
+    oneOf:
+      - enum:
+          - samsung,exynos4210-mct
+          - samsung,exynos4412-mct
+      - items:
+          - enum:
+              - samsung,exynos3250-mct
+              - samsung,exynos5250-mct
+              - samsung,exynos5260-mct
+              - samsung,exynos5420-mct
+              - samsung,exynos5433-mct
+              - samsung,exynos850-mct
+              - tesla,fsd-mct
+          - const: samsung,exynos4210-mct
 
   clocks:
     minItems: 2
@@ -63,6 +74,56 @@  required:
   - interrupts
   - reg
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos3250-mct
+    then:
+      properties:
+        interrupts:
+          minItems: 8
+          maxItems: 8
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: samsung,exynos5250-mct
+    then:
+      properties:
+        interrupts:
+          minItems: 6
+          maxItems: 6
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - samsung,exynos5260-mct
+              - samsung,exynos5420-mct
+              - samsung,exynos5433-mct
+              - samsung,exynos850-mct
+    then:
+      properties:
+        interrupts:
+          minItems: 12
+          maxItems: 12
+
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - tesla,fsd-mct
+    then:
+      properties:
+        interrupts:
+          minItems: 16
+          maxItems: 16
+
 additionalProperties: false
 
 examples: