diff mbox series

[V2,11/11] dts: bindings: Document device tree bindings for Arm TRBE

Message ID 1610511498-4058-12-git-send-email-anshuman.khandual@arm.com
State New
Headers show
Series None | expand

Commit Message

Anshuman Khandual Jan. 13, 2021, 4:18 a.m. UTC
From: Suzuki K Poulose <suzuki.poulose@arm.com>


Document the device tree bindings for Trace Buffer Extension (TRBE).

Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: Mathieu Poirier <mathieu.poirier@linaro.org>
Cc: Rob Herring <robh@kernel.org>
Cc: devicetree@vger.kernel.org
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

---
 Documentation/devicetree/bindings/arm/trbe.yaml | 46 +++++++++++++++++++++++++
 1 file changed, 46 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/arm/trbe.yaml

-- 
2.7.4

Comments

Rob Herring Jan. 13, 2021, 3:45 p.m. UTC | #1
On Wed, 13 Jan 2021 09:48:18 +0530, Anshuman Khandual wrote:
> From: Suzuki K Poulose <suzuki.poulose@arm.com>

> 

> Document the device tree bindings for Trace Buffer Extension (TRBE).

> 

> Cc: Anshuman Khandual <anshuman.khandual@arm.com>

> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>

> Cc: Rob Herring <robh@kernel.org>

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

> ---

>  Documentation/devicetree/bindings/arm/trbe.yaml | 46 +++++++++++++++++++++++++

>  1 file changed, 46 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/arm/trbe.yaml

> 


My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/arm/trbe.yaml:39:2: [warning] wrong indentation: expected 2 but found 1 (indentation)

dtschema/dtc warnings/errors:

See https://patchwork.ozlabs.org/patch/1425605

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

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.
Suzuki K Poulose Jan. 14, 2021, 10:17 a.m. UTC | #2
Hi Rob

On 1/13/21 3:45 PM, Rob Herring wrote:
> On Wed, 13 Jan 2021 09:48:18 +0530, Anshuman Khandual wrote:

>> From: Suzuki K Poulose <suzuki.poulose@arm.com>

>>

>> Document the device tree bindings for Trace Buffer Extension (TRBE).

>>

>> Cc: Anshuman Khandual <anshuman.khandual@arm.com>

>> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>

>> Cc: Rob Herring <robh@kernel.org>

>> Cc: devicetree@vger.kernel.org

>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

>> ---

>>   Documentation/devicetree/bindings/arm/trbe.yaml | 46 +++++++++++++++++++++++++

>>   1 file changed, 46 insertions(+)

>>   create mode 100644 Documentation/devicetree/bindings/arm/trbe.yaml

>>

> 

> My bot found errors running 'make dt_binding_check' on your patch:

> 

> yamllint warnings/errors:

> ./Documentation/devicetree/bindings/arm/trbe.yaml:39:2: [warning] wrong indentation: expected 2 but found 1 (indentation)

> 

> dtschema/dtc warnings/errors:


Thanks for that. I guess Anshuman can fix this up, with the following patch:

diff --git a/Documentation/devicetree/bindings/arm/trbe.yaml 
b/Documentation/devicetree/bindings/arm/trbe.yaml
index 2258595c40dd..24951e02fa58 100644
--- a/Documentation/devicetree/bindings/arm/trbe.yaml
+++ b/Documentation/devicetree/bindings/arm/trbe.yaml
@@ -36,7 +36,7 @@ additionalProperties: false

  examples:

- - |
+  - |
     #include <dt-bindings/interrupt-controller/arm-gic.h>

     trbe {

> 

> See https://patchwork.ozlabs.org/patch/1425605

> 

> This check can fail if there are any dependencies. The base for a patch

> series is generally the most recent rc1.

> 

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


I did see the warning, but I thought I fixed it. Sorry about that.

Cheers
Suzuki
Rob Herring Jan. 14, 2021, 2:07 p.m. UTC | #3
On Wed, Jan 13, 2021 at 09:48:18AM +0530, Anshuman Khandual wrote:
> From: Suzuki K Poulose <suzuki.poulose@arm.com>

> 

> Document the device tree bindings for Trace Buffer Extension (TRBE).

> 

> Cc: Anshuman Khandual <anshuman.khandual@arm.com>

> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>

> Cc: Rob Herring <robh@kernel.org>

> Cc: devicetree@vger.kernel.org

> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

> ---

>  Documentation/devicetree/bindings/arm/trbe.yaml | 46 +++++++++++++++++++++++++

>  1 file changed, 46 insertions(+)

>  create mode 100644 Documentation/devicetree/bindings/arm/trbe.yaml

> 

> diff --git a/Documentation/devicetree/bindings/arm/trbe.yaml b/Documentation/devicetree/bindings/arm/trbe.yaml

> new file mode 100644

> index 0000000..2258595

> --- /dev/null

> +++ b/Documentation/devicetree/bindings/arm/trbe.yaml

> @@ -0,0 +1,46 @@

> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause

> +# Copyright 2021, Arm Ltd

> +%YAML 1.2

> +---

> +$id: "http://devicetree.org/schemas/arm/trbe.yaml#"

> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

> +

> +title: ARM Trace Buffer Extensions

> +

> +maintainers:

> +  - Anshuman Khandual <anshuman.khandual@arm.com>

> +

> +description: |

> +  Description of TRBE hw


Huh?

> +

> +properties:

> +  $nodename:

> +    pattern: "trbe"


const: trbe

> +  compatible:

> +    items:

> +      - const: arm,trace-buffer-extension


Any versioning to this? Or is that discoverable?

> +

> +  interrupts:

> +    description: |

> +       Exactly 1 PPI must be listed. For heterogeneous systems where

> +       TRBE is only supported on a subset of the CPUs, please consult

> +       the arm,gic-v3 binding for details on describing a PPI partition.

> +    maxItems: 1

> +

> +required:

> +  - compatible

> +  - interrupts

> +

> +additionalProperties: false

> +

> +


Extra blank line.

> +examples:

> +

> + - |

> +   #include <dt-bindings/interrupt-controller/arm-gic.h>

> +

> +   trbe {

> +     compatible = "arm,trace-buffer-extension";

> +     interrupts = <GIC_PPI 15 IRQ_TYPE_LEVEL_HIGH>;

> +   };

> +...

> -- 

> 2.7.4

>
Suzuki K Poulose Jan. 14, 2021, 2:47 p.m. UTC | #4
On 1/14/21 2:07 PM, Rob Herring wrote:
> On Wed, Jan 13, 2021 at 09:48:18AM +0530, Anshuman Khandual wrote:

>> From: Suzuki K Poulose <suzuki.poulose@arm.com>

>>

>> Document the device tree bindings for Trace Buffer Extension (TRBE).

>>

>> Cc: Anshuman Khandual <anshuman.khandual@arm.com>

>> Cc: Mathieu Poirier <mathieu.poirier@linaro.org>

>> Cc: Rob Herring <robh@kernel.org>

>> Cc: devicetree@vger.kernel.org

>> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

>> Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>

>> ---

>>   Documentation/devicetree/bindings/arm/trbe.yaml | 46 +++++++++++++++++++++++++

>>   1 file changed, 46 insertions(+)

>>   create mode 100644 Documentation/devicetree/bindings/arm/trbe.yaml

>>

>> diff --git a/Documentation/devicetree/bindings/arm/trbe.yaml b/Documentation/devicetree/bindings/arm/trbe.yaml

>> new file mode 100644

>> index 0000000..2258595

>> --- /dev/null

>> +++ b/Documentation/devicetree/bindings/arm/trbe.yaml

>> @@ -0,0 +1,46 @@

>> +# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause

>> +# Copyright 2021, Arm Ltd

>> +%YAML 1.2

>> +---

>> +$id: "http://devicetree.org/schemas/arm/trbe.yaml#"

>> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"

>> +

>> +title: ARM Trace Buffer Extensions

>> +

>> +maintainers:

>> +  - Anshuman Khandual <anshuman.khandual@arm.com>

>> +

>> +description: |

>> +  Description of TRBE hw

> 

> Huh?

> 


Doh ! That was due to a miscommunication between us.
This should be :

description: |
   Arm Trace Buffer Extension (TRBE) is a per CPU component
   for storing trace generated on the CPU to memory. It is
   accessed via CPU system registers. The software can verify
   if it is permitted to use the component by checking the
   TRBIDR register.

>> +

>> +properties:

>> +  $nodename:

>> +    pattern: "trbe"

> 

> const: trbe

> 

>> +  compatible:

>> +    items:

>> +      - const: arm,trace-buffer-extension

> 

> Any versioning to this? Or is that discoverable?

> 


It must be discoverable via ID_AA64DFR0_EL1.TraceBuffer.
The IP is entirely accessed by the CPU system registers. So, any
further changes can be interpreted from the system registers
(including if the access is blocked by a higher exception level).

>> +

>> +  interrupts:

>> +    description: |

>> +       Exactly 1 PPI must be listed. For heterogeneous systems where

>> +       TRBE is only supported on a subset of the CPUs, please consult

>> +       the arm,gic-v3 binding for details on describing a PPI partition.

>> +    maxItems: 1

>> +

>> +required:

>> +  - compatible

>> +  - interrupts

>> +

>> +additionalProperties: false

>> +

>> +

> 

> Extra blank line.


Removed.

Cheers

Suzuki
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/trbe.yaml b/Documentation/devicetree/bindings/arm/trbe.yaml
new file mode 100644
index 0000000..2258595
--- /dev/null
+++ b/Documentation/devicetree/bindings/arm/trbe.yaml
@@ -0,0 +1,46 @@ 
+# SPDX-License-Identifier: GPL-2.0-only or BSD-2-Clause
+# Copyright 2021, Arm Ltd
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/arm/trbe.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: ARM Trace Buffer Extensions
+
+maintainers:
+  - Anshuman Khandual <anshuman.khandual@arm.com>
+
+description: |
+  Description of TRBE hw
+
+properties:
+  $nodename:
+    pattern: "trbe"
+  compatible:
+    items:
+      - const: arm,trace-buffer-extension
+
+  interrupts:
+    description: |
+       Exactly 1 PPI must be listed. For heterogeneous systems where
+       TRBE is only supported on a subset of the CPUs, please consult
+       the arm,gic-v3 binding for details on describing a PPI partition.
+    maxItems: 1
+
+required:
+  - compatible
+  - interrupts
+
+additionalProperties: false
+
+
+examples:
+
+ - |
+   #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+   trbe {
+     compatible = "arm,trace-buffer-extension";
+     interrupts = <GIC_PPI 15 IRQ_TYPE_LEVEL_HIGH>;
+   };
+...