[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20230425184654.GA2063541-robh@kernel.org>
Date: Tue, 25 Apr 2023 13:46:54 -0500
From: Rob Herring <robh@...nel.org>
To: Hao Zhang <quic_hazha@...cinc.com>
Cc: Suzuki K Poulose <suzuki.poulose@....com>,
Mike Leach <mike.leach@...aro.org>,
Leo Yan <leo.yan@...aro.org>,
Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
Mathieu Poirier <mathieu.poirier@...aro.org>,
Konrad Dybcio <konradybcio@...il.com>,
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>,
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 v3 2/3] dt-bindings: arm: Add Coresight Dummy Trace
On Sat, Apr 22, 2023 at 03:37:13PM +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@...cinc.com>
> ---
> .../bindings/arm/arm,coresight-dummy.yaml | 101 ++++++++++++++++++
> 1 file changed, 101 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml
>
> diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml
> new file mode 100644
> index 000000000000..48d864aefaaa
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml
> @@ -0,0 +1,101 @@
> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/arm/arm,coresight-dummy.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: ARM Coresight Dummy component
> +
> +description: |
> + Coresight Dummy Trace Module is for the specific devices that kernel
> + don't have permission to access or configure, e.g., CoreSight TPDMs
> + on Qualcomm platforms. So there need driver to register dummy devices
> + as Coresight devices. It may also be used to define components that
> + may not have any programming interfaces (e.g, static links), so that
> + paths can be established in the driver. 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 in kernel
> + side for dummy sink and dummy source.
I could imagine the OS wanting to know more information than just
'dummy'. Is data from an unknown source useful? Likewise, don't you want
to know where you are sending data too?
> +
> +maintainers:
> + - Mao Jinlong <quic_jinlmao@...cinc.com>
> + - Tao Zhang <quic_taozha@...cinc.com>
> + - Hao Zhang <quic_hazha@...cinc.com>
> +
> +properties:
> + compatible:
> + oneOf:
> + - enum:
Don't need oneOf as there is only one entry.
> + - arm,coresight-dummy-sink
> + - arm,coresight-dummy-source
> +
> + out-ports:
> + $ref: /schemas/graph.yaml#/properties/ports
> +
> + properties:
> + port:
> + description: Output connection from the source to Coresight
> + Trace bus.
> + $ref: /schemas/graph.yaml#/properties/port
> +
> + in-ports:
> + $ref: /schemas/graph.yaml#/properties/ports
> +
> + properties:
> + port:
> + description: Input connection from the Coresight Trace bus to
> + dummy sink, such as Embedded USB debugger(EUD).
> + $ref: /schemas/graph.yaml#/properties/port
> +
> +required:
> + - compatible
> +
> +if:
> + # If the compatible contains the below value
> + properties:
> + compatible:
> + contains:
> + const: arm,coresight-dummy-sink
> +
> +then:
> + required:
> + - in-ports
> +
> +else:
> + required:
> + - out-ports
This still allows the nodes when they don't make sense. I think this
needs to be 2 schema files. The only common part is 'compatible' and
that's not even shared.
Rob
Powered by blists - more mailing lists