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