Received: by 2002:a05:7412:8d11:b0:fa:4934:9f with SMTP id bj17csp543507rdb; Mon, 15 Jan 2024 05:54:43 -0800 (PST) X-Google-Smtp-Source: AGHT+IF9a6p1hNA3epwJNryuzbs+bsuzN//zOlUHSBQ37DY/lIJoVN5Btq8/gk+0lTfFm+wk7OOd X-Received: by 2002:a05:6402:278d:b0:559:4e8:6774 with SMTP id b13-20020a056402278d00b0055904e86774mr1963196ede.26.1705326882880; Mon, 15 Jan 2024 05:54:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1705326882; cv=none; d=google.com; s=arc-20160816; b=e6pAONKhjm5qUxBZQwx1UKSlpOJb8Lo3Oe+ZB0VhGQJsgWNG+2bNpnwj1SHTv7ZTFC 7SrtfQj5QS6iUTHnRE1WLzv8rYDstuBLaMjr3MaKlpkzjV1z3xAHda3cc7X5MAXGaxWL 4lE+RsuHGpiP0Q1uhXLD+PysRva+cTEHnfPl0DQ+ckCsGwrREXK/M4IzHrcnI+jZcQ52 nV1xWXjnd2eAUDc8n+wwtkIeZPY9awRwtnJUHSpSRzTJKQQ2zmS1zEifkz79Nr+vtyBg +sd+Lsa+UBTzJQWxVLDzLIbBREvoGPc/scxy+5mQOvrQAWPTFI2R0bCOVYYig6rRS1Wl /DNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=sxQobYGUiCH3u40trshtn0GkDMW94xPV+Pu/7IQRPbM=; fh=v3NBvV5+vj//chOYHzS5ZDleqozbh7nyGvHDjEWDUSE=; b=MLyfeWtxhQKnFnd7Kg96tzG+rUcVBH0CwxN9ZoirABEUk2/IVh+g2yMtZ1UOX94Mi1 kBR1FEvPJNuOVnuWwyUrCOSAIGEPrheNSEa+ykopwCDzv0Ba8zgbk9njYYF1TaSHrjGc HY4sXZIrlzy2e+Y5KckU9tfemouzpIAvFel97Mw3rL7zBEeebFc6ElkqEqBCSW3tCDCS ROFP6pMky0CVtmPHVPUv1Bwvtgul4TJs+TMfM95H9IbHFdSKfn2fKDfJYpIPpcB6kCMe jpVEWbCDw8oGiMDXesiT/KLP5Mz5yPl6PvxkWrX950B6fTalZaXj4m5EUkwDaIjD1o82 bw8Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=1iVouvkt; spf=pass (google.com: domain of linux-kernel+bounces-26057-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26057-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=foss.st.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id r18-20020a50aad2000000b005594ae1e02asi926120edc.48.2024.01.15.05.54.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jan 2024 05:54:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-26057-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=1iVouvkt; spf=pass (google.com: domain of linux-kernel+bounces-26057-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-26057-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 am.mirrors.kernel.org (Postfix) with ESMTPS id A06191F21A6B for ; Mon, 15 Jan 2024 13:54:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5203317598; Mon, 15 Jan 2024 13:54:22 +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="1iVouvkt" 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 B769817543; Mon, 15 Jan 2024 13:54:18 +0000 (UTC) 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 (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.24/8.17.1.24) with ESMTP id 40FDQbYZ022593; Mon, 15 Jan 2024 14:53:59 +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=sxQobYGUiCH3u40trshtn0GkDMW94xPV+Pu/7IQRPbM=; b=1i VouvktE8O1Jap+NVWRSLMClxDqeqrMGNQw3t6I4SmPk1oaLDSvLuMGKK98GzjfeO F6HFF1cOypBfkIhSW14qq6p6BUkxSBMQY8jXLZF2HtTjf7NPysJoIkmBcSfwmqFn E0KdM+M8XQNG3mHCXteB8DuddIvNH0tQXEBP0pxys38cjk9LnN37jn2cwtIFWnBR o5ucVKuAdvADFW63sLR3hfYsj/dGklo3plo6Z0i8RkUhs951nxbkfeQ2B26vi0Vf 5O6Wp9XCkLx6dSEVtV2J2SN7wiAt40VsT5g3hwMHECMVduv/gR/SM+m32a2UChck wyICAUDCvQn69SRdPpmA== 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 3vkmbh0se3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 15 Jan 2024 14:53:59 +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 13E68100058; Mon, 15 Jan 2024 14:53:59 +0100 (CET) Received: from Webmail-eu.st.com (shfdag1node2.st.com [10.75.129.70]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 0B95228EF81; Mon, 15 Jan 2024 14:53:59 +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; Mon, 15 Jan 2024 14:53:58 +0100 From: Arnaud Pouliquen To: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , Rob Herring , Krzysztof Kozlowski , Conor Dooley CC: , , , , , , Arnaud Pouliquen Subject: [PATCH 2/4] dt-bindings: remoteproc: add compatibility for TEE support Date: Mon, 15 Jan 2024 14:52:47 +0100 Message-ID: <20240115135249.296822-3-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240115135249.296822-1-arnaud.pouliquen@foss.st.com> References: <20240115135249.296822-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-05_08,2024-01-05_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). 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 + 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 + - 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