diff mbox series

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

Message ID 20220225153650.289923-1-krzysztof.kozlowski@canonical.com (mailing list archive)
State New
Headers show
Series [1/3] dt-bindings: timer: exynos4210-mct: describe known hardware and its interrupts | expand

Commit Message

Krzysztof Kozlowski Feb. 25, 2022, 3:36 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@canonical.com>
---
 .../timer/samsung,exynos4210-mct.yaml         | 55 ++++++++++++++++++-
 1 file changed, 52 insertions(+), 3 deletions(-)

Comments

Alim Akhtar March 4, 2022, 10:52 a.m. UTC | #1
Hi Krzysztof

>-----Original Message-----
>From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@canonical.com]
>Sent: Friday, February 25, 2022 9:07 PM
>To: Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner
><tglx@linutronix.de>; Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski
><krzysztof.kozlowski@canonical.com>; Alim Akhtar
><alim.akhtar@samsung.com>; linux-kernel@vger.kernel.org;
>devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
>samsung-soc@vger.kernel.org
>Subject: [PATCH 1/3] dt-bindings: timer: exynos4210-mct: describe known
>hardware and its interrupts
>
>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@canonical.com>
>---
> .../timer/samsung,exynos4210-mct.yaml         | 55 ++++++++++++++++++-
> 1 file changed, 52 insertions(+), 3 deletions(-)
>
>diff --git a/Documentation/devicetree/bindings/timer/samsung,exynos4210-
>mct.yaml b/Documentation/devicetree/bindings/timer/samsung,exynos4210-
>mct.yaml
>index f11cbc7ccc14..d4e23fd7a1da 100644
>--- a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml
>+++ b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yam
>+++ l
>@@ -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,44 @@ 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
>+

Probably you can update the list for tesla,fsd-mct as well in this patch
(as the support was added recently)

> additionalProperties: false
>
> examples:
>--
>2.32.0
Krzysztof Kozlowski March 4, 2022, 12:02 p.m. UTC | #2
On 04/03/2022 11:52, Alim Akhtar wrote:
> Hi Krzysztof
> 
>> -----Original Message-----
>> From: Krzysztof Kozlowski [mailto:krzysztof.kozlowski@canonical.com]
>> Sent: Friday, February 25, 2022 9:07 PM
>> To: Daniel Lezcano <daniel.lezcano@linaro.org>; Thomas Gleixner
>> <tglx@linutronix.de>; Rob Herring <robh+dt@kernel.org>; Krzysztof Kozlowski
>> <krzysztof.kozlowski@canonical.com>; Alim Akhtar
>> <alim.akhtar@samsung.com>; linux-kernel@vger.kernel.org;
>> devicetree@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-
>> samsung-soc@vger.kernel.org
>> Subject: [PATCH 1/3] dt-bindings: timer: exynos4210-mct: describe known
>> hardware and its interrupts
>>
>> 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@canonical.com>
>> ---
>> .../timer/samsung,exynos4210-mct.yaml         | 55 ++++++++++++++++++-
>> 1 file changed, 52 insertions(+), 3 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/timer/samsung,exynos4210-
>> mct.yaml b/Documentation/devicetree/bindings/timer/samsung,exynos4210-
>> mct.yaml
>> index f11cbc7ccc14..d4e23fd7a1da 100644
>> --- a/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yaml
>> +++ b/Documentation/devicetree/bindings/timer/samsung,exynos4210-mct.yam
>> +++ l
>> @@ -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,44 @@ 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
>> +
> 
> Probably you can update the list for tesla,fsd-mct as well in this patch
> (as the support was added recently)

Right.


Best regards,
Krzysztof
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..d4e23fd7a1da 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,44 @@  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
+
 additionalProperties: false
 
 examples: