Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1588226pxf; Fri, 19 Mar 2021 10:26:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzsVeSXEPyAOUWmEVa/SiqxFd8cp36XAMZ9rZ6DjJ/8jLS0ik6QILlM1yyLeDu1DxKqW+YN X-Received: by 2002:a50:9ea4:: with SMTP id a33mr11129993edf.295.1616174776610; Fri, 19 Mar 2021 10:26:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616174776; cv=none; d=google.com; s=arc-20160816; b=WOVS591nqNqbX0L63PrdKqpFB71zMGeZKpU/YN6qVrKWwXq5OSPpFkNEhLjgKWzqv3 msbfNRnl+eE3G4S+xxAA4VdWkttd2D+3PgPB8k9/RLJZ1uosDwZTwXjb0c8NYvMiac7C O7/8fisJCuX5bJOTVv1StWO+etz2O1ny479NBbqoIu5lCNmPfdWajIp3d5zQ+3cJKw8E Lxd+uy0+1Wn1TNJcSBOb4mELSr6TbdG9JgTjbs3I9hNUxtNpoeE6gqYqkxFwnNbj7y6i UWLa05hzz53YYzrnZcY2yxPRv6Cwp7SXt5xlNX3ws/MXnN+g9XVN2l5+9LJxA86iS7U/ q3gA== 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=cL+h4242+fAnn2Fd8FCYC3itCgT/thmFyDVyUCfdUfk=; b=xNE0pbs9/xbljjlHumVEbutkw69B3I/HtCayCdNUMrgsHD2aPFP8t0eLabthKA0fYV rskM2y35dVL7JtEIxJ6DDV3WcMLLeE94k1wP2e6Fu+nkg+JuLUyLVUhls26ZXIQp/zz9 +we2fRidP0Nq0W99xC8gzMn7vs8w2qGbi9yTgU411Ows9FwjviGJgBubGRNL/tZcmOcD zUqRees0m+ntt/7HKXOpKf3TmarspDYFsCppDE++Mx4nHXve/OrUbJZfAqpzHBtSwRZ1 KVBuK875RSoNuxwoJyiwgRpIqT0AGg9b7nlGxRsZ3zL7QnR/qB/1nOnAC+sja1QRQQ1N uXKg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kmGxqO3G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p16si4538980edu.606.2021.03.19.10.25.52; Fri, 19 Mar 2021 10:26:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=@gmail.com header.s=20161025 header.b=kmGxqO3G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230226AbhCSRY4 (ORCPT + 99 others); Fri, 19 Mar 2021 13:24:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36632 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230042AbhCSRY0 (ORCPT ); Fri, 19 Mar 2021 13:24:26 -0400 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C9BDEC06174A; Fri, 19 Mar 2021 10:24:25 -0700 (PDT) Received: by mail-lf1-x136.google.com with SMTP id f3so2811737lfu.5; Fri, 19 Mar 2021 10:24:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=cL+h4242+fAnn2Fd8FCYC3itCgT/thmFyDVyUCfdUfk=; b=kmGxqO3Gx87BB+rMyJf2qNLGm1+AM/5DWLtXfUZTbRPmRtyDtU3L7B6pAPTnxRK2vo A9NKZR0WIQedahu1Q/EXPzjrz97u90MjZ/RljTbnqcY4701iKpiPtHYRMGBWW9XJHjkA 4yhz/6gXJjeV19P20FsK/aiGWQRDUG0xVWeACoke85nBBj4bGmMDIFOj0T/9zt4A2eSL KUx4O0bSboQUuHT8E5brVHUO1Cm/VOBmL7aC/bJf73QVYVp34pBdp7EDi4Rgz/G0DHP+ uMObS+FJ8IosY2CxliDQb6h4Li9q4d9eRCjOYqNE8G/pC4j3lfsvlB/I9OWff0dTWsI5 QbRQ== 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=cL+h4242+fAnn2Fd8FCYC3itCgT/thmFyDVyUCfdUfk=; b=qBu02m7EsN43igxCVNi1JwoRI8AMqVKjn4yikG3t6NzXa/TGywritGYHSuTtjneYY7 OSD3Ctz4ONU070o6hrJzNvNB0bl1Up/6Q5kggdhJQflgcyfbr9KACa9Q9NpXN9fqldPK I7oRMfWkaN1hSCxECnEaYSrfFB64nsO9CtPPkhkQ5e1DzsGfjEg8wRTzuX+tCyPdoKrn B11ZBU044KJD8E/waKMAn48KePswKSbi1WEsZ2W6cewOPilQxL6XjxvmTneWcJ/g/FFv 4BorpxhyLJ4hwz0Z3WdARI2nz2NFPGoiwGVGYunHWFx6l26pT/XaBm2q84JyPqhO2mUN x8bw== X-Gm-Message-State: AOAM531bY49vq08t2V4KB04iRiVcjRtq4JPYPYggRJhG+p5l1Hd+wDa8 YN9Ef/u8sfWgk7YR5AAHAbo= X-Received: by 2002:ac2:5144:: with SMTP id q4mr1480854lfd.145.1616174663260; Fri, 19 Mar 2021 10:24:23 -0700 (PDT) Received: from localhost.localdomain ([2a01:540:2421:e100:198e:5123:d77b:1e2e]) by smtp.gmail.com with ESMTPSA id y17sm693237lfb.132.2021.03.19.10.24.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 10:24:22 -0700 (PDT) From: nikitos.tr@gmail.com To: agross@kernel.org, bjorn.andersson@linaro.org Cc: robh+dt@kernel.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Nikita Travkin Subject: [PATCH 1/2] dt-bindings: soc: qcom: Add bindings for Qualcomm Memshare service Date: Fri, 19 Mar 2021 22:23:20 +0500 Message-Id: <20210319172321.22248-2-nikitos.tr@gmail.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20210319172321.22248-1-nikitos.tr@gmail.com> References: <20210319172321.22248-1-nikitos.tr@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nikita Travkin Add DT bindings for memshare: QMI service that allocates memory per remote processor request. Signed-off-by: Nikita Travkin --- .../bindings/soc/qcom/qcom,memshare.yaml | 109 ++++++++++++++++++ include/dt-bindings/soc/qcom,memshare.h | 10 ++ 2 files changed, 119 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,memshare.yaml create mode 100644 include/dt-bindings/soc/qcom,memshare.h diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,memshare.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,memshare.yaml new file mode 100644 index 000000000000..ebdf128b066c --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,memshare.yaml @@ -0,0 +1,109 @@ +# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/qcom/qcom,memshare.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm QMI Shared Memory Service + +description: | + This driver provides a QMI service that allows remote processors (like modem) + to request additional memory. It is used for applications like GPS in modem. + +maintainers: + - Nikita Travkin + +properties: + compatible: + const: qcom,memshare + + qcom,legacy-client: + $ref: /schemas/types.yaml#/definitions/phandle + description: Phandle to a memshare client node used for legacy requests. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + +patternProperties: + "^.*@[0-9]+$": + type: object + + properties: + reg: + description: Proc-ID for clients in this node. + + qcom,qrtr-node: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Node from which the requests are expected. + + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^.*@[0-9]+$": + type: object + + properties: + reg: + description: ID of this client. + + memory-region: + $ref: /schemas/types.yaml#/definitions/phandle + description: | + Reserved memory region that should be used for allocation. + + required: + - reg + + required: + - reg + - qcom,qrtr-node + +required: + - compatible + +additionalProperties: false + +examples: + - | + #include + + reserved-memory { + + #address-cells = <2>; + #size-cells = <2>; + + gps_mem: gps@93c00000 { + reg = <0x0 0x93c00000 0x0 0x200000>; + no-map; + }; + }; + + memshare { + compatible = "qcom,memshare"; + qcom,legacy-client = <&memshare_gps>; + + #address-cells = <1>; + #size-cells = <0>; + + mpss@0 { + reg = ; + qcom,qrtr-node = <0>; + + #address-cells = <1>; + #size-cells = <0>; + + memshare_gps: gps@0 { + reg = <0>; + memory-region = <&gps_mem>; + }; + }; + }; + +... diff --git a/include/dt-bindings/soc/qcom,memshare.h b/include/dt-bindings/soc/qcom,memshare.h new file mode 100644 index 000000000000..4cef1ef75d09 --- /dev/null +++ b/include/dt-bindings/soc/qcom,memshare.h @@ -0,0 +1,10 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef __DT_QCOM_MEMSHARE_H__ +#define __DT_QCOM_MEMSHARE_H__ + +#define MEMSHARE_PROC_MPSS_V01 0 +#define MEMSHARE_PROC_ADSP_V01 1 +#define MEMSHARE_PROC_WCNSS_V01 2 + +#endif /* __DT_QCOM_MEMSHARE_H__ */ -- 2.27.0