[PATCH v1 2/3] dt-bindings: arm: Add Coresight Dummy Trace YAML schema

Hao Zhang posted 3 patches 2 years, 11 months ago
There is a newer version of this series
[PATCH v1 2/3] dt-bindings: arm: Add Coresight Dummy Trace YAML schema
Posted by Hao Zhang 2 years, 11 months ago
Add new coresight-dummy.yaml file describing the bindings required
to define coresight dummy trace in the device trees.

Signed-off-by: Hao Zhang <quic_hazha@quicinc.com>
---
 .../bindings/arm/qcom,coresight-dummy.yaml    | 129 ++++++++++++++++++
 1 file changed, 129 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml

diff --git a/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml b/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml
new file mode 100644
index 000000000000..3a7f98df2ee9
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml
@@ -0,0 +1,129 @@
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# Copyright (c) 2023 Qualcomm Innovation Center, Inc. All rights reserved.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/arm/qcom,coresight-dummy.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: QCOM Coresight Dummy component
+
+description: |
+  The Coresight Dummy component is for the specific devices that HLOS don't have
+  permission to access or configure. Such as Coresight sink EUD, some TPDMs etc.
+  So there need driver to register dummy devices as Coresight devices. Provide
+  Coresight API for dummy device operations, such as enabling and disabling
+  dummy devices. Build the Coresight path for dummy sink or dummy source for
+  debugging.
+
+  The primary use case of the coresight dummy is to build path for dummy sink or
+  dummy source.
+
+maintainers:
+  - Mao Jinlong <quic_jinlmao@quicinc.com>
+  - Tao Zhang <quic_taozha@quicinc.com>
+  - Hao Zhang <quic_hazha@quicinc.com>
+
+select:
+  properties:
+    compatible:
+      contains:
+        enum:
+          - qcom,coresight-dummy
+  required:
+    - compatible
+
+properties:
+  $nodename:
+    pattern: "^dummy(@[0-9a-f]+)$"
+  compatible:
+    items:
+      - const: qcom,coresight-dummy
+
+  reg:
+    minItems: 1
+    maxItems: 2
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    items:
+      - const: apb_pclk
+
+  qcom,dummy-sink:
+    type: boolean
+    description:
+      Indicates that the type of this coresight node is dummy sink.
+
+  qcom,dummy-source:
+    type: boolean
+    description:
+      Indicates that the type of this coresight node is dummy source.
+
+  out-ports:
+    description: |
+      Output connections from the dummy source to Coresight Trace bus.
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port:
+        description: Output connection from the dummy source to Coresight
+            Trace bus.
+        $ref: /schemas/graph.yaml#/properties/port
+
+  in-puts:
+    description: |
+      Input connections from the CoreSight Trace bus to dummy sink.
+    $ref: /schemas/graph.yaml#/properties/ports
+
+    properties:
+      port:
+        description: Input connection from the Coresight Trace bus to
+            dummy sink.
+        $ref: /schemas/graph.yaml#/properties/port
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+  - oneOf:
+    - qcom,dummy-sink
+    - qcom,dummy-source
+
+additionalProperties: false
+
+examples:
+  # minimum dummy sink definition. dummy sink connect to coresight replicator.
+  - |
+    dummy_eud: dummy_sink {
+      compatible = "qcom,dummy";
+      qcom,dummy-sink;
+
+      in-ports {
+        port {
+          eud_in_replicator_swao: endpoint {
+            remote-endpoint =
+              <&replicator_swao_out_eud>;
+          };
+        };
+      };
+    };
+
+  # minimum dummy source definition. dummy source connect to coresight funnel.
+  - |
+    dummy_riscv: dummy_source {
+      compatible = "qcom,dummy";
+      qcom,dummy-source;
+
+      out-ports {
+        port {
+          dummy_riscv_out_funnel_swao: endpoint {
+            remote-endpoint =
+              <&funnel_swao_in_dummy_riscv>;
+          };
+        };
+      };
+    };
+
+...
-- 
2.17.1
Re: [PATCH v1 2/3] dt-bindings: arm: Add Coresight Dummy Trace YAML schema
Posted by Rob Herring 2 years, 11 months ago
On Thu, 16 Mar 2023 11:20:04 +0800, Hao Zhang wrote:
> Add new coresight-dummy.yaml file describing the bindings required
> to define coresight dummy trace in the device trees.
> 
> Signed-off-by: Hao Zhang <quic_hazha@quicinc.com>
> ---
>  .../bindings/arm/qcom,coresight-dummy.yaml    | 129 ++++++++++++++++++
>  1 file changed, 129 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml:91:5: [warning] wrong indentation: expected 6 but found 4 (indentation)

dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml: required:4: {'oneOf': ['qcom,dummy-sink', 'qcom,dummy-source']} is not of type 'string'
	from schema $id: http://json-schema.org/draft-07/schema#
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml: ignoring, error in schema: required: 4
Documentation/devicetree/bindings/arm/qcom,coresight-dummy.example.dtb: /example-0/dummy_sink: failed to match any schema with compatible: ['qcom,dummy']
Documentation/devicetree/bindings/arm/qcom,coresight-dummy.example.dtb: /example-1/dummy_source: failed to match any schema with compatible: ['qcom,dummy']

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230316032005.6509-3-quic_hazha@quicinc.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Re: [PATCH v1 2/3] dt-bindings: arm: Add Coresight Dummy Trace YAML schema
Posted by Hao Zhang 2 years, 11 months ago

On 3/16/2023 9:53 PM, Rob Herring wrote:
> 
> On Thu, 16 Mar 2023 11:20:04 +0800, Hao Zhang wrote:
>> Add new coresight-dummy.yaml file describing the bindings required
>> to define coresight dummy trace in the device trees.
>>
>> Signed-off-by: Hao Zhang <quic_hazha@quicinc.com>
>> ---
>>   .../bindings/arm/qcom,coresight-dummy.yaml    | 129 ++++++++++++++++++
>>   1 file changed, 129 insertions(+)
>>   create mode 100644 Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml
>>
> 
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
> 
> yamllint warnings/errors:
> ./Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml:91:5: [warning] wrong indentation: expected 6 but found 4 (indentation)
> 
> dtschema/dtc warnings/errors:
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml: required:4: {'oneOf': ['qcom,dummy-sink', 'qcom,dummy-source']} is not of type 'string'
> 	from schema $id: http://json-schema.org/draft-07/schema#
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml: ignoring, error in schema: required: 4
> Documentation/devicetree/bindings/arm/qcom,coresight-dummy.example.dtb: /example-0/dummy_sink: failed to match any schema with compatible: ['qcom,dummy']
> Documentation/devicetree/bindings/arm/qcom,coresight-dummy.example.dtb: /example-1/dummy_source: failed to match any schema with compatible: ['qcom,dummy']
> 
> doc reference errors (make refcheckdocs):
> 
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230316032005.6509-3-quic_hazha@quicinc.com
> 
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
> 
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
> 
> pip3 install dtschema --upgrade
> 
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
> 

Hi Rob,

Thanks for your check.
I have checked it and didn't see the above errors, will follow your 
steps and change this in the next version of patch.

Thanks,
Hao