2023-05-05 09:37:58

by Hao Zhang

[permalink] [raw]
Subject: [PATCH v4 2/3] dt-bindings: arm: Add Coresight Dummy Trace

Add new coresight-dummy.yaml file describing the bindings required
to define coresight dummy trace in the device trees.

Signed-off-by: Hao Zhang <[email protected]>
---
.../bindings/arm/arm,coresight-dummy.yaml | 102 ++++++++++++++++++
1 file changed, 102 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..126518863eea
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml
@@ -0,0 +1,102 @@
+# 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.
+
+maintainers:
+ - Mao Jinlong <[email protected]>
+ - Tao Zhang <[email protected]>
+ - Hao Zhang <[email protected]>
+ - Yuanfang Zhang <[email protected]>
+
+properties:
+ compatible:
+ items:
+ - enum:
+ - 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
+
+additionalProperties: false
+
+examples:
+ # Minimum dummy sink definition. Dummy sink connect to coresight replicator.
+ - |
+ sink {
+ compatible = "arm,coresight-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.
+ - |
+ source {
+ compatible = "arm,coresight-dummy-source";
+
+ out-ports {
+ port {
+ dummy_riscv_out_funnel_swao: endpoint {
+ remote-endpoint = <&funnel_swao_in_dummy_riscv>;
+ };
+ };
+ };
+ };
+
+...
--
2.17.1


2023-05-05 11:17:45

by Suzuki K Poulose

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] dt-bindings: arm: Add Coresight Dummy Trace

On 05/05/2023 10:24, 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 <[email protected]>
> ---
> .../bindings/arm/arm,coresight-dummy.yaml | 102 ++++++++++++++++++
> 1 file changed, 102 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..126518863eea
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml
> @@ -0,0 +1,102 @@
> +# 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.
> +
> +maintainers:
> + - Mao Jinlong <[email protected]>
> + - Tao Zhang <[email protected]>
> + - Hao Zhang <[email protected]>
> + - Yuanfang Zhang <[email protected]>

Given this is a generic "CoreSight" component, I would prefer to have
the CoreSight subsystem maintainers listed here (too). I don't mind
the entries above, but would like to make sure that the subsystem
people are aware of the changes happening here. Please use:

Mike Leach <[email protected]>
Suzuki K Poulose <[email protected]>
Leo Yan <[email protected]>

With the above:

Acked-by: Suzuki K Poulose <[email protected]>

> +
> +properties:
> + compatible:
> + items:
> + - enum:
> + - 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
> +
> +additionalProperties: false
> +
> +examples:
> + # Minimum dummy sink definition. Dummy sink connect to coresight replicator.
> + - |
> + sink {
> + compatible = "arm,coresight-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.
> + - |
> + source {
> + compatible = "arm,coresight-dummy-source";
> +
> + out-ports {
> + port {
> + dummy_riscv_out_funnel_swao: endpoint {
> + remote-endpoint = <&funnel_swao_in_dummy_riscv>;
> + };
> + };
> + };
> + };
> +
> +...

2023-05-05 12:25:39

by Leo Yan

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] dt-bindings: arm: Add Coresight Dummy Trace

On Fri, May 05, 2023 at 11:54:03AM +0100, Suzuki Kuruppassery Poulose wrote:

[...]

> > +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.
> > +
> > +maintainers:
> > + - Mao Jinlong <[email protected]>
> > + - Tao Zhang <[email protected]>
> > + - Hao Zhang <[email protected]>
> > + - Yuanfang Zhang <[email protected]>
>
> Given this is a generic "CoreSight" component, I would prefer to have the
> CoreSight subsystem maintainers listed here (too). I don't mind
> the entries above, but would like to make sure that the subsystem
> people are aware of the changes happening here. Please use:
>
> Mike Leach <[email protected]>
> Suzuki K Poulose <[email protected]>
> Leo Yan <[email protected]>

Given I am spending little time on CoreSight reviewing, I'd like to
use James Clark's email address to replace my own; I believe this
would benefit long term maintenance.

James Clark <[email protected]>

Thanks!

> With the above:
>
> Acked-by: Suzuki K Poulose <[email protected]>
>
> > +
> > +properties:
> > + compatible:
> > + items:
> > + - enum:
> > + - 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
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > + # Minimum dummy sink definition. Dummy sink connect to coresight replicator.
> > + - |
> > + sink {
> > + compatible = "arm,coresight-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.
> > + - |
> > + source {
> > + compatible = "arm,coresight-dummy-source";
> > +
> > + out-ports {
> > + port {
> > + dummy_riscv_out_funnel_swao: endpoint {
> > + remote-endpoint = <&funnel_swao_in_dummy_riscv>;
> > + };
> > + };
> > + };
> > + };
> > +
> > +...
>

2023-05-07 08:21:00

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] dt-bindings: arm: Add Coresight Dummy Trace

On 05/05/2023 11:24, 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 <[email protected]>
> ---
> .../bindings/arm/arm,coresight-dummy.yaml | 102 ++++++++++++++++++
> 1 file changed, 102 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..126518863eea
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml
> @@ -0,0 +1,102 @@
> +# 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.
> +
> +maintainers:
> + - Mao Jinlong <[email protected]>
> + - Tao Zhang <[email protected]>
> + - Hao Zhang <[email protected]>
> + - Yuanfang Zhang <[email protected]>
> +
> +properties:
> + compatible:
> + items:

You were asked to drop oneOf, not to replace with items. Drop items.
Drop oneOf. It's just enum.

> + - enum:
> + - 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

No improvements. Implement Rob's comments.

Best regards,
Krzysztof

2023-05-10 03:34:53

by Hao Zhang

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] dt-bindings: arm: Add Coresight Dummy Trace

Hi Suzuki, Leo,

On 5/5/2023 8:05 PM, Leo Yan wrote:
> On Fri, May 05, 2023 at 11:54:03AM +0100, Suzuki Kuruppassery Poulose wrote:
>
> [...]
>
>>> +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.
>>> +
>>> +maintainers:
>>> + - Mao Jinlong <[email protected]>
>>> + - Tao Zhang <[email protected]>
>>> + - Hao Zhang <[email protected]>
>>> + - Yuanfang Zhang <[email protected]>
>>
>> Given this is a generic "CoreSight" component, I would prefer to have the
>> CoreSight subsystem maintainers listed here (too). I don't mind
>> the entries above, but would like to make sure that the subsystem
>> people are aware of the changes happening here. Please use:
>>
>> Mike Leach <[email protected]>
>> Suzuki K Poulose <[email protected]>
>> Leo Yan <[email protected]>
> > Given I am spending little time on CoreSight reviewing, I'd like to
> use James Clark's email address to replace my own; I believe this
> would benefit long term maintenance.
>
> James Clark <[email protected]>
>
> Thanks!
>
Thanks for your review. I will update the maintainers in the next patch
series.

Thanks,
Hao

>> With the above:
>>
>> Acked-by: Suzuki K Poulose <[email protected]>
>>
>>> +
>>> +properties:
>>> + compatible:
>>> + items:
>>> + - enum:
>>> + - 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
>>> +
>>> +additionalProperties: false
>>> +
>>> +examples:
>>> + # Minimum dummy sink definition. Dummy sink connect to coresight replicator.
>>> + - |
>>> + sink {
>>> + compatible = "arm,coresight-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.
>>> + - |
>>> + source {
>>> + compatible = "arm,coresight-dummy-source";
>>> +
>>> + out-ports {
>>> + port {
>>> + dummy_riscv_out_funnel_swao: endpoint {
>>> + remote-endpoint = <&funnel_swao_in_dummy_riscv>;
>>> + };
>>> + };
>>> + };
>>> + };
>>> +
>>> +...
>>

2023-05-15 06:20:27

by Hao Zhang

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] dt-bindings: arm: Add Coresight Dummy Trace



On 5/7/2023 4:04 PM, Krzysztof Kozlowski wrote:
> On 05/05/2023 11:24, 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 <[email protected]>
>> ---
>> .../bindings/arm/arm,coresight-dummy.yaml | 102 ++++++++++++++++++
>> 1 file changed, 102 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..126518863eea
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml
>> @@ -0,0 +1,102 @@
>> +# 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.
>> +
>> +maintainers:
>> + - Mao Jinlong <[email protected]>
>> + - Tao Zhang <[email protected]>
>> + - Hao Zhang <[email protected]>
>> + - Yuanfang Zhang <[email protected]>
>> +
>> +properties:
>> + compatible:
>> + items:
>
> You were asked to drop oneOf, not to replace with items. Drop items.
> Drop oneOf. It's just enum.
>

Hi Krzysztof,

I will drop items and update it in the next version.

Thanks,
Hao

>> + - enum:
>> + - 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
>
> No improvements. Implement Rob's comments.
>

Hi Krzysztof, Rob,

There are two comments from Rob:
1) 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?
2) 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.


1. The necessary information for coresight is connection(ports) between
different components. However, this information is not very intuitive.
There would be a generic change to support coresight name in the
further. You can refer to the below link, this solution is still under
discussion, I think it's also helpful for our query.
https://lore.kernel.org/linux-arm-kernel/[email protected]/T/

2. Dummy driver is very simple, the only goal of it is to build a path
in kernel for subsystem, so we want to handle dummy source and sink in
one generic driver. For one same driver, shall we split the schema file?

Please feel free to comment.

Thanks,
Hao

> Best regards,
> Krzysztof
>

2023-06-08 16:25:44

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v4 2/3] dt-bindings: arm: Add Coresight Dummy Trace

On Mon, May 15, 2023 at 01:52:41PM +0800, Hao Zhang wrote:
>
>
> On 5/7/2023 4:04 PM, Krzysztof Kozlowski wrote:
> > On 05/05/2023 11:24, 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 <[email protected]>
> > > ---
> > > .../bindings/arm/arm,coresight-dummy.yaml | 102 ++++++++++++++++++
> > > 1 file changed, 102 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..126518863eea
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/arm/arm,coresight-dummy.yaml
> > > @@ -0,0 +1,102 @@
> > > +# 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.
> > > +
> > > +maintainers:
> > > + - Mao Jinlong <[email protected]>
> > > + - Tao Zhang <[email protected]>
> > > + - Hao Zhang <[email protected]>
> > > + - Yuanfang Zhang <[email protected]>
> > > +
> > > +properties:
> > > + compatible:
> > > + items:
> >
> > You were asked to drop oneOf, not to replace with items. Drop items.
> > Drop oneOf. It's just enum.
> >
>
> Hi Krzysztof,
>
> I will drop items and update it in the next version.
>
> Thanks,
> Hao
>
> > > + - enum:
> > > + - 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
> >
> > No improvements. Implement Rob's comments.
> >
>
> Hi Krzysztof, Rob,
>
> There are two comments from Rob:
> 1) 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?
> 2) 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.
>
>
> 1. The necessary information for coresight is connection(ports) between
> different components. However, this information is not very intuitive. There
> would be a generic change to support coresight name in the further. You can
> refer to the below link, this solution is still under discussion, I think
> it's also helpful for our query.
> https://lore.kernel.org/linux-arm-kernel/[email protected]/T/

I don't really have more input. I'm looking for input from coresight
folks on this.

Design the binding so it is future proof. If you need to go back and add
more data to the binding in the future you've lost. It is perfectly fine
to have specific bindings with generic drivers (e.g. simple panel). Then
if you need more capabilities than a generic driver, then you can add a
specific driver in the future with no DT change.

> 2. Dummy driver is very simple, the only goal of it is to build a path in
> kernel for subsystem, so we want to handle dummy source and sink in one
> generic driver. For one same driver, shall we split the schema file?

schemas and drivers are not 1:1. So yes, split the schema.

Rob