[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e51c200e-6de0-d516-3f32-28367b2f5a95@linaro.org>
Date: Sat, 25 Mar 2023 12:49:00 +0100
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Hao Zhang <quic_hazha@...cinc.com>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Suzuki K Poulose <suzuki.poulose@....com>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Konrad Dybcio <konradybcio@...il.com>,
Mike Leach <mike.leach@...aro.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Andy Gross <agross@...nel.org>,
Paul Walmsley <paul.walmsley@...ive.com>,
Palmer Dabbelt <palmer@...belt.com>,
Albert Ou <aou@...s.berkeley.edu>,
Jonathan Corbet <corbet@....net>
Cc: Leo Yan <leo.yan@...aro.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
coresight@...ts.linaro.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Tingwei Zhang <quic_tingweiz@...cinc.com>,
Jinlong Mao <quic_jinlmao@...cinc.com>,
Yuanfang Zhang <quic_yuanfang@...cinc.com>,
Tao Zhang <quic_taozha@...cinc.com>,
Trilok Soni <quic_tsoni@...cinc.com>,
linux-arm-msm@...r.kernel.org,
Bjorn Andersson <andersson@...nel.org>,
linux-doc@...r.kernel.org
Subject: Re: [PATCH v2 2/3] dt-bindings: arm: Add Coresight Dummy Trace YAML
schema
On 24/03/2023 07:16, Hao Zhang wrote:
> Add new coresight-dummy.yaml file describing the bindings required
> to define coresight dummy trace in the device trees.
>
Subject: drop second/last, redundant "YAML schema". The "dt-bindings"
prefix is already stating that these are bindings and all new must be DT
schema. You cannot add anything else, so this is redundant.
> Signed-off-by: Hao Zhang <quic_hazha@...cinc.com>
> ---
> .../bindings/arm/qcom,coresight-dummy.yaml | 118 ++++++++++++++++++
> 1 file changed, 118 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..7b719b084d72
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/qcom,coresight-dummy.yaml
> @@ -0,0 +1,118 @@
> +# 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@...cinc.com>
> + - Tao Zhang <quic_taozha@...cinc.com>
> + - Hao Zhang <quic_hazha@...cinc.com>
> +
> +select:
> + properties:
> + compatible:
> + contains:
> + enum:
> + - qcom,coresight-dummy
> + required:
> + - compatible
Why do you need the select?
> +
> +properties:
> + $nodename:
> + pattern: "^dummy_.*(sink|source)_[0-9]+.*$"
We do not enforce node names in individual bindings. Why do you need it?
Plus underscore is not even proper character...
> + compatible:
> + items:
Drop items. You have only one item, so no need for list.
> + - const: qcom,coresight-dummy
> +
> + qcom,dummy-sink:
> + type: boolean
> + description:
> + Indicates that the type of this coresight node is dummy sink.
You just duplicated property name. Write something useful.
> +
> + qcom,dummy-source:
> + type: boolean
> + description:
> + Indicates that the type of this coresight node is dummy source.
You just duplicated property name. Write something useful.
> +
> + out-ports:
> + description: |
No need for |
> + 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-ports:
> + description: |
Ditto
> + 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
> +
> +additionalProperties: false
> +
> +oneOf:
> + - required:
> + - qcom,dummy-sink
> + - required:
> + - qcom,dummy-source
> +
> +examples:
> + # minimum dummy sink definition. dummy sink connect to coresight replicator.
> + - |
> + dummy_sink_1 {
Node names should be generic, so "sink"
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation
> + compatible = "qcom,coresight-dummy";
> + qcom,dummy-sink;
> +
> + in-ports {
> + port {
> + eud_in_replicator_swao: endpoint {
> + remote-endpoint =
> + <&replicator_swao_out_eud>;
Why line break after =?
> + };
> + };
> + };
> + };
> +
> + # minimum dummy source definition. dummy source connect to coresight funnel.
If you use sentences, then start with capital letter.
> + - |
> + dummy_source_1 {
> + compatible = "qcom,coresight-dummy";
> + qcom,dummy-source;
> +
> + out-ports {
> + port {
> + dummy_riscv_out_funnel_swao: endpoint {
> + remote-endpoint =
> + <&funnel_swao_in_dummy_riscv>;
Why line break?
> + };
> + };
> + };
> + };
> +
> +...
Best regards,
Krzysztof
Powered by blists - more mailing lists