linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes
@ 2023-12-06 11:53 Krzysztof Kozlowski
  2023-12-06 11:53 ` [PATCH 2/3] dt-bindings: arm: qcom,coresight-tpda: drop redundant type from ports Krzysztof Kozlowski
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-06 11:53 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Mao Jinlong, Hao Zhang, Tao Zhang, coresight,
	linux-arm-kernel, devicetree, linux-kernel, linux-arm-msm
  Cc: Krzysztof Kozlowski

"in-ports" and "out-ports" with single "port" subnode should use
"additionalProperties: false" to disallow any other properties mentioned
by graph schema which are not applicable for this case, e.g.
"address-cells".

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../devicetree/bindings/arm/arm,coresight-dummy-sink.yaml        | 1 +
 .../devicetree/bindings/arm/arm,coresight-dummy-source.yaml      | 1 +
 Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml   | 1 +
 Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml   | 1 +
 4 files changed, 4 insertions(+)

diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml
index c960c8e0a9a5..61143907bcde 100644
--- a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-sink.yaml
@@ -41,6 +41,7 @@ properties:
 
   in-ports:
     $ref: /schemas/graph.yaml#/properties/ports
+    additionalProperties: false
 
     properties:
       port:
diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml
index 6745b4cc8f1c..a71a05c58cc6 100644
--- a/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy-source.yaml
@@ -40,6 +40,7 @@ properties:
 
   out-ports:
     $ref: /schemas/graph.yaml#/properties/ports
+    additionalProperties: false
 
     properties:
       port:
diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
index ea3c5db6b52d..e55f69c2ff38 100644
--- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
@@ -76,6 +76,7 @@ properties:
     description: |
       Output connections from the TPDA to legacy CoreSight trace bus.
     $ref: /schemas/graph.yaml#/properties/ports
+    additionalProperties: false
 
     properties:
       port:
diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml
index 61ddc3b5b247..6984003485e8 100644
--- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpdm.yaml
@@ -72,6 +72,7 @@ properties:
     description: |
       Output connections from the TPDM to coresight funnel/TPDA.
     $ref: /schemas/graph.yaml#/properties/ports
+    additionalProperties: false
 
     properties:
       port:
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 2/3] dt-bindings: arm: qcom,coresight-tpda: drop redundant type from ports
  2023-12-06 11:53 [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes Krzysztof Kozlowski
@ 2023-12-06 11:53 ` Krzysztof Kozlowski
  2023-12-08 20:25   ` Rob Herring
  2023-12-06 11:53 ` [PATCH 3/3] dt-bindings: arm: qcom,coresight-tpda: fix indentation in the example Krzysztof Kozlowski
  2023-12-08 20:24 ` [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes Rob Herring
  2 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-06 11:53 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Mao Jinlong, Hao Zhang, Tao Zhang, coresight,
	linux-arm-kernel, devicetree, linux-kernel, linux-arm-msm
  Cc: Krzysztof Kozlowski

"in-ports" and "out-ports" are defined by graph schema, so defining its
type is redundant.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml | 2 --
 1 file changed, 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
index e55f69c2ff38..66d291b56019 100644
--- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
@@ -66,13 +66,11 @@ properties:
       - const: apb_pclk
 
   in-ports:
-    type: object
     description: |
       Input connections from TPDM to TPDA
     $ref: /schemas/graph.yaml#/properties/ports
 
   out-ports:
-    type: object
     description: |
       Output connections from the TPDA to legacy CoreSight trace bus.
     $ref: /schemas/graph.yaml#/properties/ports
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* [PATCH 3/3] dt-bindings: arm: qcom,coresight-tpda: fix indentation in the example
  2023-12-06 11:53 [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes Krzysztof Kozlowski
  2023-12-06 11:53 ` [PATCH 2/3] dt-bindings: arm: qcom,coresight-tpda: drop redundant type from ports Krzysztof Kozlowski
@ 2023-12-06 11:53 ` Krzysztof Kozlowski
  2023-12-08 20:25   ` Rob Herring
  2023-12-08 20:24 ` [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes Rob Herring
  2 siblings, 1 reply; 6+ messages in thread
From: Krzysztof Kozlowski @ 2023-12-06 11:53 UTC (permalink / raw)
  To: Suzuki K Poulose, Mike Leach, James Clark, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Mao Jinlong, Hao Zhang, Tao Zhang, coresight,
	linux-arm-kernel, devicetree, linux-kernel, linux-arm-msm
  Cc: Krzysztof Kozlowski

Fix triple-space indentation to double-space in the example DTS.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 .../bindings/arm/qcom,coresight-tpda.yaml     | 32 +++++++++----------
 1 file changed, 15 insertions(+), 17 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
index 66d291b56019..b748cf21a4d7 100644
--- a/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml
@@ -96,33 +96,31 @@ examples:
   # minimum tpda definition.
   - |
     tpda@6004000 {
-       compatible = "qcom,coresight-tpda", "arm,primecell";
-       reg = <0x6004000 0x1000>;
+      compatible = "qcom,coresight-tpda", "arm,primecell";
+      reg = <0x6004000 0x1000>;
 
-       clocks = <&aoss_qmp>;
-       clock-names = "apb_pclk";
+      clocks = <&aoss_qmp>;
+      clock-names = "apb_pclk";
 
-       in-ports {
-         #address-cells = <1>;
-         #size-cells = <0>;
+      in-ports {
+        #address-cells = <1>;
+        #size-cells = <0>;
 
         port@0 {
           reg = <0>;
           tpda_qdss_0_in_tpdm_dcc: endpoint {
-            remote-endpoint =
-              <&tpdm_dcc_out_tpda_qdss_0>;
-            };
+            remote-endpoint = <&tpdm_dcc_out_tpda_qdss_0>;
+          };
         };
       };
 
-       out-ports {
-         port {
-                 tpda_qdss_out_funnel_in0: endpoint {
-                    remote-endpoint =
-                    <&funnel_in0_in_tpda_qdss>;
-                  };
+      out-ports {
+        port {
+          tpda_qdss_out_funnel_in0: endpoint {
+            remote-endpoint = <&funnel_in0_in_tpda_qdss>;
           };
-       };
+        };
+      };
     };
 
 ...
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes
  2023-12-06 11:53 [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes Krzysztof Kozlowski
  2023-12-06 11:53 ` [PATCH 2/3] dt-bindings: arm: qcom,coresight-tpda: drop redundant type from ports Krzysztof Kozlowski
  2023-12-06 11:53 ` [PATCH 3/3] dt-bindings: arm: qcom,coresight-tpda: fix indentation in the example Krzysztof Kozlowski
@ 2023-12-08 20:24 ` Rob Herring
  2 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2023-12-08 20:24 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Suzuki K Poulose, Mike Leach, James Clark, Krzysztof Kozlowski,
	Conor Dooley, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Mao Jinlong, Hao Zhang, Tao Zhang, coresight, linux-arm-kernel,
	devicetree, linux-kernel, linux-arm-msm

On Wed, Dec 06, 2023 at 12:53:30PM +0100, Krzysztof Kozlowski wrote:
> "in-ports" and "out-ports" with single "port" subnode should use
> "additionalProperties: false" to disallow any other properties mentioned
> by graph schema which are not applicable for this case, e.g.
> "address-cells".

The graph schema should already check this case with this subschema:

    oneOf:
      - required:
          - port
      - required:
          - "#address-cells"
          - "#size-cells"

However, I now see this would allow port and #address-cells if 
#size-cells is omitted. (#address-cells is a dependency for 
##size-cells, but not vice-versa because interrupt-controllers can have 
##just #address-cells). Perhaps this should instead be:

    oneOf:
      - required:
          - port
      - anyOf:
	  - required:
              - "#address-cells"
	  - required:
              - "#size-cells"

We're missing a similar check on endpoint. Or I'm forgetting why I 
didn't add it.

I suspect there are a lot more cases if we fixed these in the users.

Rob

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 2/3] dt-bindings: arm: qcom,coresight-tpda: drop redundant type from ports
  2023-12-06 11:53 ` [PATCH 2/3] dt-bindings: arm: qcom,coresight-tpda: drop redundant type from ports Krzysztof Kozlowski
@ 2023-12-08 20:25   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2023-12-08 20:25 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: James Clark, Rob Herring, Mao Jinlong, devicetree,
	linux-arm-kernel, Hao Zhang, Andy Gross, Konrad Dybcio,
	linux-kernel, linux-arm-msm, Krzysztof Kozlowski, Mike Leach,
	Conor Dooley, Bjorn Andersson, Suzuki K Poulose, Tao Zhang,
	coresight


On Wed, 06 Dec 2023 12:53:31 +0100, Krzysztof Kozlowski wrote:
> "in-ports" and "out-ports" are defined by graph schema, so defining its
> type is redundant.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  Documentation/devicetree/bindings/arm/qcom,coresight-tpda.yaml | 2 --
>  1 file changed, 2 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 3/3] dt-bindings: arm: qcom,coresight-tpda: fix indentation in the example
  2023-12-06 11:53 ` [PATCH 3/3] dt-bindings: arm: qcom,coresight-tpda: fix indentation in the example Krzysztof Kozlowski
@ 2023-12-08 20:25   ` Rob Herring
  0 siblings, 0 replies; 6+ messages in thread
From: Rob Herring @ 2023-12-08 20:25 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Tao Zhang, Suzuki K Poulose, devicetree, Konrad Dybcio,
	linux-kernel, Hao Zhang, Rob Herring, Andy Gross,
	linux-arm-kernel, James Clark, linux-arm-msm, Mike Leach,
	Conor Dooley, coresight, Mao Jinlong, Krzysztof Kozlowski,
	Bjorn Andersson


On Wed, 06 Dec 2023 12:53:32 +0100, Krzysztof Kozlowski wrote:
> Fix triple-space indentation to double-space in the example DTS.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
> ---
>  .../bindings/arm/qcom,coresight-tpda.yaml     | 32 +++++++++----------
>  1 file changed, 15 insertions(+), 17 deletions(-)
> 

Acked-by: Rob Herring <robh@kernel.org>


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2023-12-08 20:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-12-06 11:53 [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes Krzysztof Kozlowski
2023-12-06 11:53 ` [PATCH 2/3] dt-bindings: arm: qcom,coresight-tpda: drop redundant type from ports Krzysztof Kozlowski
2023-12-08 20:25   ` Rob Herring
2023-12-06 11:53 ` [PATCH 3/3] dt-bindings: arm: qcom,coresight-tpda: fix indentation in the example Krzysztof Kozlowski
2023-12-08 20:25   ` Rob Herring
2023-12-08 20:24 ` [PATCH 1/3] dt-bindings: arm: coresight: restrict single port subnodes 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).