From patchwork Mon Sep 5 14:45:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abel Vesa X-Patchwork-Id: 603459 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1B819ECAAD3 for ; Mon, 5 Sep 2022 14:47:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238404AbiIEOrP (ORCPT ); Mon, 5 Sep 2022 10:47:15 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58808 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238132AbiIEOrO (ORCPT ); Mon, 5 Sep 2022 10:47:14 -0400 Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 642EE6170 for ; Mon, 5 Sep 2022 07:47:11 -0700 (PDT) Received: by mail-wm1-x32a.google.com with SMTP id bd26-20020a05600c1f1a00b003a5e82a6474so5822813wmb.4 for ; Mon, 05 Sep 2022 07:47:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date; bh=OduaGW9nRB1fMO6LmhdxoHqh6SOlcNIe7BUgka7IDIs=; b=JlHsmhdr/HrIefMqDVRjJO6P4RSKckrG1psa+II3I3DmgoHLuElyEn13Hoor7AkFOW qP9WnzuXgkNuQUqy0TmqFPgsEH96EtX9jke3tCLB73HLws/2gb6Wy4rkaRPfZ9Dg54de N2I516kVej7aI/2J3fNnA8Lmt9GadvBENGNP7NFUtEc3ffgq+FS+sM7NSOQLJ8QsfRcT l9TibsvTe/3dRPMAld6/uHD39F587xo4L37cZJMQs3W7TTznlqmGaQRSTlzBcfV6kfZ8 STovt1IkX0mVFaT62OKlMJ1WZnBHXaWlVQIoT4k8wEcBTlBJYivpcZTEb114iaXOEYFi k5bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date; bh=OduaGW9nRB1fMO6LmhdxoHqh6SOlcNIe7BUgka7IDIs=; b=xt2azVJdOpJkSosmrH6UBhCzvRs0yo2JXLf++ZyNKzqhwaI42OeOXQLZL8rwo3mgjN NAYCY+IyayX37JUtAa9Gzk6BMT7+JWhB6zU0Vx5z5aVVgo4Se9BEKti5zzKExBzakRCU 33g1DHOajEZopMmVKOdlMIAPZJOghJAkHfIdKcNLGB8nHti3lVOlHq46Tu9Rec0tIjnt yUI/8UFSphOG3s5ups6X3sEbZBz6wnYSfO3pKhcbWRmLVagEgwocDpYYe5ZABIay67vy 7I2a9PX3ee5SHFfkUt5ODk/bJAcYyFp8Dg7h2ixx2u+v7hPatvgH8Yl/miabZZtxLmtw BsSQ== X-Gm-Message-State: ACgBeo1l4j01q/4TLKt465HNsgenSfGA5YiHV8DYMx6PPFETlgMAY2WS 8clWSrRW5uk82n1kwAIzVBXF0Q== X-Google-Smtp-Source: AA6agR6fFb+nlKh47jOls2Futbp8YMunFz/goxL0k5nxDnvTBzhnc75sJtEwnEp7u3Z3wcBTQu7Eyg== X-Received: by 2002:a05:600c:2853:b0:3a8:3d66:2653 with SMTP id r19-20020a05600c285300b003a83d662653mr11194167wmb.156.1662389229651; Mon, 05 Sep 2022 07:47:09 -0700 (PDT) Received: from hackbox.lan ([94.52.112.99]) by smtp.gmail.com with ESMTPSA id n19-20020a05600c3b9300b003a846a014c1sm18990244wms.23.2022.09.05.07.47.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 Sep 2022 07:47:08 -0700 (PDT) From: Abel Vesa To: Srinivas Kandagatla , Amol Maheshwari , Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, Linux Kernel Mailing List , David Heidelberg Subject: [PATCH v7 1/2] dt-bindings: misc: fastrpc convert bindings to yaml Date: Mon, 5 Sep 2022 17:45:53 +0300 Message-Id: <20220905144554.1772073-1-abel.vesa@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Convert Qualcomm FastRPC bindings to yaml format, so that we could validate dt-entries correctly and any future additions can go into yaml format. Use compute-cb@ subnodes instead of just cb@. Also add qcom,non-secure-domain, qcom,glink-channels and qcom,smd-channels missing properties to make sure dtbs_check doesn't fail right off the bat. Co-developed-by: Srinivas Kandagatla Signed-off-by: Srinivas Kandagatla Co-developed-by: David Heidelberg Signed-off-by: David Heidelberg Signed-off-by: Abel Vesa --- Changes since v6: * renamed the parent node name in the example from smd-edge to glink-edge .../devicetree/bindings/misc/qcom,fastrpc.txt | 88 ------------- .../bindings/misc/qcom,fastrpc.yaml | 118 ++++++++++++++++++ 2 files changed, 118 insertions(+), 88 deletions(-) delete mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.txt create mode 100644 Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt b/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt deleted file mode 100644 index 5ec124b138a6..000000000000 --- a/Documentation/devicetree/bindings/misc/qcom,fastrpc.txt +++ /dev/null @@ -1,88 +0,0 @@ -Qualcomm Technologies, Inc. FastRPC Driver - -The FastRPC implements an IPC (Inter-Processor Communication) -mechanism that allows for clients to transparently make remote method -invocations across DSP and APPS boundaries. This enables developers -to offload tasks to the DSP and free up the application processor for -other tasks. - -- compatible: - Usage: required - Value type: - Definition: must be "qcom,fastrpc" - -- label - Usage: required - Value type: - Definition: should specify the dsp domain name this fastrpc - corresponds to. must be one of this: "adsp", "mdsp", "sdsp", "cdsp" - -- qcom,non-secure-domain: - Usage: required - Value type: - Definition: Property to specify that dsp domain is non-secure. - -- qcom,vmids: - Usage: optional - Value type: - Definition: Virtual machine IDs for remote processor. - -- #address-cells - Usage: required - Value type: - Definition: Must be 1 - -- #size-cells - Usage: required - Value type: - Definition: Must be 0 - -= COMPUTE BANKS -Each subnode of the Fastrpc represents compute context banks available -on the dsp. -- All Compute context banks MUST contain the following properties: - -- compatible: - Usage: required - Value type: - Definition: must be "qcom,fastrpc-compute-cb" - -- reg - Usage: required - Value type: - Definition: Context Bank ID. - -- qcom,nsessions: - Usage: Optional - Value type: - Defination: A value indicating how many sessions can share this - context bank. Defaults to 1 when this property - is not specified. - -Example: - -adsp-pil { - compatible = "qcom,msm8996-adsp-pil"; - ... - smd-edge { - label = "lpass"; - fastrpc { - compatible = "qcom,fastrpc"; - qcom,smd-channels = "fastrpcsmd-apps-dsp"; - label = "adsp"; - #address-cells = <1>; - #size-cells = <0>; - - cb@1 { - compatible = "qcom,fastrpc-compute-cb"; - reg = <1>; - }; - - cb@2 { - compatible = "qcom,fastrpc-compute-cb"; - reg = <2>; - }; - ... - }; - }; -}; diff --git a/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml new file mode 100644 index 000000000000..2b446272cc14 --- /dev/null +++ b/Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml @@ -0,0 +1,118 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/misc/qcom,fastrpc.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm FastRPC Driver + +maintainers: + - Srinivas Kandagatla + +description: | + The FastRPC implements an IPC (Inter-Processor Communication) + mechanism that allows for clients to transparently make remote method + invocations across DSP and APPS boundaries. This enables developers + to offload tasks to the DSP and free up the application processor for + other tasks. + +properties: + compatible: + items: + - const: qcom,fastrpc + + label: + items: + enum: + - adsp + - mdsp + - sdsp + - cdsp + + qcom,glink-channels: + description: + A list of channels tied to this function, used for matching + the function to a set of virtual channels. + $ref: "/schemas/types.yaml#/definitions/string-array" + + qcom,non-secure-domain: + description: + Used to mark the current domain as non-secure. + type: boolean + + qcom,smd-channels: + description: + Channel name used for the RPM communication + $ref: "/schemas/types.yaml#/definitions/string-array" + + '#address-cells': + const: 1 + + '#size-cells': + const: 0 + +patternProperties: + "(compute-)?cb@[0-9]*$": + type: object + + description: > + Each subnode of the Fastrpc represents compute context banks available on the dsp. + + properties: + compatible: + items: + - const: qcom,fastrpc-compute-cb + + reg: + maxItems: 1 + + qcom,nsession: + $ref: /schemas/types.yaml#/definitions/uint32 + default: 1 + description: > + A value indicating how many sessions can share this context bank. + + required: + - compatible + - reg + +required: + - compatible + - label + - '#address-cells' + - '#size-cells' + +additionalProperties: false + +examples: + - | + #include + #include + + glink-edge { + interrupts-extended = <&ipcc IPCC_CLIENT_LPASS + IPCC_MPROC_SIGNAL_GLINK_QMP + IRQ_TYPE_EDGE_RISING>; + mboxes = <&ipcc IPCC_CLIENT_LPASS + IPCC_MPROC_SIGNAL_GLINK_QMP>; + label = "lpass"; + qcom,remote-pid = <2>; + + fastrpc { + compatible = "qcom,fastrpc"; + label = "adsp"; + qcom,smd-channels = "fastrpcsmd-apps-dsp"; + #address-cells = <1>; + #size-cells = <0>; + + compute-cb@1 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <1>; + }; + + compute-cb@2 { + compatible = "qcom,fastrpc-compute-cb"; + reg = <2>; + }; + }; + };