Received: by 2002:a05:6500:1b8f:b0:1fa:5c73:8e2d with SMTP id df15csp209560lqb; Tue, 28 May 2024 13:09:12 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVcFxQl2bkyV6NDEZd3J7ltChvesAvFr+6JM4aUZKK383zQdgieb7b0HUgHQytYbN8yLzF5cGOZRUgdsV+i2RLtDmH+36ov3l1eVFVWPw== X-Google-Smtp-Source: AGHT+IFlUvxNwDJWDR9RCzmZ3YQ0snapw0MgXpGOM+x2XPodm/2QPRYTu/F0OXDXe3Usv6MyAPX+ X-Received: by 2002:a05:6358:6524:b0:197:b7d8:357e with SMTP id e5c5f4694b2df-197e50f274dmr1833845855d.12.1716926951710; Tue, 28 May 2024 13:09:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1716926951; cv=pass; d=google.com; s=arc-20160816; b=K3aPQ9lrYJipbgdIJdT1YXo+7BP4sUdwhm6EtPrTvyuJ3d20v1hFqZyEkcClsGrng7 hpdrS0saiTldNfk81aDGUpZ3CZYNADhd2cGirnO0tPJrGJNOjoyN8SWDnihPiwxfso5B 8z/BPzatfnDxiOS1a/ZT045Xb4lvhT+tiwpLbuCikwvVk5Ub+IdlTdf4aDdBaHrw0Ttx DX7GB8cJrI4++SgTVRxkz3cnHIB0sP6m6eXQarLSyZvXxqV7SsHBCAA/qgKm9+0AjwQm xfiOud4iwDAwMYsP/HEEFSXU107LtJ2eXtU6LjhWvTLLJ1uHEoGgeEIxjTu3GudjNqwP EsXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xA96EipLEsw2OGrKZRs6fY4D8prbnQiUmnEE7uuFffo=; fh=jKvZiiu7gLDS9wOXmobmAXa/aNgHv5Yfj1d3inPEjbA=; b=fvyPY0NB0I+HZZi+xKwdKgBCAJBWl39rDfEIgsUA12Cr6Rkhg2k3nZ6HYxD1dEzlKI JOzDKRA2iCS0Eqb4TwANBZ7DHV0AC1X95lfkpMpaAjJ5iV3vyvh/SdszC5H0htjyNn1B n/8Jv9aTq8ir69msfBFgBjwwyY6j84tWtKZNTZfDjepHkGS/3Eg/2pxb93rEk966Svn2 hksoVy9mcjLwGI+SMfXdTPxiSQ18ODq4lW3hidgGz8Ouy76+t7TiM4zO4SLro2CdQgpr DvgyYuA3DuvpcigpNpPrPUhISqMQNtRyoG351vtB77lBS0GEa+0kj7FTtcz1mCWQDlGY rs9A==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CDtU1yqR; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-193006-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id af79cd13be357-794abcac1e0si1173117685a.152.2024.05.28.13.09.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 13:09:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-193006-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=CDtU1yqR; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-193006-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-193006-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 5E0B31C22A1C for ; Tue, 28 May 2024 20:09:11 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id CC5D1178CC5; Tue, 28 May 2024 20:09:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="CDtU1yqR" Received: from mail-pf1-f178.google.com (mail-pf1-f178.google.com [209.85.210.178]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 78269178398 for ; Tue, 28 May 2024 20:09:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.178 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716926943; cv=none; b=aczshJqRBsudJZ4kZmy1lzNH51z8lhqiJfVfjs96BR5wxlT1MigoqyJqHN2y7QAgfkiRm9oO+lqiIA+9swTNLOxtxqxbAGqpxURb/wjDg4MWQ2SGsNmUj1XztZGYi4UO+jS8kEOsmMVa7r6A1NB7zzID0LCull9OFR7s2g8ZgSY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716926943; c=relaxed/simple; bh=+pgBMzMGOayWWzOwkArXusYvlixDsbV+Ps4Vic3yX6A=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LRsne3pSGGV3IP7W3Pkq3IIjRLGWAxftAODLA4FTojTVYlIvObjlPQQPpyvmXhNrwYmJikd+8n9ardFsXBhn9PFGcGrvmN4QXptlipUwfId5A/w2/u9ngJkeBGblfjCH5RctYPwWqUs24Wvsc6cSPuoDO0m8G8kuvpR7Q9Zow/E= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=CDtU1yqR; arc=none smtp.client-ip=209.85.210.178 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-pf1-f178.google.com with SMTP id d2e1a72fcca58-6f8eba8f25eso1067096b3a.3 for ; Tue, 28 May 2024 13:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1716926942; x=1717531742; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=xA96EipLEsw2OGrKZRs6fY4D8prbnQiUmnEE7uuFffo=; b=CDtU1yqRKiDbobdGyLNhWc1H1+kTS+c6nmWQdxUdTJ+6fv+zhjA7Ej9M/wNHslOR7R ybOZK6NsJx9WjH9v1oDh+K8PcbTSmxst+LMgGc3P1wgdPjXdx7/52xiQQBNVXkO54S6S 5IpmCGEKA0IDgNQ71JqcBZtPwK6MlCO4+GDIskaud2IYpIBgB7/iCuiT5qNsus+hfw1S yf8Nrodz/jV4w9mNC8I1z9rjU6SVRp5+rqY9sr2PWAfODtrT5atPmNt2tnuO5rsNIXu9 oCFKh0x4YkFl6YNUC/t7G17yPZnqpXZzmyL/3fe9pPPcqDnrbcVS3etQTboE/QpcIYCV tNSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1716926942; x=1717531742; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=xA96EipLEsw2OGrKZRs6fY4D8prbnQiUmnEE7uuFffo=; b=vitfp/0yr78ODxWpN9nNI2Ar6K1O27b22TRqHCvjBtplGMe+hT89f6mGBoVWwYeGoq lJDdAVTFJi8HByLcsuJdd0MEo8WWqf9dbhLWHDjK9wsjcjXsXN7aaJvMVQ6JekU1zMdx pZEZ2YezZA+KQFR5shBgEI9Vb8XFrG25P+bmkZjemAi7SNCxT4s4IT4agj7fESOmmwbK KK8EOaN0PXeFoopyHbORVeopNU/abxWYY+4M3eeF1fiI5PtdzCDpMCavL//rcIqsktsy PjZZpYPvSFMbD4mH96K6XrqFJ456pISG+e36RavuPAGoQi++J3VLB2xuNe5tnwKJbfgf IqCw== X-Forwarded-Encrypted: i=1; AJvYcCXfDp/vthJ31Ce4UO8eKXPO2TzNxcQmQLGReCSTkJMPM313WehfmsdO3VR1swUfnFTJ5ycFAv+EqpHIKRn0fdgDHNsLDHp5afIXK6nr X-Gm-Message-State: AOJu0YyxCuSEmkMDsBpHkU6fh9M6lIIzt0xd1krMo1ohiGmBsMusgjgh RmMpX+UOj1NgkmUAwWMLkecIPahiUzJxqQ7h242CGfGh5DedfYUR3QqAO1/ZLh4= X-Received: by 2002:a05:6a21:4987:b0:1a9:c4cc:721d with SMTP id adf61e73a8af0-1b212f64a6fmr13050339637.57.1716926941624; Tue, 28 May 2024 13:09:01 -0700 (PDT) Received: from p14s ([2604:3d09:148c:c800:4c7:2691:aa4a:e6b7]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-6f8fcbeb128sm6786029b3a.135.2024.05.28.13.09.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 28 May 2024 13:09:01 -0700 (PDT) Date: Tue, 28 May 2024 14:08:58 -0600 From: Mathieu Poirier To: Arnaud Pouliquen Cc: Bjorn Andersson , linux-remoteproc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com Subject: Re: [PATCH v5 2/7] dt-bindings: remoteproc: Add compatibility for TEE support Message-ID: References: <20240521081001.2989417-1-arnaud.pouliquen@foss.st.com> <20240521081001.2989417-3-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-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240521081001.2989417-3-arnaud.pouliquen@foss.st.com> On Tue, May 21, 2024 at 10:09:56AM +0200, Arnaud Pouliquen wrote: > 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. I don't see how firmware can be started and stopped. Please rework. > - On Linux, when the compatibility is set, the Cortex-M resets should not > be declared in the device tree. This is a description of "what" is happening and not "why". More comments to come shortly. Thanks, Mathieu > > 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 >