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 bindings
8
9description:
10  This binding describes the APCS "global" block found in various Qualcomm
11  platforms.
12
13maintainers:
14  - Sivaprakash Murugesan <sivaprak@codeaurora.org>
15
16properties:
17  compatible:
18    enum:
19      - qcom,ipq6018-apcs-apps-global
20      - qcom,ipq8074-apcs-apps-global
21      - qcom,msm8916-apcs-kpss-global
22      - qcom,msm8939-apcs-kpss-global
23      - qcom,msm8994-apcs-kpss-global
24      - qcom,msm8996-apcs-hmss-global
25      - qcom,msm8998-apcs-hmss-global
26      - qcom,qcs404-apcs-apps-global
27      - qcom,sc7180-apss-shared
28      - qcom,sc8180x-apss-shared
29      - qcom,sdm660-apcs-hmss-global
30      - qcom,sdm845-apss-shared
31      - qcom,sm6125-apcs-hmss-global
32      - qcom,sm8150-apss-shared
33
34  reg:
35    maxItems: 1
36
37  clocks:
38    description: phandles to the parent clocks of the clock driver
39    minItems: 2
40    items:
41      - description: primary pll parent of the clock driver
42      - description: auxiliary parent
43      - description: reference clock
44
45  '#mbox-cells':
46    const: 1
47
48  '#clock-cells':
49    const: 0
50
51  clock-names:
52    minItems: 2
53    items:
54      - const: pll
55      - const: aux
56      - const: ref
57
58required:
59  - compatible
60  - reg
61  - '#mbox-cells'
62
63additionalProperties: false
64
65allOf:
66  - if:
67      properties:
68        compatible:
69          enum:
70            - qcom,ipq6018-apcs-apps-global
71            - qcom,ipq8074-apcs-apps-global
72            - qcom,msm8916-apcs-kpss-global
73            - qcom,msm8994-apcs-kpss-global
74            - qcom,msm8996-apcs-hmss-global
75            - qcom,msm8998-apcs-hmss-global
76            - qcom,qcs404-apcs-apps-global
77            - qcom,sc7180-apss-shared
78            - qcom,sdm660-apcs-hmss-global
79            - qcom,sdm845-apss-shared
80            - qcom,sm6125-apcs-hmss-global
81            - qcom,sm8150-apss-shared
82    then:
83      properties:
84        clocks:
85          maxItems: 2
86  - if:
87      properties:
88        compatible:
89          enum:
90            - qcom,sdx55-apcs-gcc
91    then:
92      properties:
93        clocks:
94          maxItems: 3
95examples:
96
97  # Example apcs with msm8996
98  - |
99    #include <dt-bindings/interrupt-controller/arm-gic.h>
100    apcs_glb: mailbox@9820000 {
101        compatible = "qcom,msm8996-apcs-hmss-global";
102        reg = <0x9820000 0x1000>;
103
104        #mbox-cells = <1>;
105    };
106
107    rpm-glink {
108        compatible = "qcom,glink-rpm";
109        interrupts = <GIC_SPI 168 IRQ_TYPE_EDGE_RISING>;
110        qcom,rpm-msg-ram = <&rpm_msg_ram>;
111        mboxes = <&apcs_glb 0>;
112        mbox-names = "rpm_hlos";
113    };
114
115  # Example apcs with qcs404
116  - |
117    #define GCC_APSS_AHB_CLK_SRC  1
118    #define GCC_GPLL0_AO_OUT_MAIN 123
119    apcs: mailbox@b011000 {
120        compatible = "qcom,qcs404-apcs-apps-global";
121        reg = <0x0b011000 0x1000>;
122        #mbox-cells = <1>;
123        clocks = <&apcs_hfpll>, <&gcc GCC_GPLL0_AO_OUT_MAIN>;
124        clock-names = "pll", "aux";
125        #clock-cells = <0>;
126    };
127