Merge tag 'mailbox-v6.4' of git://git.linaro.org/landing-teams/working/fujitsu/integr...
[platform/kernel/linux-rpi.git] / Documentation / devicetree / bindings / mailbox / qcom,apcs-kpss-global.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/mailbox/qcom,apcs-kpss-global.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm APCS global block
8
9 description:
10   This binding describes the APCS "global" block found in various Qualcomm
11   platforms.
12
13 maintainers:
14   - Jassi Brar <jassisinghbrar@gmail.com>
15
16 properties:
17   compatible:
18     oneOf:
19       - items:
20           - enum:
21               - qcom,ipq5332-apcs-apps-global
22               - qcom,ipq8074-apcs-apps-global
23               - qcom,ipq9574-apcs-apps-global
24           - const: qcom,ipq6018-apcs-apps-global
25       - items:
26           - enum:
27               - qcom,sc7180-apss-shared
28               - qcom,sc8180x-apss-shared
29               - qcom,sm8150-apss-shared
30           - const: qcom,sdm845-apss-shared
31       - items:
32           - enum:
33               - qcom,msm8916-apcs-kpss-global
34               - qcom,msm8939-apcs-kpss-global
35               - qcom,msm8953-apcs-kpss-global
36               - qcom,msm8976-apcs-kpss-global
37               - qcom,msm8994-apcs-kpss-global
38               - qcom,qcs404-apcs-apps-global
39               - qcom,sdx55-apcs-gcc
40           - const: syscon
41       - enum:
42           - qcom,ipq6018-apcs-apps-global
43           - qcom,ipq8074-apcs-apps-global
44           - qcom,msm8996-apcs-hmss-global
45           - qcom,msm8998-apcs-hmss-global
46           - qcom,qcm2290-apcs-hmss-global
47           - qcom,sdm660-apcs-hmss-global
48           - qcom,sdm845-apss-shared
49           - qcom,sm4250-apcs-hmss-global
50           - qcom,sm6115-apcs-hmss-global
51           - qcom,sm6125-apcs-hmss-global
52
53   reg:
54     maxItems: 1
55
56   clocks:
57     description: phandles to the parent clocks of the clock driver
58     minItems: 2
59     maxItems: 3
60
61   '#mbox-cells':
62     const: 1
63
64   '#clock-cells':
65     enum: [0, 1]
66
67   clock-names:
68     minItems: 2
69     maxItems: 3
70
71 required:
72   - compatible
73   - reg
74   - '#mbox-cells'
75
76 additionalProperties: false
77
78 allOf:
79   - if:
80       properties:
81         compatible:
82           enum:
83             - qcom,msm8916-apcs-kpss-global
84             - qcom,msm8939-apcs-kpss-global
85             - qcom,qcs404-apcs-apps-global
86     then:
87       properties:
88         clocks:
89           items:
90             - description: primary pll parent of the clock driver
91             - description: auxiliary parent
92         clock-names:
93           items:
94             - const: pll
95             - const: aux
96
97   - if:
98       properties:
99         compatible:
100           contains:
101             enum:
102               - qcom,sdx55-apcs-gcc
103     then:
104       properties:
105         clocks:
106           items:
107             - description: reference clock
108             - description: primary pll parent of the clock driver
109             - description: auxiliary parent
110         clock-names:
111           items:
112             - const: ref
113             - const: pll
114             - const: aux
115   - if:
116       properties:
117         compatible:
118           contains:
119             enum:
120               - qcom,ipq6018-apcs-apps-global
121     then:
122       properties:
123         clocks:
124           items:
125             - description: primary pll parent of the clock driver
126             - description: XO clock
127         clock-names:
128           items:
129             - const: pll
130             - const: xo
131
132   - if:
133       properties:
134         compatible:
135           enum:
136             - qcom,msm8953-apcs-kpss-global
137             - qcom,msm8976-apcs-kpss-global
138             - qcom,msm8994-apcs-kpss-global
139             - qcom,msm8996-apcs-hmss-global
140             - qcom,msm8998-apcs-hmss-global
141             - qcom,qcm2290-apcs-hmss-global
142             - qcom,sdm660-apcs-hmss-global
143             - qcom,sdm845-apss-shared
144             - qcom,sm4250-apcs-hmss-global
145             - qcom,sm6115-apcs-hmss-global
146             - qcom,sm6125-apcs-hmss-global
147     then:
148       properties:
149         clocks: false
150         clock-names: false
151
152   - if:
153       properties:
154         compatible:
155           contains:
156             enum:
157               - qcom,ipq6018-apcs-apps-global
158     then:
159       properties:
160         '#clock-cells':
161           const: 1
162     else:
163       properties:
164         '#clock-cells':
165           const: 0
166
167 examples:
168
169   # Example apcs with msm8996
170   - |
171     #include <dt-bindings/interrupt-controller/arm-gic.h>
172     apcs_glb: mailbox@9820000 {
173         compatible = "qcom,msm8996-apcs-hmss-global";
174         reg = <0x9820000 0x1000>;
175
176         #mbox-cells = <1>;
177         #clock-cells = <0>;
178     };
179
180     rpm-glink {
181         compatible = "qcom,glink-rpm";
182         interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
183         qcom,rpm-msg-ram = <&rpm_msg_ram>;
184         mboxes = <&apcs_glb 0>;
185     };
186
187   # Example apcs with qcs404
188   - |
189     #define GCC_APSS_AHB_CLK_SRC  1
190     #define GCC_GPLL0_AO_OUT_MAIN 123
191     apcs: mailbox@b011000 {
192         compatible = "qcom,qcs404-apcs-apps-global", "syscon";
193         reg = <0x0b011000 0x1000>;
194         #mbox-cells = <1>;
195         clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>;
196         clock-names = "pll", "aux";
197         #clock-cells = <0>;
198     };