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,msm8916-mss-pil.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm MSM8916 MSS Peripheral Image Loader (and similar)
8
9maintainers:
10  - Stephan Gerhold <stephan@gerhold.net>
11
12description:
13  This document describes the hardware for a component that loads and boots
14  firmware on the Qualcomm MSM8916 Modem Hexagon Core (and similar).
15
16properties:
17  compatible:
18    oneOf:
19      - enum:
20          - qcom,msm8909-mss-pil
21          - qcom,msm8916-mss-pil
22          - qcom,msm8953-mss-pil
23          - qcom,msm8974-mss-pil
24
25      - const: qcom,q6v5-pil
26        description: Deprecated, prefer using qcom,msm8916-mss-pil
27        deprecated: true
28
29  reg:
30    items:
31      - description: MSS QDSP6 registers
32      - description: RMB registers
33
34  reg-names:
35    items:
36      - const: qdsp6
37      - const: rmb
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
47  interrupt-names:
48    items:
49      - const: wdog
50      - const: fatal
51      - const: ready
52      - const: handover
53      - const: stop-ack
54
55  clocks:
56    items:
57      - description: Configuration interface (AXI) clock
58      - description: Configuration bus (AHB) clock
59      - description: Boot ROM (AHB) clock
60      - description: XO proxy clock (control handed over after startup)
61
62  clock-names:
63    items:
64      - const: iface
65      - const: bus
66      - const: mem
67      - const: xo
68
69  power-domains:
70    items:
71      - description: CX proxy power domain (control handed over after startup)
72      - description: MX proxy power domain (control handed over after startup)
73      - description: MSS proxy power domain (control handed over after startup)
74                     (only valid for qcom,msm8953-mss-pil)
75    minItems: 2
76
77  power-domain-names:
78    items:
79      - const: cx
80      - const: mx
81      - const: mss # only valid for qcom,msm8953-mss-pil
82    minItems: 2
83
84  pll-supply:
85    description: PLL proxy supply (control handed over after startup)
86
87  mss-supply:
88    description: MSS power domain supply (only valid for qcom,msm8974-mss-pil)
89
90  resets:
91    items:
92      - description: MSS restart control
93
94  reset-names:
95    items:
96      - const: mss_restart
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: MPSS reserved region
125
126  firmware-name:
127    $ref: /schemas/types.yaml#/definitions/string-array
128    items:
129      - description: Name of MBA firmware
130      - description: Name of modem firmware
131
132  bam-dmux:
133    $ref: /schemas/net/qcom,bam-dmux.yaml#
134    description:
135      Qualcomm BAM Data Multiplexer (provides network interface to the modem)
136
137  smd-edge:
138    $ref: qcom,smd-edge.yaml#
139    description:
140      Qualcomm SMD subnode which represents communication edge, channels
141      and devices related to the DSP.
142    properties:
143      label:
144        enum:
145          - modem
146          - hexagon
147    unevaluatedProperties: false
148
149  # Deprecated properties
150  cx-supply:
151    description: CX power domain regulator supply (prefer using power-domains)
152    deprecated: true
153
154  mx-supply:
155    description: MX power domain regulator supply (prefer using power-domains)
156    deprecated: true
157
158  mba:
159    type: object
160    description:
161      MBA reserved region (prefer using memory-region with two items)
162    properties:
163      memory-region: true
164    required:
165      - memory-region
166    deprecated: true
167
168  mpss:
169    type: object
170    description:
171      MPSS reserved region (prefer using memory-region with two items)
172    properties:
173      memory-region: true
174    required:
175      - memory-region
176    deprecated: true
177
178required:
179  - compatible
180  - reg
181  - reg-names
182  - interrupts
183  - interrupt-names
184  - clocks
185  - clock-names
186  - pll-supply
187  - resets
188  - reset-names
189  - qcom,halt-regs
190  - qcom,smem-states
191  - qcom,smem-state-names
192  - smd-edge
193
194allOf:
195  - if:
196      properties:
197        compatible:
198          const: qcom,msm8953-mss-pil
199    then:
200      properties:
201        power-domains:
202          minItems: 3
203        power-domain-names:
204          minItems: 3
205      required:
206        - power-domains
207        - power-domain-names
208    else:
209      properties:
210        power-domains:
211          maxItems: 2
212        power-domain-names:
213          maxItems: 2
214
215  - if:
216      properties:
217        compatible:
218          const: qcom,msm8974-mss-pil
219    then:
220      required:
221        - mss-supply
222    else:
223      properties:
224        mss-supply: false
225
226  # Fallbacks for deprecated properties
227  - oneOf:
228      - required:
229          - memory-region
230      - required:
231          - mba
232          - mpss
233  - oneOf:
234      - required:
235          - power-domains
236          - power-domain-names
237      - required:
238          - cx-supply
239          - mx-supply
240
241additionalProperties: false
242
243examples:
244  - |
245    #include <dt-bindings/clock/qcom,gcc-msm8916.h>
246    #include <dt-bindings/interrupt-controller/arm-gic.h>
247    #include <dt-bindings/power/qcom-rpmpd.h>
248
249    remoteproc_mpss: remoteproc@4080000 {
250        compatible = "qcom,msm8916-mss-pil";
251        reg = <0x04080000 0x100>, <0x04020000 0x40>;
252        reg-names = "qdsp6", "rmb";
253
254        interrupts-extended = <&intc GIC_SPI 24 IRQ_TYPE_EDGE_RISING>,
255                              <&hexagon_smp2p_in 0 IRQ_TYPE_EDGE_RISING>,
256                              <&hexagon_smp2p_in 1 IRQ_TYPE_EDGE_RISING>,
257                              <&hexagon_smp2p_in 2 IRQ_TYPE_EDGE_RISING>,
258                              <&hexagon_smp2p_in 3 IRQ_TYPE_EDGE_RISING>;
259        interrupt-names = "wdog", "fatal", "ready", "handover", "stop-ack";
260
261        qcom,smem-states = <&hexagon_smp2p_out 0>;
262        qcom,smem-state-names = "stop";
263        qcom,halt-regs = <&tcsr 0x18000 0x19000 0x1a000>;
264
265        clocks = <&gcc GCC_MSS_CFG_AHB_CLK>,
266                 <&gcc GCC_MSS_Q6_BIMC_AXI_CLK>,
267                 <&gcc GCC_BOOT_ROM_AHB_CLK>,
268                 <&xo_board>;
269        clock-names = "iface", "bus", "mem", "xo";
270
271        power-domains = <&rpmpd MSM8916_VDDCX>, <&rpmpd MSM8916_VDDMX>;
272        power-domain-names = "cx", "mx";
273        pll-supply = <&pm8916_l7>;
274
275        resets = <&scm 0>;
276        reset-names = "mss_restart";
277
278        memory-region = <&mba_mem>, <&mpss_mem>;
279
280        smd-edge {
281            interrupts = <GIC_SPI 25 IRQ_TYPE_EDGE_RISING>;
282
283            qcom,smd-edge = <0>;
284            qcom,ipc = <&apcs 8 12>;
285            qcom,remote-pid = <1>;
286
287            label = "hexagon";
288        };
289    };
290