Skip to content

Commit cecf817

Browse files
committed
ASoC: dt-bindings: Rework Qualcomm APR/GPR Sound nodes for SM8450
Merge series from Krzysztof Kozlowski <[email protected]>: Adding sound support for Qualcomm SM8450 SoC (and later for SC8280XP) brought some changes to APR/GPR services bindings. These bindings are part of qcom,apr.yaml: apr-or-gpr-device-node <- qcom,apr.yaml apr-gpr-service@[0-9] <- qcom,apr.yaml service-specific-components <- /schemas/sound/qcom,q6*.yaml The schema for services (apr-gpr-service@[0-9]) was not complete and is still quite not specific. It allows several incorrect combinations, like adding a clock-controller to a APM device. Restricting it would complicate the schema even more. Bringing new support for sound on Qualcomm SM8450 and SC8280XP SoC would grow it as well. Refactor the bindings before extending them for Qualcomm SM8450 SoC.
2 parents 2d68148 + b386acc commit cecf817

15 files changed

+515
-272
lines changed
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
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-services.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm APR/GPR services shared parts
8+
9+
maintainers:
10+
- Srinivas Kandagatla <[email protected]>
11+
12+
description:
13+
Common parts of a static service in Qualcomm APR/GPR (Asynchronous/Generic
14+
Packet Router).
15+
16+
properties:
17+
reg:
18+
minimum: 1
19+
maximum: 13
20+
description: |
21+
APR Service ID
22+
3 = DSP Core Service
23+
4 = Audio Front End Service.
24+
5 = Voice Stream Manager Service.
25+
6 = Voice processing manager.
26+
7 = Audio Stream Manager Service.
27+
8 = Audio Device Manager Service.
28+
9 = Multimode voice manager.
29+
10 = Core voice stream.
30+
11 = Core voice processor.
31+
12 = Ultrasound stream manager.
32+
13 = Listen stream manager.
33+
GPR Service ID
34+
1 = Audio Process Manager Service
35+
2 = Proxy Resource Manager Service.
36+
3 = AMDB Service.
37+
4 = Voice processing manager.
38+
39+
qcom,protection-domain:
40+
$ref: /schemas/types.yaml#/definitions/string-array
41+
description: |
42+
Protection domain service name and path for APR service
43+
possible values are::
44+
"avs/audio", "msm/adsp/audio_pd".
45+
"kernel/elf_loader", "msm/modem/wlan_pd".
46+
"tms/servreg", "msm/adsp/audio_pd".
47+
"tms/servreg", "msm/modem/wlan_pd".
48+
"tms/servreg", "msm/slpi/sensor_pd".
49+
50+
required:
51+
- reg
52+
- qcom,protection-domain
53+
54+
additionalProperties: true

Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml

Lines changed: 51 additions & 119 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,7 @@ properties:
5858
qcom,glink-channels:
5959
$ref: /schemas/types.yaml#/definitions/string-array
6060
description: Channel name used for the communication
61-
items:
62-
- const: apr_audio_svc
61+
maxItems: 1
6362

6463
qcom,intents:
6564
$ref: /schemas/types.yaml#/definitions/uint32-array
@@ -81,12 +80,13 @@ properties:
8180
'#size-cells':
8281
const: 0
8382

84-
#APR/GPR Services
8583
patternProperties:
8684
"^service@[1-9a-d]$":
8785
type: object
86+
$ref: /schemas/soc/qcom/qcom,apr-services.yaml
87+
additionalProperties: true
8888
description:
89-
APR/GPR node's client devices use subnodes for desired static port services.
89+
APR/GPR static port services.
9090

9191
properties:
9292
compatible:
@@ -98,99 +98,6 @@ patternProperties:
9898
- qcom,q6apm
9999
- qcom,q6prm
100100

101-
reg:
102-
minimum: 1
103-
maximum: 13
104-
description:
105-
APR Service ID
106-
3 = DSP Core Service
107-
4 = Audio Front End Service.
108-
5 = Voice Stream Manager Service.
109-
6 = Voice processing manager.
110-
7 = Audio Stream Manager Service.
111-
8 = Audio Device Manager Service.
112-
9 = Multimode voice manager.
113-
10 = Core voice stream.
114-
11 = Core voice processor.
115-
12 = Ultrasound stream manager.
116-
13 = Listen stream manager.
117-
GPR Service ID
118-
1 = Audio Process Manager Service
119-
2 = Proxy Resource Manager Service.
120-
3 = AMDB Service.
121-
4 = Voice processing manager.
122-
123-
clock-controller:
124-
$ref: /schemas/sound/qcom,q6dsp-lpass-clocks.yaml#
125-
description: Qualcomm DSP LPASS clock controller
126-
unevaluatedProperties: false
127-
128-
dais:
129-
type: object
130-
oneOf:
131-
- $ref: /schemas/sound/qcom,q6apm-dai.yaml#
132-
- $ref: /schemas/sound/qcom,q6dsp-lpass-ports.yaml#
133-
- $ref: /schemas/sound/qcom,q6asm-dais.yaml#
134-
unevaluatedProperties: false
135-
description: Qualcomm DSP audio ports
136-
137-
routing:
138-
type: object
139-
$ref: /schemas/sound/qcom,q6adm-routing.yaml#
140-
unevaluatedProperties: false
141-
description: Qualcomm DSP LPASS audio routing
142-
143-
qcom,protection-domain:
144-
$ref: /schemas/types.yaml#/definitions/string-array
145-
description: protection domain service name and path for apr service
146-
possible values are
147-
"avs/audio", "msm/adsp/audio_pd".
148-
"kernel/elf_loader", "msm/modem/wlan_pd".
149-
"tms/servreg", "msm/adsp/audio_pd".
150-
"tms/servreg", "msm/modem/wlan_pd".
151-
"tms/servreg", "msm/slpi/sensor_pd".
152-
153-
allOf:
154-
- if:
155-
properties:
156-
compatible:
157-
enum:
158-
- qcom,q6afe
159-
then:
160-
properties:
161-
dais:
162-
properties:
163-
compatible:
164-
const: qcom,q6afe-dais
165-
166-
- if:
167-
properties:
168-
compatible:
169-
enum:
170-
- qcom,q6apm
171-
then:
172-
properties:
173-
dais:
174-
properties:
175-
compatible:
176-
enum:
177-
- qcom,q6apm-dais
178-
- qcom,q6apm-lpass-dais
179-
180-
- if:
181-
properties:
182-
compatible:
183-
enum:
184-
- qcom,q6asm
185-
then:
186-
properties:
187-
dais:
188-
properties:
189-
compatible:
190-
const: qcom,q6asm-dais
191-
192-
additionalProperties: false
193-
194101
required:
195102
- compatible
196103
- qcom,domain
@@ -203,7 +110,15 @@ allOf:
203110
- qcom,gpr
204111
then:
205112
properties:
113+
qcom,glink-channels:
114+
items:
115+
- const: adsp_apps
206116
power-domains: false
117+
else:
118+
properties:
119+
qcom,glink-channels:
120+
items:
121+
- const: apr_audio_svc
207122

208123
- if:
209124
required:
@@ -227,31 +142,35 @@ examples:
227142
apr {
228143
compatible = "qcom,apr-v2";
229144
qcom,domain = <APR_DOMAIN_ADSP>;
145+
qcom,glink-channels = "apr_audio_svc";
146+
qcom,intents = <512 20>;
230147
#address-cells = <1>;
231148
#size-cells = <0>;
232149
233150
q6core: service@3 {
234-
compatible = "qcom,q6core";
235-
reg = <APR_SVC_ADSP_CORE>;
236-
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
237-
};
238-
239-
q6afe: service@4 {
240-
compatible = "qcom,q6afe";
241-
reg = <APR_SVC_AFE>;
242-
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
243-
};
244-
245-
q6asm: service@7 {
246-
compatible = "qcom,q6asm";
247-
reg = <APR_SVC_ASM>;
248-
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
151+
compatible = "qcom,q6core";
152+
reg = <APR_SVC_ADSP_CORE>;
153+
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
249154
};
250155
251-
q6adm: service@8 {
252-
compatible = "qcom,q6adm";
253-
reg = <APR_SVC_ADM>;
254-
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
156+
service@4 {
157+
compatible = "qcom,q6afe";
158+
reg = <APR_SVC_AFE>;
159+
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
160+
161+
clock-controller {
162+
compatible = "qcom,q6afe-clocks";
163+
#clock-cells = <2>;
164+
};
165+
166+
dais {
167+
compatible = "qcom,q6afe-dais";
168+
#address-cells = <1>;
169+
#size-cells = <0>;
170+
#sound-dai-cells = <1>;
171+
/* ... */
172+
};
173+
/* ... */
255174
};
256175
};
257176
@@ -260,12 +179,25 @@ examples:
260179
gpr {
261180
compatible = "qcom,gpr";
262181
qcom,domain = <GPR_DOMAIN_ID_ADSP>;
182+
qcom,glink-channels = "adsp_apps";
183+
qcom,intents = <512 20>;
263184
#address-cells = <1>;
264185
#size-cells = <0>;
265186
266187
service@1 {
267-
compatible = "qcom,q6apm";
268-
reg = <GPR_APM_MODULE_IID>;
269-
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
188+
compatible = "qcom,q6apm";
189+
reg = <GPR_APM_MODULE_IID>;
190+
#sound-dai-cells = <0>;
191+
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
192+
193+
dais {
194+
compatible = "qcom,q6apm-dais";
195+
iommus = <&apps_smmu 0x1801 0x0>;
196+
};
197+
198+
bedais {
199+
compatible = "qcom,q6apm-lpass-dais";
200+
#sound-dai-cells = <1>;
201+
};
270202
};
271203
};

Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,7 @@ additionalProperties: false
3030

3131
examples:
3232
- |
33-
#include <dt-bindings/soc/qcom,apr.h>
34-
#include <dt-bindings/sound/qcom,q6asm.h>
35-
36-
apr {
37-
compatible = "qcom,apr-v2";
38-
qcom,domain = <APR_DOMAIN_ADSP>;
39-
#address-cells = <1>;
40-
#size-cells = <0>;
41-
42-
service@8 {
43-
compatible = "qcom,q6adm";
44-
reg = <APR_SVC_ADM>;
45-
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
46-
47-
routing {
48-
compatible = "qcom,q6adm-routing";
49-
#sound-dai-cells = <0>;
50-
};
51-
};
33+
routing {
34+
compatible = "qcom,q6adm-routing";
35+
#sound-dai-cells = <0>;
5236
};
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/sound/qcom,q6adm.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: Qualcomm Audio Device Manager (Q6ADM)
8+
9+
maintainers:
10+
- Krzysztof Kozlowski <[email protected]>
11+
- Srinivas Kandagatla <[email protected]>
12+
13+
allOf:
14+
- $ref: /schemas/soc/qcom/qcom,apr-services.yaml#
15+
16+
properties:
17+
compatible:
18+
enum:
19+
- qcom,q6adm
20+
21+
routing:
22+
type: object
23+
$ref: /schemas/sound/qcom,q6adm-routing.yaml#
24+
unevaluatedProperties: false
25+
description: Qualcomm DSP LPASS audio routing
26+
27+
required:
28+
- compatible
29+
- routing
30+
31+
unevaluatedProperties: false
32+
33+
examples:
34+
- |
35+
#include <dt-bindings/soc/qcom,apr.h>
36+
37+
apr {
38+
#address-cells = <1>;
39+
#size-cells = <0>;
40+
41+
service@8 {
42+
compatible = "qcom,q6adm";
43+
reg = <APR_SVC_ADM>;
44+
qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
45+
46+
routing {
47+
compatible = "qcom,q6adm-routing";
48+
#sound-dai-cells = <0>;
49+
};
50+
};
51+
};

0 commit comments

Comments
 (0)