From patchwork Tue Sep 21 13:36:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 514406 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp3091236jao; Tue, 21 Sep 2021 06:38:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwM6ZQwaETwyHjmc1RQznxACGNJPgjVvAos8iUa30TNg3VgfECV6gSDoq9Z+qy9o2Ubd2dS X-Received: by 2002:a17:907:20bb:: with SMTP id pw27mr34439996ejb.438.1632231537802; Tue, 21 Sep 2021 06:38:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1632231537; cv=none; d=google.com; s=arc-20160816; b=hsjYQxfy3auPcQB4sNKOQc7Gx3XZ6de0TYrX3brFFqbm0PuXdo82LsGcYI1SLAyYX0 bb2Kht0BDu441eyJCWqydjj83al7RsWe9m5JFUoWN5SKIRDt8Qdd7Ri+yo6+gCsX4Hcl UMejC4oo5npS8iNXGJwG1o/2jh4zQnkrg4rQI44UeT1LWkgAOMXUMQlCAh0V/uHy/bzO P9WaFOuyMZpBzFzK66r2BjQMFl4SzlEsYFv5DvgdUlncQMveeNDYb6yJqecveplHnXwo 8eaV7pe1o/ljR93F4ZewUQnnEE/Od/AaipU2stsGtH/uGWLwf3KSc1gMU4W8f2ZOQMa8 E0nQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=9h1xMEiV0P0T+5NxtCB5k6xQoY2x3NNYvUmlcG7EV4s=; b=NewpDncfODqQFiPic3Bw19JHnZVHNT2WNN8JzkNn+/in+7QqIjJoK+DgBBKAPOgu8e s9bvFO1GHulPGHSmnovmYndwKgEjlJDsaa3VXkdtpi7KHUctgxzJDIKsbF01Q5Zl7HpB vg/+8vJGZlz4Ev9OmmM9CDkG2Q64t4ajbmG6zsyOaSFTk6cGAt5FMicYHp4bHDUuTE8D Crqa+Hup0QPOSD6pUZmt4VMgM2cenMm/4mgNNe6oc3VUDpL6JoFnh8BsEa4QUvuO4dWa LGeLBx9tKVj2Ld99/zs7IUpT6JAduRkXdY3eh6YFdvIWfV8xkp8YYHbDoZXZJkcSM821 fIzQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gV9Hy9Wz; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id gv40si20271551ejc.399.2021.09.21.06.38.57; Tue, 21 Sep 2021 06:38:57 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gV9Hy9Wz; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233134AbhIUNkX (ORCPT + 7 others); Tue, 21 Sep 2021 09:40:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52740 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233128AbhIUNkX (ORCPT ); Tue, 21 Sep 2021 09:40:23 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86CC2C061757 for ; Tue, 21 Sep 2021 06:38:54 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id dj4so18748036edb.5 for ; Tue, 21 Sep 2021 06:38:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=9h1xMEiV0P0T+5NxtCB5k6xQoY2x3NNYvUmlcG7EV4s=; b=gV9Hy9Wzz18Zk9xzayAO6Qwv1zz5f0BSPLh2v7NtY1+pErcSf8ifM1g4E5ISw2+QQs igyYMWmVaNhUKE+1vPcA2t2hnobsjaAjDHXKvG0/CY65TsZLXPJe7Rj9blQJdLe5cIWs 4ZIy3ULh7PG5eNdVpkqhGiJXsCfNuNzq35MyUPpwMThVBZ+RbRwlrJLh7m4ydlXixdSU C8c2hyV3VlZma1+7mzEd6NzDO2Kt7ofHcnAt1nL3Tvx6TeX4LjwPeh8L2TxKE/UcivGN ALa240x9V9HFM+0w6KA5965Kk6+jhuohexZDJdE6/Crt9ABzzgPwTcOIZhLVgN+yccq+ heIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9h1xMEiV0P0T+5NxtCB5k6xQoY2x3NNYvUmlcG7EV4s=; b=GVxOjXIonIn6iJU+90jMDtvpTVz+Zn5xsKyh/uPlCxbr3sXYmMrYXg4IITMCg2zjrG hWJKpG5Na0yZWbXpo6n52PtgyrfG+nQNONB5vWDdpTbKlCU8kXb8jtS5tSXPCZXpsSMz pRhfnO1n9T2b6sh9g7dkVRtXFRM3F1spUNyRAWCAmLGbpiO8OIVZS3l5E0smh2BOkSS3 fAJH4RbibCKA8CtLxgr5WR2dELd3TENbEoSvEL+d47m+WGtl6Qzzl4eptj65wUQidr4D D5unOaloZRxCKCJkphpSxhLuD1UnfMbU13wIYSgw89qdbIj5Vpf89MXyWrFJr7fXEn7u xMig== X-Gm-Message-State: AOAM532mE5c/1ZpBGWLJp1Oc9osD7SrsH+aem1jW3DfYQG7/QXoCrqno et/8bh3OYLdo6YBofRQxvHJjzA== X-Received: by 2002:a17:907:11c2:: with SMTP id va2mr14250678ejb.160.1632231449372; Tue, 21 Sep 2021 06:37:29 -0700 (PDT) Received: from srini-hackbox.lan (cpc86377-aztw32-2-0-cust226.18-1.cable.virginm.net. [92.233.226.227]) by smtp.gmail.com with ESMTPSA id b3sm7915799edx.55.2021.09.21.06.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Sep 2021 06:37:28 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org Cc: plai@codeaurora.org, pierre-louis.bossart@linux.intel.com, tiwai@suse.de, devicetree@vger.kernel.org, perex@perex.cz, alsa-devel@alsa-project.org, lgirdwood@gmail.com, bgoswami@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v7 04/22] soc: dt-bindings: qcom: add gpr bindings Date: Tue, 21 Sep 2021 14:36:51 +0100 Message-Id: <20210921133709.4973-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210921133709.4973-1-srinivas.kandagatla@linaro.org> References: <20210921133709.4973-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org 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 Reviewed-by: Rob Herring --- .../bindings/soc/qcom/qcom,apr.yaml | 41 +++++++++++++++---- include/dt-bindings/soc/qcom,gpr.h | 19 +++++++++ 2 files changed, 53 insertions(+), 7 deletions(-) create mode 100644 include/dt-bindings/soc/qcom,gpr.h -- 2.21.0 diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml index bfe04fca8aa3..028c5d105adb 100644 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,apr.yaml @@ -4,20 +4,21 @@ $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 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: compatible: enum: - qcom,apr-v2 + - qcom,gpr qcom,apr-domain: $ref: /schemas/types.yaml#/definitions/uint32 @@ -46,6 +47,10 @@ properties: 5 = Application processor Domain 6 = Modem2 Domain 7 = Application Processor2 Domain + Selects the processor domain for gpr + 1 = Modem Domain + 2 = Audio DSP Domain + 3 = Application Processor Domain '#address-cells': const: 1 @@ -53,12 +58,12 @@ properties: '#size-cells': const: 0 -#APR Services +#APR/GPR Services patternProperties: - "^service@[3-9a-d]$": + "^service@[1-9a-d]$": type: object description: - APR node's client devices use subnodes for desired static port services. + APR/GPR node's client devices use subnodes for desired static port services. properties: compatible: @@ -67,9 +72,11 @@ patternProperties: - qcom,q6asm - qcom,q6afe - qcom,q6adm + - qcom,q6apm + - qcom,q6prm reg: - minimum: 3 + minimum: 1 maximum: 13 description: APR Service ID @@ -84,6 +91,11 @@ patternProperties: 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 @@ -148,3 +160,18 @@ examples: qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; }; }; + + - | + #include + gpr { + compatible = "qcom,gpr"; + qcom,domain = ; + #address-cells = <1>; + #size-cells = <0>; + + service@1 { + compatible = "qcom,q6apm"; + reg = ; + 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..3107da59319c --- /dev/null +++ b/include/dt-bindings/soc/qcom,gpr.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */ + +#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 */