xref: /linux/Documentation/devicetree/bindings/interconnect/qcom,msm8998-bwmon.yaml (revision d30c1683aaecb93d2ab95685dc4300a33d3cea7a)
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 <krzk@kernel.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,kaanapali-cpu-bwmon
29              - qcom,qcm2290-cpu-bwmon
30              - qcom,qcs615-cpu-bwmon
31              - qcom,qcs8300-cpu-bwmon
32              - qcom,sa8775p-cpu-bwmon
33              - qcom,sc7180-cpu-bwmon
34              - qcom,sc7280-cpu-bwmon
35              - qcom,sc8280xp-cpu-bwmon
36              - qcom,sdm845-cpu-bwmon
37              - qcom,sm6115-cpu-bwmon
38              - qcom,sm6350-llcc-bwmon
39              - qcom,sm8250-cpu-bwmon
40              - qcom,sm8550-cpu-bwmon
41              - qcom,sm8650-cpu-bwmon
42              - qcom,sm8750-cpu-bwmon
43              - qcom,x1e80100-cpu-bwmon
44          - const: qcom,sdm845-bwmon    # BWMON v4, unified register space
45      - items:
46          - enum:
47              - qcom,qcs615-llcc-bwmon
48              - qcom,qcs8300-llcc-bwmon
49              - qcom,sa8775p-llcc-bwmon
50              - qcom,sc7180-llcc-bwmon
51              - qcom,sc8280xp-llcc-bwmon
52              - qcom,sm6350-cpu-bwmon
53              - qcom,sm8250-llcc-bwmon
54              - qcom,sm8550-llcc-bwmon
55              - qcom,sm8650-llcc-bwmon
56              - qcom,x1e80100-llcc-bwmon
57          - const: qcom,sc7280-llcc-bwmon
58      - const: qcom,sc7280-llcc-bwmon   # BWMON v5
59      - const: qcom,sdm845-llcc-bwmon   # BWMON v5
60
61  interconnects:
62    maxItems: 1
63
64  interrupts:
65    maxItems: 1
66
67  operating-points-v2: true
68  opp-table:
69    type: object
70
71  reg:
72    # BWMON v5 uses one register address space, v1-v4 use one or two.
73    minItems: 1
74    maxItems: 2
75
76  reg-names:
77    minItems: 1
78    maxItems: 2
79
80  nonposted-mmio: true
81
82required:
83  - compatible
84  - interconnects
85  - interrupts
86  - operating-points-v2
87  - reg
88
89additionalProperties: false
90
91allOf:
92  - if:
93      properties:
94        compatible:
95          const: qcom,msm8998-bwmon
96    then:
97      properties:
98        reg:
99          minItems: 2
100
101        reg-names:
102          items:
103            - const: monitor
104            - const: global
105
106    else:
107      properties:
108        reg:
109          maxItems: 1
110
111        reg-names:
112          maxItems: 1
113
114examples:
115  - |
116    #include <dt-bindings/interconnect/qcom,sdm845.h>
117    #include <dt-bindings/interrupt-controller/arm-gic.h>
118
119    pmu@1436400 {
120        compatible = "qcom,sdm845-cpu-bwmon", "qcom,sdm845-bwmon";
121        reg = <0x01436400 0x600>;
122        interrupts = <GIC_SPI 581 IRQ_TYPE_LEVEL_HIGH>;
123        interconnects = <&gladiator_noc MASTER_APPSS_PROC 3 &mem_noc SLAVE_LLCC 3>;
124
125        operating-points-v2 = <&cpu_bwmon_opp_table>;
126
127        cpu_bwmon_opp_table: opp-table {
128            compatible = "operating-points-v2";
129            opp-0 {
130                opp-peak-kBps = <4800000>;
131            };
132            opp-1 {
133                opp-peak-kBps = <9216000>;
134            };
135            opp-2 {
136                opp-peak-kBps = <15052800>;
137            };
138            opp-3 {
139                opp-peak-kBps = <20889600>;
140            };
141            opp-4 {
142                opp-peak-kBps = <25497600>;
143            };
144        };
145    };
146