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