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 16E83C47422 for ; Wed, 17 Jan 2024 07:45:37 +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:From:References:CC:To: Subject:MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SZBqtQhBLpucLoAaXuCq/hsKKjG7OU/U7eUQaha27qo=; b=rvs29bmlWgDD7O vGJfnoRD7Vp6+J8oeAOBAh+zjxgZoYkw3P0+NYLIvEEzILrTPzFtQZpnRtfPbzfxIlczU9asvS31t IBITAzkTu1c/bJPB9GhhdWE6zNiH458zKo8qphJNk25GDn+oyrikFCXtLeGuEhfnZi1xtZzvXPDsW 3Mb9nOY/HtEiyH/+bbgt9ioq68RRWw6wGW/Ty0e8ujkFOWSvWm/u5nWOpsri7gDSbHWcqGNaUBYiP q3oigtzcegezjWGttvO/d4jHVGGsz7pRTUnf9J8eCJlget7LhG8YYcRPxfCfT8r59tfq2HHgwDg6J FGdQ82JPZfaBKvCd04cg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rQ0bo-00EjpH-1L; Wed, 17 Jan 2024 07:45:12 +0000 Received: from mx07-00178001.pphosted.com ([185.132.182.106]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rQ0bk-00Ejo1-17 for linux-arm-kernel@lists.infradead.org; Wed, 17 Jan 2024 07:45:11 +0000 Received: from pps.filterd (m0369458.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40H3x5lt020013; Wed, 17 Jan 2024 08:44:53 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= message-id:date:mime-version:subject:to:cc:references:from :in-reply-to:content-type:content-transfer-encoding; s= selector1; bh=OZrP5toRyjcJF2MlSXBcWkH6wmirRqD90mK0q6wA+8s=; b=sZ NaaTxtfHG0uZgegMGyKzip7iEYjjLmR6zGfV8xvOnL1Kid70iHiDFayu6HehNrgU a//XoLX3+f2/t6xhEYxJsnpz2wahW6gYJ/fJGs6UxwU3bqn0Bjx4MpSoMldru9kw 7Zjq7yfBUTf15XqCv4vj8uM5d1ckOq7xKdqhTxWKJgdlSrncdwytdGgK6cBGqA4d ui2WFAHsofdKJEscuoCSEXi6d7JeKmTwjhc/WIv3AMTbCATg9TCPuP1zlfi3AVjL xPBEyj8BcVi1Fy0fQz9pt5pgUmM4JXVT6vDKB2w1+eK8U95tBjw7XGOCSrHIahjf fVSXEmqnUGFRy63nR08Q== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3vm4y501dw-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 17 Jan 2024 08:44:53 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 19FAC10007B; Wed, 17 Jan 2024 08:44:52 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id E4C96212317; Wed, 17 Jan 2024 08:44:51 +0100 (CET) Received: from [10.252.22.63] (10.252.22.63) by SHFDAG1NODE2.st.com (10.75.129.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Wed, 17 Jan 2024 08:44:51 +0100 Message-ID: Date: Wed, 17 Jan 2024 08:44:50 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 2/4] dt-bindings: remoteproc: add compatibility for TEE support Content-Language: en-US To: Rob Herring CC: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , Krzysztof Kozlowski , Conor Dooley , , , , , , References: <20240115135249.296822-1-arnaud.pouliquen@foss.st.com> <20240115135249.296822-3-arnaud.pouliquen@foss.st.com> <20240116192145.GA265232-robh@kernel.org> From: Arnaud POULIQUEN Organization: STMicroelectronics In-Reply-To: <20240116192145.GA265232-robh@kernel.org> X-Originating-IP: [10.252.22.63] X-ClientProxiedBy: SHFCAS1NODE2.st.com (10.75.129.73) To SHFDAG1NODE2.st.com (10.75.129.70) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-01-17_03,2024-01-16_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240116_234508_978768_A56ED253 X-CRM114-Status: GOOD ( 20.54 ) 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 1/16/24 20:21, Rob Herring wrote: > On Mon, Jan 15, 2024 at 02:52:47PM +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). >> 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 >> --- >> .../bindings/remoteproc/st,stm32-rproc.yaml | 53 +++++++++++++++---- >> 1 file changed, 44 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..9fdfa30eff20 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 Linux > > What if other OSs want to manage the M4? Right, for instance this compatibles are also used by U-boot. I will change "by Linux" by "by non secure context" > >> + Use "st,stm32mp1-m4-tee" for the Cortex-M4 coprocessor management by secure context >> >> reg: >> description: >> @@ -142,21 +147,41 @@ 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 >> + then: >> + required: >> + - st,syscfg-holdboot >> + - resets >> + else: >> + properties: >> + st,syscfg-holdboot: false >> + required: >> + - reset-names > > Looks like a new required property. I just realize that it does not make sense. We execute this only if "reset-names" contains "hold_boot". I will remove it Thanks! Arnaud > >> + - resets >> + >> + - 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 +213,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