From patchwork Wed Jul 14 15:30:24 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 476796 Delivered-To: patch@linaro.org Received: by 2002:a02:c94a:0:0:0:0:0 with SMTP id u10csp676383jao; Wed, 14 Jul 2021 08:31:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzS3ILERsHhETt9HgnUqHyRau9asM3JSV6ldrGDEhj3L+HMb227Sh0hsh6pfeF3bwqpWUpP X-Received: by 2002:a05:6e02:c7:: with SMTP id r7mr7083323ilq.52.1626276664685; Wed, 14 Jul 2021 08:31:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626276664; cv=none; d=google.com; s=arc-20160816; b=ijSPLKp213y6gPdAwPmDvvfDdQrpHTd7cAchhAt1D39RpORBovVqJZ0+YiXFrxkIpA /vM4AJWvQdv7hkiQLMh/zJtF/ocJc+oRcoS6ecIbQMStDBNfL64XYiAr209r2lyPnp4l GcD9h4bFLvY9sjfA9u97CGwYjLj16cySpCJypSf1depYK01TH5TJg6Kv0a7HnKAtjPdp BM6b6hGCAQqo86N6YLtTVAT+6Eyv4p20LhpHhIo1qQLaJksRD5jQhrvv//sx0LfDMvrY zpk6PDavz+jJhN3iefNrJChuNENL2+r87Y9Lex7thPgtU2+VdZt7VFlZiPcCNu1p37/3 L7fg== 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=xiCF2nRgXBkkZxRW+nKblAu8sGXdLERpAmm5UZ/e/m8=; b=d4c0ZD0uT5732KPzm8lpq02g5rrHnOi+VY4XdCHZfbcFP1NBOjP7WJ3ADrf0NW+e+s c6XfCJj2jdYb4sHNdJKWtZ2DweSKhUamPk2y7Q3T9YavFwDIW7WFGhpofENt2K2CpbUv cuuAe43QscOC82uBwn7UQeo5Lt7NWEt6mRPuKSQ+26bfWNl61/p2uSmEMpDKJ7UJM+EM RBaKc0H0zFeaCf9soxG3BvdkvKiwP1umTYEYyCZ14CqgBhAoLIcM7qkM/pzkD2oBfl1m HjHr3JEkRzbJWG+hM5EfXJXJY8qOaoWT3XbB3p2XMUkqfABw2m41veCcPUHGwMvOhPkJ hGJQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=SRhSOcNw; 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 k2si2936383jao.12.2021.07.14.08.31.04; Wed, 14 Jul 2021 08:31:04 -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=SRhSOcNw; 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 S239650AbhGNPdt (ORCPT + 7 others); Wed, 14 Jul 2021 11:33:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47116 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239607AbhGNPdt (ORCPT ); Wed, 14 Jul 2021 11:33:49 -0400 Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C37F5C06175F for ; Wed, 14 Jul 2021 08:30:56 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id n4so1862568wms.1 for ; Wed, 14 Jul 2021 08:30:56 -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=xiCF2nRgXBkkZxRW+nKblAu8sGXdLERpAmm5UZ/e/m8=; b=SRhSOcNwWN+ksk7Vs4KchDJ5/wH8TgYYFftErjY+9pbOkYNwDha7sNoYZzFCOjEfZc lY1Dw+HqNQ8AeiorkcGTa5q2YsGSgM//zTCf4DONWjgNRuN8RgK9qSi6aMfR9NlapphG hsimlLmoze5ccvvySMp4Dou4BUjHp6MMGbXq2gvMyECV7Tfh+hBr+BQbAS0JFTM95Orz K46foeXTtB2XGa/aB9Ip4syGkC/ulMZba2MyYBBbp16TP+DN2i7yGM2Sbywp6AAzMuXq Gt2UJg2fWZAuRCMt+oX7eBebrMAi3BtUJIepBy4DNWc7s3A5IC+EknMgD7u8VlnUhOu4 gpUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=xiCF2nRgXBkkZxRW+nKblAu8sGXdLERpAmm5UZ/e/m8=; b=jKFG8/V7Nt+MSFiEo/uyuYI+SK/U45VxKcW+ocb0G1YEgdek1ZrQKL5ALtPHHGYVws 5RfmeoFUWfrVHhPCRn6Xk8OgqS0jUwS34oaKtvbCGfOX9Ej07SslPswHqv30OgqvlKR+ J1dxJDjMMV8Xs+uuQ1SFY75Z+da9qMsGuRVoowXargKiBklOyuigiFaCEBR1tJV6ABbC vEWCIy961qtZmiK2bLXOxuf6+0rAUDnDuYHhFB7jVo3lCCFCYjN6M0Cr9GU5kg/X5gQc aFpCMjrmNixLvJBu1xlDe7+R+Gga2fjw2qfg7t6mdZtNAQdiuzvjpWXtv44WhduRyCij vq+A== X-Gm-Message-State: AOAM53218HH70aO/OwgdDwEiEqttv44Hd7F1cXiiFQ/EhtveWyci/wDW 2qfOF5Q5af7rM9ZZxPOLyYgiK/n5WELrdw== X-Received: by 2002:a05:600c:3b93:: with SMTP id n19mr4770604wms.3.1626276655306; Wed, 14 Jul 2021 08:30:55 -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 y6sm2465174wma.48.2021.07.14.08.30.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jul 2021 08:30:54 -0700 (PDT) From: Srinivas Kandagatla To: bjorn.andersson@linaro.org, broonie@kernel.org, robh@kernel.org Cc: plai@codeaurora.org, tiwai@suse.de, devicetree@vger.kernel.org, perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lgirdwood@gmail.com, bgoswami@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v2 01/16] soc: dt-bindings: qcom: add gpr bindings Date: Wed, 14 Jul 2021 16:30:24 +0100 Message-Id: <20210714153039.28373-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210714153039.28373-1-srinivas.kandagatla@linaro.org> References: <20210714153039.28373-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. Signed-off-by: Srinivas Kandagatla --- .../bindings/soc/qcom/qcom,gpr.yaml | 83 +++++++++++++++++++ include/dt-bindings/soc/qcom,gpr.h | 18 ++++ 2 files changed, 101 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,gpr.yaml create mode 100644 include/dt-bindings/soc/qcom,gpr.h -- 2.21.0 diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,gpr.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,gpr.yaml new file mode 100644 index 000000000000..d6dda44b655e --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,gpr.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/qcom/qcom,gpr.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Generic Packet Router binding + +maintainers: + - Srinivas Kandagatla + +description: | + This binding describes the Qualcomm Generic Packet Router,Shared Memory Manager, + used to send and receive packets between Audio DSP and Application processor. + +properties: + compatible: + const: qcom,gpr + + qcom,glink-channels: + const: adsp_apps + description: + glink channel associated with gpr function + + qcom,protection-domain: + $ref: /schemas/types.yaml#/definitions/string-array + description: protection domain service name and path for gpr service + has dependency on. + items: + - const: avs/audio + - const: msm/adsp/audio_pd + + qcom,gpr-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 + +#GPR Services +patternProperties: + 'gprservice@[0-9]+$': + type: object + description: + GPR node's client devices use subnodes for desired static port services. + + properties: + reg: + maxItems: 1 + description: Service port id + + additionalProperties: false + +required: + - compatible + - qcom,glink-channels + - qcom,gpr-domain + +additionalProperties: false + +examples: + - | + #include + gpr { + compatible = "qcom,gpr"; + qcom,glink-channels = "adsp_apps"; + qcom,gpr-domain = ; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + #address-cells = <1>; + #size-cells = <0>; + + gprservice@1 { + reg = ; + }; + }; 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 */