81248e517a5b99fbb0d403211c130e59fcaeb9df
[openwrt/staging/pepe2k.git] /
1 From: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
2 Date: Fri, 10 Nov 2023 14:49:29 +0530
3 Subject: [PATCH] dt-bindings: remoteproc: qcom: Add support for multipd model
4
5 Add new binding document for multipd model remoteproc.
6 IPQ5332, IPQ9574 follows multipd model.
7
8 Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
9 Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
10 ---
11 --- /dev/null
12 +++ b/Documentation/devicetree/bindings/remoteproc/qcom,multipd-pil.yaml
13 @@ -0,0 +1,189 @@
14 +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause)
15 +%YAML 1.2
16 +---
17 +$id: http://devicetree.org/schemas/remoteproc/qcom,multipd-pil.yaml#
18 +$schema: http://devicetree.org/meta-schemas/core.yaml#
19 +
20 +title: Qualcomm Multipd Secure Peripheral Image Loader
21 +
22 +maintainers:
23 + - Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
24 +
25 +description:
26 + Multipd Peripheral Image Loader loads firmware and boots Q6 protection domain,
27 + WCSS protection domain remoteproc's on the Qualcomm IPQ9574, IPQ5332 SoC.
28 + Protection domain is similar to process in Linux. Here QDSP6 processor runs
29 + each wifi radio functionality on a separate process. One process can't access
30 + other process resources, so this is termed as PD i.e protection domain.
31 +
32 +properties:
33 + compatible:
34 + enum:
35 + - qcom,ipq5332-q6-mpd
36 + - qcom,ipq9574-q6-mpd
37 +
38 + reg:
39 + maxItems: 1
40 +
41 + firmware-name:
42 + maxItems: 2
43 +
44 + interrupts:
45 + items:
46 + - description: Watchdog interrupt
47 + - description: Fatal interrupt
48 + - description: Ready interrupt
49 + - description: Handover interrupt
50 + - description: Stop acknowledge interrupt
51 +
52 + interrupt-names:
53 + items:
54 + - const: wdog
55 + - const: fatal
56 + - const: ready
57 + - const: handover
58 + - const: stop-ack
59 +
60 + qcom,smem-states:
61 + $ref: /schemas/types.yaml#/definitions/phandle-array
62 + description: States used by the AP to signal the remote processor
63 + items:
64 + - description: Shutdown Q6
65 + - description: Stop Q6
66 +
67 + qcom,smem-state-names:
68 + description:
69 + Names of the states used by the AP to signal the remote processor
70 + items:
71 + - const: shutdown
72 + - const: stop
73 +
74 + memory-region:
75 + items:
76 + - description: Q6 reserved region
77 +
78 + glink-edge:
79 + $ref: /schemas/remoteproc/qcom,glink-edge.yaml#
80 + description:
81 + Qualcomm G-Link subnode which represents communication edge, channels
82 + and devices related to the Modem.
83 + unevaluatedProperties: false
84 +
85 +patternProperties:
86 + "^pd-1|pd-2|pd-3":
87 + type: object
88 + description:
89 + WCSS means 'wireless connectivity sub system', in simple words it's a
90 + wifi radio block. In multipd model, Q6 root protection domain will
91 + provide services to WCSS user protection domain. In other words WCSS
92 + protection domains depends on Q6 protection domain i.e Q6 should be up
93 + before WCSS, similarly Q6 should shut down after all WCSS domains are
94 + down. It can be achieved by building parent-child topology between Q6
95 + and WCSS domain's i.e keeping wcss node as sub node of Q6 device node.
96 +
97 + properties:
98 + firmware-name:
99 + maxItems: 1
100 +
101 + interrupts:
102 + items:
103 + - description: Fatal interrupt
104 + - description: Ready interrupt
105 + - description: Spawn acknowledge interrupt
106 + - description: Stop acknowledge interrupt
107 +
108 + interrupt-names:
109 + items:
110 + - const: fatal
111 + - const: ready
112 + - const: spawn-ack
113 + - const: stop-ack
114 +
115 + qcom,smem-states:
116 + $ref: /schemas/types.yaml#/definitions/phandle-array
117 + description: States used by the AP to signal the remote processor
118 + items:
119 + - description: Shutdown WCSS pd
120 + - description: Stop WCSS pd
121 + - description: Spawn WCSS pd
122 +
123 + qcom,smem-state-names:
124 + description:
125 + Names of the states used by the AP to signal the remote processor
126 + items:
127 + - const: shutdown
128 + - const: stop
129 + - const: spawn
130 +
131 + required:
132 + - firmware-name
133 + - interrupts
134 + - interrupt-names
135 + - qcom,smem-states
136 + - qcom,smem-state-names
137 +
138 + additionalProperties: false
139 +
140 +required:
141 + - compatible
142 + - firmware-name
143 + - reg
144 + - interrupts
145 + - interrupt-names
146 + - qcom,smem-states
147 + - qcom,smem-state-names
148 + - memory-region
149 +
150 +additionalProperties: false
151 +
152 +examples:
153 + - |
154 + #include <dt-bindings/interrupt-controller/arm-gic.h>
155 + q6v5_wcss: remoteproc@d100000 {
156 + compatible = "qcom,ipq5332-q6-mpd";
157 + reg = <0xd100000 0x4040>;
158 + firmware-name = "ath11k/IPQ5332/hw1.0/q6_fw0.mdt",
159 + "ath11k/IPQ5332/hw1.0/iu_fw.mdt";
160 + interrupts-extended = <&intc GIC_SPI 291 IRQ_TYPE_EDGE_RISING>,
161 + <&wcss_smp2p_in 0 IRQ_TYPE_NONE>,
162 + <&wcss_smp2p_in 1 IRQ_TYPE_NONE>,
163 + <&wcss_smp2p_in 2 IRQ_TYPE_NONE>,
164 + <&wcss_smp2p_in 3 IRQ_TYPE_NONE>;
165 + interrupt-names = "wdog",
166 + "fatal",
167 + "ready",
168 + "handover",
169 + "stop-ack";
170 +
171 + qcom,smem-states = <&wcss_smp2p_out 0>,
172 + <&wcss_smp2p_out 1>;
173 + qcom,smem-state-names = "shutdown",
174 + "stop";
175 +
176 + memory-region = <&q6_region>;
177 +
178 + glink-edge {
179 + interrupts = <GIC_SPI 417 IRQ_TYPE_EDGE_RISING>;
180 + label = "rtr";
181 + qcom,remote-pid = <1>;
182 + mboxes = <&apcs_glb 8>;
183 + };
184 +
185 + pd-1 {
186 + firmware-name = "ath11k/IPQ5332/hw1.0/q6_fw1.mdt";
187 + interrupts-extended = <&wcss_smp2p_in 8 IRQ_TYPE_NONE>,
188 + <&wcss_smp2p_in 9 IRQ_TYPE_NONE>,
189 + <&wcss_smp2p_in 12 IRQ_TYPE_NONE>,
190 + <&wcss_smp2p_in 11 IRQ_TYPE_NONE>;
191 + interrupt-names = "fatal",
192 + "ready",
193 + "spawn-ack",
194 + "stop-ack";
195 + qcom,smem-states = <&wcss_smp2p_out 8>,
196 + <&wcss_smp2p_out 9>,
197 + <&wcss_smp2p_out 10>;
198 + qcom,smem-state-names = "shutdown",
199 + "stop",
200 + "spawn";
201 + };
202 + };