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 83AFBC46CD2 for ; Tue, 30 Jan 2024 17:51:29 +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=MCFUXif9O100OPbON4fNrQP6NlMr05TmLIs0bJH8gnk=; b=TNboMGnUSudsO8 oUXHPq76g1IaDJ9r/uPgBGZP6EkM8CrEnM46ysPE7H0PYqIovBos+2mdYhalmUkoeHoPOarHshE/w ljzV0qrGT+GS2n6wIiI5MNHgT1XSv4zYN/7v4ZErgphQeLMk/pBSJ5iBojSTmWE8o16/sVZS8aops TGN2sIHZNJKrVtRNe+B3m2a7kwibvMmFmPr5BVlX1BEdi2XG0UFSzocbl4xZ5mzFc6A3mPDI40Fvv TrpDzfWLDTchZjAqzoXgAGWiDicBl62S8QlntbD9JwMzgDnX4mHBJsc4oh0JqN/fUrGQWq0+Ys1na kEiqZUGT2A1mulZrrWRw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUsGU-000000001pr-3wit; Tue, 30 Jan 2024 17:51:18 +0000 Received: from dfw.source.kernel.org ([2604:1380:4641:c500::1]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rUsGR-000000001oG-292s for linux-arm-kernel@lists.infradead.org; Tue, 30 Jan 2024 17:51:16 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E7B3C60F70; Tue, 30 Jan 2024 17:51:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6BF42C433C7; Tue, 30 Jan 2024 17:51:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706637074; bh=DLSPvWePq7u4CdVnhLxHSUsOcaWXfundUGhrwH3b74Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=eVOgJDlwGSKU7+ba2A8EpRFzEE1f8EsGEGAgimwIWcT9R5UrOsy7CyPyy1iTz3ewT mKigbDH0EaiSqf1o/tbc2QKXn0QMEQietBjB2qEWHpS5oxiqgjjFN+HqTcC7yl6uYK agH0WhQpgj4N7IQy/g8lgUbSHzsBRR7RvpX8qeevKSwmjNoS00M6K4jJrbOpaJdUI0 u9Dsy/KEwcgO3nyc93FPTAaON5mpXJDwDv3eEkx0VOQpH0gEuFKyrwgiYIkXK0LVqB jv9XoSvh5IJR5jzUnvMnwq2Ux3+r3NR0Rr3GkcAVE2UlGJOsN87TimQmXFGRpMcrtw Vv3MgSTZdP8LA== Date: Tue, 30 Jan 2024 11:51:12 -0600 From: Rob Herring To: Arnaud Pouliquen Cc: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , Krzysztof Kozlowski , Conor Dooley , linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, op-tee@lists.trustedfirmware.org, devicetree@vger.kernel.org Subject: Re: [PATCH v2 2/4] dt-bindings: remoteproc: Add compatibility for TEE support Message-ID: <20240130175112.GA2040002-robh@kernel.org> References: <20240118100433.3984196-1-arnaud.pouliquen@foss.st.com> <20240118100433.3984196-3-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20240118100433.3984196-3-arnaud.pouliquen@foss.st.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240130_095115_677809_4CC79A78 X-CRM114-Status: GOOD ( 24.73 ) 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 Thu, Jan 18, 2024 at 11:04:31AM +0100, Arnaud Pouliquen wrote: > The "st,stm32mp1-m4-tee" compatible is utilized in a system configuration > where the Cortex-M4 firmware is loaded by the Trusted execution Environment > (TEE). > For instance, this compatible is used in both the Linux and OP-TEE > device-tree: > - In OP-TEE, a node is defined in the device tree with the > st,stm32mp1-m4-tee to support signed remoteproc firmware. > Based on DT properties, OP-TEE authenticates, loads, starts, and stops > the firmware. > - On Linux, when the compatibility is set, the Cortex-M resets should not > be declared in the device tree. > > Signed-off-by: Arnaud Pouliquen > --- > V1 to V2 updates > - update "st,stm32mp1-m4" compatible description to generalize > - remove the 'reset-names' requirement in one conditional branch, as the > property is already part of the condition test. > --- > .../bindings/remoteproc/st,stm32-rproc.yaml | 52 +++++++++++++++---- > 1 file changed, 43 insertions(+), 9 deletions(-) > > diff --git a/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml > index 370af61d8f28..6af821b15736 100644 > --- a/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml > +++ b/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml > @@ -16,7 +16,12 @@ maintainers: > > properties: > compatible: > - const: st,stm32mp1-m4 > + enum: > + - st,stm32mp1-m4 > + - st,stm32mp1-m4-tee > + description: > + Use "st,stm32mp1-m4" for the Cortex-M4 coprocessor management by non-secure context > + Use "st,stm32mp1-m4-tee" for the Cortex-M4 coprocessor management by secure context > > reg: > description: > @@ -142,21 +147,40 @@ properties: > required: > - compatible > - reg > - - resets > > allOf: > - if: > properties: > - reset-names: > - not: > - contains: > - const: hold_boot > + compatible: > + contains: > + const: st,stm32mp1-m4 > + then: > + if: > + properties: > + reset-names: > + not: > + contains: > + const: hold_boot Note that this is true when 'reset-names' is not present. If that is not desired, then you need 'required: [reset-names]'. Not really a new issue though. > + then: > + required: > + - st,syscfg-holdboot > + - resets > + else: > + properties: > + st,syscfg-holdboot: false > + required: > + - resets 'resets' is always required within the outer 'then' schema, so you can move this up a level. > + > + - if: > + properties: > + compatible: > + contains: > + const: st,stm32mp1-m4-tee > then: > - required: > - - st,syscfg-holdboot > - else: > properties: > st,syscfg-holdboot: false > + reset-names: false > + resets: false > > additionalProperties: false > > @@ -188,5 +212,15 @@ examples: > st,syscfg-rsc-tbl = <&tamp 0x144 0xFFFFFFFF>; > st,syscfg-m4-state = <&tamp 0x148 0xFFFFFFFF>; > }; > + - | > + #include > + m4@10000000 { > + compatible = "st,stm32mp1-m4-tee"; > + reg = <0x10000000 0x40000>, > + <0x30000000 0x40000>, > + <0x38000000 0x10000>; > + st,syscfg-rsc-tbl = <&tamp 0x144 0xFFFFFFFF>; > + st,syscfg-m4-state = <&tamp 0x148 0xFFFFFFFF>; > + }; > > ... > -- > 2.25.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel