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