linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property
@ 2023-09-25 22:05 Rob Herring
  2023-09-25 22:05 ` [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes Rob Herring
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Rob Herring @ 2023-09-25 22:05 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Leo Yan,
	Krzysztof Kozlowski, Conor Dooley
  Cc: coresight, linux-arm-kernel, devicetree, linux-kernel

'cpu' has been added as a single phandle type to dtschema, so drop the
type here.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml | 1 -
 1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
index 6216cfb0a188..b9bdfc8969cd 100644
--- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
@@ -92,7 +92,6 @@ properties:
     maxItems: 1
 
   cpu:
-    $ref: /schemas/types.yaml#/definitions/phandle
     description:
       Handle to cpu this device is associated with. This must appear in the
       base cti node if compatible string arm,coresight-cti-v8-arch is used,
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes
  2023-09-25 22:05 [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property Rob Herring
@ 2023-09-25 22:05 ` Rob Herring
  2023-09-26 10:46   ` Mike Leach
                     ` (2 more replies)
  2023-09-26 10:41 ` [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property Mike Leach
                   ` (2 subsequent siblings)
  3 siblings, 3 replies; 8+ messages in thread
From: Rob Herring @ 2023-09-25 22:05 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Leo Yan,
	Krzysztof Kozlowski, Conor Dooley
  Cc: coresight, linux-arm-kernel, devicetree, linux-kernel

Just as unevaluatedProperties or additionalProperties are required at
the top level of schemas, they should (and will) also be required for
child node schemas. That ensures only documented properties are
present for any node.

Adding additionalProperties constraint on 'trig-conns' nodes results in
warnings that 'cpu' and 'arm,cs-dev-assoc' are not allowed. These are
already defined for the parent node, but need to be duplicated for the
child node. Drop the free form description that the properties also apply
to the child nodes.

Signed-off-by: Rob Herring <robh@kernel.org>
---
 .../bindings/arm/arm,coresight-cti.yaml       | 33 ++++++++++++++-----
 1 file changed, 24 insertions(+), 9 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
index b9bdfc8969cd..2d5545a2b49c 100644
--- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
@@ -93,9 +93,7 @@ properties:
 
   cpu:
     description:
-      Handle to cpu this device is associated with. This must appear in the
-      base cti node if compatible string arm,coresight-cti-v8-arch is used,
-      or may appear in a trig-conns child node when appropriate.
+      Handle to cpu this CTI is associated with.
 
   power-domains:
     maxItems: 1
@@ -112,12 +110,12 @@ properties:
     description:
       defines a phandle reference to an associated CoreSight trace device.
       When the associated trace device is enabled, then the respective CTI
-      will be enabled. Use in a trig-conns node, or in CTI base node when
-      compatible string arm,coresight-cti-v8-arch used. If the associated
-      device has not been registered then the node name will be stored as
-      the connection name for later resolution. If the associated device is
-      not a CoreSight device or not registered then the node name will remain
-      the connection name and automatic enabling will not occur.
+      will be enabled. Use in CTI base node when compatible string
+      arm,coresight-cti-v8-arch used. If the associated device has not been
+      registered then the node name will be stored as the connection name for
+      later resolution. If the associated device is not a CoreSight device or
+      not registered then the node name will remain the connection name and
+      automatic enabling will not occur.
 
   # size cells and address cells required if trig-conns node present.
   "#size-cells":
@@ -129,6 +127,8 @@ properties:
 patternProperties:
   '^trig-conns@([0-9]+)$':
     type: object
+    additionalProperties: false
+
     description:
       A trigger connections child node which describes the trigger signals
       between this CTI and another hardware device. This device may be a CPU,
@@ -140,6 +140,21 @@ patternProperties:
       reg:
         maxItems: 1
 
+      cpu:
+        description:
+          Handle to cpu this trigger connection is associated with.
+
+      arm,cs-dev-assoc:
+        $ref: /schemas/types.yaml#/definitions/phandle
+        description:
+          defines a phandle reference to an associated CoreSight trace device.
+          When the associated trace device is enabled, then the respective CTI
+          will be enabled. If the associated device has not been registered
+          then the node name will be stored as the connection name for later
+          resolution. If the associated device is not a CoreSight device or
+          not registered then the node name will remain the connection name
+          and automatic enabling will not occur.
+
       arm,trig-in-sigs:
         $ref: /schemas/types.yaml#/definitions/uint32-array
         minItems: 1
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property
  2023-09-25 22:05 [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property Rob Herring
  2023-09-25 22:05 ` [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes Rob Herring
@ 2023-09-26 10:41 ` Mike Leach
  2023-09-26 13:07 ` Conor Dooley
  2023-10-30 21:05 ` Rob Herring
  3 siblings, 0 replies; 8+ messages in thread
From: Mike Leach @ 2023-09-26 10:41 UTC (permalink / raw)
  To: Rob Herring
  Cc: Suzuki K Poulose, James Clark, Leo Yan, Krzysztof Kozlowski,
	Conor Dooley, coresight, linux-arm-kernel, devicetree,
	linux-kernel

On Mon, 25 Sept 2023 at 23:05, Rob Herring <robh@kernel.org> wrote:
>
> 'cpu' has been added as a single phandle type to dtschema, so drop the
> type here.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> index 6216cfb0a188..b9bdfc8969cd 100644
> --- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> @@ -92,7 +92,6 @@ properties:
>      maxItems: 1
>
>    cpu:
> -    $ref: /schemas/types.yaml#/definitions/phandle
>      description:
>        Handle to cpu this device is associated with. This must appear in the
>        base cti node if compatible string arm,coresight-cti-v8-arch is used,
> --
> 2.40.1
>

Reviewed-by: Mike Leach <mike.leach@linaro.org>
-- 
Mike Leach
Principal Engineer, ARM Ltd.
Manchester Design Centre. UK

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes
  2023-09-25 22:05 ` [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes Rob Herring
@ 2023-09-26 10:46   ` Mike Leach
  2023-09-26 13:12   ` Conor Dooley
  2023-10-30 21:06   ` Rob Herring
  2 siblings, 0 replies; 8+ messages in thread
From: Mike Leach @ 2023-09-26 10:46 UTC (permalink / raw)
  To: Rob Herring
  Cc: Suzuki K Poulose, James Clark, Leo Yan, Krzysztof Kozlowski,
	Conor Dooley, coresight, linux-arm-kernel, devicetree,
	linux-kernel

On Mon, 25 Sept 2023 at 23:05, Rob Herring <robh@kernel.org> wrote:
>
> Just as unevaluatedProperties or additionalProperties are required at
> the top level of schemas, they should (and will) also be required for
> child node schemas. That ensures only documented properties are
> present for any node.
>
> Adding additionalProperties constraint on 'trig-conns' nodes results in
> warnings that 'cpu' and 'arm,cs-dev-assoc' are not allowed. These are
> already defined for the parent node, but need to be duplicated for the
> child node. Drop the free form description that the properties also apply
> to the child nodes.
>
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../bindings/arm/arm,coresight-cti.yaml       | 33 ++++++++++++++-----
>  1 file changed, 24 insertions(+), 9 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> index b9bdfc8969cd..2d5545a2b49c 100644
> --- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> @@ -93,9 +93,7 @@ properties:
>
>    cpu:
>      description:
> -      Handle to cpu this device is associated with. This must appear in the
> -      base cti node if compatible string arm,coresight-cti-v8-arch is used,
> -      or may appear in a trig-conns child node when appropriate.
> +      Handle to cpu this CTI is associated with.
>
>    power-domains:
>      maxItems: 1
> @@ -112,12 +110,12 @@ properties:
>      description:
>        defines a phandle reference to an associated CoreSight trace device.
>        When the associated trace device is enabled, then the respective CTI
> -      will be enabled. Use in a trig-conns node, or in CTI base node when
> -      compatible string arm,coresight-cti-v8-arch used. If the associated
> -      device has not been registered then the node name will be stored as
> -      the connection name for later resolution. If the associated device is
> -      not a CoreSight device or not registered then the node name will remain
> -      the connection name and automatic enabling will not occur.
> +      will be enabled. Use in CTI base node when compatible string
> +      arm,coresight-cti-v8-arch used. If the associated device has not been
> +      registered then the node name will be stored as the connection name for
> +      later resolution. If the associated device is not a CoreSight device or
> +      not registered then the node name will remain the connection name and
> +      automatic enabling will not occur.
>
>    # size cells and address cells required if trig-conns node present.
>    "#size-cells":
> @@ -129,6 +127,8 @@ properties:
>  patternProperties:
>    '^trig-conns@([0-9]+)$':
>      type: object
> +    additionalProperties: false
> +
>      description:
>        A trigger connections child node which describes the trigger signals
>        between this CTI and another hardware device. This device may be a CPU,
> @@ -140,6 +140,21 @@ patternProperties:
>        reg:
>          maxItems: 1
>
> +      cpu:
> +        description:
> +          Handle to cpu this trigger connection is associated with.
> +
> +      arm,cs-dev-assoc:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description:
> +          defines a phandle reference to an associated CoreSight trace device.
> +          When the associated trace device is enabled, then the respective CTI
> +          will be enabled. If the associated device has not been registered
> +          then the node name will be stored as the connection name for later
> +          resolution. If the associated device is not a CoreSight device or
> +          not registered then the node name will remain the connection name
> +          and automatic enabling will not occur.
> +
>        arm,trig-in-sigs:
>          $ref: /schemas/types.yaml#/definitions/uint32-array
>          minItems: 1
> --
> 2.40.1
>

Reviewed-by: Mike Leach <mike.leach@linaro.org>

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

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property
  2023-09-25 22:05 [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property Rob Herring
  2023-09-25 22:05 ` [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes Rob Herring
  2023-09-26 10:41 ` [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property Mike Leach
@ 2023-09-26 13:07 ` Conor Dooley
  2023-10-30 21:05 ` Rob Herring
  3 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2023-09-26 13:07 UTC (permalink / raw)
  To: Rob Herring
  Cc: Suzuki K Poulose, Mike Leach, James Clark, Leo Yan,
	Krzysztof Kozlowski, Conor Dooley, coresight, linux-arm-kernel,
	devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 1043 bytes --]

On Mon, Sep 25, 2023 at 05:05:05PM -0500, Rob Herring wrote:
> 'cpu' has been added as a single phandle type to dtschema, so drop the
> type here.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

> ---
>  Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> index 6216cfb0a188..b9bdfc8969cd 100644
> --- a/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml
> @@ -92,7 +92,6 @@ properties:
>      maxItems: 1
>  
>    cpu:
> -    $ref: /schemas/types.yaml#/definitions/phandle
>      description:
>        Handle to cpu this device is associated with. This must appear in the
>        base cti node if compatible string arm,coresight-cti-v8-arch is used,
> -- 
> 2.40.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes
  2023-09-25 22:05 ` [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes Rob Herring
  2023-09-26 10:46   ` Mike Leach
@ 2023-09-26 13:12   ` Conor Dooley
  2023-10-30 21:06   ` Rob Herring
  2 siblings, 0 replies; 8+ messages in thread
From: Conor Dooley @ 2023-09-26 13:12 UTC (permalink / raw)
  To: Rob Herring
  Cc: Suzuki K Poulose, Mike Leach, James Clark, Leo Yan,
	Krzysztof Kozlowski, Conor Dooley, coresight, linux-arm-kernel,
	devicetree, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 752 bytes --]

On Mon, Sep 25, 2023 at 05:05:06PM -0500, Rob Herring wrote:
> Just as unevaluatedProperties or additionalProperties are required at
> the top level of schemas, they should (and will) also be required for
> child node schemas. That ensures only documented properties are
> present for any node.
> 
> Adding additionalProperties constraint on 'trig-conns' nodes results in
> warnings that 'cpu' and 'arm,cs-dev-assoc' are not allowed. These are
> already defined for the parent node, but need to be duplicated for the
> child node. Drop the free form description that the properties also apply
> to the child nodes.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

Thanks,
Conor.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property
  2023-09-25 22:05 [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property Rob Herring
                   ` (2 preceding siblings ...)
  2023-09-26 13:07 ` Conor Dooley
@ 2023-10-30 21:05 ` Rob Herring
  3 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2023-10-30 21:05 UTC (permalink / raw)
  To: Rob Herring
  Cc: linux-kernel, Suzuki K Poulose, linux-arm-kernel, Mike Leach,
	coresight, devicetree, Conor Dooley, Leo Yan, Krzysztof Kozlowski,
	James Clark


On Mon, 25 Sep 2023 17:05:05 -0500, Rob Herring wrote:
> 'cpu' has been added as a single phandle type to dtschema, so drop the
> type here.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  Documentation/devicetree/bindings/arm/arm,coresight-cti.yaml | 1 -
>  1 file changed, 1 deletion(-)
> 

Applied, thanks!


^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes
  2023-09-25 22:05 ` [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes Rob Herring
  2023-09-26 10:46   ` Mike Leach
  2023-09-26 13:12   ` Conor Dooley
@ 2023-10-30 21:06   ` Rob Herring
  2 siblings, 0 replies; 8+ messages in thread
From: Rob Herring @ 2023-10-30 21:06 UTC (permalink / raw)
  To: Rob Herring
  Cc: Leo Yan, Mike Leach, James Clark, linux-kernel, linux-arm-kernel,
	Conor Dooley, Krzysztof Kozlowski, coresight, Suzuki K Poulose,
	devicetree


On Mon, 25 Sep 2023 17:05:06 -0500, Rob Herring wrote:
> Just as unevaluatedProperties or additionalProperties are required at
> the top level of schemas, they should (and will) also be required for
> child node schemas. That ensures only documented properties are
> present for any node.
> 
> Adding additionalProperties constraint on 'trig-conns' nodes results in
> warnings that 'cpu' and 'arm,cs-dev-assoc' are not allowed. These are
> already defined for the parent node, but need to be duplicated for the
> child node. Drop the free form description that the properties also apply
> to the child nodes.
> 
> Signed-off-by: Rob Herring <robh@kernel.org>
> ---
>  .../bindings/arm/arm,coresight-cti.yaml       | 33 ++++++++++++++-----
>  1 file changed, 24 insertions(+), 9 deletions(-)
> 

Applied, thanks!


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2023-10-30 21:06 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-25 22:05 [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property Rob Herring
2023-09-25 22:05 ` [PATCH 2/2] dt-bindings: arm,coresight-cti: Add missing additionalProperties on child nodes Rob Herring
2023-09-26 10:46   ` Mike Leach
2023-09-26 13:12   ` Conor Dooley
2023-10-30 21:06   ` Rob Herring
2023-09-26 10:41 ` [PATCH 1/2] dt-bindings: arm,coresight-cti: Drop type for 'cpu' property Mike Leach
2023-09-26 13:07 ` Conor Dooley
2023-10-30 21:05 ` Rob Herring

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).