Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp2385899pxb; Sun, 24 Apr 2022 13:08:40 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmsRoQb57ZCj/wWzFJ+zjfexxAknKpznj9mbHXeIGMV6w8O9JzTzIGYk+4V8E+54MNmhbd X-Received: by 2002:a17:902:d509:b0:15c:fd46:8db with SMTP id b9-20020a170902d50900b0015cfd4608dbmr4700191plg.52.1650830920196; Sun, 24 Apr 2022 13:08:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650830920; cv=none; d=google.com; s=arc-20160816; b=dBEs8wVcZaY0OICq/qhEs3FXZJmWukcEx0Pz5IrEFxh+q2Kz75HuHWdtGE9qrls7aR jB0Vgxi8yzKlJLANgppMDT60IltsydEULeUawTnR6wmZayMCOlisF39cyQWvG0/RFv+M orwU1TnoDsgWRYbUNqLiXwAwQDLf6rM204Q4gGQonS8FgYa0pDVltlWIescg5re5FVzC m4kPrBfI+NPTowzJzXYyx2LlSKwtWti7OhG1qvF0NiG9kFPt0d3ncZJaaLtiiFzGIlfp C9KnEkpDA89TMfEfTYfApyagVPYHqgzquzh8PfFNL5To1MW2+yGE5sTcol3BrzNzjH09 MrVQ== 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=QdcXMwu4StCDfRuTYNtvpLD+CnAXeUVdYF37s7EbreU=; b=uyhnrcP+C5BMB++RaedvPbSi4GbVp5IOaqIoH7gSBI+wQLBoKEvO94FBsM1rcceo0c 6YJm76vbN3JdEY2Mi4B/n/zyV+1P6JYJj9PDWWc+4z4CPutMw/WqX/LwRHIeV5UeEmRx ceUZMBdhlZmNaeV6c/sCV0x0TUIU5NiyQMoWZF7OvVR+j9ifffjFRQ6Fqc3Cix0ZWUE/ zr0FEdtFZjqG6mU4/F7LQZaKeZiRIk5E4I+7wm0faElNcuaPs1q0QFt07dYsYTz4kneq 6HuKvSI+S+HBZguurDFDAETJlgU+Bp3O1N4hVa/bv5+obabW+vVwG6T7l8HZcaTO8oxV yTKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=VG9iHFer; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 64-20020a630743000000b003aafa34cbf1si5233995pgh.642.2022.04.24.13.08.23; Sun, 24 Apr 2022 13:08:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ixit.cz header.s=dkim header.b=VG9iHFer; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=REJECT dis=NONE) header.from=ixit.cz Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234015AbiDXNSy (ORCPT + 99 others); Sun, 24 Apr 2022 09:18:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35050 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233780AbiDXNSr (ORCPT ); Sun, 24 Apr 2022 09:18:47 -0400 Received: from ixit.cz (ip-94-112-206-30.net.upcbroadband.cz [94.112.206.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAB3DE93; Sun, 24 Apr 2022 06:15:43 -0700 (PDT) Received: from localhost.localdomain (unknown [185.14.232.186]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by ixit.cz (Postfix) with ESMTPSA id BDB0524CEB; Sun, 24 Apr 2022 15:15:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ixit.cz; s=dkim; t=1650806141; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=QdcXMwu4StCDfRuTYNtvpLD+CnAXeUVdYF37s7EbreU=; b=VG9iHFerBI9Cz0raVcbmWn9zE6CMctfUAgRYWg6kcv06hKspdnQ2osqyUAzO4b3M/1xp31 UhIr4dKGljKnAlU8Fy9C2YjP9iyjqgkj3FwBUxaYuHIlYf/Ejwn2iLdRMuHFxELsVyNh9X JM8MGeZcoRJnIxMAZk2bbCuCHZX4M9g= From: David Heidelberg To: Andy Gross , Bjorn Andersson , Rob Herring , Krzysztof Kozlowski Cc: David Heidelberg , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 3/3] dt-bindings: soc: qcom: convert QCOM SMP2P binding to yaml Date: Sun, 24 Apr 2022 15:15:21 +0200 Message-Id: <20220424131522.14185-3-david@ixit.cz> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220424131522.14185-1-david@ixit.cz> References: <20220424131522.14185-1-david@ixit.cz> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RDNS_DYNAMIC,SPF_HELO_PASS, SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert Qualcomm SoC SMP2P binding to the yaml format. Signed-off-by: David Heidelberg --- v2: - dropped constraints on sub-node names, converted patternProperties to additionalProperties - adjusted name from "Point 2 Point" to "Point to Point" --- .../bindings/soc/qcom/qcom,smp2p.txt | 110 -------------- .../bindings/soc/qcom/qcom,smp2p.yaml | 136 ++++++++++++++++++ 2 files changed, 136 insertions(+), 110 deletions(-) delete mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt deleted file mode 100644 index 49e1d72d3648..000000000000 --- a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.txt +++ /dev/null @@ -1,110 +0,0 @@ -Qualcomm Shared Memory Point 2 Point binding - -The Shared Memory Point to Point (SMP2P) protocol facilitates communication of -a single 32-bit value between two processors. Each value has a single writer -(the local side) and a single reader (the remote side). Values are uniquely -identified in the system by the directed edge (local processor ID to remote -processor ID) and a string identifier. - -- compatible: - Usage: required - Value type: - Definition: must be one of: - "qcom,smp2p" - -- interrupts: - Usage: required - Value type: - Definition: one entry specifying the smp2p notification interrupt - -- mboxes: - Usage: required - Value type: - Definition: reference to the associated doorbell in APCS, as described - in mailbox/mailbox.txt - -- qcom,ipc: - Usage: required, unless mboxes is specified - Value type: - Definition: three entries specifying the outgoing ipc bit used for - signaling the remote end of the smp2p edge: - - phandle to a syscon node representing the apcs registers - - u32 representing offset to the register within the syscon - - u32 representing the ipc bit within the register - -- qcom,smem: - Usage: required - Value type: - Definition: two identifiers of the inbound and outbound smem items used - for this edge - -- qcom,local-pid: - Usage: required - Value type: - Definition: specifies the identifier of the local endpoint of this edge - -- qcom,remote-pid: - Usage: required - Value type: - Definition: specifies the identifier of the remote endpoint of this edge - -= SUBNODES -Each SMP2P pair contain a set of inbound and outbound entries, these are -described in subnodes of the smp2p device node. The node names are not -important. - -- qcom,entry-name: - Usage: required - Value type: - Definition: specifies the name of this entry, for inbound entries this - will be used to match against the remotely allocated entry - and for outbound entries this name is used for allocating - entries - -- interrupt-controller: - Usage: required for incoming entries - Value type: - Definition: marks the entry as inbound; the node should be specified - as a two cell interrupt-controller as defined in - "../interrupt-controller/interrupts.txt" - If not specified this node will denote the outgoing entry - -- #interrupt-cells: - Usage: required for incoming entries - Value type: - Definition: must be 2 - denoting the bit in the entry and IRQ flags - -- #qcom,smem-state-cells: - Usage: required for outgoing entries - Value type: - Definition: must be 1 - denoting the bit in the entry - -= EXAMPLE -The following example shows the SMP2P setup with the wireless processor, -defined from the 8974 apps processor's point-of-view. It encompasses one -inbound and one outbound entry: - -wcnss-smp2p { - compatible = "qcom,smp2p"; - qcom,smem = <431>, <451>; - - interrupts = <0 143 1>; - - qcom,ipc = <&apcs 8 18>; - - qcom,local-pid = <0>; - qcom,remote-pid = <4>; - - wcnss_smp2p_out: master-kernel { - qcom,entry-name = "master-kernel"; - - #qcom,smem-state-cells = <1>; - }; - - wcnss_smp2p_in: slave-kernel { - qcom,entry-name = "slave-kernel"; - - interrupt-controller; - #interrupt-cells = <2>; - }; -}; diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml new file mode 100644 index 000000000000..9d728c76f7b0 --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smp2p.yaml @@ -0,0 +1,136 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/soc/qcom/qcom,smp2p.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: Qualcomm Shared Memory Point to Point + +description: | + The Shared Memory Point to Point (SMP2P) protocol facilitates communication of + a single 32-bit value between two processors. Each value has a single writer + (the local side) and a single reader (the remote side). Values are uniquely + identified in the system by the directed edge (local processor ID to remote + processor ID) and a string identifier. + +maintainers: + - Bjorn Andersson + +properties: + compatible: + const: qcom,smp2p + + interrupts: + maxItems: 1 + + mboxes: + description: > + reference to the associated doorbell in APCS, as described + in mailbox/mailbox.txt + + qcom,ipc: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: > + three entries specifying the outgoing ipc bit used for + signaling the remote end of the smp2p edge + minItems: 1 + maxItems: 32 # no hard limit + items: + items: + - description: phandle to a syscon node representing the apcs registers + - description: offset to the register within the syscon + - description: the IPC bit within the register + + qcom,smem: + $ref: /schemas/types.yaml#/definitions/uint32-matrix + description: indentifiers of the smem items used for this edge + items: + - items: + - description: identifier of inbound smem items + - items: + - description: identifier of outbound smem items + + qcom,local-pid: + $ref: /schemas/types.yaml#/definitions/uint32 + description: specifies the identifier of the local endpoint of this edge + + qcom,remote-pid: + $ref: /schemas/types.yaml#/definitions/uint32 + description: specifies the identifier of the remote endpoint of this edge + +additionalProperties: + type: object + properties: + interrupt-controller: + description: > + marks the entry as inbound, if not specified + this node will denote the outgoing entry + + '#interrupt-cells': + const: 2 + + qcom,entry-name: + $ref: /schemas/types.yaml#/definitions/string + description: > + specifies the name of this entry, for inbound entries this will be + used to match against the remotely allocated entry and for outbound + entries this name is used for allocating entries + + '#qcom,smem-state-cells': + $ref: /schemas/types.yaml#/definitions/uint32 + description: required for outgoing entries + const: 1 + + required: + - qcom,entry-name + + oneOf: + - required: + - interrupt-controller + - '#interrupt-cells' + - required: + - '#qcom,smem-state-cells' + + additionalProperties: false + +required: + - compatible + - qcom,smem + - qcom,local-pid + - qcom,remote-pid + +anyOf: + - required: + - mboxes + - required: + - qcom,ipc + +examples: + # The following example shows the SMP2P setup with the wireless processor, + # defined from the 8974 apps processor's point-of-view. It encompasses one + # inbound and one outbound entry: + - | + wcnss-smp2p { + compatible = "qcom,smp2p"; + qcom,smem = <431>, <451>; + + interrupts = <0 143 1>; + + qcom,ipc = <&apcs 8 18>; + + qcom,local-pid = <0>; + qcom,remote-pid = <4>; + + wcnss_smp2p_out: master-kernel { + qcom,entry-name = "master-kernel"; + + #qcom,smem-state-cells = <1>; + }; + + wcnss_smp2p_in: slave-kernel { + qcom,entry-name = "slave-kernel"; + + interrupt-controller; + #interrupt-cells = <2>; + }; + }; -- 2.35.1