dt-bindings: soc: qcom: apr: correct service children
[platform/kernel/linux-starfive.git] / Documentation / devicetree / bindings / soc / qcom / qcom,apr.yaml
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#"
5 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
6
7 title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding
8
9 maintainers:
10   - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11
12 description: |
13   This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for
14   communication between Application processor and QDSP. APR/GPR is mainly
15   used for audio/voice services on the QDSP.
16
17 properties:
18   compatible:
19     enum:
20       - qcom,apr-v2
21       - qcom,gpr
22
23   qcom,apr-domain:
24     $ref: /schemas/types.yaml#/definitions/uint32
25     enum: [1, 2, 3, 4, 5, 6, 7]
26     description:
27       Selects the processor domain for apr
28         1 = APR simulator
29         2 = PC Domain
30         3 = Modem Domain
31         4 = ADSP Domain
32         5 = Application processor Domain
33         6 = Modem2 Domain
34         7 = Application Processor2 Domain
35     deprecated: true
36
37   qcom,domain:
38     $ref: /schemas/types.yaml#/definitions/uint32
39     minimum: 1
40     maximum: 7
41     description:
42       Selects the processor domain for apr
43         1 = APR simulator
44         2 = PC Domain
45         3 = Modem Domain
46         4 = ADSP Domain
47         5 = Application processor Domain
48         6 = Modem2 Domain
49         7 = Application Processor2 Domain
50       Selects the processor domain for gpr
51         1 = Modem Domain
52         2 = Audio DSP Domain
53         3 = Application Processor Domain
54
55   '#address-cells':
56     const: 1
57
58   '#size-cells':
59     const: 0
60
61 #APR/GPR Services
62 patternProperties:
63   "^service@[1-9a-d]$":
64     type: object
65     description:
66       APR/GPR node's client devices use subnodes for desired static port services.
67
68     properties:
69       compatible:
70         enum:
71           - qcom,q6core
72           - qcom,q6asm
73           - qcom,q6afe
74           - qcom,q6adm
75           - qcom,q6apm
76           - qcom,q6prm
77
78       reg:
79         minimum: 1
80         maximum: 13
81         description:
82           APR Service ID
83             3 = DSP Core Service
84             4 = Audio  Front End Service.
85             5 = Voice Stream Manager Service.
86             6 = Voice processing manager.
87             7 = Audio Stream Manager Service.
88             8 = Audio Device Manager Service.
89             9 = Multimode voice manager.
90             10 = Core voice stream.
91             11 = Core voice processor.
92             12 = Ultrasound stream manager.
93             13 = Listen stream manager.
94           GPR Service ID
95             1 = Audio Process Manager Service
96             2 = Proxy Resource Manager Service.
97             3 = AMDB Service.
98             4 = Voice processing manager.
99
100       clock-controller:
101         $ref: /schemas/sound/qcom,q6dsp-lpass-clocks.yaml#
102         description: Qualcomm DSP LPASS clock controller
103         unevaluatedProperties: false
104
105       dais:
106         # TODO: Waiting for Documentation/devicetree/bindings/sound/qcom,q6asm.txt
107         type: object
108         description: Qualcomm DSP audio ports
109
110       routing:
111         # TODO: Waiting for Documentation/devicetree/bindings/sound/qcom,q6adm.txt
112         type: object
113         description: Qualcomm DSP LPASS audio routing
114
115       qcom,protection-domain:
116         $ref: /schemas/types.yaml#/definitions/string-array
117         description: protection domain service name and path for apr service
118           possible values are
119           "avs/audio", "msm/adsp/audio_pd".
120           "kernel/elf_loader", "msm/modem/wlan_pd".
121           "tms/servreg", "msm/adsp/audio_pd".
122           "tms/servreg", "msm/modem/wlan_pd".
123           "tms/servreg", "msm/slpi/sensor_pd".
124
125     allOf:
126       - if:
127           properties:
128             compatible:
129               enum:
130                 - qcom,q6afe
131         then:
132           properties:
133             dais:
134               properties:
135                 compatible:
136                   const: qcom,q6afe-dais
137
138       - if:
139           properties:
140             compatible:
141               enum:
142                 - qcom,q6apm
143         then:
144           properties:
145             dais:
146               properties:
147                 compatible:
148                   enum:
149                     - qcom,q6apm-dais
150                     - qcom,q6apm-lpass-dais
151
152       - if:
153           properties:
154             compatible:
155               enum:
156                 - qcom,q6asm
157         then:
158           properties:
159             dais:
160               properties:
161                 compatible:
162                   const: qcom,q6asm-dais
163
164     additionalProperties: false
165
166 required:
167   - compatible
168   - qcom,domain
169
170 additionalProperties: false
171
172 examples:
173   - |
174     #include <dt-bindings/soc/qcom,apr.h>
175     apr {
176         compatible = "qcom,apr-v2";
177         qcom,domain = <APR_DOMAIN_ADSP>;
178         #address-cells = <1>;
179         #size-cells = <0>;
180
181         q6core: service@3 {
182           compatible = "qcom,q6core";
183           reg = <APR_SVC_ADSP_CORE>;
184           qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
185         };
186
187         q6afe: service@4 {
188           compatible = "qcom,q6afe";
189           reg = <APR_SVC_AFE>;
190           qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
191         };
192
193         q6asm: service@7 {
194           compatible = "qcom,q6asm";
195           reg = <APR_SVC_ASM>;
196           qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
197         };
198
199         q6adm: service@8 {
200           compatible = "qcom,q6adm";
201           reg = <APR_SVC_ADM>;
202           qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
203         };
204     };
205
206   - |
207     #include <dt-bindings/soc/qcom,gpr.h>
208     gpr {
209         compatible = "qcom,gpr";
210         qcom,domain = <GPR_DOMAIN_ID_ADSP>;
211         #address-cells = <1>;
212         #size-cells = <0>;
213
214         service@1 {
215           compatible = "qcom,q6apm";
216           reg = <GPR_APM_MODULE_IID>;
217           qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
218         };
219     };