From mboxrd@z Thu Jan 1 00:00:00 1970 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D448CC761AF for ; Mon, 3 Apr 2023 19:59:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=vPeEvDEdyujTYjjS4S1d4PL5cWyg3ejuz/TkNJGAzq8=; b=OTGR0c/27FFQxu LeG50ObRtVGtVYpqOfsyo8dMcEYT9mcKcoPeW5j0b3QNEXVy0ov2uxw9vfd1Gh17lNHOCAS+KkJo6 5aVPnDSq3EKVtURHaRwPmZ+ubsOFm9iGnPJfOh5cPc/bLYYnMQPhLPKUHmJ1DkGdqHyjnT8i/+nD6 iKm3SnAFPaliR+iW7ERQnvlZdANEpLmPdSYgtMyUofFGSJXU+S1j0twh5vknyNns0H+4MHGgumn7y K20w+ktBQD5bvi+9BuF5AbBu931MP4B4B4MgSpxJm2ZdTdYchRZMskNl1mrR7YBi6KgNMk18QPaqg JwXZzAHamunRSmbdMxhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1pjQJi-00GWof-3B; Mon, 03 Apr 2023 19:58:15 +0000 Received: from mail-ot1-f49.google.com ([209.85.210.49]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1pjQJf-00GWnI-1n for linux-arm-kernel@lists.infradead.org; Mon, 03 Apr 2023 19:58:13 +0000 Received: by mail-ot1-f49.google.com with SMTP id a30-20020a9d3e1e000000b006a13f728172so13082197otd.3 for ; Mon, 03 Apr 2023 12:58:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680551890; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=r0ZVpErobEk7siRufyklDa0K2HoTMPy0mGGHyR65Aiw=; b=5d8P4A5y06rOb6YAZzA9w5cJHdE/hhROp0Ul3WLSAmbOe/EdGt7bKTyDa3y0EbEJ0f KVc2WnXVYSPfSTcALAt24Xoh6nqwT4JSth/zzcs8j9whC1lBbExOsL72+24QNvO4/5VH BwKIRbZhsk+EC3C1KvQ+sNCvDizbpR8YQEZRwvvNwqQ3Cmok+fxFVGrakAnOsPVekprq dSNkVapdRUiubdR4MJ5LgqRgYA5McfKSgMRafGpTUTX2sQ9FmmtGAc8abQyR7hThmf+O qv0ShWJvvhip+cctgMbcoxaRLVLokuPy7TBdiHtnqmiWqyITu2l1dcSkq35qNWkuSPsj WeGg== X-Gm-Message-State: AAQBX9f/f/AhJl9fZQKzljQfgcwh+Z1vkJiXMPYUDcDqWrYQ9RNwBiuy D/CmyC7L1kzuIiJAHpTTlA== X-Google-Smtp-Source: AKy350bGZH8h9G3cgIbWhS5PENOUJZ25o+LP1PRC4PeBlq22dweLKKypO5LxOd8z91F0sr/RVTOEfg== X-Received: by 2002:a9d:291:0:b0:69f:a848:1bb2 with SMTP id 17-20020a9d0291000000b0069fa8481bb2mr9204636otl.8.1680551889791; Mon, 03 Apr 2023 12:58:09 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id c21-20020a9d67d5000000b006a205a8d5bdsm4702200otn.45.2023.04.03.12.58.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 03 Apr 2023 12:58:09 -0700 (PDT) Received: (nullmailer pid 1465383 invoked by uid 1000); Mon, 03 Apr 2023 19:58:08 -0000 Date: Mon, 3 Apr 2023 14:58:08 -0500 From: Rob Herring To: Cristian Marussi Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, sudeep.holla@arm.com, vincent.guittot@linaro.org, souvik.chakravarty@arm.com, nicola.mazzucato@arm.com, krzysztof.kozlowski+dt@linaro.org Subject: Re: [PATCH v2 1/2] dt-bindings: firmware: arm,scmi: Support mailboxes unidirectional channels Message-ID: <20230403195808.GA1362828-robh@kernel.org> References: <20230327154528.460836-1-cristian.marussi@arm.com> <20230327154528.460836-2-cristian.marussi@arm.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230327154528.460836-2-cristian.marussi@arm.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230403_125811_594090_88A9ABF3 X-CRM114-Status: GOOD ( 28.93 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Mon, Mar 27, 2023 at 04:45:27PM +0100, Cristian Marussi wrote: > SCMI defines two kinds of communication channels between the agent and the > platform: one bidirectional 'a2p' channel used by the agent to send SCMI > commands and synchronously receive the related replies, and an optional > 'p2a' unidirectional channel used to asynchronously receive delayed > responses and notifications emitted from the platform. > > When configuring an SCMI transport based on mailboxes, the current binding > supports only mailboxes providing bidirectional channels: in such a case > one mailbox channel can be easily assigned to each SCMI channel as above > described. > > In case, instead, to have to deal with mailboxes providing only distinct > unidirectional channels, it becomes necessary to extend the binding in > order to be able to bind 2 distinct unidirectional mailbox channels to the > same SCMI 'a2p' channel. > > Bidirectional and unidirectional channels support for the SCMI mailbox > transport can coexist by carefully considering the effective combination > of defined 'mboxes' and 'shmem' descriptors. > > Signed-off-by: Cristian Marussi > --- > v1 --> v2 > - added mbox-names unidirectional definitions and example > --- > .../bindings/firmware/arm,scmi.yaml | 76 ++++++++++++++++--- > 1 file changed, 66 insertions(+), 10 deletions(-) > > diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > index 2f7c51c75e85..0204b102b47f 100644 > --- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > +++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml > @@ -56,17 +56,41 @@ properties: > description: > Specifies the mailboxes used to communicate with SCMI compliant > firmware. > - items: > - - const: tx > - - const: rx > + oneOf: > + - items: > + - const: tx > + - items: > + - const: tx > + - const: rx These 2 'items' can be collapsed to 1 with 'minItems: 1' added. > + - items: > + - const: tx > + - const: tx_reply > + - items: > + - const: tx > + - const: tx_reply > + - const: rx Same on these 2 with 'minItems: 2' added. > > mboxes: > description: > List of phandle and mailbox channel specifiers. It should contain > - exactly one or two mailboxes, one for transmitting messages("tx") > - and another optional for receiving the notifications("rx") if supported. > + exactly one, two or three mailboxes; the first one or two for transmitting > + messages ("tx") and another optional ("rx") for receiving notifications > + and delayed responses, if supported by the platform. > + The number of mailboxes needed for transmitting messages depends on the > + type of channels exposed by the specific underlying mailbox controller; > + one single channel descriptor is enough if such channel is bidirectional, > + while two channel descriptors are needed to represent the SCMI ("tx") > + channel if the underlying mailbox channels are of unidirectional type. > + The effective combination in numbers of mboxes and shmem descriptors let > + the SCMI subsystem determine unambiguosly which type of SCMI channels are > + made available by the underlying mailbox controller and how to use them. > + 1 mbox / 1 shmem => SCMI TX over 1 mailbox bidirectional channel > + 2 mbox / 2 shmem => SCMI TX and RX over 2 mailbox bidirectional channels > + 2 mbox / 1 shmem => SCMI TX over 2 mailbox unidirectional channels > + 3 mbox / 2 shmem => SCMI TX and RX over 3 mailbox unidirectional channels > + Any other combination of mboxes and shmem is invalid. > minItems: 1 > - maxItems: 2 > + maxItems: 3 > > shmem: > description: > @@ -228,13 +252,23 @@ $defs: > maxItems: 1 > > mbox-names: > - items: > - - const: tx > - - const: rx > + oneOf: > + - items: > + - const: tx > + - items: > + - const: tx > + - const: rx > + - items: > + - const: tx > + - const: tx_reply > + - items: > + - const: tx > + - const: tx_reply > + - const: rx > > mboxes: > minItems: 1 > - maxItems: 2 > + maxItems: 3 > > shmem: > minItems: 1 > @@ -393,6 +427,28 @@ examples: > }; > }; > > + - | > + firmware { > + scmi { > + compatible = "arm,scmi"; > + mboxes = <&mhu_U_tx 0 0>, <&mhu_U_rx 0 0>; > + mbox-names = "tx", "tx_reply"; > + shmem = <&cpu_scp_lpri0>; > + > + #address-cells = <1>; > + #size-cells = <0>; > + > + scmi_dvfs_2: protocol@13 { > + reg = <0x13>; > + #clock-cells = <1>; > + > + mboxes = <&mhu_U_tx 1 0>, <&mhu_U_rx 1 0>, <&mhu_U_rx 1 1>; > + mbox-names = "tx", "tx_reply", "rx"; > + shmem = <&cpu_scp_hpri0>, <&cpu_scp_hpri1>; > + }; > + }; > + }; > + > - | > firmware { > scmi { > -- > 2.34.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel