From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 923154A32; Fri, 8 Mar 2024 14:48:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.207.212.93 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709909320; cv=none; b=V7pWYzBd9f+dvtV18w0QAb20+PjLeN+N25zT05RdXn3nL0kJO6v2K3PzmSXyZqxq6GrYlBkEkTz58zDY10nNeODWSrOfLsO23ne1y9aL1gkfuOdGvEIa5Bg2/1wPGjDbA0NtJARvRVuRkSztyaPItXY+didAFJK6kAQvra57ROU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709909320; c=relaxed/simple; bh=WJAAFv9HpT7EYoeKUho7qzaL00rTB2FCdEQkiADh85I=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=j3yc+4QT9gVtCiJQFQ53y9fkx3NE4gZsLCDrPTJmk0bRr/afQzO8nhncGjlFOZ1s2vYHgzrjhdJKMJmQIQfH55X3JVGZXPkyqLmz4wAEtn4NqjMhVEtcqXugNiS5BIdjI4tlBP2m03TF8YneC+GxC/ihCg8WLPK7LpAoVElfAw4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com; spf=pass smtp.mailfrom=foss.st.com; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b=ojzzt3oY; arc=none smtp.client-ip=91.207.212.93 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=foss.st.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="ojzzt3oY" Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 428CPQXu021482; Fri, 8 Mar 2024 15:48:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=3mswl4/9HTAkPLEfs+kyIZ/5HHTQ7/vqhlZwBfB6tso=; b=oj zzt3oYr/17BncxqK6199L9fC//gy+XxiBxUFShKE5ljNGdJ2NnYdhzBgg0SvY8LC ESnSV3VjWcihYqEn65NtVWopmV5OndrL85kczaoMfY7G4Tku4EYBLnCjBgIa6Uri EG9CkN+vyglLTw07xR03dfyg0gvDM0WU3k/HSpdWJXpnk4nc9wqhVZS6u0nXTCzJ +/7v+vQzR6XmvFt+1Iv+xDEd9XPQeuIaPlzkthAH/n4Kvt+salM9naTN2gOcvTSn LVtGaeVyQ7BaOWy4f2GzYr5Zax3Iw+CoDH+5xJG1aXNEg3FprAUa+o5xu5vIvsNw bsy/ykyJ2p8aIT1S9OPg== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3wqdxmnngu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 15:48:11 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 6AFD540045; Fri, 8 Mar 2024 15:48:08 +0100 (CET) Received: from Webmail-eu.st.com (eqndag1node6.st.com [10.75.129.135]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BECE027D53A; Fri, 8 Mar 2024 15:47:18 +0100 (CET) Received: from SAFDAG1NODE1.st.com (10.75.90.17) by EQNDAG1NODE6.st.com (10.75.129.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 8 Mar 2024 15:47:18 +0100 Received: from localhost (10.201.21.20) by SAFDAG1NODE1.st.com (10.75.90.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 8 Mar 2024 15:47:18 +0100 From: Arnaud Pouliquen To: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley CC: , , , , , , Arnaud Pouliquen Subject: [PATCH v4 2/4] dt-bindings: remoteproc: Add compatibility for TEE support Date: Fri, 8 Mar 2024 15:47:06 +0100 Message-ID: <20240308144708.62362-3-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240308144708.62362-1-arnaud.pouliquen@foss.st.com> References: <20240308144708.62362-1-arnaud.pouliquen@foss.st.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SAFCAS1NODE1.st.com (10.75.90.11) To SAFDAG1NODE1.st.com (10.75.90.17) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 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 Reviewed-by: Rob Herring --- .../bindings/remoteproc/st,stm32-rproc.yaml | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml index 370af61d8f28..36ea54016b76 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,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 + else: + properties: + st,syscfg-holdboot: false + required: + - reset-names required: - - st,syscfg-holdboot - else: + - resets + + - if: + properties: + compatible: + contains: + const: st,stm32mp1-m4-tee + then: 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 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 C5497C54E4A for ; Fri, 8 Mar 2024 14:48:43 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:CC:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=ai3Eg/GajqrhlnI1BeOLY7FXPimu5GQ7N1+noCoEI+4=; b=f/MlVDSbK7riQC 9XKjDCv5zvrDKo6rjgYp5iRtu05eLPxvRijJd2wKi7FPnlcPwYIf4gBD7KkE3pBFfdJEep09EmbZj 4MYYoVBgqRAUsf8AGBEVgTQMlt3cGX853dr/1Kfj3LiciG63NZw72uM9oKgP2PQzJNdcLDvijiTZb NRbfqxyrFW/0/XUcpKaLdhtovJLcPtEpN1e1K4kypp1ZTAPgbr8Rl73qoQ1CiY6Z8eYsJhvKcmEuw 8CgFiao5mSGDNrPVgMQwipr67hSL3tcC2ACoHfHfjuyqO+QeOAxX7vZ35K9uTF/hUBxFt39UZdYPS NGWi2iUbj8tNZJNOc1bQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1ribWU-00000009f4T-2NzH; Fri, 08 Mar 2024 14:48:34 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93] helo=mx07-00178001.pphosted.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1ribWM-00000009eyG-2v2U for linux-arm-kernel@lists.infradead.org; Fri, 08 Mar 2024 14:48:29 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 428CPQXu021482; Fri, 8 Mar 2024 15:48:12 +0100 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= selector1; bh=3mswl4/9HTAkPLEfs+kyIZ/5HHTQ7/vqhlZwBfB6tso=; b=oj zzt3oYr/17BncxqK6199L9fC//gy+XxiBxUFShKE5ljNGdJ2NnYdhzBgg0SvY8LC ESnSV3VjWcihYqEn65NtVWopmV5OndrL85kczaoMfY7G4Tku4EYBLnCjBgIa6Uri EG9CkN+vyglLTw07xR03dfyg0gvDM0WU3k/HSpdWJXpnk4nc9wqhVZS6u0nXTCzJ +/7v+vQzR6XmvFt+1Iv+xDEd9XPQeuIaPlzkthAH/n4Kvt+salM9naTN2gOcvTSn LVtGaeVyQ7BaOWy4f2GzYr5Zax3Iw+CoDH+5xJG1aXNEg3FprAUa+o5xu5vIvsNw bsy/ykyJ2p8aIT1S9OPg== Received: from beta.dmz-ap.st.com (beta.dmz-ap.st.com [138.198.100.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3wqdxmnngu-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 08 Mar 2024 15:48:11 +0100 (CET) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 6AFD540045; Fri, 8 Mar 2024 15:48:08 +0100 (CET) Received: from Webmail-eu.st.com (eqndag1node6.st.com [10.75.129.135]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id BECE027D53A; Fri, 8 Mar 2024 15:47:18 +0100 (CET) Received: from SAFDAG1NODE1.st.com (10.75.90.17) by EQNDAG1NODE6.st.com (10.75.129.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 8 Mar 2024 15:47:18 +0100 Received: from localhost (10.201.21.20) by SAFDAG1NODE1.st.com (10.75.90.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Fri, 8 Mar 2024 15:47:18 +0100 From: Arnaud Pouliquen To: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley CC: , , , , , , Arnaud Pouliquen Subject: [PATCH v4 2/4] dt-bindings: remoteproc: Add compatibility for TEE support Date: Fri, 8 Mar 2024 15:47:06 +0100 Message-ID: <20240308144708.62362-3-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240308144708.62362-1-arnaud.pouliquen@foss.st.com> References: <20240308144708.62362-1-arnaud.pouliquen@foss.st.com> MIME-Version: 1.0 X-Originating-IP: [10.201.21.20] X-ClientProxiedBy: SAFCAS1NODE1.st.com (10.75.90.11) To SAFDAG1NODE1.st.com (10.75.90.17) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.1011,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2024-03-08_08,2024-03-06_01,2023-05-22_02 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240308_064827_045510_17EE6803 X-CRM114-Status: GOOD ( 13.98 ) 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 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 Reviewed-by: Rob Herring --- .../bindings/remoteproc/st,stm32-rproc.yaml | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml index 370af61d8f28..36ea54016b76 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,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 + else: + properties: + st,syscfg-holdboot: false + required: + - reset-names required: - - st,syscfg-holdboot - else: + - resets + + - if: + properties: + compatible: + contains: + const: st,stm32mp1-m4-tee + then: 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