From patchwork Wed Sep 15 13:13:15 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 512205 Delivered-To: patch@linaro.org Received: by 2002:a02:c816:0:0:0:0:0 with SMTP id p22csp170282jao; Wed, 15 Sep 2021 06:14:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzPUbukzLr9TRZhD0eUopdGJh2wmh9ksl53GIG2f1QeMjdnz8Aq3sfyfK/+RY7+MtAoB/gY X-Received: by 2002:a6b:8e87:: with SMTP id q129mr17951400iod.176.1631711688436; Wed, 15 Sep 2021 06:14:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631711688; cv=none; d=google.com; s=arc-20160816; b=sA8j2ULE45/RTDDv5O4RMIhzuyvuGYSqlCs0ALg2tz6paIbfqKerShVUccaPwX043B FY1drd3ziA5PpesHOXgBh73OScZ8Ba3So0F97eEWgZCXoijVdWq9JFOZBtSkZimxt+Ce GH8uli0f31a17MmKZ/Hmu/VYHnIh9Et+bdeKv+Q01XZTkq2X6WhESItJ33GCQiHCFves GrnTAYXmXsXqj5ONsaDAoFRhTsDh/CL5cwI2PbDIFHk0y4D6SJp3T4GVe5gE1oO2nKE5 sSckWPyQjTZmVrWWGPrFfId4YBMS8z8VRDvy+zU1N1tp4h9VzW+tGljsJnF8lqEBb5HC C+1g== 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=2cJVr3hNa4aWAix71c9LGWt7oh/MR6uMc4joRHEDdJE=; b=ey7ZvIb9tMCVDLV6TQdirOZHvMFyt4a1BVgwQSgNAwChPx3p8ctxF99KiMRwyH2KKS GqcHhV48zTETaK6KgsbLcyM1P6pHE7Rt2jAe8wCEwTJ+n4+y1Da3FyN1RmvBafQYupzU Xhl6I3gswhfxP+UMbzLZFaLS2BFc03tFAf8Hwd5WhFD/w2XAgcmSfDH96Aw/7R8IFj+b Ayw5/kSq9uhNu9md+nagy+FPmT2r7uJf8RpyRydflhprwJXy7OYobyxQ8YKFNKNUmTXu /l3A+p89cphQvrfYCFNUDOF9AYOlPChSlVOzKYEZcIhC6NelGf56B8EmRB62+F73DakX l8Ig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=fLqFc+pw; 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 d7si14683559ilg.5.2021.09.15.06.14.48; Wed, 15 Sep 2021 06:14:48 -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=fLqFc+pw; 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 S233791AbhIONQF (ORCPT + 6 others); Wed, 15 Sep 2021 09:16:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42264 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233191AbhIONQE (ORCPT ); Wed, 15 Sep 2021 09:16:04 -0400 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B57F8C061575 for ; Wed, 15 Sep 2021 06:14:45 -0700 (PDT) Received: by mail-wr1-x435.google.com with SMTP id b6so3815712wrh.10 for ; Wed, 15 Sep 2021 06:14:45 -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=2cJVr3hNa4aWAix71c9LGWt7oh/MR6uMc4joRHEDdJE=; b=fLqFc+pwChdEB1eEWW6DrwmmxeQOoqgtyhP67svHaKG9IsRIysKhXUEBh/aoOIkfWM etd48Bknu6OkOF6M4PlO2suSAmH32eNjKCA5OnZf41NcemNZfrB0v4BxErk9Rpg+p4tH 5qhl8HU/f06PsUgHaCmc8a8Wez5lCqUHzD6vSU3hlmYKktB7Xsh9TCgkko7LvDHdVSxa o3uuuGWp7xMpyIXBz/hYEdck5YnI3YF69gcbiecHbJTcVKZus0QStiEwVUJDOaJ98EHz huEnyy5HOAxdTi3DAnFXTY3O1mu28/91CEhARzTnHodqJsepAntMhcYBldy5arN+o+JT WhwQ== 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=2cJVr3hNa4aWAix71c9LGWt7oh/MR6uMc4joRHEDdJE=; b=xeRH1t9cfGiek3Su6609kHgvweqi5FilWmC8RrxhfEcAZMh4a3qY1j/7CCM1bOCNwu t+N01pj23Lalupi6sZBkcTfuRbSL+OT010/EPMLOt6LkQdLYsQoISchcL/6w6Fz+mJo1 ybUcB8BSMKUM+Ftugx02q2y6i0ulUvdoVFqYNOXZbsQqBWW7+5VUpOOdO7XBfPvztywr lS2C8TptxaEh2wb2pt/GlNUVrF8MlSCgoUw9deCYoDM2Q+AgFyRkSzQiHxy7tRrmTJ7G k+0nP4AGQAQ/EuMbgVU113CAoZJ8V0t1WW4okQYpJr5zm1s3tpa8YIhXsQoxKVeeCLdr +Mow== X-Gm-Message-State: AOAM5329+PhsUZlAGQ4G3yX7h8/AYdo8KhUlCaRP5HMXfDJF5Bqpf6U2 yC0mxS+Sn6jR56NV9ZlpYvrhYA== X-Received: by 2002:adf:f612:: with SMTP id t18mr5177963wrp.16.1631711684254; Wed, 15 Sep 2021 06:14:44 -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 m29sm14501717wrb.89.2021.09.15.06.14.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 15 Sep 2021 06:14:43 -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 v6 04/22] soc: dt-bindings: qcom: add gpr bindings Date: Wed, 15 Sep 2021 14:13:15 +0100 Message-Id: <20210915131333.19047-5-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210915131333.19047-1-srinivas.kandagatla@linaro.org> References: <20210915131333.19047-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 --- .../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 Reviewed-by: Rob Herring 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 */