xref: /freebsd/sys/contrib/device-tree/Bindings/firmware/qcom,scm.yaml (revision 8d13bc63c0e1d50bc9e47ac1f26329c999bfecf0)
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-ipq5018
28          - qcom,scm-ipq5332
29          - qcom,scm-ipq6018
30          - qcom,scm-ipq806x
31          - qcom,scm-ipq8074
32          - qcom,scm-ipq9574
33          - qcom,scm-mdm9607
34          - qcom,scm-msm8226
35          - qcom,scm-msm8660
36          - qcom,scm-msm8916
37          - qcom,scm-msm8953
38          - qcom,scm-msm8960
39          - qcom,scm-msm8974
40          - qcom,scm-msm8976
41          - qcom,scm-msm8994
42          - qcom,scm-msm8996
43          - qcom,scm-msm8998
44          - qcom,scm-qcm2290
45          - qcom,scm-qdu1000
46          - qcom,scm-sa8775p
47          - qcom,scm-sc7180
48          - qcom,scm-sc7280
49          - qcom,scm-sc8180x
50          - qcom,scm-sc8280xp
51          - qcom,scm-sdm670
52          - qcom,scm-sdm845
53          - qcom,scm-sdx55
54          - qcom,scm-sdx65
55          - qcom,scm-sdx75
56          - qcom,scm-sm6115
57          - qcom,scm-sm6125
58          - qcom,scm-sm6350
59          - qcom,scm-sm6375
60          - qcom,scm-sm7150
61          - qcom,scm-sm8150
62          - qcom,scm-sm8250
63          - qcom,scm-sm8350
64          - qcom,scm-sm8450
65          - qcom,scm-sm8550
66          - qcom,scm-sm8650
67          - qcom,scm-qcs404
68          - qcom,scm-x1e80100
69      - const: qcom,scm
70
71  clocks:
72    minItems: 1
73    maxItems: 3
74
75  clock-names:
76    minItems: 1
77    maxItems: 3
78
79  dma-coherent: true
80
81  interconnects:
82    maxItems: 1
83
84  interconnect-names:
85    maxItems: 1
86
87  '#reset-cells':
88    const: 1
89
90  interrupts:
91    description:
92      The wait-queue interrupt that firmware raises as part of handshake
93      protocol to handle sleeping SCM calls.
94    maxItems: 1
95
96  qcom,sdi-enabled:
97    description:
98      Indicates that the SDI (Secure Debug Image) has been enabled by TZ
99      by default and it needs to be disabled.
100      If not disabled WDT assertion or reboot will cause the board to hang
101      in the debug mode.
102    type: boolean
103
104  qcom,dload-mode:
105    $ref: /schemas/types.yaml#/definitions/phandle-array
106    items:
107      - items:
108          - description: phandle to TCSR hardware block
109          - description: offset of the download mode control register
110    description: TCSR hardware block
111
112allOf:
113  # Clocks
114  - if:
115      properties:
116        compatible:
117          contains:
118            enum:
119              - qcom,scm-apq8064
120              - qcom,scm-apq8084
121              - qcom,scm-mdm9607
122              - qcom,scm-msm8226
123              - qcom,scm-msm8660
124              - qcom,scm-msm8916
125              - qcom,scm-msm8953
126              - qcom,scm-msm8960
127              - qcom,scm-msm8974
128              - qcom,scm-msm8976
129              - qcom,scm-qcm2290
130              - qcom,scm-sm6375
131    then:
132      required:
133        - clocks
134        - clock-names
135    else:
136      properties:
137        clock-names: false
138        clocks: false
139
140  - if:
141      properties:
142        compatible:
143          contains:
144            enum:
145              - qcom,scm-apq8064
146              - qcom,scm-msm8660
147              - qcom,scm-msm8960
148              - qcom,scm-qcm2290
149              - qcom,scm-sm6375
150    then:
151      properties:
152        clock-names:
153          items:
154            - const: core
155
156        clocks:
157          maxItems: 1
158
159  - if:
160      properties:
161        compatible:
162          contains:
163            enum:
164              - qcom,scm-apq8084
165              - qcom,scm-mdm9607
166              - qcom,scm-msm8226
167              - qcom,scm-msm8916
168              - qcom,scm-msm8953
169              - qcom,scm-msm8974
170              - qcom,scm-msm8976
171    then:
172      properties:
173        clock-names:
174          items:
175            - const: core
176            - const: bus
177            - const: iface
178
179        clocks:
180          minItems: 3
181          maxItems: 3
182
183  # Interrupts
184  - if:
185      not:
186        properties:
187          compatible:
188            contains:
189              enum:
190                - qcom,scm-sm8450
191                - qcom,scm-sm8550
192                - qcom,scm-sm8650
193    then:
194      properties:
195        interrupts: false
196
197required:
198  - compatible
199
200additionalProperties: false
201
202examples:
203  - |
204    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
205
206    firmware {
207        scm {
208            compatible = "qcom,scm-msm8916", "qcom,scm";
209            clocks = <&gcc GCC_CRYPTO_CLK>,
210                     <&gcc GCC_CRYPTO_AXI_CLK>,
211                     <&gcc GCC_CRYPTO_AHB_CLK>;
212            clock-names = "core", "bus", "iface";
213        };
214    };
215