xref: /linux/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml (revision 2eff01ee2881becc9daaa0d53477ec202136b1f4)
1# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/interconnect/qcom,msm8998-bwmon.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm Interconnect Bandwidth Monitor
8
9maintainers:
10  - Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
11
12description: |
13  Bandwidth Monitor measures current throughput on buses between various NoC
14  fabrics and provides information when it crosses configured thresholds.
15
16  Certain SoCs might have more than one Bandwidth Monitors, for example on SDM845::
17   - Measuring the bandwidth between CPUs and Last Level Cache Controller -
18     called just BWMON,
19   - Measuring the bandwidth between Last Level Cache Controller and memory
20     (DDR) - called LLCC BWMON.
21
22properties:
23  compatible:
24    oneOf:
25      - const: qcom,msm8998-bwmon       # BWMON v4
26      - items:
27          - enum:
28              - qcom,qcm2290-cpu-bwmon
29              - qcom,qcs8300-cpu-bwmon
30              - qcom,sa8775p-cpu-bwmon
31              - qcom,sc7180-cpu-bwmon
32              - qcom,sc7280-cpu-bwmon
33              - qcom,sc8280xp-cpu-bwmon
34              - qcom,sdm845-cpu-bwmon
35              - qcom,sm6115-cpu-bwmon
36              - qcom,sm6350-llcc-bwmon
37              - qcom,sm8250-cpu-bwmon
38              - qcom,sm8550-cpu-bwmon
39              - qcom,sm8650-cpu-bwmon
40              - qcom,x1e80100-cpu-bwmon
41          - const: qcom,sdm845-bwmon    # BWMON v4, unified register space
42      - items:
43          - enum:
44              - qcom,qcs8300-llcc-bwmon
45              - qcom,sa8775p-llcc-bwmon
46              - qcom,sc7180-llcc-bwmon
47              - qcom,sc8280xp-llcc-bwmon
48              - qcom,sm6350-cpu-bwmon
49              - qcom,sm8250-llcc-bwmon
50              - qcom,sm8550-llcc-bwmon
51              - qcom,sm8650-llcc-bwmon
52              - qcom,x1e80100-llcc-bwmon
53          - const: qcom,sc7280-llcc-bwmon
54      - const: qcom,sc7280-llcc-bwmon   # BWMON v5
55      - const: qcom,sdm845-llcc-bwmon   # BWMON v5
56
57  interconnects:
58    maxItems: 1
59
60  interrupts:
61    maxItems: 1
62
63  operating-points-v2: true
64  opp-table:
65    type: object
66
67  reg:
68    # BWMON v5 uses one register address space, v1-v4 use one or two.
69    minItems: 1
70    maxItems: 2
71
72  reg-names:
73    minItems: 1
74    maxItems: 2
75
76required:
77  - compatible
78  - interconnects
79  - interrupts
80  - operating-points-v2
81  - reg
82
83additionalProperties: false
84
85allOf:
86  - if:
87      properties:
88        compatible:
89          const: qcom,msm8998-bwmon
90    then:
91      properties:
92        reg:
93          minItems: 2
94
95        reg-names:
96          items:
97            - const: monitor
98            - const: global
99
100    else:
101      properties:
102        reg:
103          maxItems: 1
104
105        reg-names:
106          maxItems: 1
107
108examples:
109  - |
110    #include <dt-bindings/interconnect/qcom,sdm845.h>
111    #include <dt-bindings/interrupt-controller/arm-gic.h>
112
113    pmu@1436400 {
114        compatible = "qcom,sdm845-cpu-bwmon", "qcom,sdm845-bwmon";
115        reg = <0x01436400 0x600>;
116        interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
117        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_LLCC 3>;
118
119        operating-points-v2 = <&cpu_bwmon_opp_table>;
120
121        cpu_bwmon_opp_table: opp-table {
122            compatible = "operating-points-v2";
123            opp-0 {
124                opp-peak-kBps = <4800000>;
125            };
126            opp-1 {
127                opp-peak-kBps = <9216000>;
128            };
129            opp-2 {
130                opp-peak-kBps = <15052800>;
131            };
132            opp-3 {
133                opp-peak-kBps = <20889600>;
134            };
135            opp-4 {
136                opp-peak-kBps = <25497600>;
137            };
138        };
139    };
140