[PATCH 01/12] dt-bindings: arm: coresight: Add cpu cluster tmc/funnel/replicator support

Yuanfang Zhang posted 12 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH 01/12] dt-bindings: arm: coresight: Add cpu cluster tmc/funnel/replicator support
Posted by Yuanfang Zhang 3 months, 2 weeks ago
Add the following compatible strings to the bindings:
- arm,coresight-cpu-funnel
- arm,coresight-cpu-replicator
- arm,coresight-cpu-tmc

Each requires 'power-domains' when used.

Signed-off-by: Yuanfang Zhang <yuanfang.zhang@oss.qualcomm.com>
---
 .../bindings/arm/arm,coresight-dynamic-funnel.yaml | 23 +++++++++++++++++-----
 .../arm/arm,coresight-dynamic-replicator.yaml      | 22 +++++++++++++++++----
 .../devicetree/bindings/arm/arm,coresight-tmc.yaml | 22 +++++++++++++++++----
 3 files changed, 54 insertions(+), 13 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
index b74db15e5f8af2226b817f6af5f533b1bfc74736..8f32d4e3bbb750f5a6262db0032318875739cf81 100644
--- a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
@@ -28,19 +28,32 @@ select:
   properties:
     compatible:
       contains:
-        const: arm,coresight-dynamic-funnel
+        enum:
+          - arm,coresight-dynamic-funnel
+          - arm,coresight-cpu-funnel
   required:
     - compatible
 
 allOf:
   - $ref: /schemas/arm/primecell.yaml#
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: arm,coresight-cpu-funnel
+    then:
+      required:
+        - power-domains
+
 properties:
   compatible:
-    items:
-      - const: arm,coresight-dynamic-funnel
-      - const: arm,primecell
-
+    oneOf:
+      - items:
+          - const: arm,coresight-dynamic-funnel
+          - const: arm,primecell
+      - items:
+          - const: arm,coresight-cpu-funnel
   reg:
     maxItems: 1
 
diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicator.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicator.yaml
index 17ea936b796fd42bb885e539201276a11e91028c..5ce30c4e9c415f487ee61dceaf5b8ad12c78e671 100644
--- a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicator.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-replicator.yaml
@@ -28,18 +28,32 @@ select:
   properties:
     compatible:
       contains:
-        const: arm,coresight-dynamic-replicator
+        enum:
+          - arm,coresight-dynamic-replicator
+          - arm,coresight-cpu-replicator
   required:
     - compatible
 
 allOf:
   - $ref: /schemas/arm/primecell.yaml#
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: arm,coresight-cpu-replicator
+    then:
+      required:
+        - power-domains
+
 properties:
   compatible:
-    items:
-      - const: arm,coresight-dynamic-replicator
-      - const: arm,primecell
+    oneOf:
+      - items:
+          - const: arm,coresight-dynamic-replicator
+          - const: arm,primecell
+      - items:
+          - const: arm,coresight-cpu-replicator
 
   reg:
     maxItems: 1
diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml
index 96dd5b5f771a39138df9adde0c9c9a6f5583d9da..d7c0b618fe98a3ca584041947fb5c0f80f1ade6e 100644
--- a/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-tmc.yaml
@@ -29,18 +29,32 @@ select:
   properties:
     compatible:
       contains:
-        const: arm,coresight-tmc
+        enum:
+          - arm,coresight-tmc
+          - arm,coresight-cpu-tmc
   required:
     - compatible
 
 allOf:
   - $ref: /schemas/arm/primecell.yaml#
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: arm,coresight-cpu-tmc
+    then:
+      required:
+        - power-domains
+
 properties:
   compatible:
-    items:
-      - const: arm,coresight-tmc
-      - const: arm,primecell
+    oneOf:
+      - items:
+          - const: arm,coresight-tmc
+          - const: arm,primecell
+      - items:
+          - const: arm,coresight-cpu-tmc
 
   reg:
     maxItems: 1

-- 
2.34.1
Re: [PATCH 01/12] dt-bindings: arm: coresight: Add cpu cluster tmc/funnel/replicator support
Posted by Krzysztof Kozlowski 3 months, 2 weeks ago
On Mon, Oct 27, 2025 at 11:28:03PM -0700, Yuanfang Zhang wrote:
> Add the following compatible strings to the bindings:
> - arm,coresight-cpu-funnel
> - arm,coresight-cpu-replicator
> - arm,coresight-cpu-tmc

We see that from the diff. Explain here the hardware instead.

> 
> Each requires 'power-domains' when used.
> 
> Signed-off-by: Yuanfang Zhang <yuanfang.zhang@oss.qualcomm.com>
> ---
>  .../bindings/arm/arm,coresight-dynamic-funnel.yaml | 23 +++++++++++++++++-----
>  .../arm/arm,coresight-dynamic-replicator.yaml      | 22 +++++++++++++++++----
>  .../devicetree/bindings/arm/arm,coresight-tmc.yaml | 22 +++++++++++++++++----
>  3 files changed, 54 insertions(+), 13 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
> index b74db15e5f8af2226b817f6af5f533b1bfc74736..8f32d4e3bbb750f5a6262db0032318875739cf81 100644
> --- a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
> @@ -28,19 +28,32 @@ select:
>    properties:
>      compatible:
>        contains:
> -        const: arm,coresight-dynamic-funnel
> +        enum:
> +          - arm,coresight-dynamic-funnel
> +          - arm,coresight-cpu-funnel

Keep alphabetical sorting. We asked this multiple times already.

>    required:
>      - compatible
>  
>  allOf:
>    - $ref: /schemas/arm/primecell.yaml#
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: arm,coresight-cpu-funnel
> +    then:
> +      required:
> +        - power-domains

Just move the allOf to the bottom like in example-schema.

> +
>  properties:
>    compatible:
> -    items:
> -      - const: arm,coresight-dynamic-funnel
> -      - const: arm,primecell
> -

Why do you remove this?

> +    oneOf:
> +      - items:
> +          - const: arm,coresight-dynamic-funnel
> +          - const: arm,primecell
> +      - items:
> +          - const: arm,coresight-cpu-funnel

Hm? Why do you need custom select if this is not primecell? And nothing
in commit msg explains why this is not primecell anymore.

You have entire commit msg to say something useful, WHY you are doing
this, WHY you are doing it DIFFERENTLY. Don't say what you did - that's
obvious, we are capable of reading diffs.

Best regards,
Krzysztof
Re: [PATCH 01/12] dt-bindings: arm: coresight: Add cpu cluster tmc/funnel/replicator support
Posted by Mike Leach 3 months, 1 week ago
Hi,

On Tue, 28 Oct 2025 at 09:09, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On Mon, Oct 27, 2025 at 11:28:03PM -0700, Yuanfang Zhang wrote:
> > Add the following compatible strings to the bindings:
> > - arm,coresight-cpu-funnel
> > - arm,coresight-cpu-replicator
> > - arm,coresight-cpu-tmc
>

These are redundant - the actual hardware has not changed - what has
is how the device is powered up / down on the system

> We see that from the diff. Explain here the hardware instead.
>
> >
> > Each requires 'power-domains' when used.

So why is this not used to adjust the power handling in the driver? Or
another attribute.
Look at the CTI bindings - these can be associated with a CPU or be a
system CTI - we look at the cpu attribute to differentiate, not have
two separate compatibles.

Regards

Mike


> >
> > Signed-off-by: Yuanfang Zhang <yuanfang.zhang@oss.qualcomm.com>
> > ---
> >  .../bindings/arm/arm,coresight-dynamic-funnel.yaml | 23 +++++++++++++++++-----
> >  .../arm/arm,coresight-dynamic-replicator.yaml      | 22 +++++++++++++++++----
> >  .../devicetree/bindings/arm/arm,coresight-tmc.yaml | 22 +++++++++++++++++----
> >  3 files changed, 54 insertions(+), 13 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
> > index b74db15e5f8af2226b817f6af5f533b1bfc74736..8f32d4e3bbb750f5a6262db0032318875739cf81 100644
> > --- a/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
> > +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dynamic-funnel.yaml
> > @@ -28,19 +28,32 @@ select:
> >    properties:
> >      compatible:
> >        contains:
> > -        const: arm,coresight-dynamic-funnel
> > +        enum:
> > +          - arm,coresight-dynamic-funnel
> > +          - arm,coresight-cpu-funnel
>
> Keep alphabetical sorting. We asked this multiple times already.
>
> >    required:
> >      - compatible
> >
> >  allOf:
> >    - $ref: /schemas/arm/primecell.yaml#
> >
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: arm,coresight-cpu-funnel
> > +    then:
> > +      required:
> > +        - power-domains
>
> Just move the allOf to the bottom like in example-schema.
>
> > +
> >  properties:
> >    compatible:
> > -    items:
> > -      - const: arm,coresight-dynamic-funnel
> > -      - const: arm,primecell
> > -
>
> Why do you remove this?
>
> > +    oneOf:
> > +      - items:
> > +          - const: arm,coresight-dynamic-funnel
> > +          - const: arm,primecell
> > +      - items:
> > +          - const: arm,coresight-cpu-funnel
>
> Hm? Why do you need custom select if this is not primecell? And nothing
> in commit msg explains why this is not primecell anymore.
>
> You have entire commit msg to say something useful, WHY you are doing
> this, WHY you are doing it DIFFERENTLY. Don't say what you did - that's
> obvious, we are capable of reading diffs.
>
> Best regards,
> Krzysztof
>


-- 
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK