[RFC PATCH 1/2] dt-bindings: Add the binding doc for xilinx APM
Krzysztof Kozlowski
krzysztof.kozlowski at linaro.org
Wed Sep 21 02:02:50 PDT 2022
On 21/09/2022 10:06, Shubhrajyoti Datta wrote:
> The LogiCORE™ IP AXI Performance Monitor core enables AXI system
> performance measurement for multiple slots (AXI4/AXI3/AXI4-Stream/
> AXI4-Lite) activity. Add the devicetree binding for xilinx APM.
>
> Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta at amd.com>
> ---
> .../bindings/perf/xlnx-axi-perf-monitor.yaml | 137 ++++++++++++++++++
> 1 file changed, 137 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/perf/xlnx-axi-perf-monitor.yaml
>
> diff --git a/Documentation/devicetree/bindings/perf/xlnx-axi-perf-monitor.yaml b/Documentation/devicetree/bindings/perf/xlnx-axi-perf-monitor.yaml
> new file mode 100644
> index 000000000000..0b8ba96aa867
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/perf/xlnx-axi-perf-monitor.yaml
Filename based on compatible (the same as compatible).
> @@ -0,0 +1,137 @@
> +# SPDX-License-Identifier: GPL-2.0-or-later OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/perf/xilinx-apm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Xilinx Axi Performance Monitor device tree bindings
Drop "device tree bindings".
> +
> +maintainers:
> + - Shubhrajyoti Datta <shubhrajyoti.datta at xilinx.com>
> +
> +properties:
> + compatible:
> + items:
You have one item, so no "items".
> + - enum:
> + - xlnx,axi-perf-monitor
> +
> + reg:
> + maxItems: 1
> +
> + clocks:
> + maxItems: 1
> +
> + interrupts:
> + maxItems: 1
> +
> + xlnx,enable-profile:
> + allOf:
No need for allOf.
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [0, 1]
This is boolean.
> + description:
> + Enables the profile mode.
Explain what is "profile mode".
> + maxItems: 1
> +
> + xlnx,enable-trace:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [0, 1]
Ditto
> + description:
> + Enables trace mode.
Ditto
> + maxItems: 1
> +
> + xlnx,num-monitor-slots:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - minimum: 1
> + - maximum: 8
No allOf.
All of such comments apply everywhere.
> + description:
> + Number of monitor slots.
> +
> + xlnx,enable-event-count:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [0, 1]
boolean
> + description:
> + Enable event count.
> +
> + xlnx,enable-event-log:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [0, 1]
boolean
> + description:
> + Enable event log.
> +
> + xlnx,have-sampled-metric-cnt:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + Sampled metric counters enabled in APM.
Description says: boolean
> +
> + xlnx,metric-count-width:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [32, 64]
> + description:
> + Metric Counter width.
> +
> + xlnx,metric-count-scale:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [1, 2, 4, 8]
> + description:
> + Metric Counter scale factor.
> +
> + xlnx,num-of-counters:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + description:
> + Number of counters in APM.
> +
> + xlnx,metrics-sample-count-width:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [32, 64]
> + description:
> + Sampled metric counter width.
> +
> + xlnx,global-count-width:
> + allOf:
> + - $ref: /schemas/types.yaml#/definitions/uint32
> + - enum: [32, 64]
> + description:
> + Global Clock counter width.
> +
> + xlnx,id-filter-32bit:
> + description: APM is in 32-bit mode.
> + type: boolean
> +
> +required:
> + - compatible
> + - reg
> + - clocks
> + - interrupts
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + apm at 44a00000 {
Generic node names: pmu
> + compatible = "xlnx,axi-perf-monitor";
> + interrupt-parent = <&axi_intc_1>;
> + interrupts = <1 2>;
Are these usual interrupt flags?
> + reg = <0x44a00000 0x1000>;
> + clocks = <&clkc 15>;
> + xlnx,enable-profile = <0>;
> + xlnx,enable-trace = <0>;
> + xlnx,num-monitor-slots = <4>;
> + xlnx,enable-event-count = <1>;
> + xlnx,enable-event-log = <1>;
> + xlnx,have-sampled-metric-cnt = <1>;
> + xlnx,num-of-counters = <8>;
> + xlnx,metric-count-width = <32>;
> + xlnx,metrics-sample-count-width = <32>;
> + xlnx,global-count-width = <32>;
> + xlnx,metric-count-scale = <1>;
> + xlnx,id-filter-32bit;
> + };
Best regards,
Krzysztof
More information about the linux-arm-kernel
mailing list