[PATCH 00/10] ASoC: dt-bindings: Rework Qualcomm APR/GPR Sound nodes for SM8450
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]) already grows considerably 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.
Best regards, Krzysztof
Krzysztof Kozlowski (10): ASoC: dt-bindings: qcom,apr: Add GLINK channel name for SM8450 ASoC: dt-bindings: qcom,apr: Split services to shared schema ASoC: dt-bindings: qcom,q6afe: Split to separate schema ASoC: dt-bindings: qcom,q6apm: Split to separate schema ASoC: dt-bindings: qcom,q6adm: Split to separate schema ASoC: dt-bindings: qcom,q6asm: Split to separate schema ASoC: dt-bindings: qcom,q6prm: Split to separate schema ASoC: dt-bindings: qcom,q6core: Split to separate schema ASoC: dt-bindings: qcom,q6apm-lpass-dais: Split to separate schema ASoC: dt-bindings: qcom,q6apm: Add SM8450 bedais node
.../bindings/soc/qcom/qcom,apr-services.yaml | 54 ++++++++ .../bindings/soc/qcom/qcom,apr.yaml | 119 ++---------------- .../bindings/sound/qcom,q6adm-routing.yaml | 22 +--- .../devicetree/bindings/sound/qcom,q6adm.yaml | 51 ++++++++ .../devicetree/bindings/sound/qcom,q6afe.yaml | 69 ++++++++++ .../bindings/sound/qcom,q6apm-dai.yaml | 19 +-- .../bindings/sound/qcom,q6apm-lpass-dais.yaml | 32 +++++ .../devicetree/bindings/sound/qcom,q6apm.yaml | 67 ++++++++++ .../bindings/sound/qcom,q6asm-dais.yaml | 48 +++---- .../devicetree/bindings/sound/qcom,q6asm.yaml | 68 ++++++++++ .../bindings/sound/qcom,q6core.yaml | 39 ++++++ .../sound/qcom,q6dsp-lpass-clocks.yaml | 40 +----- .../sound/qcom,q6dsp-lpass-ports.yaml | 57 ++------- .../devicetree/bindings/sound/qcom,q6prm.yaml | 50 ++++++++ MAINTAINERS | 2 +- 15 files changed, 477 insertions(+), 260 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6afe.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6core.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6prm.yaml
On SM8450 and SC8280XP with Qualcomm GPR, the GLINK channel name (qcom,glink-channels) for ADSP is "adsp_apps".
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../devicetree/bindings/soc/qcom/qcom,apr.yaml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml index f47491aab3b1..0a7a34cb2497 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml @@ -58,8 +58,7 @@ properties: qcom,glink-channels: $ref: /schemas/types.yaml#/definitions/string-array description: Channel name used for the communication - items: - - const: apr_audio_svc + maxItems: 1
qcom,intents: $ref: /schemas/types.yaml#/definitions/uint32-array @@ -203,7 +202,15 @@ allOf: - qcom,gpr then: properties: + qcom,glink-channels: + items: + - const: adsp_apps power-domains: false + else: + properties: + qcom,glink-channels: + items: + - const: apr_audio_svc
- if: required:
The APR/GPR nodes are organized like:
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]) already grows considerably 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.
Simplify the qcom,apr.yaml by splitting the services to a shared file which will be: 1. Referenced by qcom,apr.yaml with additionalProperties:true, 2. Referenced by specific bindings for services with additionalProperties:false (not yet in this commit).
While moving the code, add also required 'reg' and 'qcom,protection-domain' to further constrain the bindings.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/soc/qcom/qcom,apr-services.yaml | 54 +++++++++ .../bindings/soc/qcom/qcom,apr.yaml | 108 +----------------- MAINTAINERS | 2 +- 3 files changed, 58 insertions(+), 106 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml new file mode 100644 index 000000000000..290555426c39 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/qcom,apr-services.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm APR/GPR services shared parts + +maintainers: + - Srinivas Kandagatla srinivas.kandagatla@linaro.org + +description: + Common parts of a static service in Qualcomm APR/GPR (Asynchronous/Generic + Packet Router). + +properties: + reg: + minimum: 1 + maximum: 13 + description: | + APR Service ID + 3 = DSP Core Service + 4 = Audio Front End Service. + 5 = Voice Stream Manager Service. + 6 = Voice processing manager. + 7 = Audio Stream Manager Service. + 8 = Audio Device Manager Service. + 9 = Multimode voice manager. + 10 = Core voice stream. + 11 = Core voice processor. + 12 = Ultrasound stream manager. + 13 = Listen stream manager. + GPR Service ID + 1 = Audio Process Manager Service + 2 = Proxy Resource Manager Service. + 3 = AMDB Service. + 4 = Voice processing manager. + + qcom,protection-domain: + $ref: /schemas/types.yaml#/definitions/string-array + description: | + Protection domain service name and path for APR service + possible values are:: + "avs/audio", "msm/adsp/audio_pd". + "kernel/elf_loader", "msm/modem/wlan_pd". + "tms/servreg", "msm/adsp/audio_pd". + "tms/servreg", "msm/modem/wlan_pd". + "tms/servreg", "msm/slpi/sensor_pd". + +required: + - reg + - qcom,protection-domain + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml index 0a7a34cb2497..9302ffe567d6 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml @@ -80,115 +80,13 @@ properties: '#size-cells': const: 0
-#APR/GPR Services patternProperties: "^service@[1-9a-d]$": type: object + $ref: /schemas/soc/qcom/qcom,apr-services.yaml + additionalProperties: true description: - APR/GPR node's client devices use subnodes for desired static port services. - - properties: - compatible: - enum: - - qcom,q6core - - qcom,q6asm - - qcom,q6afe - - qcom,q6adm - - qcom,q6apm - - qcom,q6prm - - reg: - minimum: 1 - maximum: 13 - description: - APR Service ID - 3 = DSP Core Service - 4 = Audio Front End Service. - 5 = Voice Stream Manager Service. - 6 = Voice processing manager. - 7 = Audio Stream Manager Service. - 8 = Audio Device Manager Service. - 9 = Multimode voice manager. - 10 = Core voice stream. - 11 = Core voice processor. - 12 = Ultrasound stream manager. - 13 = Listen stream manager. - GPR Service ID - 1 = Audio Process Manager Service - 2 = Proxy Resource Manager Service. - 3 = AMDB Service. - 4 = Voice processing manager. - - clock-controller: - $ref: /schemas/sound/qcom,q6dsp-lpass-clocks.yaml# - description: Qualcomm DSP LPASS clock controller - unevaluatedProperties: false - - dais: - type: object - oneOf: - - $ref: /schemas/sound/qcom,q6apm-dai.yaml# - - $ref: /schemas/sound/qcom,q6dsp-lpass-ports.yaml# - - $ref: /schemas/sound/qcom,q6asm-dais.yaml# - unevaluatedProperties: false - description: Qualcomm DSP audio ports - - routing: - type: object - $ref: /schemas/sound/qcom,q6adm-routing.yaml# - unevaluatedProperties: false - description: Qualcomm DSP LPASS audio routing - - qcom,protection-domain: - $ref: /schemas/types.yaml#/definitions/string-array - description: protection domain service name and path for apr service - possible values are - "avs/audio", "msm/adsp/audio_pd". - "kernel/elf_loader", "msm/modem/wlan_pd". - "tms/servreg", "msm/adsp/audio_pd". - "tms/servreg", "msm/modem/wlan_pd". - "tms/servreg", "msm/slpi/sensor_pd". - - allOf: - - if: - properties: - compatible: - enum: - - qcom,q6afe - then: - properties: - dais: - properties: - compatible: - const: qcom,q6afe-dais - - - if: - properties: - compatible: - enum: - - qcom,q6apm - then: - properties: - dais: - properties: - compatible: - enum: - - qcom,q6apm-dais - - qcom,q6apm-lpass-dais - - - if: - properties: - compatible: - enum: - - qcom,q6asm - then: - properties: - dais: - properties: - compatible: - const: qcom,q6asm-dais - - additionalProperties: false + APR/GPR static port services.
required: - compatible diff --git a/MAINTAINERS b/MAINTAINERS index 3df7b9a3f5ba..804e4a700477 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16893,7 +16893,7 @@ M: Srinivas Kandagatla srinivas.kandagatla@linaro.org M: Banajit Goswami bgoswami@quicinc.com L: alsa-devel@alsa-project.org (moderated for non-subscribers) S: Supported -F: Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +F: Documentation/devicetree/bindings/soc/qcom/qcom,apr* F: Documentation/devicetree/bindings/sound/qcom,* F: drivers/soc/qcom/apr.c F: include/dt-bindings/sound/qcom,wcd9335.h
On Fri, 11 Nov 2022 12:35:39 +0100, Krzysztof Kozlowski wrote:
The APR/GPR nodes are organized like:
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]) already grows considerably 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.
Simplify the qcom,apr.yaml by splitting the services to a shared file which will be:
- Referenced by qcom,apr.yaml with additionalProperties:true,
- Referenced by specific bindings for services with additionalProperties:false (not yet in this commit).
While moving the code, add also required 'reg' and 'qcom,protection-domain' to further constrain the bindings.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/soc/qcom/qcom,apr-services.yaml | 54 +++++++++ .../bindings/soc/qcom/qcom,apr.yaml | 108 +----------------- MAINTAINERS | 2 +- 3 files changed, 58 insertions(+), 106 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors: Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-0/apr/service@3: failed to match any schema with compatible: ['qcom,q6core'] Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-0/apr/service@4: failed to match any schema with compatible: ['qcom,q6afe'] Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-0/apr/service@7: failed to match any schema with compatible: ['qcom,q6asm'] Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-0/apr/service@8: failed to match any schema with compatible: ['qcom,q6adm'] Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-1/gpr/service@1: failed to match any schema with compatible: ['qcom,q6apm'] Documentation/devicetree/bindings/sound/qcom,q6adm-routing.example.dtb:0:0: /example-0/apr/service@8: failed to match any schema with compatible: ['qcom,q6adm'] Documentation/devicetree/bindings/sound/qcom,q6asm-dais.example.dtb:0:0: /example-0/apr/service@7: failed to match any schema with compatible: ['qcom,q6asm'] Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.example.dtb:0:0: /example-0/apr/service@4: failed to match any schema with compatible: ['qcom,q6afe'] /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.example.dtb: gpr: service@2: 'qcom,protection-domain' is a required property From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.example.dtb:0:0: /example-1/gpr/service@2: failed to match any schema with compatible: ['qcom,q6prm'] /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.example.dtb: gpr: service@1: 'qcom,protection-domain' is a required property From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml Documentation/devicetree/bindings/sound/qcom,q6apm-dai.example.dtb:0:0: /example-0/gpr/service@1: failed to match any schema with compatible: ['qcom,q6apm'] Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.example.dtb:0:0: /example-0/apr/service@4: failed to match any schema with compatible: ['qcom,q6afe'] /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.example.dtb: gpr: service@1: 'qcom,protection-domain' is a required property From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.example.dtb:0:0: /example-1/gpr/service@1: failed to match any schema with compatible: ['qcom,q6apm']
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit.
On 11/11/2022 14:30, Rob Herring wrote:
On Fri, 11 Nov 2022 12:35:39 +0100, Krzysztof Kozlowski wrote:
The APR/GPR nodes are organized like:
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]) already grows considerably 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.
Simplify the qcom,apr.yaml by splitting the services to a shared file which will be:
- Referenced by qcom,apr.yaml with additionalProperties:true,
- Referenced by specific bindings for services with additionalProperties:false (not yet in this commit).
While moving the code, add also required 'reg' and 'qcom,protection-domain' to further constrain the bindings.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/soc/qcom/qcom,apr-services.yaml | 54 +++++++++ .../bindings/soc/qcom/qcom,apr.yaml | 108 +----------------- MAINTAINERS | 2 +- 3 files changed, 58 insertions(+), 106 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors: Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-0/apr/service@3: failed to match any schema with compatible: ['qcom,q6core'] Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-0/apr/service@4: failed to match any schema with compatible: ['qcom,q6afe'] Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-0/apr/service@7: failed to match any schema with compatible: ['qcom,q6asm'] Documentation/devicetree/bindings/soc/qcom/qcom,apr.example.dtb:0:0: /example-0/apr/service@8: failed to match any schema with compatible: ['qcom,q6adm']
This is expected. I should have mention maybe in commit msg that these compatibles are being removed in this commit and re-added in further commits. Change is therefore not entirely bisectable, but should be easier for review.
If desired, I can squash these commits.
Best regards, Krzysztof
On 11/11/2022 11:35, Krzysztof Kozlowski wrote:
The APR/GPR nodes are organized like:
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]) already grows
I have not seen these grow or change alteast in the past 9 years.
Old APR (Elite f/w) and new GPR (AudioReach) interface provides access to static services on the DSP.
considerably and is still quite not specific. It allows several incorrect combinations, like adding a clock-controller to a APM device.
This should be fixed for sure for validation.
We had dedicated bindings per service before.
As the service has changed as part of new AudioReach Firmware, we could have added new bindings for these services again. But as we are dealing with the same audio hardware and clock resources a new bindings per service did not make sense. Since then we moved all the lpass audio ports and clocks related bindings to qcom,q6dsp-lpass-clocks.yaml and qcom,q6dsp-lpass-ports.yaml.
--srini
Restricting it would complicate the schema even more. Bringing new support for sound on Qualcomm SM8450 and SC8280XP SoC would grow it as well.
Simplify the qcom,apr.yaml by splitting the services to a shared file which will be:
- Referenced by qcom,apr.yaml with additionalProperties:true,
- Referenced by specific bindings for services with additionalProperties:false (not yet in this commit).
While moving the code, add also required 'reg' and 'qcom,protection-domain' to further constrain the bindings.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../bindings/soc/qcom/qcom,apr-services.yaml | 54 +++++++++ .../bindings/soc/qcom/qcom,apr.yaml | 108 +----------------- MAINTAINERS | 2 +- 3 files changed, 58 insertions(+), 106 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml
diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml new file mode 100644 index 000000000000..290555426c39 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml @@ -0,0 +1,54 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/qcom,apr-services.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml#
+title: Qualcomm APR/GPR services shared parts
+maintainers:
- Srinivas Kandagatla srinivas.kandagatla@linaro.org
+description:
- Common parts of a static service in Qualcomm APR/GPR (Asynchronous/Generic
- Packet Router).
+properties:
- reg:
- minimum: 1
- maximum: 13
- description: |
APR Service ID
3 = DSP Core Service
4 = Audio Front End Service.
5 = Voice Stream Manager Service.
6 = Voice processing manager.
7 = Audio Stream Manager Service.
8 = Audio Device Manager Service.
9 = Multimode voice manager.
10 = Core voice stream.
11 = Core voice processor.
12 = Ultrasound stream manager.
13 = Listen stream manager.
GPR Service ID
1 = Audio Process Manager Service
2 = Proxy Resource Manager Service.
3 = AMDB Service.
4 = Voice processing manager.
- qcom,protection-domain:
- $ref: /schemas/types.yaml#/definitions/string-array
- description: |
Protection domain service name and path for APR service
possible values are::
"avs/audio", "msm/adsp/audio_pd".
"kernel/elf_loader", "msm/modem/wlan_pd".
"tms/servreg", "msm/adsp/audio_pd".
"tms/servreg", "msm/modem/wlan_pd".
"tms/servreg", "msm/slpi/sensor_pd".
+required:
- reg
- qcom,protection-domain
+additionalProperties: true diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml index 0a7a34cb2497..9302ffe567d6 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml @@ -80,115 +80,13 @@ properties: '#size-cells': const: 0
-#APR/GPR Services patternProperties: "^service@[1-9a-d]$": type: object
- $ref: /schemas/soc/qcom/qcom,apr-services.yaml
- additionalProperties: true description:
APR/GPR node's client devices use subnodes for desired static port services.
- properties:
compatible:
enum:
- qcom,q6core
- qcom,q6asm
- qcom,q6afe
- qcom,q6adm
- qcom,q6apm
- qcom,q6prm
reg:
minimum: 1
maximum: 13
description:
APR Service ID
3 = DSP Core Service
4 = Audio Front End Service.
5 = Voice Stream Manager Service.
6 = Voice processing manager.
7 = Audio Stream Manager Service.
8 = Audio Device Manager Service.
9 = Multimode voice manager.
10 = Core voice stream.
11 = Core voice processor.
12 = Ultrasound stream manager.
13 = Listen stream manager.
GPR Service ID
1 = Audio Process Manager Service
2 = Proxy Resource Manager Service.
3 = AMDB Service.
4 = Voice processing manager.
clock-controller:
$ref: /schemas/sound/qcom,q6dsp-lpass-clocks.yaml#
description: Qualcomm DSP LPASS clock controller
unevaluatedProperties: false
dais:
type: object
oneOf:
- $ref: /schemas/sound/qcom,q6apm-dai.yaml#
- $ref: /schemas/sound/qcom,q6dsp-lpass-ports.yaml#
- $ref: /schemas/sound/qcom,q6asm-dais.yaml#
unevaluatedProperties: false
description: Qualcomm DSP audio ports
routing:
type: object
$ref: /schemas/sound/qcom,q6adm-routing.yaml#
unevaluatedProperties: false
description: Qualcomm DSP LPASS audio routing
qcom,protection-domain:
$ref: /schemas/types.yaml#/definitions/string-array
description: protection domain service name and path for apr service
possible values are
"avs/audio", "msm/adsp/audio_pd".
"kernel/elf_loader", "msm/modem/wlan_pd".
"tms/servreg", "msm/adsp/audio_pd".
"tms/servreg", "msm/modem/wlan_pd".
"tms/servreg", "msm/slpi/sensor_pd".
- allOf:
- if:
properties:
compatible:
enum:
- qcom,q6afe
then:
properties:
dais:
properties:
compatible:
const: qcom,q6afe-dais
- if:
properties:
compatible:
enum:
- qcom,q6apm
then:
properties:
dais:
properties:
compatible:
enum:
- qcom,q6apm-dais
- qcom,q6apm-lpass-dais
- if:
properties:
compatible:
enum:
- qcom,q6asm
then:
properties:
dais:
properties:
compatible:
const: qcom,q6asm-dais
- additionalProperties: false
APR/GPR static port services.
required:
- compatible
diff --git a/MAINTAINERS b/MAINTAINERS index 3df7b9a3f5ba..804e4a700477 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -16893,7 +16893,7 @@ M: Srinivas Kandagatla srinivas.kandagatla@linaro.org M: Banajit Goswami bgoswami@quicinc.com L: alsa-devel@alsa-project.org (moderated for non-subscribers) S: Supported -F: Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +F: Documentation/devicetree/bindings/soc/qcom/qcom,apr* F: Documentation/devicetree/bindings/sound/qcom,* F: drivers/soc/qcom/apr.c F: include/dt-bindings/sound/qcom,wcd9335.h
On 11/11/2022 17:35, Srinivas Kandagatla wrote:
On 11/11/2022 11:35, Krzysztof Kozlowski wrote:
The APR/GPR nodes are organized like:
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]) already grows
I have not seen these grow or change alteast in the past 9 years.
You added GPR to services in 2021, so it grew past 9 years. Then it grew in 2022 when I started adding missing pieces - missing compatibles and properties.
Old APR (Elite f/w) and new GPR (AudioReach) interface provides access to static services on the DSP.
considerably and is still quite not specific. It allows several incorrect combinations, like adding a clock-controller to a APM device.
This should be fixed for sure for validation.
This cannot be fixed without making schema over-complicated. It includes six different compatibles. Except few of them - these compatibles represent different devices.
We had dedicated bindings per service before.
Where?
As the service has changed as part of new AudioReach Firmware, we could have added new bindings for these services again. But as we are dealing with the same audio hardware and clock resources a new bindings per service did not make sense. Since then we moved all the lpass audio ports and clocks related bindings to qcom,q6dsp-lpass-clocks.yaml and qcom,q6dsp-lpass-ports.yaml.
These are not bindings for services but bindings for their devices.
Best regards, Krzysztof
On 11/11/2022 12:35, Krzysztof Kozlowski wrote:
The APR/GPR nodes are organized like:
apr-or-gpr-device-node <- qcom,apr.yaml apr-gpr-service@[0-9] <- qcom,apr.yaml service-specific-components <- /schemas/sound/qcom,q6*.yaml
(...)
+additionalProperties: true diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml index 0a7a34cb2497..9302ffe567d6 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml @@ -80,115 +80,13 @@ properties: '#size-cells': const: 0
-#APR/GPR Services patternProperties: "^service@[1-9a-d]$": type: object
- $ref: /schemas/soc/qcom/qcom,apr-services.yaml
- additionalProperties: true description:
APR/GPR node's client devices use subnodes for desired static port services.
- properties:
compatible:
enum:
- qcom,q6core
- qcom,q6asm
- qcom,q6afe
- qcom,q6adm
- qcom,q6apm
- qcom,q6prm
I think that this piece could stay here. Otherwise we allow any compatible which matches the qcom,apr-services.yaml binding, but that's easy to achieve.
Best regards, Krzysztof
The APR/GPR bindings with services got complicated so move out the Q6AFE service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Move most of the examples from its children to this new file.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../devicetree/bindings/sound/qcom,q6afe.yaml | 69 +++++++++++++++++++ .../sound/qcom,q6dsp-lpass-clocks.yaml | 40 +---------- .../sound/qcom,q6dsp-lpass-ports.yaml | 56 +++------------ 3 files changed, 81 insertions(+), 84 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6afe.yaml
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6afe.yaml b/Documentation/devicetree/bindings/sound/qcom,q6afe.yaml new file mode 100644 index 000000000000..45ad703d70bd --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,q6afe.yaml @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,q6afe.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Audio FrontEnd (Q6AFE) + +maintainers: + - Krzysztof Kozlowski krzysztof.kozlowski@linaro.org + - Srinivas Kandagatla srinivas.kandagatla@linaro.org + +allOf: + - $ref: /schemas/soc/qcom/qcom,apr-services.yaml# + +properties: + compatible: + enum: + - qcom,q6afe + + clock-controller: + $ref: /schemas/sound/qcom,q6dsp-lpass-clocks.yaml# + unevaluatedProperties: false + description: Qualcomm DSP LPASS clock controller + + dais: + type: object + $ref: /schemas/sound/qcom,q6dsp-lpass-ports.yaml# + unevaluatedProperties: false + description: Qualcomm DSP audio ports + +required: + - compatible + - dais + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/soc/qcom,apr.h> + #include <dt-bindings/sound/qcom,q6afe.h> + apr { + #address-cells = <1>; + #size-cells = <0>; + + service@4 { + compatible = "qcom,q6afe"; + reg = <APR_SVC_AFE>; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + + clock-controller { + compatible = "qcom,q6afe-clocks"; + #clock-cells = <2>; + }; + + dais { + compatible = "qcom,q6afe-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + + dai@22 { + reg = <QUATERNARY_MI2S_RX>; + qcom,sd-lines = <0 1 2 3>; + }; + }; + + }; + }; diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml index fd567d20417d..aa6c0ecba5cf 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-clocks.yaml @@ -35,41 +35,7 @@ additionalProperties: false
examples: - | - #include <dt-bindings/soc/qcom,apr.h> - #include <dt-bindings/sound/qcom,q6afe.h> - apr { - compatible = "qcom,apr-v2"; - qcom,domain = <APR_DOMAIN_ADSP>; - #address-cells = <1>; - #size-cells = <0>; - - service@4 { - compatible = "qcom,q6afe"; - reg = <APR_SVC_AFE>; - qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; - - clock-controller { - compatible = "qcom,q6afe-clocks"; - #clock-cells = <2>; - }; - }; - }; - - - | - #include <dt-bindings/soc/qcom,gpr.h> - gpr { - compatible = "qcom,gpr"; - qcom,domain = <GPR_DOMAIN_ID_ADSP>; - #address-cells = <1>; - #size-cells = <0>; - - service@2 { - reg = <GPR_PRM_MODULE_IID>; - compatible = "qcom,q6prm"; - - clock-controller { - compatible = "qcom,q6prm-lpass-clocks"; - #clock-cells = <2>; - }; - }; + clock-controller { + compatible = "qcom,q6afe-clocks"; + #clock-cells = <2>; }; diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml index e53fc0960a14..b202692f1756 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml @@ -150,54 +150,16 @@ additionalProperties: false
examples: - | - #include <dt-bindings/soc/qcom,apr.h> - #include <dt-bindings/sound/qcom,q6afe.h> - apr { - compatible = "qcom,apr-v2"; - #address-cells = <1>; - #size-cells = <0>; - qcom,domain = <APR_DOMAIN_ADSP>; - - service@4 { - compatible = "qcom,q6afe"; - reg = <APR_SVC_AFE>; - qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; - - dais { - compatible = "qcom,q6afe-dais"; - #address-cells = <1>; - #size-cells = <0>; - #sound-dai-cells = <1>; - - dai@22 { - reg = <QUATERNARY_MI2S_RX>; - qcom,sd-lines = <0 1 2 3>; - }; - }; - }; - }; - - | - #include <dt-bindings/soc/qcom,gpr.h> - gpr { - compatible = "qcom,gpr"; + #include <dt-bindings/sound/qcom,q6dsp-lpass-ports.h> + + dais { + compatible = "qcom,q6afe-dais"; #address-cells = <1>; #size-cells = <0>; - qcom,domain = <GPR_DOMAIN_ID_ADSP>; - - service@1 { - compatible = "qcom,q6apm"; - reg = <GPR_APM_MODULE_IID>; - - dais { - compatible = "qcom,q6apm-lpass-dais"; - #address-cells = <1>; - #size-cells = <0>; - #sound-dai-cells = <1>; - - dai@22 { - reg = <QUATERNARY_MI2S_RX>; - qcom,sd-lines = <0 1 2 3>; - }; - }; + #sound-dai-cells = <1>; + + dai@22 { + reg = <QUATERNARY_MI2S_RX>; + qcom,sd-lines = <0 1 2 3>; }; };
The APR/GPR bindings with services got complicated so move out the Q6APM service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Move most of the examples from its children to this new file.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/qcom,q6apm-dai.yaml | 19 ++----- .../devicetree/bindings/sound/qcom,q6apm.yaml | 51 +++++++++++++++++++ 2 files changed, 54 insertions(+), 16 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm.yaml
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml index 24f7bf2bfd95..73a4afad5a74 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6apm-dai.yaml @@ -27,20 +27,7 @@ additionalProperties: false
examples: - | - #include <dt-bindings/soc/qcom,gpr.h> - gpr { - compatible = "qcom,gpr"; - #address-cells = <1>; - #size-cells = <0>; - qcom,domain = <GPR_DOMAIN_ID_ADSP>; - - service@1 { - compatible = "qcom,q6apm"; - reg = <1>; - - dais { - compatible = "qcom,q6apm-dais"; - iommus = <&apps_smmu 0x1801 0x0>; - }; - }; + dais { + compatible = "qcom,q6apm-dais"; + iommus = <&apps_smmu 0x1801 0x0>; }; diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml new file mode 100644 index 000000000000..7acb832aa557 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,q6apm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Audio Process Manager (Q6APM) + +maintainers: + - Krzysztof Kozlowski krzysztof.kozlowski@linaro.org + - Srinivas Kandagatla srinivas.kandagatla@linaro.org + +allOf: + - $ref: /schemas/soc/qcom/qcom,apr-services.yaml# + +properties: + compatible: + enum: + - qcom,q6apm + + dais: + type: object + $ref: /schemas/sound/qcom,q6apm-dai.yaml# + unevaluatedProperties: false + description: Qualcomm DSP audio ports + +required: + - compatible + - dais + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/soc/qcom,gpr.h> + + gpr { + #address-cells = <1>; + #size-cells = <0>; + + service@1 { + reg = <GPR_APM_MODULE_IID>; + compatible = "qcom,q6apm"; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + + dais { + compatible = "qcom,q6apm-dais"; + iommus = <&apps_smmu 0x1801 0x0>; + }; + }; + };
The APR/GPR bindings with services got complicated so move out the Q6ADM service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Move most of the examples from its children to this new file.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/qcom,q6adm-routing.yaml | 22 ++------ .../devicetree/bindings/sound/qcom,q6adm.yaml | 51 +++++++++++++++++++ 2 files changed, 54 insertions(+), 19 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm.yaml
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml b/Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml index d0f7a79e240a..b7ed2d3f21f9 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6adm-routing.yaml @@ -30,23 +30,7 @@ additionalProperties: false
examples: - | - #include <dt-bindings/soc/qcom,apr.h> - #include <dt-bindings/sound/qcom,q6asm.h> - - apr { - compatible = "qcom,apr-v2"; - qcom,domain = <APR_DOMAIN_ADSP>; - #address-cells = <1>; - #size-cells = <0>; - - service@8 { - compatible = "qcom,q6adm"; - reg = <APR_SVC_ADM>; - qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; - - routing { - compatible = "qcom,q6adm-routing"; - #sound-dai-cells = <0>; - }; - }; + routing { + compatible = "qcom,q6adm-routing"; + #sound-dai-cells = <0>; }; diff --git a/Documentation/devicetree/bindings/sound/qcom,q6adm.yaml b/Documentation/devicetree/bindings/sound/qcom,q6adm.yaml new file mode 100644 index 000000000000..fe14a97ea616 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,q6adm.yaml @@ -0,0 +1,51 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,q6adm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Audio Device Manager (Q6ADM) + +maintainers: + - Krzysztof Kozlowski krzysztof.kozlowski@linaro.org + - Srinivas Kandagatla srinivas.kandagatla@linaro.org + +allOf: + - $ref: /schemas/soc/qcom/qcom,apr-services.yaml# + +properties: + compatible: + enum: + - qcom,q6adm + + routing: + type: object + $ref: /schemas/sound/qcom,q6adm-routing.yaml# + unevaluatedProperties: false + description: Qualcomm DSP LPASS audio routing + +required: + - compatible + - routing + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/soc/qcom,apr.h> + + apr { + #address-cells = <1>; + #size-cells = <0>; + + service@8 { + compatible = "qcom,q6adm"; + reg = <APR_SVC_ADM>; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + + routing { + compatible = "qcom,q6adm-routing"; + #sound-dai-cells = <0>; + }; + }; + };
The APR/GPR bindings with services got complicated so move out the Q6ASM service to its own binding. Previously the compatible was documented in qcom,apr.yaml. Move most of the examples from its children to this new file.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/qcom,q6asm-dais.yaml | 48 +++++-------- .../devicetree/bindings/sound/qcom,q6asm.yaml | 68 +++++++++++++++++++ 2 files changed, 84 insertions(+), 32 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.yaml
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml b/Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml index 8deb8ffb143b..0110b38f6de9 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6asm-dais.yaml @@ -73,40 +73,24 @@ additionalProperties: false
examples: - | - #include <dt-bindings/soc/qcom,apr.h> - #include <dt-bindings/sound/qcom,q6asm.h> - - apr { - compatible = "qcom,apr-v2"; - qcom,domain = <APR_DOMAIN_ADSP>; + dais { + compatible = "qcom,q6asm-dais"; + iommus = <&apps_smmu 0x1821 0x0>; #address-cells = <1>; #size-cells = <0>; + #sound-dai-cells = <1>; + + dai@0 { + reg = <0>; + }; + + dai@1 { + reg = <1>; + };
- service@7 { - compatible = "qcom,q6asm"; - reg = <APR_SVC_ASM>; - qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; - - dais { - compatible = "qcom,q6asm-dais"; - iommus = <&apps_smmu 0x1821 0x0>; - #address-cells = <1>; - #size-cells = <0>; - #sound-dai-cells = <1>; - - dai@0 { - reg = <0>; - }; - - dai@1 { - reg = <1>; - }; - - dai@2 { - reg = <2>; - is-compress-dai; - direction = <1>; - }; - }; + dai@2 { + reg = <2>; + is-compress-dai; + direction = <1>; }; }; diff --git a/Documentation/devicetree/bindings/sound/qcom,q6asm.yaml b/Documentation/devicetree/bindings/sound/qcom,q6asm.yaml new file mode 100644 index 000000000000..cb49f9667cca --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,q6asm.yaml @@ -0,0 +1,68 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,q6asm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Audio Stream Manager (Q6ASM) + +maintainers: + - Krzysztof Kozlowski krzysztof.kozlowski@linaro.org + - Srinivas Kandagatla srinivas.kandagatla@linaro.org + +allOf: + - $ref: /schemas/soc/qcom/qcom,apr-services.yaml# + +properties: + compatible: + enum: + - qcom,q6asm + + dais: + type: object + $ref: /schemas/sound/qcom,q6asm-dais.yaml# + unevaluatedProperties: false + description: Qualcomm DSP audio ports + +required: + - compatible + - dais + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/soc/qcom,apr.h> + + apr { + #address-cells = <1>; + #size-cells = <0>; + + service@7 { + compatible = "qcom,q6asm"; + reg = <APR_SVC_ASM>; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + + dais { + compatible = "qcom,q6asm-dais"; + iommus = <&apps_smmu 0x1821 0x0>; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + + dai@0 { + reg = <0>; + }; + + dai@1 { + reg = <1>; + }; + + dai@2 { + reg = <2>; + is-compress-dai; + direction = <1>; + }; + }; + }; + };
The APR/GPR bindings with services got complicated so move out the Q6PRM service to its own binding. Previously the compatible was documented in qcom,apr.yaml.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../devicetree/bindings/sound/qcom,q6prm.yaml | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6prm.yaml
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6prm.yaml b/Documentation/devicetree/bindings/sound/qcom,q6prm.yaml new file mode 100644 index 000000000000..f6dbb1267bfe --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,q6prm.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,q6prm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Proxy Resource Manager (Q6PRM) + +maintainers: + - Krzysztof Kozlowski krzysztof.kozlowski@linaro.org + - Srinivas Kandagatla srinivas.kandagatla@linaro.org + +allOf: + - $ref: /schemas/soc/qcom/qcom,apr-services.yaml# + +properties: + compatible: + enum: + - qcom,q6prm + + clock-controller: + $ref: /schemas/sound/qcom,q6dsp-lpass-clocks.yaml# + unevaluatedProperties: false + description: Qualcomm DSP LPASS clock controller + +required: + - compatible + - clock-controller + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/soc/qcom,gpr.h> + + gpr { + #address-cells = <1>; + #size-cells = <0>; + + service@2 { + reg = <GPR_PRM_MODULE_IID>; + compatible = "qcom,q6prm"; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + + clock-controller { + compatible = "qcom,q6prm-lpass-clocks"; + #clock-cells = <2>; + }; + }; + };
The APR/GPR bindings with services got complicated so move out the Q6Core service to its own binding. Previously the compatible was documented in qcom,apr.yaml.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/qcom,q6core.yaml | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6core.yaml
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6core.yaml b/Documentation/devicetree/bindings/sound/qcom,q6core.yaml new file mode 100644 index 000000000000..e240712de9ca --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,q6core.yaml @@ -0,0 +1,39 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,q6core.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Audio Core (Q6Core) + +maintainers: + - Krzysztof Kozlowski krzysztof.kozlowski@linaro.org + - Srinivas Kandagatla srinivas.kandagatla@linaro.org + +allOf: + - $ref: /schemas/soc/qcom/qcom,apr-services.yaml# + +properties: + compatible: + enum: + - qcom,q6core + +required: + - compatible + +unevaluatedProperties: false + +examples: + - | + #include <dt-bindings/soc/qcom,apr.h> + + apr { + #address-cells = <1>; + #size-cells = <0>; + + service@3 { + compatible = "qcom,q6core"; + reg = <APR_SVC_ADSP_CORE>; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + }; + };
The Qualcomm DSP LPASS Audio DAIs are a bit different than Qualcomm DSP Audio FrontEnd (Q6AFE) DAIs - they do not use children nodes for each DAI. None of other properties from qcom,q6dsp-lpass-ports.yaml apply here as well, so move the qcom,q6apm-lpass-dais compatible to its own binding.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../bindings/sound/qcom,q6apm-lpass-dais.yaml | 32 +++++++++++++++++++ .../sound/qcom,q6dsp-lpass-ports.yaml | 1 - 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml new file mode 100644 index 000000000000..4b3ce779206b --- /dev/null +++ b/Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml @@ -0,0 +1,32 @@ +# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/qcom,q6apm-lpass-dais.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm DSP LPASS (Low Power Audio SubSystem) Audio Ports + +maintainers: + - Krzysztof Kozlowski krzysztof.kozlowski@linaro.org + - Srinivas Kandagatla srinivas.kandagatla@linaro.org + +properties: + compatible: + enum: + - qcom,q6apm-lpass-dais + + '#sound-dai-cells': + const: 1 + +required: + - compatible + - '#sound-dai-cells' + +additionalProperties: false + +examples: + - | + dais { + compatible = "qcom,q6apm-lpass-dais"; + #sound-dai-cells = <1>; + }; diff --git a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml index b202692f1756..d8ebf2e528d2 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6dsp-lpass-ports.yaml @@ -16,7 +16,6 @@ properties: compatible: enum: - qcom,q6afe-dais - - qcom,q6apm-lpass-dais
'#sound-dai-cells': const: 1
On SM8450 and SC8280XP, the Q6APM is a bit different: 1. It is used as a platform DAI link, so it needs #sound-dai-cells. 2. It has two DAI children, so add new "bedais" node.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org --- .../devicetree/bindings/sound/qcom,q6apm.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml index 7acb832aa557..cd434e8268ce 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml @@ -18,14 +18,24 @@ properties: enum: - qcom,q6apm
+ bedais: + type: object + $ref: /schemas/sound/qcom,q6apm-lpass-dais.yaml# + unevaluatedProperties: false + description: Qualcomm DSP audio ports + dais: type: object $ref: /schemas/sound/qcom,q6apm-dai.yaml# unevaluatedProperties: false description: Qualcomm DSP audio ports
+ '#sound-dai-cells': + const: 0 + required: - compatible + - bedais - dais
unevaluatedProperties: false @@ -41,11 +51,17 @@ examples: service@1 { reg = <GPR_APM_MODULE_IID>; compatible = "qcom,q6apm"; + #sound-dai-cells = <0>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
dais { compatible = "qcom,q6apm-dais"; iommus = <&apps_smmu 0x1801 0x0>; }; + + bedais { + compatible = "qcom,q6apm-lpass-dais"; + #sound-dai-cells = <1>; + }; }; };
On 11/11/2022 11:35, Krzysztof Kozlowski wrote:
On SM8450 and SC8280XP, the Q6APM is a bit different:
This is not specific to SM8450 or SC8280XP its part of AudioReach apm which deals with both backends and pcm.
In old Elite architecture we had a dedicated service AFE to deal with Backend dais, now APM does all.
Thanks, Srini
- It is used as a platform DAI link, so it needs #sound-dai-cells.
- It has two DAI children, so add new "bedais" node.
Signed-off-by: Krzysztof Kozlowski krzysztof.kozlowski@linaro.org
.../devicetree/bindings/sound/qcom,q6apm.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
diff --git a/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml index 7acb832aa557..cd434e8268ce 100644 --- a/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml +++ b/Documentation/devicetree/bindings/sound/qcom,q6apm.yaml @@ -18,14 +18,24 @@ properties: enum: - qcom,q6apm
bedais:
type: object
$ref: /schemas/sound/qcom,q6apm-lpass-dais.yaml#
unevaluatedProperties: false
description: Qualcomm DSP audio ports
dais: type: object $ref: /schemas/sound/qcom,q6apm-dai.yaml# unevaluatedProperties: false description: Qualcomm DSP audio ports
'#sound-dai-cells':
const: 0
required:
- compatible
- bedais
- dais
unevaluatedProperties: false
@@ -41,11 +51,17 @@ examples: service@1 { reg = <GPR_APM_MODULE_IID>; compatible = "qcom,q6apm";
#sound-dai-cells = <0>; qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; dais { compatible = "qcom,q6apm-dais"; iommus = <&apps_smmu 0x1801 0x0>; };
bedais {
compatible = "qcom,q6apm-lpass-dais";
#sound-dai-cells = <1>;
}; }; };
On 14/11/2022 12:40, Srinivas Kandagatla wrote:
On 11/11/2022 11:35, Krzysztof Kozlowski wrote:
On SM8450 and SC8280XP, the Q6APM is a bit different:
This is not specific to SM8450 or SC8280XP its part of AudioReach apm which deals with both backends and pcm.
In old Elite architecture we had a dedicated service AFE to deal with Backend dais, now APM does all.
Sure, I'll add it to commit msg.
Best regards, Krzysztof
On 11/11/2022 12:35, Krzysztof Kozlowski wrote:
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]) already grows considerably 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.
I forgot to mention that DTS in progress is available here: https://github.com/krzk/linux/blob/wip/sm8450/arch/arm64/boot/dts/qcom/sm845... https://github.com/krzk/linux/blob/wip/sm8450/arch/arm64/boot/dts/qcom/sm845...
Best regards, Krzysztof
On 11/11/2022 11:35, Krzysztof Kozlowski wrote:
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]) already grows considerably 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.
Why would this grow? All the dsp services are static and they will not change per SoC unless there is a total firmware change in DSP.
Refactor the bindings before extending them for Qualcomm SM8450 SoC.
I dont understand this bit, what is SoC audio support to do with DSP bindings. DSP bindings should be totally independent of this.
--srini
Best regards, Krzysztof
Krzysztof Kozlowski (10): ASoC: dt-bindings: qcom,apr: Add GLINK channel name for SM8450 ASoC: dt-bindings: qcom,apr: Split services to shared schema ASoC: dt-bindings: qcom,q6afe: Split to separate schema ASoC: dt-bindings: qcom,q6apm: Split to separate schema ASoC: dt-bindings: qcom,q6adm: Split to separate schema ASoC: dt-bindings: qcom,q6asm: Split to separate schema ASoC: dt-bindings: qcom,q6prm: Split to separate schema ASoC: dt-bindings: qcom,q6core: Split to separate schema ASoC: dt-bindings: qcom,q6apm-lpass-dais: Split to separate schema ASoC: dt-bindings: qcom,q6apm: Add SM8450 bedais node
.../bindings/soc/qcom/qcom,apr-services.yaml | 54 ++++++++ .../bindings/soc/qcom/qcom,apr.yaml | 119 ++---------------- .../bindings/sound/qcom,q6adm-routing.yaml | 22 +--- .../devicetree/bindings/sound/qcom,q6adm.yaml | 51 ++++++++ .../devicetree/bindings/sound/qcom,q6afe.yaml | 69 ++++++++++ .../bindings/sound/qcom,q6apm-dai.yaml | 19 +-- .../bindings/sound/qcom,q6apm-lpass-dais.yaml | 32 +++++ .../devicetree/bindings/sound/qcom,q6apm.yaml | 67 ++++++++++ .../bindings/sound/qcom,q6asm-dais.yaml | 48 +++---- .../devicetree/bindings/sound/qcom,q6asm.yaml | 68 ++++++++++ .../bindings/sound/qcom,q6core.yaml | 39 ++++++ .../sound/qcom,q6dsp-lpass-clocks.yaml | 40 +----- .../sound/qcom,q6dsp-lpass-ports.yaml | 57 ++------- .../devicetree/bindings/sound/qcom,q6prm.yaml | 50 ++++++++ MAINTAINERS | 2 +- 15 files changed, 477 insertions(+), 260 deletions(-) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,apr-services.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6adm.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6afe.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm-lpass-dais.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6apm.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6asm.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6core.yaml create mode 100644 Documentation/devicetree/bindings/sound/qcom,q6prm.yaml
On 11/11/2022 17:15, Srinivas Kandagatla wrote:
On 11/11/2022 11:35, Krzysztof Kozlowski wrote:
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]) already grows considerably 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.
Why would this grow? All the dsp services are static and they will not change per SoC unless there is a total firmware change in DSP.
They grow now with SM8450 which requires changes there. Otherwise DTS does not pass with current bindings. The bindings before my fixing in 2022 were really incomplete. Now they are complete, but: 1. Not for SM8450 - this will bring new things, 2. Very unspecific as they allow multiple invalid configurations.
Refactor the bindings before extending them for Qualcomm SM8450 SoC.
I dont understand this bit, what is SoC audio support to do with DSP bindings. DSP bindings should be totally independent of this.
APR/GPR bindings are for SoC audio, so while adding SoC audio the first are affected. If you went through the commits here, you would notice the changes.
Best regards, Krzysztof
On 14/11/2022 07:48, Krzysztof Kozlowski wrote:
On 11/11/2022 17:15, Srinivas Kandagatla wrote:
On 11/11/2022 11:35, Krzysztof Kozlowski wrote:
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]) already grows considerably 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.
Why would this grow? All the dsp services are static and they will not change per SoC unless there is a total firmware change in DSP.
They grow now with SM8450 which requires changes there. Otherwise DTS does not pass with current bindings. The bindings before my fixing in 2022 were really incomplete. Now they are complete, but:
- Not for SM8450 - this will bring new things,
- Very unspecific as they allow multiple invalid configurations.
Okay, I looked at all the patches, they are fine as it is, the confusion part is the subject and comments which are misleading and trying to say that these are specific to SM8450 or SC8280XP. Infact this is not true, none of these changes are specific to any SoC, they are part of AudioReach.
--srini
Refactor the bindings before extending them for Qualcomm SM8450 SoC.
I dont understand this bit, what is SoC audio support to do with DSP bindings. DSP bindings should be totally independent of this.
APR/GPR bindings are for SoC audio, so while adding SoC audio the first are affected. If you went through the commits here, you would notice the changes.
Best regards, Krzysztof
On 14/11/2022 12:50, Srinivas Kandagatla wrote:
On 14/11/2022 07:48, Krzysztof Kozlowski wrote:
On 11/11/2022 17:15, Srinivas Kandagatla wrote:
On 11/11/2022 11:35, Krzysztof Kozlowski wrote:
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]) already grows considerably 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.
Why would this grow? All the dsp services are static and they will not change per SoC unless there is a total firmware change in DSP.
They grow now with SM8450 which requires changes there. Otherwise DTS does not pass with current bindings. The bindings before my fixing in 2022 were really incomplete. Now they are complete, but:
- Not for SM8450 - this will bring new things,
- Very unspecific as they allow multiple invalid configurations.
Okay, I looked at all the patches, they are fine as it is, the confusion part is the subject and comments which are misleading and trying to say that these are specific to SM8450 or SC8280XP. Infact this is not true, none of these changes are specific to any SoC, they are part of AudioReach.
They are part of bringing audio on SM8450, at the end we all are SoC centric... we do not bring support for AudioReach just for itself, right? We bring it because we want to have something working on SM8450 and further...
Best regards, Krzysztof
participants (3)
-
Krzysztof Kozlowski
-
Rob Herring
-
Srinivas Kandagatla