From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753019AbdGGNxa (ORCPT ); Fri, 7 Jul 2017 09:53:30 -0400 Received: from mail-yw0-f195.google.com ([209.85.161.195]:35798 "EHLO mail-yw0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752523AbdGGNx1 (ORCPT ); Fri, 7 Jul 2017 09:53:27 -0400 Date: Fri, 7 Jul 2017 08:53:25 -0500 From: Rob Herring To: Andre Przywara Cc: Jassi Brar , Sudeep Holla , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com, Maxime Ripard , Chen-Yu Tsai , Icenowy Zheng , Mark Rutland , devicetree@vger.kernel.org Subject: Re: [PATCH 2/8] dt-bindings: mailbox: add binding doc for the ARM SMC mailbox Message-ID: <20170707135325.7iqntzxhnh7fzv4m@rob-hp-laptop> References: <20170630095608.24943-1-andre.przywara@arm.com> <20170630095608.24943-3-andre.przywara@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170630095608.24943-3-andre.przywara@arm.com> User-Agent: NeoMutt/20170113 (1.7.2) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 30, 2017 at 10:56:02AM +0100, Andre Przywara wrote: > Add binding documentation for the generic ARM SMC mailbox. > This is not describing hardware, but a firmware interface. > > Signed-off-by: Andre Przywara > --- > .../devicetree/bindings/mailbox/arm-smc.txt | 61 ++++++++++++++++++++++ > 1 file changed, 61 insertions(+) > create mode 100644 Documentation/devicetree/bindings/mailbox/arm-smc.txt > > diff --git a/Documentation/devicetree/bindings/mailbox/arm-smc.txt b/Documentation/devicetree/bindings/mailbox/arm-smc.txt > new file mode 100644 > index 0000000..90c5926 > --- /dev/null > +++ b/Documentation/devicetree/bindings/mailbox/arm-smc.txt > @@ -0,0 +1,61 @@ > +ARM SMC Mailbox Driver s/Driver/Interface/ > +====================== > + > +This mailbox uses the ARM smc (secure monitor call) instruction to > +trigger a mailbox-connected activity in firmware, executing on the very same > +core as the caller. By nature this operation is synchronous and this > +mailbox provides no way for asynchronous messages to be delivered the other > +way round, from firmware to the OS. However the value of r0/w0/x0 the firmware > +returns after the smc call is delivered as a received message to the > +mailbox framework, so a synchronous communication can be established. > + > +One use case of this mailbox is the SCP interface, which uses shared memory > +to transfer commands and parameters, and a mailbox to trigger a function > +call. This allows SoCs without a separate management processor (or > +when such a processor is not available or used) to use this standardized > +interface anyway. > + > +This binding describes no hardware, but establishes a firmware interface. > +The communication follows the ARM SMC calling convention[1]. > +Any core which supports the SMC or HVC instruction can be used, as long as > +a firmware component running in EL3 or EL2 is handling these calls. > + > +Mailbox Device Node: > +==================== Please state this should be a child of /firmware node. > + > +Required properties: > +-------------------- > +- compatible: Shall be "arm,smc-mbox" > +- #mbox-cells Shall be 1 - the index of the channel needed. > +- arm,smc-func-ids An array of 32-bit values specifying the function > + IDs used by each mailbox channel. Those function IDs > + follow the ARM SMC calling convention standard [1]. > + There is one identifier per channel and the number > + of supported channels is determined by the length > + of this array. > + > +Optional properties: > +-------------------- > +- method: A string, either: > + "hvc": if the driver shall use an HVC call, or > + "smc": if the driver shall use an SMC call > + If omitted, defaults to an SMC call. > + > +Example: > +-------- > + > + mailbox: smc_mbox { swap these. mailbox for the node name. > + #mbox-cells = <1>; > + compatible = "arm,smc-mbox"; > + identifiers = <0x82000001>, <0x82000002>; > + }; > + > + scpi { > + compatible = "arm,scpi"; > + mboxes = <&mailbox 0>; > + shmem = <&cpu_scp_shmem>; > + }; > + > + > +[1] > +http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0028a/index.html > -- > 2.9.0 >