All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: bjorn.andersson@linaro.org, broonie@kernel.org,
	plai@codeaurora.org, tiwai@suse.de, devicetree@vger.kernel.org,
	perex@perex.cz, alsa-devel@alsa-project.org, lgirdwood@gmail.com,
	bgoswami@codeaurora.org
Subject: Re: [PATCH v4 03/20] soc: dt-bindings: qcom: add gpr bindings
Date: Fri, 13 Aug 2021 17:32:16 -0500	[thread overview]
Message-ID: <YRby8EtUeXnqEd8m@robh.at.kernel.org> (raw)
In-Reply-To: <20210809112339.8368-4-srinivas.kandagatla@linaro.org>

On Mon, Aug 09, 2021 at 12:23:22PM +0100, Srinivas Kandagatla wrote:
> Qualcomm Generic Packet router aka GPR is the IPC mechanism found
> in AudioReach next generation signal processing framework to perform
> command and response messages between various processors.
> 
> GPR has concepts of static and dynamic port, all static services like
> APM (Audio Processing Manager), PRM (Proxy resource manager) have
> fixed port numbers where as dynamic services like graphs have dynamic
> port numbers which are allocated at runtime. All GPR packet messages
> will have source and destination domain and port along with opcode
> and payload.
> 
> This support is added using existing APR driver to reuse most of
> the code.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  .../bindings/soc/qcom/qcom,apr.yaml           | 92 ++++++++++++++++++-
>  include/dt-bindings/soc/qcom,gpr.h            | 18 ++++
>  2 files changed, 105 insertions(+), 5 deletions(-)
>  create mode 100644 include/dt-bindings/soc/qcom,gpr.h
> 
> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
> index 12650f7084f4..59d8b4dce8b5 100644
> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
> @@ -4,14 +4,14 @@
>  $id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#"
>  $schema: "http://devicetree.org/meta-schemas/core.yaml#"
>  
> -title: Qualcomm APR (Asynchronous Packet Router) binding
> +title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding
>  
>  maintainers:
>    - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>  
>  description: |
> -  This binding describes the Qualcomm APR, APR is a IPC protocol for
> -  communication between Application processor and QDSP. APR is mainly
> +  This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for
> +  communication between Application processor and QDSP. APR/GPR is mainly
>    used for audio/voice services on the QDSP.
>  
>  properties:
> @@ -19,6 +19,7 @@ properties:
>      enum:
>        - qcom,apr
>        - qcom,apr-v2
> +      - qcom,gpr
>  
>    qcom,apr-domain:
>      $ref: /schemas/types.yaml#/definitions/uint32
> @@ -33,13 +34,22 @@ properties:
>          6 = Modem2 Domain
>          7 = Application Processor2 Domain
>  
> +  qcom,gpr-domain:

When the next flavor comes out, we'll have qcom,foo-domain?

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2, 3]
> +    description:
> +      Selects the processor domain for gpr
> +        1 = Modem Domain
> +        2 = Audio DSP Domain
> +        3 = Application Processor Domain
> +
>    '#address-cells':
>      const: 1
>  
>    '#size-cells':
>      const: 0
>  
> -#APR Services
> +#APR/GPR Services
>  patternProperties:
>    "^apr-service@[0-9a-e]$":
>      type: object
> @@ -86,9 +96,66 @@ patternProperties:
>  
>      additionalProperties: false
>  
> +  "^gpr-service@[0-9a-e]$":

And foo-service@...

Do you (the driver) care what the node name is?

> +    type: object
> +    description:
> +      GPR node's client devices use subnodes for desired static port services.
> +
> +    properties:
> +      compatible:
> +        enum:
> +          - qcom,q6apm
> +          - qcom,q6prm
> +
> +      reg:
> +        enum: [1, 2, 3, 4]
> +        description:
> +          GPR Service ID
> +            1 = Audio Process Manager Service
> +            2 = Proxy Resource Manager Service.

Looks like both reg and compatible encode what the service is.

> +            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
> +          has dependency on.
> +        items:
> +          - const: avs/audio
> +          - const: msm/adsp/audio_pd

Why are we redefining the same property? You've combined the binding but 
are still sharing almost nothing...

> +
> +      '#address-cells':
> +        const: 1
> +
> +      '#size-cells':
> +        const: 0
> +
> +    additionalProperties: false
> +
>  required:
>    - compatible
> -  - qcom,apr-domain
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,apr-v2
> +              - qcom,apr
> +    then:
> +      required:
> +        - qcom,apr-domain
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,gpr
> +    then:
> +      required:
> +        - qcom,gpr-domain
>  
>  additionalProperties: false
>  
> @@ -125,3 +192,18 @@ examples:
>            qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
>          };
>      };
> +
> +  - |
> +    #include <dt-bindings/soc/qcom,gpr.h>
> +    gpr {
> +        compatible = "qcom,gpr";
> +        qcom,gpr-domain = <GPR_DOMAIN_ID_ADSP>;
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        gpr-service@1 {
> +          compatible = "qcom,q6apm";
> +          reg = <GPR_APM_MODULE_IID>;
> +          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> +        };
> +    };
> diff --git a/include/dt-bindings/soc/qcom,gpr.h b/include/dt-bindings/soc/qcom,gpr.h
> new file mode 100644
> index 000000000000..1c68906e079c
> --- /dev/null
> +++ b/include/dt-bindings/soc/qcom,gpr.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __DT_BINDINGS_QCOM_GPR_H
> +#define __DT_BINDINGS_QCOM_GPR_H
> +
> +/* DOMAINS */
> +
> +#define GPR_DOMAIN_ID_MODEM	1
> +#define GPR_DOMAIN_ID_ADSP	2
> +#define GPR_DOMAIN_ID_APPS	3
> +
> +/* Static Services */
> +
> +#define GPR_APM_MODULE_IID		1
> +#define GPR_PRM_MODULE_IID		2
> +#define GPR_AMDB_MODULE_IID		3
> +#define GPR_VCPM_MODULE_IID		4
> +
> +#endif /* __DT_BINDINGS_QCOM_GPR_H */
> -- 
> 2.21.0
> 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Rob Herring <robh@kernel.org>
To: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Cc: devicetree@vger.kernel.org, alsa-devel@alsa-project.org,
	bgoswami@codeaurora.org, tiwai@suse.de, plai@codeaurora.org,
	lgirdwood@gmail.com, broonie@kernel.org,
	bjorn.andersson@linaro.org
Subject: Re: [PATCH v4 03/20] soc: dt-bindings: qcom: add gpr bindings
Date: Fri, 13 Aug 2021 17:32:16 -0500	[thread overview]
Message-ID: <YRby8EtUeXnqEd8m@robh.at.kernel.org> (raw)
In-Reply-To: <20210809112339.8368-4-srinivas.kandagatla@linaro.org>

On Mon, Aug 09, 2021 at 12:23:22PM +0100, Srinivas Kandagatla wrote:
> Qualcomm Generic Packet router aka GPR is the IPC mechanism found
> in AudioReach next generation signal processing framework to perform
> command and response messages between various processors.
> 
> GPR has concepts of static and dynamic port, all static services like
> APM (Audio Processing Manager), PRM (Proxy resource manager) have
> fixed port numbers where as dynamic services like graphs have dynamic
> port numbers which are allocated at runtime. All GPR packet messages
> will have source and destination domain and port along with opcode
> and payload.
> 
> This support is added using existing APR driver to reuse most of
> the code.
> 
> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
> ---
>  .../bindings/soc/qcom/qcom,apr.yaml           | 92 ++++++++++++++++++-
>  include/dt-bindings/soc/qcom,gpr.h            | 18 ++++
>  2 files changed, 105 insertions(+), 5 deletions(-)
>  create mode 100644 include/dt-bindings/soc/qcom,gpr.h
> 
> diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
> index 12650f7084f4..59d8b4dce8b5 100644
> --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
> +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml
> @@ -4,14 +4,14 @@
>  $id: "http://devicetree.org/schemas/soc/qcom/qcom,apr.yaml#"
>  $schema: "http://devicetree.org/meta-schemas/core.yaml#"
>  
> -title: Qualcomm APR (Asynchronous Packet Router) binding
> +title: Qualcomm APR/GPR (Asynchronous/Generic Packet Router) binding
>  
>  maintainers:
>    - Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
>  
>  description: |
> -  This binding describes the Qualcomm APR, APR is a IPC protocol for
> -  communication between Application processor and QDSP. APR is mainly
> +  This binding describes the Qualcomm APR/GPR, APR/GPR is a IPC protocol for
> +  communication between Application processor and QDSP. APR/GPR is mainly
>    used for audio/voice services on the QDSP.
>  
>  properties:
> @@ -19,6 +19,7 @@ properties:
>      enum:
>        - qcom,apr
>        - qcom,apr-v2
> +      - qcom,gpr
>  
>    qcom,apr-domain:
>      $ref: /schemas/types.yaml#/definitions/uint32
> @@ -33,13 +34,22 @@ properties:
>          6 = Modem2 Domain
>          7 = Application Processor2 Domain
>  
> +  qcom,gpr-domain:

When the next flavor comes out, we'll have qcom,foo-domain?

> +    $ref: /schemas/types.yaml#/definitions/uint32
> +    enum: [1, 2, 3]
> +    description:
> +      Selects the processor domain for gpr
> +        1 = Modem Domain
> +        2 = Audio DSP Domain
> +        3 = Application Processor Domain
> +
>    '#address-cells':
>      const: 1
>  
>    '#size-cells':
>      const: 0
>  
> -#APR Services
> +#APR/GPR Services
>  patternProperties:
>    "^apr-service@[0-9a-e]$":
>      type: object
> @@ -86,9 +96,66 @@ patternProperties:
>  
>      additionalProperties: false
>  
> +  "^gpr-service@[0-9a-e]$":

And foo-service@...

Do you (the driver) care what the node name is?

> +    type: object
> +    description:
> +      GPR node's client devices use subnodes for desired static port services.
> +
> +    properties:
> +      compatible:
> +        enum:
> +          - qcom,q6apm
> +          - qcom,q6prm
> +
> +      reg:
> +        enum: [1, 2, 3, 4]
> +        description:
> +          GPR Service ID
> +            1 = Audio Process Manager Service
> +            2 = Proxy Resource Manager Service.

Looks like both reg and compatible encode what the service is.

> +            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
> +          has dependency on.
> +        items:
> +          - const: avs/audio
> +          - const: msm/adsp/audio_pd

Why are we redefining the same property? You've combined the binding but 
are still sharing almost nothing...

> +
> +      '#address-cells':
> +        const: 1
> +
> +      '#size-cells':
> +        const: 0
> +
> +    additionalProperties: false
> +
>  required:
>    - compatible
> -  - qcom,apr-domain
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,apr-v2
> +              - qcom,apr
> +    then:
> +      required:
> +        - qcom,apr-domain
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - qcom,gpr
> +    then:
> +      required:
> +        - qcom,gpr-domain
>  
>  additionalProperties: false
>  
> @@ -125,3 +192,18 @@ examples:
>            qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
>          };
>      };
> +
> +  - |
> +    #include <dt-bindings/soc/qcom,gpr.h>
> +    gpr {
> +        compatible = "qcom,gpr";
> +        qcom,gpr-domain = <GPR_DOMAIN_ID_ADSP>;
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        gpr-service@1 {
> +          compatible = "qcom,q6apm";
> +          reg = <GPR_APM_MODULE_IID>;
> +          qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd";
> +        };
> +    };
> diff --git a/include/dt-bindings/soc/qcom,gpr.h b/include/dt-bindings/soc/qcom,gpr.h
> new file mode 100644
> index 000000000000..1c68906e079c
> --- /dev/null
> +++ b/include/dt-bindings/soc/qcom,gpr.h
> @@ -0,0 +1,18 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +#ifndef __DT_BINDINGS_QCOM_GPR_H
> +#define __DT_BINDINGS_QCOM_GPR_H
> +
> +/* DOMAINS */
> +
> +#define GPR_DOMAIN_ID_MODEM	1
> +#define GPR_DOMAIN_ID_ADSP	2
> +#define GPR_DOMAIN_ID_APPS	3
> +
> +/* Static Services */
> +
> +#define GPR_APM_MODULE_IID		1
> +#define GPR_PRM_MODULE_IID		2
> +#define GPR_AMDB_MODULE_IID		3
> +#define GPR_VCPM_MODULE_IID		4
> +
> +#endif /* __DT_BINDINGS_QCOM_GPR_H */
> -- 
> 2.21.0
> 
> 

  reply	other threads:[~2021-08-13 22:32 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-09 11:23 [PATCH v4 00/20] ASoC: qcom: Add AudioReach support Srinivas Kandagatla
2021-08-09 11:23 ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 01/20] soc: dt-bindings: qcom: apr: convert to yaml Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-13 22:23   ` Rob Herring
2021-08-13 22:23     ` Rob Herring
2021-09-01 14:28     ` Srinivas Kandagatla
2021-09-01 14:28       ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 02/20] soc: qcom: apr: make code more reuseable Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 03/20] soc: dt-bindings: qcom: add gpr bindings Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-13 22:32   ` Rob Herring [this message]
2021-08-13 22:32     ` Rob Herring
2021-09-01 14:28     ` Srinivas Kandagatla
2021-09-01 14:28       ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 04/20] soc: qcom: apr: Add GPR support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 05/20] ASoC: dt-bindings: move LPASS dai related bindings out of q6afe Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 06/20] ASoC: dt-bindings: move LPASS clocks " Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 07/20] ASoC: dt-bindings: rename q6afe.h to q6dsp-lpass-ports.h Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 08/20] ASoC: qdsp6: q6afe-dai: move lpass audio ports to common file Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 09/20] ASoC: qdsp6: q6afe-clocks: move audio-clocks " Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 10/20] ASoC: dt-bindings: q6dsp: add q6apm-lpass-dai compatible Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 11/20] ASoC: dt-bindings: lpass-clocks: add q6prm clocks compatible Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 12/20] ASoC: dt-bindings: add q6apm digital audio stream bindings Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 13/20] ASoC: qdsp6: audioreach: add basic pkt alloc support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 14/20] ASoC: qdsp6: audioreach: add q6apm support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 15/20] ASoC: qdsp6: audioreach: add module configuration command helpers Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 16/20] ASoC: qdsp6: audioreach: add topology support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 17/20] ASoC: qdsp6: audioreach: add q6apm-dai support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 18/20] ASoC: qdsp6: audioreach: add q6apm lpass dai support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 19/20] ASoC: qdsp6: audioreach: add q6prm support Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla
2021-08-09 11:23 ` [PATCH v4 20/20] ASoC: qdsp6: audioreach: add support for q6prm-clocks Srinivas Kandagatla
2021-08-09 11:23   ` Srinivas Kandagatla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YRby8EtUeXnqEd8m@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=bgoswami@codeaurora.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=broonie@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=perex@perex.cz \
    --cc=plai@codeaurora.org \
    --cc=srinivas.kandagatla@linaro.org \
    --cc=tiwai@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.