From patchwork Wed Nov 29 15:31:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Richard X-Patchwork-Id: 13473032 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D1A74C4167B for ; Wed, 29 Nov 2023 15:32:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=4CnNRcSP0dG7t4IjvvjsSQruve9g5jmaRIkmr01HCyk=; b=jMYIp6y2AUoEBd 8Vbx1kS18XXtKnHXb3uU5l+rOlu6UQpnqUomj1oyKLvCv0rVhEK3OqK+eKsAaO+tcMz/aHHqqs1NK z/+IyiIyjR1nmmBrk1iZV2bkD/PHPMsVPDy20bpyqRi/nvNOLfWJJwLNoHxnHpscnS33XrNYA47lA DTPB7NaStD50aVlvUwLr83SoRVPhJMT/2zZCbCGXCcV1dtciGiwr7Fa8tY1+yGQKc5S+RUoybFtBb 0zSZ6n4NtTNKJFvE6ciF1SjVQ2J5NWWwRsRZd/GnvyfWAsCCRe5+XqPGrHhlV0RR5X6baKN5xr6RW oo42+uPeedYZyCl/zL/g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8MXR-008kfy-1q; Wed, 29 Nov 2023 15:31:45 +0000 Received: from relay4-d.mail.gandi.net ([2001:4b98:dc4:8::224]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8MXA-008kaM-0N for linux-arm-kernel@lists.infradead.org; Wed, 29 Nov 2023 15:31:30 +0000 Received: by mail.gandi.net (Postfix) with ESMTPSA id 340CDE000A; Wed, 29 Nov 2023 15:31:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1701271886; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=n6Se7MgTLDlVPsmnv481wC76UKLsZL7lpNqEMlGZzy0=; b=IAr/fyUww18EgY4GKsHZMYeVTdK+cveCDjQkTAmKmYQJpAQ7V63VUI9w7uU7LnDdhJ++6s dswp7Ew+Zg2jg5CZ6Spu6PDvXR+wXPIizzILSrhOIIRTH348R5T8oNbB0qw9s1hJRTqFdV 2Fy+7NThE7UTzrSf0si2wpYZf8E9T0LpEFGHklB76X5DCOqK1OrBEAMdRHaIW5bIgqCctX oWBJ5zufnZ+o9VcXTxrrzf5pGoqf2q7bRqpUHmsMx/5lsiRj2JVK0yEGnZy+kq8fjMv+Pg i45A8YVchsERATCQniJ8Nm2udPMXvwziQDnejef9/H38zCbu3qbps28oEgypgA== From: Thomas Richard Date: Wed, 29 Nov 2023 16:31:21 +0100 Subject: [PATCH 5/5] arm64: dts: ti: k3-j7200: add reserved memory regions for lpm MIME-Version: 1.0 Message-Id: <20231129-j7200-tisci-s2r-v1-5-c1d5964ed574@bootlin.com> References: <20231129-j7200-tisci-s2r-v1-0-c1d5964ed574@bootlin.com> In-Reply-To: <20231129-j7200-tisci-s2r-v1-0-c1d5964ed574@bootlin.com> To: Nishanth Menon , Tero Kristo , Santosh Shilimkar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Vignesh Raghavendra Cc: linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thomas.petazzoni@bootlin.com, gregory.clement@bootlin.com, u-kumar1@ti.com, Thomas Richard X-Mailer: b4 0.12.0 X-GND-Sasl: thomas.richard@bootlin.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231129_073128_338009_F7D04707 X-CRM114-Status: GOOD ( 10.43 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Two memory regions are reserved for suspend to ram on j7200. One is dedicated to TF-A, it uses this region to save its context during suspend. The second region is for R5 SPL, which uses it for its stacks and to store some firmware images. These regions are reserved from the linux point of view to avoid any memory corruption. Signed-off-by: Thomas Richard --- arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi index 5a300d4c8ba0..dc8c9c3e8443 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j7200-som-p0.dtsi @@ -79,6 +79,16 @@ rtos_ipc_memory_region: ipc-memories@a4000000 { alignment = <0x1000>; no-map; }; + + lpm_r5_spl_ctx_ddr: lpm-memory@a5000000 { + reg = <0x00 0xa5000000 0x00 0x1000000>; + no-map; + }; + + lpm_bl31_ctx_ddr: lpm-memory@a6000000 { + reg = <0x00 0xa6000000 0x00 0x20000>; + no-map; + }; }; };