1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/firmware/qcom,scm.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: QCOM Secure Channel Manager (SCM)
8
9description: |
10  Qualcomm processors include an interface to communicate to the secure firmware.
11  This interface allows for clients to request different types of actions.
12  These can include CPU power up/down, HDCP requests, loading of firmware,
13  and other assorted actions.
14
15maintainers:
16  - Bjorn Andersson <bjorn.andersson@linaro.org>
17  - Robert Marko <robimarko@gmail.com>
18  - Guru Das Srinagesh <quic_gurus@quicinc.com>
19
20properties:
21  compatible:
22    items:
23      - enum:
24          - qcom,scm-apq8064
25          - qcom,scm-apq8084
26          - qcom,scm-ipq4019
27          - qcom,scm-ipq5332
28          - qcom,scm-ipq6018
29          - qcom,scm-ipq806x
30          - qcom,scm-ipq8074
31          - qcom,scm-ipq9574
32          - qcom,scm-mdm9607
33          - qcom,scm-msm8226
34          - qcom,scm-msm8660
35          - qcom,scm-msm8916
36          - qcom,scm-msm8953
37          - qcom,scm-msm8960
38          - qcom,scm-msm8974
39          - qcom,scm-msm8976
40          - qcom,scm-msm8994
41          - qcom,scm-msm8996
42          - qcom,scm-msm8998
43          - qcom,scm-qcm2290
44          - qcom,scm-qdu1000
45          - qcom,scm-sa8775p
46          - qcom,scm-sc7180
47          - qcom,scm-sc7280
48          - qcom,scm-sc8180x
49          - qcom,scm-sc8280xp
50          - qcom,scm-sdm670
51          - qcom,scm-sdm845
52          - qcom,scm-sdx55
53          - qcom,scm-sdx65
54          - qcom,scm-sdx75
55          - qcom,scm-sm6115
56          - qcom,scm-sm6125
57          - qcom,scm-sm6350
58          - qcom,scm-sm6375
59          - qcom,scm-sm8150
60          - qcom,scm-sm8250
61          - qcom,scm-sm8350
62          - qcom,scm-sm8450
63          - qcom,scm-sm8550
64          - qcom,scm-qcs404
65      - const: qcom,scm
66
67  clocks:
68    minItems: 1
69    maxItems: 3
70
71  clock-names:
72    minItems: 1
73    maxItems: 3
74
75  dma-coherent: true
76
77  interconnects:
78    maxItems: 1
79
80  interconnect-names:
81    maxItems: 1
82
83  '#reset-cells':
84    const: 1
85
86  interrupts:
87    description:
88      The wait-queue interrupt that firmware raises as part of handshake
89      protocol to handle sleeping SCM calls.
90    maxItems: 1
91
92  qcom,dload-mode:
93    $ref: /schemas/types.yaml#/definitions/phandle-array
94    items:
95      - items:
96          - description: phandle to TCSR hardware block
97          - description: offset of the download mode control register
98    description: TCSR hardware block
99
100allOf:
101  # Clocks
102  - if:
103      properties:
104        compatible:
105          contains:
106            enum:
107              - qcom,scm-apq8064
108              - qcom,scm-apq8084
109              - qcom,scm-mdm9607
110              - qcom,scm-msm8226
111              - qcom,scm-msm8660
112              - qcom,scm-msm8916
113              - qcom,scm-msm8953
114              - qcom,scm-msm8960
115              - qcom,scm-msm8974
116              - qcom,scm-msm8976
117              - qcom,scm-qcm2290
118              - qcom,scm-sm6375
119    then:
120      required:
121        - clocks
122        - clock-names
123    else:
124      properties:
125        clock-names: false
126        clocks: false
127
128  - if:
129      properties:
130        compatible:
131          contains:
132            enum:
133              - qcom,scm-apq8064
134              - qcom,scm-msm8660
135              - qcom,scm-msm8960
136              - qcom,scm-qcm2290
137              - qcom,scm-sm6375
138    then:
139      properties:
140        clock-names:
141          items:
142            - const: core
143
144        clocks:
145          maxItems: 1
146
147  - if:
148      properties:
149        compatible:
150          contains:
151            enum:
152              - qcom,scm-apq8084
153              - qcom,scm-mdm9607
154              - qcom,scm-msm8226
155              - qcom,scm-msm8916
156              - qcom,scm-msm8953
157              - qcom,scm-msm8974
158              - qcom,scm-msm8976
159    then:
160      properties:
161        clock-names:
162          items:
163            - const: core
164            - const: bus
165            - const: iface
166
167        clocks:
168          minItems: 3
169          maxItems: 3
170
171  # Interconnects
172  - if:
173      not:
174        properties:
175          compatible:
176            contains:
177              enum:
178                - qcom,scm-qdu1000
179                - qcom,scm-sc8280xp
180                - qcom,scm-sm8450
181                - qcom,scm-sm8550
182    then:
183      properties:
184        interconnects: false
185
186  # Interrupts
187  - if:
188      not:
189        properties:
190          compatible:
191            contains:
192              enum:
193                - qcom,scm-sm8450
194                - qcom,scm-sm8550
195    then:
196      properties:
197        interrupts: false
198
199required:
200  - compatible
201
202additionalProperties: false
203
204examples:
205  - |
206    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
207
208    firmware {
209        scm {
210            compatible = "qcom,scm-msm8916", "qcom,scm";
211            clocks = <&gcc GCC_CRYPTO_CLK>,
212                     <&gcc GCC_CRYPTO_AXI_CLK>,
213                     <&gcc GCC_CRYPTO_AHB_CLK>;
214            clock-names = "core", "bus", "iface";
215        };
216    };
217