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