Received: by 2002:a05:7412:ba23:b0:fa:4c10:6cad with SMTP id jp35csp243730rdb; Thu, 18 Jan 2024 02:07:46 -0800 (PST) X-Google-Smtp-Source: AGHT+IFAdmLmFiDSk5pMrMF87j0H0ZriImO0MKSIzzAAP6s1B1PqnraKafTOuNSEzL2ZkVL+5tGi X-Received: by 2002:a05:6808:2e92:b0:3bd:9adc:6aee with SMTP id gt18-20020a0568082e9200b003bd9adc6aeemr840232oib.36.1705572466217; Thu, 18 Jan 2024 02:07:46 -0800 (PST) Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id c17-20020ae9e211000000b0077fb9dd4b5esi13312089qkc.739.2024.01.18.02.07.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 18 Jan 2024 02:07:46 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-29997-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=LOhIt2e7; arc=fail (signature failed); spf=pass (google.com: domain of linux-kernel+bounces-29997-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-29997-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 9259E1C218DC for ; Thu, 18 Jan 2024 10:07:45 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E4A0E2033F; Thu, 18 Jan 2024 10:07:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=foss.st.com header.i=@foss.st.com header.b="LOhIt2e7" Received: from mx07-00178001.pphosted.com (mx07-00178001.pphosted.com [185.132.182.106]) (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 5081A2030E; Thu, 18 Jan 2024 10:07:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.132.182.106 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705572455; cv=none; b=PPGIIhaqi2il59n0dDDtMpOEcaocOkoBkzWaMzl6k3xYWkFvWJKN3/k/1/NUEZfQyc7iWRx2mgf83ih2xMlJu30VQC34EM+8DtE5oF7L1zzJYAO7JhOKffmMRXb/F28ECZhZ/xBFUyTfTIfhyJ+3BCnyf5tKSSoT4AQsJbmq0DY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705572455; c=relaxed/simple; bh=40VPSU6AX02vAqlvOdfGbStxQT2t/I9uVKGR7e2jgQ8=; h=Received:DKIM-Signature:Received:Received:Received:Received:From: To:CC:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding:Content-Type: X-Originating-IP:X-ClientProxiedBy:X-Proofpoint-Virus-Version; b=AmyNn48ao7Y//ss6NxLau+8n8R8meK7DtFjRy/RPxbDPzNu9/mYCg10/mRaDw32S2JKYe9ZVr3Dvu+Ng641bCMFeqOOFVMNBq9WmuQf3MzMTj2gzg22VnmAbAkDCR5JmcLxYIKr5czgUx6udqc6lEDiA1KjAhdRKdHKjJMRfrPA= 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=LOhIt2e7; arc=none smtp.client-ip=185.132.182.106 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 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 40I4Et6h017221; Thu, 18 Jan 2024 11:07:06 +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=8S4qqZRLK56BR/uibHO2eixbPZSWZd1/08c0a5yZAKc=; b=LO hIt2e7LcKdlfpqPqKke/yLHvNtQzZFsDQU01IWsHs8sZOdEyczPwDTd/nZEqhbo5 VZEq1DTjo8NxF8VwmrbP3t02nU4ll3l0Mj7NRwkLfYAvB8ZGEtkNHwl+wWKNteGa zkxJNLBmRxm5FXCpiPxjHttZmA44Oc/4vfcidxMiXb26lwMUuybI7tTXpg31CEok id2WYlVC3jcMgpSX6SFuvTRXDbN2oLSdCyYzMippOtnr/2xl4aChj8XfyDw2zKTY YRbHvFUpUtqplIj+3YwbvyJhkMmqW6P+YPRrtTVzwnxtdU5b55sqkuJCPgKE5cVw ySGTSyDfPKVNPPEaiqhw== 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 3vm4y5603s-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 18 Jan 2024 11:07:06 +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 483C010007D; Thu, 18 Jan 2024 11:07:05 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 408A921A22A; Thu, 18 Jan 2024 11:07:05 +0100 (CET) Received: from localhost (10.201.20.75) 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; Thu, 18 Jan 2024 11:07:04 +0100 From: Arnaud Pouliquen To: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , , , , Arnaud Pouliquen Subject: [PATCH v2 2/4] dt-bindings: remoteproc: Add compatibility for TEE support Date: Thu, 18 Jan 2024 11:04:31 +0100 Message-ID: <20240118100433.3984196-3-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240118100433.3984196-1-arnaud.pouliquen@foss.st.com> References: <20240118100433.3984196-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: EQNCAS1NODE3.st.com (10.75.129.80) 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-18_05,2024-01-17_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 --- 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 + then: + required: + - st,syscfg-holdboot + - resets + else: + properties: + st,syscfg-holdboot: false + required: + - 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 +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