From patchwork Mon Aug 9 11:23:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 493844 Delivered-To: patch@linaro.org Received: by 2002:a05:6638:396:0:0:0:0 with SMTP id y22csp2811228jap; Mon, 9 Aug 2021 04:24:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx8fytsG1fAMBShboJuEXFFuzQEg76ozvcJWKUczxIA8GmblQwvw0+HsLCNZaiZuuo736uo X-Received: by 2002:a02:95c7:: with SMTP id b65mr15685146jai.59.1628508276331; Mon, 09 Aug 2021 04:24:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628508276; cv=none; d=google.com; s=arc-20160816; b=CDx2NJuruD/2hssnHQYtb7/ojhZlxFC3eGiyO1hJZX4ewT24xCc9gVTm+ehPVt+5MS Jw31NbFzOY9pgm/qNB/0FSAVjzfPUe1PPresg2TSOnLey+NpTuPmHhUZIgwX5/OXpn08 jeE9C/D5VFvhCkSkvXQ7zbovS1OvhNS2zTg6YOaYkoi5C8pWx1dewtSSqM3QH4WApYbJ yxc6HVPtpClNHCgRCTRYVvBf63QCkAm2u40JOGdU483ZH5NgxpgTmcyG3mr5ESl+cEq8 VbCFv7cY4Z3YcHAv4LLCtLVYZxCDmJncXY19rpuUzBOir53v8ZewZY/LA4syJBjwphlR rP5g== 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=GJlsWNgwKODDcwAuvO6G0kTnrLu0l5LAblYrz3XnMPQ=; b=qLqR0xpaS3bnlCgtz1sqB3SWMtIbJBR+FKttghudDImV3/GQ9O1g1tN7yUg3CkRznb zfiNOh4+J9SAgc6wH5o3rQmPEzeydUZnIeFcYyGzVJURVZWVUBMVUTbDLe8o+TYsWIDu F/he1Z3zA5t2VzVqwZK3NT90beze9bQHttfG0dQHkS657oPEoSWKZbKB19TVw7IvFVA8 45r/foYD2MftF2SSkdA1Gu1vGLeJmM17bxS0dIs4UvnsFfHvWSN2iWBJ76zLDqJQVVW+ at+f/hCjMzLZhUHRoA1j91BZarA/xe09U+fQsPlbt+l0l4qhqI7rtSS+90y1tB0unRVT VmmA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AqAucSpP; 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 q9si16629084jap.5.2021.08.09.04.24.36; Mon, 09 Aug 2021 04:24:36 -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=AqAucSpP; 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 S235133AbhHILYz (ORCPT + 7 others); Mon, 9 Aug 2021 07:24:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235053AbhHILYz (ORCPT ); Mon, 9 Aug 2021 07:24:55 -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 A0E56C0613D3 for ; Mon, 9 Aug 2021 04:24:34 -0700 (PDT) Received: by mail-wm1-x32b.google.com with SMTP id u15so10338885wmj.1 for ; Mon, 09 Aug 2021 04:24:34 -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=GJlsWNgwKODDcwAuvO6G0kTnrLu0l5LAblYrz3XnMPQ=; b=AqAucSpP64Wqp523ZRIEm3J4hI333t2QbONzQpUWA+SSbPLfkHIBuwpq2bBUhnxoFf aIpAsLCdVi09yBVoe8cFD+hF7JNv/aZVby2BT/kOP+oQBkv5pc/ohrc4AwVFOCcHn4/x gmY6QO0P7XvX31OcKwQnU97V5ntYy3h4nVEzW3RJgMUhCIfdhzvhN93zDly1t0W5ClMF HiahFil4Dmz4udhG+0P9gm9lONOwv+xyI6zrURV09fn76jBjvoChM1wRuG6/IJw5ZXUB MYxLQOYLlmYDdBDOaNnl2jqndszCF9uIlBO250q4Z4pwZCJxvlt02htFvR6GOKklGdNL qmZA== 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=GJlsWNgwKODDcwAuvO6G0kTnrLu0l5LAblYrz3XnMPQ=; b=N8I79zfQLGTkvRv8CyUQeuOp+uw9iJeCRoEC3UjGeF9mBLFRKd1uWDV87Klw7wh8Hl RCT8EXXvzo2B5igZ7QOitiiI1QDKtriYE6+K4CWw3AM+2G5SqnGwRgZinbblyoFZOkBM SffpIt2T7ZxW8WXuaBurZQOu4kS1fBeQnSS2qKGhFd3qXGF/WNSg4uzN5C9jZoNUpHph gsvkX4CBKDPLSXn6im5xp3sgozY4W+TY5PvA0Gq/iyj5jVjH03x8tnSVN5vYbotrB11M PZJOLCaZogYpCixISwL4sorMLCGFHOZxuucIbTPQ2jHO6PExPN/UUlW2lodIM7HLk0wf MK1Q== X-Gm-Message-State: AOAM533TugPv463mHO6+JDBJPCegVK5vGsckJEyza2GVVxZazTLbQ71C 2ERmxumV5hq4i4Fn+3YaSh0QxQ== X-Received: by 2002:a05:600c:4a12:: with SMTP id c18mr33748888wmp.9.1628508273222; Mon, 09 Aug 2021 04:24:33 -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 b80sm7774900wmb.2.2021.08.09.04.24.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Aug 2021 04:24:32 -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, lgirdwood@gmail.com, bgoswami@codeaurora.org, Srinivas Kandagatla Subject: [PATCH v4 03/20] soc: dt-bindings: qcom: add gpr bindings Date: Mon, 9 Aug 2021 12:23:22 +0100 Message-Id: <20210809112339.8368-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20210809112339.8368-1-srinivas.kandagatla@linaro.org> References: <20210809112339.8368-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 | 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 -- 2.21.0 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 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: + $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]$": + 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. + 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 + + '#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 + gpr { + compatible = "qcom,gpr"; + qcom,gpr-domain = ; + #address-cells = <1>; + #size-cells = <0>; + + gpr-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..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 */