1a7ee53e1SKrzysztof Kozlowski# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2a7ee53e1SKrzysztof Kozlowski%YAML 1.2
3a7ee53e1SKrzysztof Kozlowski---
4a7ee53e1SKrzysztof Kozlowski$id: http://devicetree.org/schemas/interconnect/qcom,msm8998-bwmon.yaml#
5a7ee53e1SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6a7ee53e1SKrzysztof Kozlowski
7a7ee53e1SKrzysztof Kozlowskititle: Qualcomm Interconnect Bandwidth Monitor
8a7ee53e1SKrzysztof Kozlowski
9a7ee53e1SKrzysztof Kozlowskimaintainers:
10a7ee53e1SKrzysztof Kozlowski  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
11a7ee53e1SKrzysztof Kozlowski
12a7ee53e1SKrzysztof Kozlowskidescription: |
13a7ee53e1SKrzysztof Kozlowski  Bandwidth Monitor measures current throughput on buses between various NoC
14a7ee53e1SKrzysztof Kozlowski  fabrics and provides information when it crosses configured thresholds.
15a7ee53e1SKrzysztof Kozlowski
16a7ee53e1SKrzysztof Kozlowski  Certain SoCs might have more than one Bandwidth Monitors, for example on SDM845::
17a7ee53e1SKrzysztof Kozlowski   - Measuring the bandwidth between CPUs and Last Level Cache Controller -
18a7ee53e1SKrzysztof Kozlowski     called just BWMON,
19a7ee53e1SKrzysztof Kozlowski   - Measuring the bandwidth between Last Level Cache Controller and memory
20a7ee53e1SKrzysztof Kozlowski     (DDR) - called LLCC BWMON.
21a7ee53e1SKrzysztof Kozlowski
22a7ee53e1SKrzysztof Kozlowskiproperties:
23a7ee53e1SKrzysztof Kozlowski  compatible:
24a7ee53e1SKrzysztof Kozlowski    oneOf:
25b7590f38SKonrad Dybcio      - const: qcom,msm8998-bwmon       # BWMON v4
26a7ee53e1SKrzysztof Kozlowski      - items:
27a7ee53e1SKrzysztof Kozlowski          - enum:
28770b8d2dSKonrad Dybcio              - qcom,sc7180-cpu-bwmon
291498a5a7SKrzysztof Kozlowski              - qcom,sc7280-cpu-bwmon
302d710b00SBjorn Andersson              - qcom,sc8280xp-cpu-bwmon
31b7590f38SKonrad Dybcio              - qcom,sdm845-cpu-bwmon
32*3740a791SKonrad Dybcio              - qcom,sm8250-cpu-bwmon
3316ceb986SNeil Armstrong              - qcom,sm8550-cpu-bwmon
34b7590f38SKonrad Dybcio          - const: qcom,sdm845-bwmon    # BWMON v4, unified register space
352d710b00SBjorn Andersson      - items:
362d710b00SBjorn Andersson          - enum:
37770b8d2dSKonrad Dybcio              - qcom,sc7180-llcc-bwmon
382d710b00SBjorn Andersson              - qcom,sc8280xp-llcc-bwmon
39*3740a791SKonrad Dybcio              - qcom,sm8250-llcc-bwmon
4016ceb986SNeil Armstrong              - qcom,sm8550-llcc-bwmon
412d710b00SBjorn Andersson          - const: qcom,sc7280-llcc-bwmon
42b7c84ae7SRajendra Nayak      - const: qcom,sc7280-llcc-bwmon   # BWMON v5
433098fcb1SKrzysztof Kozlowski      - const: qcom,sdm845-llcc-bwmon   # BWMON v5
44a7ee53e1SKrzysztof Kozlowski
45a7ee53e1SKrzysztof Kozlowski  interconnects:
46a7ee53e1SKrzysztof Kozlowski    maxItems: 1
47a7ee53e1SKrzysztof Kozlowski
48a7ee53e1SKrzysztof Kozlowski  interrupts:
49a7ee53e1SKrzysztof Kozlowski    maxItems: 1
50a7ee53e1SKrzysztof Kozlowski
51a7ee53e1SKrzysztof Kozlowski  operating-points-v2: true
52c8973737SKrzysztof Kozlowski  opp-table:
53c8973737SKrzysztof Kozlowski    type: object
54a7ee53e1SKrzysztof Kozlowski
55a7ee53e1SKrzysztof Kozlowski  reg:
56b7590f38SKonrad Dybcio    # BWMON v5 uses one register address space, v1-v4 use one or two.
57b7590f38SKonrad Dybcio    minItems: 1
58b7590f38SKonrad Dybcio    maxItems: 2
59b7590f38SKonrad Dybcio
60b7590f38SKonrad Dybcio  reg-names:
61b7590f38SKonrad Dybcio    minItems: 1
62b7590f38SKonrad Dybcio    maxItems: 2
63a7ee53e1SKrzysztof Kozlowski
64a7ee53e1SKrzysztof Kozlowskirequired:
65a7ee53e1SKrzysztof Kozlowski  - compatible
66a7ee53e1SKrzysztof Kozlowski  - interconnects
67a7ee53e1SKrzysztof Kozlowski  - interrupts
68a7ee53e1SKrzysztof Kozlowski  - operating-points-v2
69a7ee53e1SKrzysztof Kozlowski  - opp-table
70a7ee53e1SKrzysztof Kozlowski  - reg
71a7ee53e1SKrzysztof Kozlowski
72a7ee53e1SKrzysztof KozlowskiadditionalProperties: false
73a7ee53e1SKrzysztof Kozlowski
74b7590f38SKonrad DybcioallOf:
75b7590f38SKonrad Dybcio  - if:
76b7590f38SKonrad Dybcio      properties:
77b7590f38SKonrad Dybcio        compatible:
78b7590f38SKonrad Dybcio          const: qcom,msm8998-bwmon
79b7590f38SKonrad Dybcio    then:
80b7590f38SKonrad Dybcio      properties:
81b7590f38SKonrad Dybcio        reg:
82b7590f38SKonrad Dybcio          minItems: 2
83b7590f38SKonrad Dybcio
84b7590f38SKonrad Dybcio        reg-names:
85b7590f38SKonrad Dybcio          items:
86b7590f38SKonrad Dybcio            - const: monitor
87b7590f38SKonrad Dybcio            - const: global
88b7590f38SKonrad Dybcio
89b7590f38SKonrad Dybcio    else:
90b7590f38SKonrad Dybcio      properties:
91b7590f38SKonrad Dybcio        reg:
92b7590f38SKonrad Dybcio          maxItems: 1
93b7590f38SKonrad Dybcio
94b7590f38SKonrad Dybcio        reg-names:
95b7590f38SKonrad Dybcio          maxItems: 1
96b7590f38SKonrad Dybcio
97a7ee53e1SKrzysztof Kozlowskiexamples:
98a7ee53e1SKrzysztof Kozlowski  - |
99a7ee53e1SKrzysztof Kozlowski    #include <dt-bindings/interconnect/qcom,sdm845.h>
100a7ee53e1SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
101a7ee53e1SKrzysztof Kozlowski
102a7ee53e1SKrzysztof Kozlowski    pmu@1436400 {
103b7590f38SKonrad Dybcio        compatible = "qcom,sdm845-cpu-bwmon", "qcom,sdm845-bwmon";
104a7ee53e1SKrzysztof Kozlowski        reg = <0x01436400 0x600>;
105a7ee53e1SKrzysztof Kozlowski        interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
106a7ee53e1SKrzysztof Kozlowski        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_LLCC 3>;
107a7ee53e1SKrzysztof Kozlowski
108a7ee53e1SKrzysztof Kozlowski        operating-points-v2 = <&cpu_bwmon_opp_table>;
109a7ee53e1SKrzysztof Kozlowski
110a7ee53e1SKrzysztof Kozlowski        cpu_bwmon_opp_table: opp-table {
111a7ee53e1SKrzysztof Kozlowski            compatible = "operating-points-v2";
112a7ee53e1SKrzysztof Kozlowski            opp-0 {
113a7ee53e1SKrzysztof Kozlowski                opp-peak-kBps = <4800000>;
114a7ee53e1SKrzysztof Kozlowski            };
115a7ee53e1SKrzysztof Kozlowski            opp-1 {
116a7ee53e1SKrzysztof Kozlowski                opp-peak-kBps = <9216000>;
117a7ee53e1SKrzysztof Kozlowski            };
118a7ee53e1SKrzysztof Kozlowski            opp-2 {
119a7ee53e1SKrzysztof Kozlowski                opp-peak-kBps = <15052800>;
120a7ee53e1SKrzysztof Kozlowski            };
121a7ee53e1SKrzysztof Kozlowski            opp-3 {
122a7ee53e1SKrzysztof Kozlowski                opp-peak-kBps = <20889600>;
123a7ee53e1SKrzysztof Kozlowski            };
124a7ee53e1SKrzysztof Kozlowski            opp-4 {
125a7ee53e1SKrzysztof Kozlowski                opp-peak-kBps = <25497600>;
126a7ee53e1SKrzysztof Kozlowski            };
127a7ee53e1SKrzysztof Kozlowski        };
128a7ee53e1SKrzysztof Kozlowski    };
129