Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp921812lqt; Fri, 7 Jun 2024 02:46:06 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUC6uR7NfabLfJS/bsEM+u2mt1JSays3Fm1q7huDBLgw0BaD+lZhutc2B4OHcQNZK/6PF7u84t9S6s5qgR6z+iUHPrdsD2n4PchV/ARqA== X-Google-Smtp-Source: AGHT+IHktCa4+yis4tuwXOixjtULhPm8wMBK0VhhmoCLK9tKy9s28CmM+7KAb217FdgsnWWg8FzV X-Received: by 2002:a05:6a00:2d1c:b0:6ed:d68d:948a with SMTP id d2e1a72fcca58-7040c753e43mr2206935b3a.23.1717753566080; Fri, 07 Jun 2024 02:46:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717753566; cv=pass; d=google.com; s=arc-20160816; b=hEzd2psKC5bJaWHvhxAIvglYbgq+gxi0v5IriH045K4lM9UUcBmOjC3KLELViYrfYK IeGe4w2AO5x0xQ5/b+1TGwaX1cNMRDgc8wOtPcN4gHOyfiQ54n1hMDmbYcTmNd2aVN91 U+Sf+parnMKpbxmgIpbIt/dGoCMP8e1vhUIpPgCkva11YAzImLCP9FK2PcPA1fKIjzHz zM53AoFO0ExRSuWzI1kXpyyf7uece0J2YoQb5YFrl+EPexPxFMtywIjVZQgPnPelMCyl jMI+hqDsxVAt2gVM8dJePzNXMoXORT5i2gg2IbRlZPualqo1F7PIrU92jZcb+k1oom31 ntqw== 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=cgopnLpz9D21kyaw8ITdDfN75PlJ1uAsIPqYUc0U42w=; fh=hTJigRCoV4/ES7XxqKE71DbJJyraFtTSDFtlGOKfKPo=; b=RRkhNR+mKMhhuF0LaYg6spmb6VUfTT6CGo/hAPAxxvoev5d8lQfcWuUFqvePTnkymR BW1cnRlB60k0+dqt8VWy0r40LUf1Hw2mzlntD+knKUuoSmhpRs3uNg8D9oXYwY7c3XPh NF+S6YxLLRouB/s4eWdHEJfYfinlHhwA86kNZ8a3yjKPzwyl1LmMXK+ZaY4/vgFbSkq3 AlKUsHMfNGf7Wz3VszKgkCuwzgrhwaZe6LA4q2Bn73rIHeKSr/ILQp6Jsud9/j8H0LOB OnzVEtzKFcX7vqUnN2DK94HJUGcnUINc+CQ/tapY1BWO3jkU4ARkPx1vH7ZBDOuZQtAO s0UQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@foss.st.com header.s=selector1 header.b=ZAflLt91; 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-205756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205756-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 d2e1a72fcca58-703fd5703d6si2685074b3a.353.2024.06.07.02.46.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 02:46:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-205756-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=ZAflLt91; 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-205756-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-205756-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 A4A61283975 for ; Fri, 7 Jun 2024 09:46:05 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D2A3915746C; Fri, 7 Jun 2024 09:45:04 +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="ZAflLt91" 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 0261515D5BD; Fri, 7 Jun 2024 09:45:01 +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=1717753503; cv=none; b=u0sPn4cAFW9ZDsPL9u2i6EmQH8uQ10L+PAjtXMu/ABfXUYt9RQIe4ayYehS6cibrQc2CZhIjQYFB5oER6agm7b+ug/gBc2HfavFc90QOM/twAEIi1QcUhxP6Arv7RBdveT1GcV/2XhyifThVmvNEpwqrEvVEr+NM7+yaAR5IRIE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717753503; c=relaxed/simple; bh=Vw/wQHz6rommIFjL+r7UGw0i629SCyoNi0ACok8F24M=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=ozmNyawK7Q4xNpZp1JzrnezBSRRClJYQFCYusSieqTI90kp4MuF7LAk5pv/Y77KsBiNVcE9SyzzV8fz+ijWnoXojhI/guhpFYkYi42Do5LVNo8pyBDny+kXyj0TKacXWSukK3dtqV0WGCO+DsjIACuL9r+QVp5Oq0rv/Eo/YEQs= 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=ZAflLt91; 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 (m0288072.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45791Jwm010908; Fri, 7 Jun 2024 11:34:59 +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= cgopnLpz9D21kyaw8ITdDfN75PlJ1uAsIPqYUc0U42w=; b=ZAflLt91PGfkcp3V YElKpoff1n+gl8GOOcxMQvlG9Zqbb3WnfeilPVHvwJaKy/kkBbCTCD1LOCQkNEEP 9qmLQ1ndyjFNwRGu3p9hIDWg7ZEJ+Hx93tCNqfDmC9NfSZwoFmvPTeBog/z0oEgY cEfLQF1ap2qJwbA8KCFWrn5MwSbFhJ5VfY9izmg0d+dgiyaMOiYpQGZa11hH2U// U7JNYZODlfE23S/1/7aCg61vNqugbWnl/2ILNaTbSw/v1by+UP8g9Yurens1CySl 3ylfUu5Xnedkd8UvYJYteTxu0Mo05qRgeSiCPwK38ZANjd/DpYSCvEIVk8LXmhul o+rPgg== 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 3yg7r0gts7-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 07 Jun 2024 11:34:58 +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 DB85A4004A; Fri, 7 Jun 2024 11:34:54 +0200 (CEST) Received: from Webmail-eu.st.com (eqndag1node5.st.com [10.75.129.134]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 1C2E3214530; Fri, 7 Jun 2024 11:34:08 +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; Fri, 7 Jun 2024 11:34:07 +0200 Received: from localhost (10.252.5.235) 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; Fri, 7 Jun 2024 11:34:07 +0200 From: Arnaud Pouliquen To: Bjorn Andersson , Mathieu Poirier , Jens Wiklander , "Rob Herring" , Krzysztof Kozlowski , Conor Dooley CC: , , , , , , Arnaud Pouliquen Subject: [PATCH v6 3/5] dt-bindings: remoteproc: Add compatibility for TEE support Date: Fri, 7 Jun 2024 11:33:24 +0200 Message-ID: <20240607093326.369090-4-arnaud.pouliquen@foss.st.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20240607093326.369090-1-arnaud.pouliquen@foss.st.com> References: <20240607093326.369090-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: SAFCAS1NODE2.st.com (10.75.90.13) 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-07_04,2024-06-06_02,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 --- update vs previous version - 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