[v3,2/2] dt-bindings: arm: Add device-name in the coresight components
Commit Message
Current name of coresight component's folder consists of prefix of
the device and the id in the device list. When run 'ls' command,
we can get the register address of the device. Take CTI for example,
if we want to set the config for modem CTI, but we can't know which
CTI is modem CTI from all current information.
cti_sys0 -> ../../../devices/platform/soc@0/138f0000.cti/cti_sys0
cti_sys1 -> ../../../devices/platform/soc@0/13900000.cti/cti_sys1
Add device-name in device tree which can provide a better description
of the coresight device. It can provide the info like the system or
HW it belongs to.
Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
---
.../devicetree/bindings/arm/arm,coresight-catu.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-cpu-debug.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-cti.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-dummy-sink.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-dummy-source.yaml | 6 ++++++
.../bindings/arm/arm,coresight-dynamic-funnel.yaml | 6 ++++++
.../bindings/arm/arm,coresight-dynamic-replicator.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-etb10.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-etm.yaml | 6 ++++++
.../bindings/arm/arm,coresight-static-funnel.yaml | 6 ++++++
.../bindings/arm/arm,coresight-static-replicator.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-stm.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-tmc.yaml | 6 ++++++
.../devicetree/bindings/arm/arm,coresight-tpiu.yaml | 6 ++++++
.../devicetree/bindings/arm/qcom,coresight-tpda.yaml | 6 ++++++
.../devicetree/bindings/arm/qcom,coresight-tpdm.yaml | 6 ++++++
16 files changed, 96 insertions(+)
Comments
On Wed, Jan 31, 2024 at 12:26:26AM -0800, Mao Jinlong wrote:
> Current name of coresight component's folder consists of prefix of
> the device and the id in the device list. When run 'ls' command,
> we can get the register address of the device. Take CTI for example,
> if we want to set the config for modem CTI, but we can't know which
> CTI is modem CTI from all current information.
>
> cti_sys0 -> ../../../devices/platform/soc@0/138f0000.cti/cti_sys0
> cti_sys1 -> ../../../devices/platform/soc@0/13900000.cti/cti_sys1
>
> Add device-name in device tree which can provide a better description
> of the coresight device. It can provide the info like the system or
> HW it belongs to.
>
> Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
> ---
> .../devicetree/bindings/arm/arm,coresight-catu.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-cpu-debug.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-cti.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-dummy-sink.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-dummy-source.yaml | 6 ++++++
> .../bindings/arm/arm,coresight-dynamic-funnel.yaml | 6 ++++++
> .../bindings/arm/arm,coresight-dynamic-replicator.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-etb10.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-etm.yaml | 6 ++++++
> .../bindings/arm/arm,coresight-static-funnel.yaml | 6 ++++++
> .../bindings/arm/arm,coresight-static-replicator.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-stm.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-tmc.yaml | 6 ++++++
> .../devicetree/bindings/arm/arm,coresight-tpiu.yaml | 6 ++++++
> .../devicetree/bindings/arm/qcom,coresight-tpda.yaml | 6 ++++++
> .../devicetree/bindings/arm/qcom,coresight-tpdm.yaml | 6 ++++++
Why do you need a name on everything? Funnels and replicators, for
example, aren't a source of data, but just connected to things that are.
ETM is tightly coupled to a CPU and you have a link to it. You have
graph links to show connections. Limit this to where you actually need
it.
> 16 files changed, 96 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-catu.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-catu.yaml
> index 2bae06eed693..a4d20aad0c70 100644
> --- a/Documentation/devicetree/bindings/arm/arm,coresight-catu.yaml
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-catu.yaml
> @@ -44,6 +44,12 @@ properties:
> - const: arm,coresight-catu
> - const: arm,primecell
>
> + device-name:
This is too generic of a name. Make is something closer to how it is
used or what it is for. Naming sysfs devices is not how it is used.
That's just an intermediate step.
> + $ref: /schemas/types.yaml#/definitions/string
> + description:
> + Define the name which can describe what kind of HW or system the
> + device is for.
> +
> reg:
> maxItems: 1
>
> diff --git a/Documentation/devicetree/bindings/arm/arm,coresight-cpu-debug.yaml b/Documentation/devicetree/bindings/arm/arm,coresight-cpu-debug.yaml
> index 0a6bc03ebe00..6094cc9cb834 100644
> --- a/Documentation/devicetree/bindings/arm/arm,coresight-cpu-debug.yaml
> +++ b/Documentation/devicetree/bindings/arm/arm,coresight-cpu-debug.yaml
> @@ -39,6 +39,12 @@ properties:
> - const: arm,coresight-cpu-debug
> - const: arm,primecell
>
> + device-name:
> + $ref: /schemas/types.yaml#/definitions/string
If you are redefining the type multiple times, there's a problem in the
structure of the schemas. Really, that's true for anything duplicated in
the kernel.
Rob
@@ -44,6 +44,12 @@ properties:
- const: arm,coresight-catu
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -39,6 +39,12 @@ properties:
- const: arm,coresight-cpu-debug
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -88,6 +88,12 @@ properties:
- const: arm,coresight-cti
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -39,6 +39,12 @@ properties:
enum:
- arm,coresight-dummy-sink
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
in-ports:
$ref: /schemas/graph.yaml#/properties/ports
@@ -38,6 +38,12 @@ properties:
enum:
- arm,coresight-dummy-source
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
out-ports:
$ref: /schemas/graph.yaml#/properties/ports
@@ -41,6 +41,12 @@ properties:
- const: arm,coresight-dynamic-funnel
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -41,6 +41,12 @@ properties:
- const: arm,coresight-dynamic-replicator
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -41,6 +41,12 @@ properties:
- const: arm,coresight-etb10
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -60,6 +60,12 @@ properties:
Embedded Trace Macrocell (version 4.x), with system register access only
const: arm,coresight-etm4x-sysreg
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -27,6 +27,12 @@ properties:
compatible:
const: arm,coresight-static-funnel
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
power-domains:
maxItems: 1
@@ -27,6 +27,12 @@ properties:
compatible:
const: arm,coresight-static-replicator
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
power-domains:
maxItems: 1
@@ -43,6 +43,12 @@ properties:
- const: arm,coresight-stm
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 2
@@ -42,6 +42,12 @@ properties:
- const: arm,coresight-tmc
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -41,6 +41,12 @@ properties:
- const: arm,coresight-tpiu
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
maxItems: 1
@@ -54,6 +54,12 @@ properties:
- const: qcom,coresight-tpda
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
minItems: 1
maxItems: 2
@@ -40,6 +40,12 @@ properties:
- const: qcom,coresight-tpdm
- const: arm,primecell
+ device-name:
+ $ref: /schemas/types.yaml#/definitions/string
+ description:
+ Define the name which can describe what kind of HW or system the
+ device is for.
+
reg:
minItems: 1
maxItems: 2