From patchwork Mon Feb 1 13:34:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Leo Yan X-Patchwork-Id: 8179701 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.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id E1AEC9F38B for ; Mon, 1 Feb 2016 13:37:38 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03AEE20435 for ; Mon, 1 Feb 2016 13:37:38 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1D75F202BE for ; Mon, 1 Feb 2016 13:37:36 +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 1aQEeH-000441-AQ; Mon, 01 Feb 2016 13:36:09 +0000 Received: from mail-pa0-x231.google.com ([2607:f8b0:400e:c03::231]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1aQEdc-0002Zb-N3 for linux-arm-kernel@lists.infradead.org; Mon, 01 Feb 2016 13:35:32 +0000 Received: by mail-pa0-x231.google.com with SMTP id yy13so82264912pab.3 for ; Mon, 01 Feb 2016 05:35:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:subject:date:message-id:in-reply-to:references; bh=kCt1wq9tCBCX4n/w6vj67GORdSPyCIzAtfiMVrLnSrs=; b=NReZXQeFW4i0KMvWSfeTLksxVRHPBmNV0u+V/4LPfYL8peg+Ah0wVYfxHTC9TGcpUm vPVKzplodZZnbTVfZeIpxcJ99+v4A13BIRYk5GE89kS7rfdd1ksVlS/Z72ngS82HJBGp F2Z0yMJeBgvmfofMcnZYr9BglyRVDRXhF4abY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=kCt1wq9tCBCX4n/w6vj67GORdSPyCIzAtfiMVrLnSrs=; b=HpehN/Lqf1/Mheh7OU/5u0GMUk0o9BGVeXl10ymFVp+5YysZB0uuxLrE0tUKkIUxv0 A4ySTD/AwB2AQHIgHB7rtrLQbkFPqSx3OoQKf4fvltAodWA6Xl/2ZHicZlOAQ6XtO15S Hwew8nJr791hV+XT+bs7w/ridSx6d3ZF6JQd2PwkyJgms4Wm3iQS3fa3+YFYRoIkzRWe iZCFSV12suS7677duectFKjymho04Om1G6V0JhOytFyCJCQEydHAnighNs8D5XUrqjhb Y/RWNnp1HGK/8Ev+Hxp0WH383+qUNQfHwIhl2v0+O2OLuw/por3Gc1WwiN2I51ub0JFE Dh4Q== X-Gm-Message-State: AG10YOS0/nSz/C7TVMwWcqKAo+nXu293msfltFRhhaL8Bx8N3rsTPmxnMt7YJoGcxORX/gVR X-Received: by 10.66.149.7 with SMTP id tw7mr38652233pab.72.1454333707854; Mon, 01 Feb 2016 05:35:07 -0800 (PST) Received: from localhost.localdomain (v17.blockcn.net. [192.241.236.26]) by smtp.gmail.com with ESMTPSA id r87sm4653060pfa.61.2016.02.01.05.35.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 01 Feb 2016 05:35:06 -0800 (PST) From: Leo Yan To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Catalin Marinas , Will Deacon , Jassi Brar , Leo Yan , Arnd Bergmann , Wei Xu , Tyler Baker , Sudeep Holla , Chen Feng , Bintian Wang , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Haojian Zhuang Subject: [PATCH v5 1/4] dt-bindings: mailbox: Document Hi6220 mailbox driver Date: Mon, 1 Feb 2016 21:34:44 +0800 Message-Id: <1454333687-20421-2-git-send-email-leo.yan@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1454333687-20421-1-git-send-email-leo.yan@linaro.org> References: <1454333687-20421-1-git-send-email-leo.yan@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160201_053529_069223_71474C1D X-CRM114-Status: GOOD ( 16.85 ) X-Spam-Score: -2.7 (--) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,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 Document DT binding for Hisilicon Hi6220 mailbox driver. Signed-off-by: Leo Yan --- .../bindings/mailbox/hisilicon,hi6220-mailbox.txt | 90 ++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt diff --git a/Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt b/Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt new file mode 100644 index 0000000..96e6acc --- /dev/null +++ b/Documentation/devicetree/bindings/mailbox/hisilicon,hi6220-mailbox.txt @@ -0,0 +1,90 @@ +Hisilicon Hi6220 Mailbox Driver +=============================== + +Hisilicon Hi6220 mailbox supports up to 32 channels. Each channel +is unidirectional with a maximum message size of 8 words. I/O is +performed using register access (there is no DMA) and the cell +raises an interrupt when messages are received. + +Mailbox Device Node: +==================== + +Required properties: +-------------------- +- compatible: Shall be "hisilicon,hi6220-mbox" +- reg: Contains the mailbox register address range (base + address and length); the first item is for IPC + registers, the second item is shared buffer for + slots. +- #mbox-cells Common mailbox binding property to identify the number + of cells required for the mailbox specifier. Should be 1. +- interrupts: Contains the interrupt information for the mailbox + device. The format is dependent on which interrupt + controller the SoCs use. + +Optional Properties: +-------------------- +- hi6220,mbox-tx-noirq: Flag to allow the client user of this mailbox driver + to send messages without triggering a TX completion + interrupt. + +Child Nodes: +============ +A child node is used for representing the actual sub-mailbox device that is +used for the communication between the host processor and a remote processor. +Each child node should have a unique node name across all the different +mailbox device nodes. + +Required properties: +-------------------- +- hi6220,mbox-tx: sub-mailbox descriptor property defining Tx channel +- hi6220,mbox-rx: sub-mailbox descriptor property defining Rx channel + +Sub-mailbox Descriptor Data +--------------------------- +Each of the above hi6220,mbox-tx and hi6220,mbox-rx properties should have 3 +cells of data that represent the following: + Cell #1 (slot_id) - mailbox slot id used either for transmitting + (hi6220,mbox-tx) or for receiving (hi6220,mbox-rx) + Cell #2 (dst_irq) - irq identifier index number which used by MCU. + Cell #3 (ack_irq) - irq identifier index number with generating a tx/rx + interrupt to application processor, mailbox driver + used this id to acknowledge interrupt. + +Example: +-------- + + mailbox: mailbox@F7510000 { + #mbox-cells = <1>; + compatible = "hisilicon,hi6220-mbox"; + reg = <0x0 0xF7510000 0x0 0x1000>, /* IPC_S */ + <0x0 0x06DFF800 0x0 0x0800>; /* Mailbox */ + interrupt-parent = <&gic>; + interrupts = ; + mbox_stub_clock: mbox_stub_clock { + hi6220,mbox-rx = <0 1 10>; + hi6220,mbox-tx = <1 0 11>; + }; + }; + + +Mailbox client +=============== + +"mboxes" and the optional "mbox-names" (please see +Documentation/devicetree/bindings/mailbox/mailbox.txt for details). Each value +of the mboxes property should contain a phandle to the mailbox controller +device node and second argument is the channel index. It must be 0 (hardware +support only one channel). The equivalent "mbox-names" property value can be +used to give a name to the communication channel to be used by the client user. + +Example: +-------- + + stub_clock: stub_clock { + compatible = "hisilicon,hi6220-stub-clk"; + hisilicon,hi6220-clk-sram = <&sram>; + #clock-cells = <1>; + mbox-names = "mbox-tx"; + mboxes = <&mailbox 1>; + };