Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp181460lqp; Tue, 11 Jun 2024 00:41:30 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXjy03w7o84R6IzoqiK6mOmVpVaVCbQuZtAn/psoaOlAMpyyUQC+f77Q1H8MTzPZJUbj7LNlfNdBLPSYvXmclIIdhsASMO2j1+XfdpPxA== X-Google-Smtp-Source: AGHT+IHoOiOa1UZ2Sf8HU0bygkSvqrwVLRp9OcCSP3A8bXom0AwQAvk94xlZXeTywLx9pKNP3jG6 X-Received: by 2002:a05:6359:4c8d:b0:19f:4a60:e6f7 with SMTP id e5c5f4694b2df-19f4a60e9acmr862457055d.29.1718091690236; Tue, 11 Jun 2024 00:41:30 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718091690; cv=pass; d=google.com; s=arc-20160816; b=o4Y+uI7q+bOwd3FWPy6lPD+95o5ocD0U8VYc78Vvy9iM6wxs5EhtRGdeebYF8rdyu1 7S7nRX3kdhiI4E6nzE5luMqJG/waYX+udu2w5VoyzOvFnnwIXILs1+DXRFg4eCgBTT3j znYjmzg9hPNRuGYw43Y8dp1wMgE5ODVnMiSzBKfGXGytFkbqtkSKFxGmJGLJh6hcrfaA /W7whGGtNUeGZumAiLIJDHYubKGiNBSoNEHLcpbN9zR/LXboH7zzYhEP8RT8bsRGm8wJ KW60JtGZ0kP0U9Q7WnL0/BjZ8Jb2NM5wME+hfbm7RSUN+LbL7d2nSOu4e3meCwJFx4Nm s29g== ARC-Message-Signature: i=2; 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=lqh9Us/HOGcM6R06K1nx/R7GseG1B7CW4LuJPd7bflI=; fh=hTJigRCoV4/ES7XxqKE71DbJJyraFtTSDFtlGOKfKPo=; b=ode5BHD4V+Of0o34uwSf16wnQ4DOyWWQ05yyeN84iF4YLFVXT0ULseBjLs5LBF1XKN jvENjZA4rAZ16gmlWOpjM3w5xpTZuN/2h1r+GPMZPvlckwQq7Spi9SPDrdJOOW5lHXF6 pGgY6VyJ9uYTSXWQNzYEMFWKi6+qIDjByLJK4YVAv50Ml//hJrb4YyriCEm01LasZQJP Ug5qRhUt6nA0+sDVAqb47ysr9oG/C0z0MupW87Cb/inX1cjhSdKurncKaYJtCH0mTtdZ nmg9oYoFiLDc2yNnpigniAyz1b+PmuH8OfeaYy+d+WrP/g0d0DO77xD4vN28LPvrN6sn j7DA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Bu3LMjM6; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-209390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209390-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 sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id 41be03b00d2f7-6e6be05066bsi5044315a12.379.2024.06.11.00.41.29 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 00:41:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-209390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=Bu3LMjM6; arc=pass (i=1 spf=pass spfdomain=foss.st.com dkim=pass dkdomain=foss.st.com dmarc=pass fromdomain=foss.st.com); spf=pass (google.com: domain of linux-kernel+bounces-209390-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-209390-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id 7385628B3BD for ; Tue, 11 Jun 2024 07:40:57 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 6D810173339; Tue, 11 Jun 2024 07:40:28 +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="Bu3LMjM6" 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 897D2172BA5; Tue, 11 Jun 2024 07:40:25 +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=1718091627; cv=none; b=TDLTAjFeDPlJ18RTRYOOiODP/pNs4D7nRkSLSvDvu1D7fO2wo/XOblpiCQKALYuijqc67B8RaUXzbVQZ0CSw9nEqchZk75PGTGF3yuS8glq77pHIukrO0J7v56hFy1Cs0AiaMhgRJeuetzcK2JiRMdIT1b5ryrrRgbijXxNmlZg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718091627; c=relaxed/simple; bh=sBIU409b2Iv9d/pRES9fFLQVXaB/K/7mfZXiapMClw0=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=pfJRa2SUs8HYTQRSv7jEcXllP1UJtJR9EVJFrWjvtZDZXOqX17cAQsey/L8WrvqCTj3jKdF7tA1ntK67wW7oL7mhYS0aSNPsZageo7rcHRoEnJi0uNwx2a2m2Q5iCvvND4BfAdCtb+7zqyzS1N044JYgvpf6mAOVv8WaIJZvRK8= 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=Bu3LMjM6; 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 Received: from pps.filterd (m0046661.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45B01V94027315; Tue, 11 Jun 2024 09:40:02 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=selector1; bh= lqh9Us/HOGcM6R06K1nx/R7GseG1B7CW4LuJPd7bflI=; b=Bu3LMjM682G0RYiQ R/dcs713FCj2oXJvQjmk23RB92x8mNTgtYmQhD0C3vTEIt2+6NKk5dI9i3dfs8lw b6JWsKTeI2g3R99KBw05VvhQHMPGA0k0GS800/asDWNDC5U22rDiEu+gDaGE5Vj+ ndllNwWcR3vHU1NQsAdc+kNRQcUzmwIQC7VpwZrBPJzbgn0o9fHjAqxM36ZkHgtF ifH+rN/T2AIQx1lDqEekXGWGu3Fs2jC7sYdha6nDB3Cij0m/NWlAbQvKq/gSGaHJ OdniPeuJzLvmtz0QCdbOPStxVME4ZvstZ6OsDLZSQfevbexv8BVmLFCT+ysl12BS g3K8bg== 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 3ypbp41fdy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jun 2024 09:40:02 +0200 (MEST) Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 24CD340046; Tue, 11 Jun 2024 09:39:58 +0200 (CEST) Received: from Webmail-eu.st.com (eqndag1node5.st.com [10.75.129.134]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 5509D20F56B; Tue, 11 Jun 2024 09:39:11 +0200 (CEST) Received: from SAFDAG1NODE1.st.com (10.75.90.17) by EQNDAG1NODE5.st.com (10.75.129.134) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Tue, 11 Jun 2024 09:39:11 +0200 Received: from localhost (10.48.86.121) 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.35; Tue, 11 Jun 2024 09:39:10 +0200 From: Arnaud Pouliquen To: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley CC: , , , , , , Arnaud Pouliquen Subject: [PATCH v7 3/5] dt-bindings: remoteproc: Add compatibility for TEE support Date: Tue, 11 Jun 2024 09:39:02 +0200 Message-ID: <20240611073904.475019-4-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240611073904.475019-1-arnaud.pouliquen@foss.st.com> References: <20240611073904.475019-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.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-11_03,2024-06-11_01,2024-05-17_01 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 trees: - In OP-TEE, a node is defined in the device tree with the "st,stm32mp1-m4-tee" compatible to support signed remoteproc firmware. Based on DT properties, the OP-TEE remoteproc framework is initiated to expose a trusted application service to authenticate and load the remote processor firmware provided by the Linux remoteproc framework, as well as to start and stop the remote processor. - In Linux, when the compatibility is set, the Cortex-M resets should not be declared in the device tree. In such a configuration, the reset is managed by the OP-TEE remoteproc driver and is no longer accessible from the Linux kernel. Associated with this new compatible, add the "st,proc-id" property to identify the remote processor. This ID is used to define a unique ID, common between Linux, U-Boot, and OP-TEE, to identify a coprocessor. This ID will be used in requests to the OP-TEE remoteproc Trusted Application to specify the remote processor. Signed-off-by: Arnaud Pouliquen Reviewed-by: Rob Herring (Arm) --- update vs V6: Add Reviewed-by: Rob Herring (Arm) update vs V5 - merge [PATCH v5 4/7] remoteproc: core introduce rproc_set_rsc_table_on_start function as new "st,proc-id" is associated to "st,stm32mp1-m4-tee" compatible - update commit message - remove Reviewed-by: Rob Herring as patch is updated --- .../bindings/remoteproc/st,stm32-rproc.yaml | 58 ++++++++++++++++--- 1 file changed, 50 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..409123cd4667 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: @@ -43,6 +48,10 @@ properties: - description: The offset of the hold boot setting register - description: The field mask of the hold boot + st,proc-id: + description: remote processor identifier + $ref: /schemas/types.yaml#/definitions/uint32 + st,syscfg-tz: deprecated: true description: @@ -142,21 +151,43 @@ 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 + required: + - st,proc-id additionalProperties: false @@ -188,5 +219,16 @@ 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,proc-id = <0>; + st,syscfg-rsc-tbl = <&tamp 0x144 0xFFFFFFFF>; + st,syscfg-m4-state = <&tamp 0x148 0xFFFFFFFF>; + }; ... -- 2.25.1