From patchwork Tue Sep 30 00:34:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bjorn Andersson X-Patchwork-Id: 4999591 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 94F249F1D4 for ; Tue, 30 Sep 2014 00:37:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B90CC20109 for ; Tue, 30 Sep 2014 00:37:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDA4B201FB for ; Tue, 30 Sep 2014 00:37:46 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1XYlPT-0007i9-MA; Tue, 30 Sep 2014 00:35:19 +0000 Received: from seldrel01.sonyericsson.com ([212.209.106.2]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1XYlPR-0006a9-Bm for linux-arm-kernel@lists.infradead.org; Tue, 30 Sep 2014 00:35:17 +0000 From: Bjorn Andersson To: Kumar Gala , Andy Gross , Arnd Bergmann , Grant Likely , Ian Campbell , Mark Rutland , Pawel Moll , Rob Herring Subject: [RFC 2/7] soc: qcom: Add device tree binding for SMD Date: Mon, 29 Sep 2014 17:34:46 -0700 Message-ID: <1412037291-16880-3-git-send-email-bjorn.andersson@sonymobile.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1412037291-16880-1-git-send-email-bjorn.andersson@sonymobile.com> References: <1412037291-16880-1-git-send-email-bjorn.andersson@sonymobile.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140929_173517_595771_3F90A413 X-CRM114-Status: GOOD ( 12.07 ) X-Spam-Score: -5.0 (-----) Cc: devicetree@vger.kernel.org, Samuel Ortiz , linux-arm-msm@vger.kernel.org, Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown , Lee Jones , linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add device tree binding documentation for the Qualcomm Shared Memory Device. Signed-off-by: Bjorn Andersson --- I was looking at having one smd node per remote processor - e.g flatten the first and second level. As all the channels, for all the remote processors are allocated from the same pool this does however not feel very natural. .../devicetree/bindings/soc/qcom/qcom,smd.txt | 82 ++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt diff --git a/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt b/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt new file mode 100644 index 0000000..c56e4fc --- /dev/null +++ b/Documentation/devicetree/bindings/soc/qcom/qcom,smd.txt @@ -0,0 +1,82 @@ +Qualcomm Shared Memory Driver (SMD) binding + +This binding describes the Qualcomm Shared Memory Driver, a fifo based +communication channel for sending data between the various subsystems in +Qualcomm platforms. + +- compatible: + Usage: required + Value type: + Definition: must be "qcom,smd" + +- qcom,smem: + Usage: required + Value type: + Definition: reference to a smem node managing the shared memory items + used for smd + += EDGES + +Each subnode of the SMD node represents a remote subsystem, i.e. a remote +processor of some sort - in SMD language called an "edge". The name of the +edges are not important. + +- interrupts: + Usage: required + Value type: + Definition: should specify the IRQ used by the remote processor to + signal this processor about communication related updates + +- qcom,ipc: + Usage: required + Value type: + Definition: three entries specifying the outgoing ipc bit used for + signaling the remote processor: + - 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,smd-edge: + Usage: required + Value type: + Definition: an identifier representing the remote processor + += SMD DEVICES + +In turn, subnodes of the "edges" represent devices tied to SMD channels on that +"edge". The names of the devices are not important. The properties of these +nodes are defined by the individual bindings for the SMD devices - but must +contain the following property: + +- qcom,smd-channels: + Usage: required + Value type: + Definition: a list of channels tied to this device, used for matching + the device to channels + += EXAMPLE + +The following example represents a smd node, with one edge representing the +"rpm" subsystem. For the "rpm" subsystem we have a device tied to the +"rpm_request" channel. + + smd { + compatible = "qcom,smd"; + qcom,smem = <&smem>; + + rpm { + interrupts = <0 168 1>; + qcom,ipc = <&apcs 8 0>; + qcom,smd-edge = <15>; + + rpm_requests { + compatible = "qcom,rpm-msm8974"; + qcom,smd-channels = "rpm_requests"; + + #address-cells = <1>; + #size-cells = <0>; + + ... + }; + }; + };