1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/remoteproc/qcom,msm8996-mss-pil.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm MSM8996 MSS Peripheral Image Loader (and similar)
8
9maintainers:
10  - Bjorn Andersson <andersson@kernel.org>
11  - Sibi Sankar <quic_sibis@quicinc.com>
12
13description:
14  MSS Peripheral Image Loader loads and boots firmware on the
15  Qualcomm Technology Inc. MSM8996 Modem Hexagon Core (and similar).
16
17properties:
18  compatible:
19    enum:
20      - qcom,msm8996-mss-pil
21      - qcom,msm8998-mss-pil
22      - qcom,sdm845-mss-pil
23
24  reg:
25    items:
26      - description: MSS QDSP6 registers
27      - description: RMB registers
28
29  reg-names:
30    items:
31      - const: qdsp6
32      - const: rmb
33
34  iommus:
35    items:
36      - description: MSA Stream 1
37      - description: MSA Stream 2
38
39  interrupts:
40    items:
41      - description: Watchdog interrupt
42      - description: Fatal interrupt
43      - description: Ready interrupt
44      - description: Handover interrupt
45      - description: Stop acknowledge interrupt
46      - description: Shutdown acknowledge interrupt
47
48  interrupt-names:
49    items:
50      - const: wdog
51      - const: fatal
52      - const: ready
53      - const: handover
54      - const: stop-ack
55      - const: shutdown-ack
56
57  clocks:
58    minItems: 8
59    maxItems: 9
60
61  clock-names:
62    minItems: 8
63    maxItems: 9
64
65  power-domains:
66    items:
67      - description: CX power domain
68      - description: MX power domain
69      - description: MSS power domain (only valid for qcom,sdm845-mss-pil)
70    minItems: 2
71
72  power-domain-names:
73    items:
74      - const: cx
75      - const: mx
76      - const: mss # only valid for qcom,sdm845-mss-pil
77    minItems: 2
78
79  pll-supply:
80    description: PLL supply
81
82  resets:
83    items:
84      - description: AOSS restart
85      - description: PDC reset (only valid for qcom,sdm845-mss-pil)
86    minItems: 1
87
88  reset-names:
89    items:
90      - const: mss_restart
91      - const: pdc_reset # only valid for qcom,sdm845-mss-pil
92    minItems: 1
93
94  qcom,qmp:
95    $ref: /schemas/types.yaml#/definitions/phandle
96    description: Reference to the AOSS side-channel message RAM.
97
98  qcom,smem-states:
99    $ref: /schemas/types.yaml#/definitions/phandle-array
100    description: States used by the AP to signal the Hexagon core
101    items:
102      - description: Stop modem
103
104  qcom,smem-state-names:
105    description: Names of the states used by the AP to signal the Hexagon core
106    items:
107      - const: stop
108
109  qcom,halt-regs:
110    $ref: /schemas/types.yaml#/definitions/phandle-array
111    description:
112      Halt registers are used to halt transactions of various sub-components
113      within MSS.
114    items:
115      - items:
116          - description: phandle to TCSR syscon region
117          - description: offset to the Q6 halt register
118          - description: offset to the modem halt register
119          - description: offset to the nc halt register
120
121  memory-region:
122    items:
123      - description: MBA reserved region
124      - description: Modem reserved region
125      - description: Metadata reserved region
126
127  firmware-name:
128    $ref: /schemas/types.yaml#/definitions/string-array
129    items:
130      - description: Name of MBA firmware
131      - description: Name of modem firmware
132
133  smd-edge:
134    $ref: /schemas/remoteproc/qcom,smd-edge.yaml#
135    description:
136      Qualcomm Shared Memory subnode which represents communication edge,
137      channels and devices related to the Modem.
138    unevaluatedProperties: false
139
140  glink-edge:
141    $ref: /schemas/remoteproc/qcom,glink-edge.yaml#
142    description:
143      Qualcomm G-Link subnode which represents communication edge, channels
144      and devices related to the Modem.
145    unevaluatedProperties: false
146
147  # Deprecated properties
148  mba:
149    type: object
150    description:
151      MBA reserved region
152
153    properties:
154      memory-region: true
155
156    required:
157      - memory-region
158
159    additionalProperties: false
160    deprecated: true
161
162  mpss:
163    type: object
164    description:
165      MPSS reserved region
166
167    properties:
168      memory-region: true
169
170    required:
171      - memory-region
172
173    additionalProperties: false
174    deprecated: true
175
176  metadata:
177    type: object
178    description:
179      Metadata reserved region
180
181    properties:
182      memory-region: true
183
184    required:
185      - memory-region
186
187    additionalProperties: false
188    deprecated: true
189
190required:
191  - compatible
192  - reg
193  - reg-names
194  - interrupts
195  - interrupt-names
196  - clocks
197  - clock-names
198  - power-domains
199  - power-domain-names
200  - resets
201  - reset-names
202  - qcom,halt-regs
203  - qcom,smem-states
204  - qcom,smem-state-names
205
206allOf:
207  - if:
208      properties:
209        compatible:
210          const: qcom,msm8996-mss-pil
211    then:
212      properties:
213        clocks:
214          items:
215            - description: GCC MSS IFACE clock
216            - description: GCC MSS BUS clock
217            - description: GCC MSS MEM clock
218            - description: RPMH XO clock
219            - description: GCC MSS GPLL0 clock
220            - description: GCC MSS SNOC_AXI clock
221            - description: GCC MSS MNOC_AXI clock
222            - description: RPMH PNOC clock
223            - description: GCC MSS PRNG clock
224            - description: RPMH QDSS clock
225        clock-names:
226          items:
227            - const: iface
228            - const: bus
229            - const: mem
230            - const: xo
231            - const: gpll0_mss
232            - const: snoc_axi
233            - const: mnoc_axi
234            - const: pnoc
235            - const: qdss
236        glink-edge: false
237      required:
238        - pll-supply
239        - smd-edge
240    else:
241      properties:
242        pll-supply: false
243        smd-edge: false
244
245  - if:
246      properties:
247        compatible:
248          const: qcom,msm8998-mss-pil
249    then:
250      properties:
251        clocks:
252          items:
253            - description: GCC MSS IFACE clock
254            - description: GCC MSS BUS clock
255            - description: GCC MSS MEM clock
256            - description: GCC MSS GPLL0 clock
257            - description: GCC MSS SNOC_AXI clock
258            - description: GCC MSS MNOC_AXI clock
259            - description: RPMH QDSS clock
260            - description: RPMH XO clock
261        clock-names:
262          items:
263            - const: iface
264            - const: bus
265            - const: mem
266            - const: gpll0_mss
267            - const: snoc_axi
268            - const: mnoc_axi
269            - const: qdss
270            - const: xo
271      required:
272        - glink-edge
273
274  - if:
275      properties:
276        compatible:
277          const: qcom,sdm845-mss-pil
278    then:
279      properties:
280        power-domains:
281          minItems: 3
282        power-domain-names:
283          minItems: 3
284        resets:
285          minItems: 2
286        reset-names:
287          minItems: 2
288        clocks:
289          items:
290            - description: GCC MSS IFACE clock
291            - description: GCC MSS BUS clock
292            - description: GCC MSS MEM clock
293            - description: GCC MSS GPLL0 clock
294            - description: GCC MSS SNOC_AXI clock
295            - description: GCC MSS MNOC_AXI clock
296            - description: GCC MSS PRNG clock
297            - description: RPMH XO clock
298        clock-names:
299          items:
300            - const: iface
301            - const: bus
302            - const: mem
303            - const: gpll0_mss
304            - const: snoc_axi
305            - const: mnoc_axi
306            - const: prng
307            - const: xo
308      required:
309        - qcom,qmp
310        - glink-edge
311    else:
312      properties:
313        iommus: false
314        power-domains:
315          maxItems: 2
316        power-domain-names:
317          maxItems: 2
318        resets:
319          maxItems: 1
320        reset-names:
321          maxItems: 1
322        qcom,qmp: false
323
324  # Fallbacks for deprecated properties
325  - oneOf:
326      - required:
327          - memory-region
328      - required:
329          - mba
330          - mpss
331          - metadata
332
333additionalProperties: false
334
335examples:
336  - |
337    #include <dt-bindings/clock/qcom,gcc-sdm845.h>
338    #include <dt-bindings/clock/qcom,rpmh.h>
339    #include <dt-bindings/interrupt-controller/arm-gic.h>
340    #include <dt-bindings/power/qcom-rpmpd.h>
341    #include <dt-bindings/reset/qcom,sdm845-aoss.h>
342    #include <dt-bindings/reset/qcom,sdm845-pdc.h>
343
344    remoteproc@4080000 {
345        compatible = "qcom,sdm845-mss-pil";
346        reg = <0x04080000 0x408>, <0x04180000 0x48>;
347        reg-names = "qdsp6", "rmb";
348
349        interrupts-extended = <&intc GIC_SPI 266 IRQ_TYPE_EDGE_RISING>,
350                              <&modem_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
351                              <&modem_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
352                              <&modem_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
353                              <&modem_smp2p_in 3 IRQ_TYPE_EDGE_RISING>,
354                              <&modem_smp2p_in 7 IRQ_TYPE_EDGE_RISING>;
355        interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack",
356                          "shutdown-ack";
357
358        clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
359                 <&gcc GCC_MSS_Q6_MEMNOC_AXI_CLK>,
360                 <&gcc GCC_BOOT_ROM_AHB_CLK>,
361                 <&gcc GCC_MSS_GPLL0_DIV_CLK_SRC>,
362                 <&gcc GCC_MSS_SNOC_AXI_CLK>,
363                 <&gcc GCC_MSS_MFAB_AXIS_CLK>,
364                 <&gcc GCC_PRNG_AHB_CLK>,
365                 <&rpmhcc RPMH_CXO_CLK>;
366        clock-names = "iface", "bus", "mem", "gpll0_mss",
367                      "snoc_axi", "mnoc_axi", "prng", "xo";
368
369        power-domains = <&rpmhpd SDM845_CX>,
370                        <&rpmhpd SDM845_MX>,
371                        <&rpmhpd SDM845_MSS>;
372        power-domain-names = "cx", "mx", "mss";
373
374        memory-region = <&mba_mem>, <&mpss_mem>, <&mdata_mem>;
375
376        resets = <&aoss_reset AOSS_CC_MSS_RESTART>,
377                 <&pdc_reset PDC_MODEM_SYNC_RESET>;
378        reset-names = "mss_restart", "pdc_reset";
379
380        qcom,halt-regs = <&tcsr_regs_1 0x3000 0x5000 0x4000>;
381
382        qcom,qmp = <&aoss_qmp>;
383
384        qcom,smem-states = <&modem_smp2p_out 0>;
385        qcom,smem-state-names = "stop";
386
387        glink-edge {
388            interrupts = <GIC_SPI 449 IRQ_TYPE_EDGE_RISING>;
389            label = "modem";
390            qcom,remote-pid = <1>;
391            mboxes = <&apss_shared 12>;
392        };
393    };
394