From nobody Thu Sep 24 20:02:44 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 A0E3C4A499F; Mon, 21 Sep 2026 14:53:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002421; cv=none; b=Hf9ENIPTGoUcNIUarXD8QYHgPzLLelMew26lnS78O3zyvqY84AZ/L+4F4Jtb93EQU8PpSxteiW9OM6UHpfOQYSO0ZJ+ZvewX0mMiWN8jh55CgVsrWSDM8hnvRfeUparqcowIC0N4vAUAvOI2EB6nk8N3n0BWRYhxpMnWI3BaXF8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002421; c=relaxed/simple; bh=QTGXIPmcHuM5GiY1m1pIuIOfZWP7jATqjBAuo4XrEy8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=N3dK76CGnLXpGR3CvMy42u0Tq1qQSWYGqawrSUjlLJsOgqzUkZMX8oZLRUlPqfzOajGZ2eGE62P1YexWVLEhSZzIGkk2KGlgtnTxgVFnVjsbcvR2AZXM+2bD8/J7xOhj8AmsI1nW/JDCieLp7o4JIwIwzP/Nr3u6KLcu/38+rYY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=hdEPRSH8; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="hdEPRSH8" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id D809B1A0815; Mon, 21 Sep 2026 14:53:37 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A55D75FFB2; Mon, 21 Sep 2026 14:53:37 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 53A7C10329080; Mon, 21 Sep 2026 16:53:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790002416; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=Gco7GK+iV2C1g9gQkUNs9G3U8mloXNXVjk8mlpk2Iwo=; b=hdEPRSH83fM5YEy3/ygfQ1tLabQAX9TlucnsvA7Ot9SVas9UIbyKdi31Kr/xHG9l/Wceuq RxRv36wdzxdwd+jDA/dGe2DxkkKx51nf3mTu8xb180RYct59KoAmNWzLN1vdVR4m5qwWrE infkI1/l3VXND6295w0bvALI17LMaviAJT8c6tcwvm/C//Jk7FRFn6PkEoyH19D3LriXy0 lx1Vv6f7GQosH8NzN+e2m9nAYYya/chUiuJDHINxXV5KR6M8EfhqgokHsWZFxg9mhQyOUB N7j74a6EoJw39B/riqOYu63PILOzDwJ00c24vBC9EN9JgCtuUxNDckcxiUqxug== From: "Richard Genoud (TI)" To: Nishanth Menon , Vignesh Raghavendra Cc: Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Udit Kumar , Abhash Kumar , Beleswar Padhi , Thomas Richard , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH v4 1/7] dt-bindings: remoteproc: k3-r5f: Add Jacinto LPM memory region Date: Mon, 21 Sep 2026 16:53:19 +0200 Message-ID: <20260921145325.300025-2-richard.genoud@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921145325.300025-1-richard.genoud@bootlin.com> References: <20260921145325.300025-1-richard.genoud@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Declare a carveout memory region to store LPM metadata on Jacinto devices. For Jacinto devices, this memory region is needed for saving ATF context and the certificate information of ATF and OPTEE and DM image. This LPM metadata area is firewalled to be accessed only by TIFS. U-Boot R5 SPL/TIFS will use this area to save and restore: - ATF context - ATF certificate information - OPTEE certificate information - DM image (which has been copied in memory at boot time by U-Boot R5-SPL) At resume, U-Boot R5 SPL is executed and detects that the board is resuming (with a flag set in the PMIC), then it: - brings out of retention the DDR - retrieves the LPM memory region from DTS - authenticates certificates from LPM memory region and applies firewalls - asks TIFS to restore TFA and its own minimal context - starts TFA on remote proc - loads back DM image from memory and jumps to DM https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-ms= g-lpm-save-addr NB: This memory region is not part of DM memory (which is not retained at suspend) Signed-off-by: Richard Genoud (TI) Reviewed-by: Rob Herring (Arm) --- .../bindings/remoteproc/ti,k3-r5f-rproc.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.y= aml b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml index 14e6b2f817b3..af2acd429974 100644 --- a/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml @@ -155,9 +155,10 @@ patternProperties: description: | phandle to the reserved memory nodes to be associated with the remoteproc device. There should be two reserved memory nodes def= ined - for the basic layout or 6 partitions for a detailed layout. The - reserved memory nodes should be carveout nodes, and should be de= fined - with a "no-map" property as per the bindings in + for the basic layout, three for the Jacinto layout or 6 partitio= ns + for a detailed layout. The reserved memory nodes should be carve= out + nodes, and should be defined with a "no-map" property as per the + bindings in Documentation/devicetree/bindings/reserved-memory/reserved-memor= y.txt oneOf: - description: Basic layout @@ -174,6 +175,12 @@ patternProperties: - description: LPM metadata - description: LPM FS context data and reserved sections - description: DM RM/PM trace and firmware code/data + - description: Jacinto layout + items: + - description: region used for dynamic DMA allocations like = vrings and + vring buffers + - description: region reserved for firmware image sections + - description: LPM metadata =20 memory-region-names: description: | @@ -192,6 +199,11 @@ patternProperties: - const: lpm-metadata - const: lpm-context - const: dm-firmware + - description: Jacinto layout + items: + - const: dma + - const: firmware + - const: lpm-metadata =20 # Optional properties: # -------------------- From nobody Thu Sep 24 20:02:44 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 1DE593CA483 for ; Mon, 21 Sep 2026 14:53:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002422; cv=none; b=jqwG/1RNuNbt9u82Lyr4kA+mT/g3Pe2i9biODaxD+FAjBPUzdwo2LbxeU4kpOWVhAYqFbk05rzLDZBAHP4EhZC0si7RD0Bn7rPFf1VByGoO4Mt6rPvxc84c2pdSf5A0Vu/MOIi5lk7ecP+G1yz72SO/s1eJxUk21vZQ1EUVmjU8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002422; c=relaxed/simple; bh=rocu/2yiUQErYtrWbo5Fb766lw4uQcZyhJUqnN81NX0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mra4uBl68dG4314yLBu1wd6s0gX1XNECh0IIV+ZakN8OFWcWW1EZ0JroiMbwqi3qJPWsEEp3vnNgEYYA3AHT95uro3Ed77/gkn7BT/YTqtq+LmbTGFQKFC+R8M8cTIGhWYg45ij1PrcljWoR11edCwjLd+K6Vhwfm8wFRzscex0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=CYywDKnD; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="CYywDKnD" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 7E5BA4E40D86 for ; Mon, 21 Sep 2026 14:53:39 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 516145FFB2; Mon, 21 Sep 2026 14:53:39 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A496410329195; Mon, 21 Sep 2026 16:53:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790002418; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=0XfNnwLyPIHZJJHZc9uvlNXqC+VY2k4WOMmJttsUxZQ=; b=CYywDKnDvk9aFqMxlv6rjV8pv7s5pTRKvsjsFHHqklPUkYi4PfsJ7lzV/w71eD6MXdnwLZ boV48QUg5Rn7q3avxt6OJ10X6hMiD4qjRVg6rSK6xg6AjYDk68pO/z3+8Dy4zfmE5V6kqg 6gkJNCoeAXZM1p/RTP/7e2IIfPDnwDFgnKJGbBRFGdpCHCSYfuIZjpLlyFBqJoeriwl3Ta wi+x7ybMb8+u20hQvntPNiHsU51HeSFNk4Lr8frWEk603DawjSR0wUk1EHapVGXPSicZg9 wyu5xVEo2CAF6haDcVI9psOOV2tEm4lmasUJPTMmxR/SJZK9I6DX/rNvSs6i0g== From: "Richard Genoud (TI)" To: Nishanth Menon , Vignesh Raghavendra Cc: Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Udit Kumar , Abhash Kumar , Beleswar Padhi , Thomas Richard , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH v4 2/7] remoteproc: k3: skip mapping firewalled lpm-metadata memory region Date: Mon, 21 Sep 2026 16:53:20 +0200 Message-ID: <20260921145325.300025-3-richard.genoud@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921145325.300025-1-richard.genoud@bootlin.com> References: <20260921145325.300025-1-richard.genoud@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" The region lpm-metadata is firewalled by TIFS on Jacinto devices, so it should not be mapped to prevent speculative access crashes Just skip this memory region during initialization. Signed-off-by: Richard Genoud (TI) --- drivers/remoteproc/ti_k3_common.c | 36 +++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/drivers/remoteproc/ti_k3_common.c b/drivers/remoteproc/ti_k3_c= ommon.c index 3cb8ae5d72f6..5158e5e7c816 100644 --- a/drivers/remoteproc/ti_k3_common.c +++ b/drivers/remoteproc/ti_k3_common.c @@ -471,7 +471,7 @@ int k3_reserved_mem_init(struct k3_rproc *kproc) struct device *dev =3D kproc->dev; struct device_node *np =3D dev->of_node; int num_rmems; - int ret, i; + int ret, i, j; =20 num_rmems =3D of_reserved_mem_region_count(np); if (num_rmems < 0) { @@ -501,30 +501,44 @@ int k3_reserved_mem_init(struct k3_rproc *kproc) return -ENOMEM; =20 /* use remaining reserved memory regions for static carveouts */ - for (i =3D 0; i < num_rmems; i++) { + for (j =3D 0, i =3D 0; i < num_rmems; i++) { struct resource res; + const char *region_name; =20 ret =3D of_reserved_mem_region_to_resource(np, i + 1, &res); if (ret) return ret; =20 - kproc->rmem[i].bus_addr =3D res.start; + ret =3D of_property_read_string_index(np, "memory-region-names", + i + 1, ®ion_name); + /* + * lpm-metadata is a firewalled region accessible only by TIFS. + * Skip mapping it to avoid speculative access crashes. + */ + if (!ret && !strcmp(region_name, "lpm-metadata")) { + dev_dbg(dev, "Skipping firewalled memory region %s @0x%x\n", + region_name, (u32)res.start); + continue; + } + + kproc->rmem[j].bus_addr =3D res.start; /* 64-bit address regions currently not supported */ - kproc->rmem[i].dev_addr =3D (u32)res.start; - kproc->rmem[i].size =3D resource_size(&res); - kproc->rmem[i].cpu_addr =3D devm_ioremap_resource_wc(dev, &res); - if (IS_ERR(kproc->rmem[i].cpu_addr)) { + kproc->rmem[j].dev_addr =3D (u32)res.start; + kproc->rmem[j].size =3D resource_size(&res); + kproc->rmem[j].cpu_addr =3D devm_ioremap_resource_wc(dev, &res); + if (IS_ERR(kproc->rmem[j].cpu_addr)) { dev_err(dev, "failed to map reserved memory#%d at %pR\n", i + 1, &res); return -ENOMEM; } =20 dev_dbg(dev, "reserved memory%d: bus addr %pa size 0x%zx va %p da 0x%x\n= ", - i + 1, &kproc->rmem[i].bus_addr, - kproc->rmem[i].size, kproc->rmem[i].cpu_addr, - kproc->rmem[i].dev_addr); + j + 1, &kproc->rmem[j].bus_addr, + kproc->rmem[j].size, kproc->rmem[j].cpu_addr, + kproc->rmem[j].dev_addr); + j++; } - kproc->num_rmems =3D num_rmems; + kproc->num_rmems =3D j; =20 return 0; } From nobody Thu Sep 24 20:02:44 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 CFEBC4AA03C for ; Mon, 21 Sep 2026 14:53:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002424; cv=none; b=SR6zgAwcIjIIa8wHg3CxVRjkJE1VErN4e1/k9dfrCqZvciIyrh5yAe2zxLs4o4otTqqKyELs6yiJAnjAX6YnXEOLWWF0kxW6jALEMRjE41LNMlPfZOdF8ZffMe2SjO341Pu5/P7LRdw1VaOW4RMgJwMbnu1IVSlrOloZlDvXhBM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002424; c=relaxed/simple; bh=tLzMAjEKz6XvccKCtGhuzuXw6J5RYVtnQCalTxS38wo=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TZYvHWYMMOmN5l9n6kDNGr665lASkkzBTePI44SK1Y1a0w+oi9v6hzBr9jvu3NNuXQuOaMNDjJZdVVmmLV7qaBHDI20LQLFTbwNN2D9I1PmBT5/uqsZz9ovl1AF+FqksV0WCE1Rts90TvF2RIHkHmw3BQi3q5p/nYvAr6Q8yfiw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=1PGM4q+0; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="1PGM4q+0" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 6B4B64E40D52; Mon, 21 Sep 2026 14:53:41 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 37FB65FFB2; Mon, 21 Sep 2026 14:53:41 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id B907310328ED0; Mon, 21 Sep 2026 16:53:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790002420; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=JS4lrZdkL4lVi5iyHZ16dFD0sXGL72eEoQ2P8NGZ5vE=; b=1PGM4q+0QhZ3+kZFwkIuU3bufNmxQsSkOB5i6vqChrgFKW6FKL7ko61heYaVHeqM64MWv8 06vYDIwvGYin9VkxlTBx3GX1PJ6cHiWLzzwVApQtSwLsxZwHmFt91OCOnwPq5T+0Pdt19K JuK3cHNNwA6o24WgtFMU5K1nAHaCWTgK2tvkwQNiiHEvtTMALKDDbW9rZAb3C8f23HsZur zUPWngEhxsSTI5EqHZ+6eZWBS3T16mu8IcKfeKZAW8vgpLpW8P6/VmwpfcddVLBYmqsTEr 1/7nr3SMPtWSQldvRQoQkekKcvRb93wA1eMgS7D5rGhghJk28XNgkqQEuNti3g== From: "Richard Genoud (TI)" To: Nishanth Menon , Vignesh Raghavendra Cc: Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Udit Kumar , Abhash Kumar , Beleswar Padhi , Thomas Richard , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH v4 3/7] arm64: dts: ti: k3-j7200-ti-ipc-firmware: Reserve memory for LPM metadata Date: Mon, 21 Sep 2026 16:53:21 +0200 Message-ID: <20260921145325.300025-4-richard.genoud@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921145325.300025-1-richard.genoud@bootlin.com> References: <20260921145325.300025-1-richard.genoud@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Declare a carveout memory region to store LPM metadata on J7200. For Jacinto devices, this memory region is needed for saving ATF context and the certificate information of ATF and OPTEE and DM image. This LPM metadata area is firewalled to be accessed only by TIFS. U-Boot R5 SPL/TIFS will use this area to save and restore: - ATF context - ATF certificate information - OPTEE certificate information - DM image (which has been copied in memory at boot time by U-Boot R5-SPL) At resume, U-Boot R5 SPL is executed and detects that the board is resuming (with a flag set in the PMIC), then it: - brings out of retention the DDR - retrieves the LPM memory region from DTS - authenticates certificates from LPM memory region and applies firewalls - asks TIFS to restore TFA and its own minimal context - starts TFA on remote proc - loads back DM image from memory and jumps to DM As this is used by U-Boot SPL, bootph-pre-ram is added. https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-ms= g-lpm-save-addr NB: This memory region is not part of DM memory (which is not retained at suspend) Signed-off-by: Prasanth Babu Mantena Signed-off-by: Richard Genoud (TI) --- arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi b/arch/ar= m64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi index d65f68c7d432..a6043970715a 100644 --- a/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j7200-ti-ipc-firmware.dtsi @@ -47,6 +47,12 @@ rtos_ipc_memory_region: memory@a4000000 { alignment =3D <0x1000>; no-map; }; + + lpm_memory_region: memory@a4800000 { + reg =3D <0x00 0xa4800000 0x00 0x00300000>; + no-map; + bootph-pre-ram; + }; }; =20 &mailbox0_cluster0 { @@ -99,8 +105,10 @@ &mcu_r5fss0 { &mcu_r5fss0_core0 { mboxes =3D <&mailbox0_cluster0 &mbox_mcu_r5fss0_core0>; memory-region =3D <&mcu_r5fss0_core0_dma_memory_region>, - <&mcu_r5fss0_core0_memory_region>; - memory-region-names =3D "dma", "firmware"; + <&mcu_r5fss0_core0_memory_region>, + <&lpm_memory_region>; + memory-region-names =3D "dma", "firmware", "lpm-metadata"; + bootph-pre-ram; status =3D "okay"; }; From nobody Thu Sep 24 20:02:44 2026 Received: from smtpout-02.galae.net (smtpout-02.galae.net [185.246.84.56]) (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 EE1704AAC63 for ; Mon, 21 Sep 2026 14:53:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.84.56 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002426; cv=none; b=QMjRHLugF1tlDnkpyT2C9kKcw2o79kc44ifp/foFkdkP4jCuMhazvh4fYsinnKw+ZHFkH1WE3iynnKix/IS9BJoiAbioJaO8ASyPytM0QEAqoDSUGw9QUoC9vPsPx2aPx5S8zg3wwrAmKgD2rtubX1VsTxoyYfheBH539St8vdA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002426; c=relaxed/simple; bh=y74aKqIsiqmZJ0papdgJhyb2d18UTukENhBmlp63l1M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=XIePhjHKFG88n8YU+27NTPxMNw+tfsIbUCaegtqhLyUe0ywW8R/31I/ca8A2ddsQxqg/Q5revRAcDsOLVVlnQ2urbb29Gth8ItMkmsnoJ/wullLX0BA7TyOnMpgGq4PrtTrZra6h9psYdBZ6N9cHmXCkBkMC208wpEzgZd04UM4= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=J2z40v1G; arc=none smtp.client-ip=185.246.84.56 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="J2z40v1G" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-02.galae.net (Postfix) with ESMTPS id 794A71A0815; Mon, 21 Sep 2026 14:53:43 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 46A105FFB2; Mon, 21 Sep 2026 14:53:43 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id A7A3B1032906F; Mon, 21 Sep 2026 16:53:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790002422; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=xUALyvtUXYfkbKIvNlqiBzpv7vLH5wP8YCmHD2a1OBQ=; b=J2z40v1GAnbY+2pPUWuEIETIWHYBMMYKyu48tfCgIgJtvlxKCc7EFla3ASahDcgHU1qANI L4VymnZ7gXjEpnbxpN8YDTNF/vGub878SEsE4P+Zzk915oEukFHsGcR5LVwtlq4FWecaMs CBa3Ub/2fZ3nc4R6c7gm/OYxefV2CUpQq8pVJmFFBrwjR/W8gt9Jf21evlSnmyvAabXFNS x13m/eD6mC9MOxCezXxGkfQfzTHcToQUoHEv/KGiUOM55DgfSEdxQCgKhTAFwFo+R8LCPC Me4UwlCEM9hFClzW4hYdscE07KmJYiNaIhxtXTC19HK3atn1KAusLFt37Vw/GQ== From: "Richard Genoud (TI)" To: Nishanth Menon , Vignesh Raghavendra Cc: Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Udit Kumar , Abhash Kumar , Beleswar Padhi , Thomas Richard , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH v4 4/7] arm64: dts: ti: k3-j721s2-ti-ipc-firmware: Reserve memory for LPM metadata Date: Mon, 21 Sep 2026 16:53:22 +0200 Message-ID: <20260921145325.300025-5-richard.genoud@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921145325.300025-1-richard.genoud@bootlin.com> References: <20260921145325.300025-1-richard.genoud@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Declare a carveout memory region to store LPM metadata on J721S2. For Jacinto devices, this memory region is needed for saving ATF context and the certificate information of ATF and OPTEE and DM image. This LPM metadata area is firewalled to be accessed only by TIFS. U-Boot R5 SPL/TIFS will use this area to save and restore: - ATF context - ATF certificate information - OPTEE certificate information - DM image (which has been copied in memory at boot time by U-Boot R5-SPL) At resume, U-Boot R5 SPL is executed and detects that the board is resuming (with a flag set in the PMIC), then it: - brings out of retention the DDR - retrieves the LPM memory region from DTS - authenticates certificates from LPM memory region and applies firewalls - asks TIFS to restore TFA and its own minimal context - starts TFA on remote proc - loads back DM image from memory and jumps to DM https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-ms= g-lpm-save-addr As this is used by U-Boot SPL, bootph-pre-ram is added. NB: This memory region is not part of DM memory (which is not retained at suspend) Signed-off-by: Prasanth Babu Mantena Signed-off-by: Richard Genoud (TI) --- .../arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi b/arch/a= rm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi index 5253d028da09..010d20d56927 100644 --- a/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j721s2-ti-ipc-firmware.dtsi @@ -95,6 +95,12 @@ rtos_ipc_memory_region: memory@a8000000 { alignment =3D <0x1000>; no-map; }; + + lpm_memory_region: memory@a9c00000 { + reg =3D <0x00 0xa9c00000 0x00 0x00300000>; + no-map; + bootph-pre-ram; + }; }; =20 &mailbox0_cluster0 { @@ -189,8 +195,10 @@ &mcu_r5fss0 { &mcu_r5fss0_core0 { mboxes =3D <&mailbox0_cluster0 &mbox_mcu_r5fss0_core0>; memory-region =3D <&mcu_r5fss0_core0_dma_memory_region>, - <&mcu_r5fss0_core0_memory_region>; - memory-region-names =3D "dma", "firmware"; + <&mcu_r5fss0_core0_memory_region>, + <&lpm_memory_region>; + memory-region-names =3D "dma", "firmware", "lpm-metadata"; + bootph-pre-ram; status =3D "okay"; }; From nobody Thu Sep 24 20:02:44 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 175FC4AB1C0 for ; Mon, 21 Sep 2026 14:53:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002428; cv=none; b=Uj+hMsECYm17ftVb0eBcJY8nxNfya3oHqX/nLLiG4NkvqF2bm0ZR8xKPhyNyOjX16oFDyLF0tM83KC5pSFlIvwLCRIWwvTyli7iGEnz9oes6YVtinfzc+VXSNOdfFoxVuS82KM1zp0BMo3OjdBCf+YeiAHpLQSJLtKPgvqrO06I= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002428; c=relaxed/simple; bh=1kh9qfP0wUu2c/FkgDii6V3N1MeAwQui5bNxS8i45vg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=oGJLZIXArJ++QU2BJ6EiBEX/2hUWqpnlMZ7gqZ2FL8OkWrWmP62Rf1194L1CCnuRvrTPUD/Qo/lK3WIdntqm7NRR9VFDjv1U84SshNBjVFao//srShhkYBTotKZLmSUQZitgSpDf21QV/NHm/sv9iCumUhan68B2eQj7bol+aZc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=WKa4hZyQ; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="WKa4hZyQ" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id 7D6F5C5CD64; Mon, 21 Sep 2026 14:54:31 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 577C25FFB2; Mon, 21 Sep 2026 14:53:45 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 8BB4610329080; Mon, 21 Sep 2026 16:53:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790002424; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=uM1P7EYZw7wk7taKSV6yf3up95jn2KRr1wCZHKfs2Po=; b=WKa4hZyQXZNdc26cOxj+Ebb47oww8B6fJH2mbtoqlTdc+oEql2Kg/hoQQBsB+TqlMrIE48 iDUgI6aK2o0ZQZgSDAj0mPsM3BJ4YKgNuSE6RuturxzgCOP4fnxWKd6nAdPRvuTfgRPfDh ziuFvgRnKjeCpVIgwCYto8NAn/KmfluWcmF6UQ0ktKz9BzH26vjs6zDDiWxmf//QG0vOfW OQK/7s2SfWBZLpS4aEsxkdaMex/IuX2VbB4JJwUc3fY/eWLkq0NhIHTG3CwyLtfNWxTK/2 G0WN+YCya780gquYYqDSKo0GUoGLgum8dA+RkgWM+3QxAC6lJ1FcnahS8CmZMg== From: "Richard Genoud (TI)" To: Nishanth Menon , Vignesh Raghavendra Cc: Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Udit Kumar , Abhash Kumar , Beleswar Padhi , Thomas Richard , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH v4 5/7] arm64: dts: ti: k3-j784s4-ti-ipc-firmware: Reserve memory for LPM metadata Date: Mon, 21 Sep 2026 16:53:23 +0200 Message-ID: <20260921145325.300025-6-richard.genoud@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921145325.300025-1-richard.genoud@bootlin.com> References: <20260921145325.300025-1-richard.genoud@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Declare a carveout memory region to store LPM metadata on J784S4. For Jacinto devices, this memory region is needed for saving ATF context and the certificate information of ATF and OPTEE and DM image. This LPM metadata area is firewalled to be accessed only by TIFS. U-Boot R5 SPL/TIFS will use this area to save and restore: - ATF context - ATF certificate information - OPTEE certificate information - DM image (which has been copied in memory at boot time by U-Boot R5-SPL) At resume, U-Boot R5 SPL is executed and detects that the board is resuming (with a flag set in the PMIC), then it: - brings out of retention the DDR - retrieves the LPM memory region from DTS - authenticates certificates from LPM memory region and applies firewalls - asks TIFS to restore TFA and its own minimal context - starts TFA on remote proc - loads back DM image from memory and jumps to DM https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-ms= g-lpm-save-addr As this is used by U-Boot SPL, bootph-pre-ram is added and the device is enabled. NB: This memory region is not part of DM memory (which is not retained at suspend) Signed-off-by: Prasanth Babu Mantena Signed-off-by: Richard Genoud (TI) --- .../boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi b/arch/a= rm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi index 81b508b9b05e..1c0c1533f0a3 100644 --- a/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j784s4-ti-ipc-firmware.dtsi @@ -17,6 +17,12 @@ c71_3_memory_region: memory@ab100000 { reg =3D <0x00 0xab100000 0x00 0xf00000>; no-map; }; + + lpm_memory_region: memory@ac000000 { + reg =3D <0x00 0xac000000 0x00 0x00300000>; + no-map; + bootph-pre-ram; + }; }; =20 &mailbox0_cluster5 { @@ -27,6 +33,15 @@ mbox_c71_3: mbox-c71-3 { }; }; =20 +&mcu_r5fss0_core0 { + memory-region =3D <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>, + <&lpm_memory_region>; + memory-region-names =3D "dma", "firmware", "lpm-metadata"; + bootph-pre-ram; + status =3D "okay"; +}; + &c71_3 { mboxes =3D <&mailbox0_cluster5 &mbox_c71_3>; memory-region =3D <&c71_3_dma_memory_region>, From nobody Thu Sep 24 20:02:44 2026 Received: from smtpout-04.galae.net (smtpout-04.galae.net [185.171.202.116]) (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 8083F4A9D49; Mon, 21 Sep 2026 14:53:49 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.171.202.116 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002431; cv=none; b=urz1qqx+qx/PP3rUOmCxFE0JMLiJIXYVAbDmXerFwvZ08FEJOWuMNjUUNpI6TzITRa53+AcVgqHt/0g3IQmJFqerlsVZPPSG2QBPazQUcq3hvL9tEyuhGm1LMGINrPCqULJu8213l8UrhcupHom9Pd/de8NJ9ZF/Bzbi87804ZY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002431; c=relaxed/simple; bh=fNgI8dSAL/QSamBcLWF2pCT0hdNYcmEfkDleWfFn9pk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=olvcka1wx4G0FQV0byJM8akGXO3EIRzuHBiwTAakSeW9OJLLsC3xRnPq150lEUfwx0jjySRReDEvBC+jJ4wyD4IVEg0C9lM7nl1dmx7qO/QPlqj/UOfZul2h8I+AdFNTuQUYDWmtFly7LpoOxo4fZoMrXnYNx+DTQQ6Tw8WbPok= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=wjKH0kKw; arc=none smtp.client-ip=185.171.202.116 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="wjKH0kKw" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-04.galae.net (Postfix) with ESMTPS id CDBA5C23D92; Mon, 21 Sep 2026 14:54:33 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id A84CB5FFB2; Mon, 21 Sep 2026 14:53:47 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id AA64210329195; Mon, 21 Sep 2026 16:53:44 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790002426; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=bqWTaa9P4726wAp8OdJXg008Zn0xKz5pVT9+3dq+cYU=; b=wjKH0kKwXUoTKdXHzriac92HdpU2dj8rCvbyOgJMh6fKpxDTH4GPexupJy9Y6HwXFysMvS 1Ox9sbBVk1YzqZ1hjrgRurFpOLgT4sARPhxZ2wzuQrwbmfDC5qUI2zs/bNJ5UI+8XG+UGn Vh8gwiU1pHmeFt/8SOZ5chWRcMPsL2NSRbJcmVRnKcc+M6C7IUh9JGEe0HDa3ZRkRrjG9R nF3QWgAnTguWT1ve1HZ3baBMJlZiDzD+V0cQJuoXhj3P5YI9BE3QC0E+u9yu5pAlKqcBF+ UAf5m2hUDeHzS1AWYssqXNKBiG3pXVZtyLHpP7R72xnPeylio00aVAwDHr5wxw== From: "Richard Genoud (TI)" To: Nishanth Menon , Vignesh Raghavendra Cc: Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Udit Kumar , Abhash Kumar , Beleswar Padhi , Thomas Richard , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH v4 6/7] arm64: dts: ti: k3-j722s-ti-ipc-firmware: Reserve memory for LPM metadata Date: Mon, 21 Sep 2026 16:53:24 +0200 Message-ID: <20260921145325.300025-7-richard.genoud@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921145325.300025-1-richard.genoud@bootlin.com> References: <20260921145325.300025-1-richard.genoud@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Declare a carveout memory region to store LPM metadata on J722S. For Jacinto devices, this memory region is needed for saving ATF context and the certificate information of ATF and OPTEE and DM image. This LPM metadata area is firewalled to be accessed only by TIFS. U-Boot R5 SPL/TIFS will use this area to save and restore: - ATF context - ATF certificate information - OPTEE certificate information - DM image (which has been copied in memory at boot time by U-Boot R5-SPL) At resume, U-Boot R5 SPL is executed and detects that the board is resuming (with a flag set in the PMIC), then it: - brings out of retention the DDR - retrieves the LPM memory region from DTS - authenticates certificates from LPM memory region and applies firewalls - asks TIFS to restore TFA and its own minimal context - starts TFA on remote proc - loads back DM image from memory and jumps to DM https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-ms= g-lpm-save-addr As this is used by U-Boot SPL, bootph-pre-ram is added. NB: This memory region is not part of DM memory (which is not retained at suspend) Signed-off-by: Prasanth Babu Mantena Signed-off-by: Richard Genoud (TI) --- arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi b/arch/ar= m64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi index a59c3648d805..5d8499a33fcd 100644 --- a/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi +++ b/arch/arm64/boot/dts/ti/k3-j722s-ti-ipc-firmware.dtsi @@ -59,6 +59,12 @@ rtos_ipc_memory_region: memory@a5000000 { alignment =3D <0x1000>; no-map; }; + + lpm_memory_region: memory@a6c00000 { + reg =3D <0x00 0xa6c00000 0x00 0x00300000>; + no-map; + bootph-pre-ram; + }; }; =20 &mailbox0_cluster0 { @@ -122,8 +128,10 @@ &wkup_r5fss0 { &wkup_r5fss0_core0 { mboxes =3D <&mailbox0_cluster0 &mbox_wkup_r5_0>; memory-region =3D <&wkup_r5fss0_core0_dma_memory_region>, - <&wkup_r5fss0_core0_memory_region>; - memory-region-names =3D "dma", "firmware"; + <&wkup_r5fss0_core0_memory_region>, + <&lpm_memory_region>; + memory-region-names =3D "dma", "firmware", "lpm-metadata"; + bootph-pre-ram; status =3D "okay"; }; From nobody Thu Sep 24 20:02:44 2026 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (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 5D1EF4AC17D; Mon, 21 Sep 2026 14:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.246.85.4 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002432; cv=none; b=rIp1t0Oz1PwRw3C3NYJeBm3bCj2BhNfGZqB3Y2D89POAcf7MMBv57OYOvAiS9GkzFXOpLi424AGskCaSYsw9FAWZz6nn4vBCkglxNr9WeR8XM2eAc82CAb2+kUH8CRtVWi1PtV1y7feJ3oe6QBr4jHu+TAWSinh93LY5kg5A3qw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790002432; c=relaxed/simple; bh=iYsxOGCuhF7XWYoqxDk+UPUV2lxavlesnho4EvO1H2U=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mee0/jHgqhhfb3ACIEfl0gH6x9/jQ1QcrbS+tPLKwUDSdun3x2b/q48XD+W9bEZHNouzwpxAwsl7SlhEArKTI7bV6veuZj2lBE4IT9XSH4dVJ94ioTQ7fd5yCm+9wgQz+h21Pvwjml+tNjDOZniOPMquzIWZmk6sVbTwx43S0KA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b=fQm76AQD; arc=none smtp.client-ip=185.246.85.4 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="fQm76AQD" Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id E92034E40D52; Mon, 21 Sep 2026 14:53:49 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id BBE0A5FFB2; Mon, 21 Sep 2026 14:53:49 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0AEC8103291B1; Mon, 21 Sep 2026 16:53:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1790002428; h=from:subject:date:message-id:to:cc:mime-version: content-transfer-encoding:in-reply-to:references; bh=k13HDNE1rJUSq0uCLZXSMqkE9k5YxUpfJcI0ebOcnHg=; b=fQm76AQDVNW5du+BeBnL/BuChXoy2BjharEsy3atUz0NWRcJM4z08+LENAQ92A64BF+nWf k+a9AJnfxFXPpt1Y1WQsYSdJ8Fui4CYyJevLQFaMma9zFCi8Q8Au4hQdO49mIfNARFgpuy E+HUeqorzzoFNMbMXiSAkWkX0625ARnbYqhKWj0Jf1BbrlSCfvEig0A1tFRnRgfmmfGQRW ttKT70nnfvixB6pxMycDiv06bnPsM7xiXbQzNI7nfGLnbDjEscPA/6KfiFQkwisM52yFVA pCn3egXC1a6an9JQwNqPcB/DM2tsz8lZcp5iJOixaLLaUGDUJmVFylNIxiss4A== From: "Richard Genoud (TI)" To: Nishanth Menon , Vignesh Raghavendra Cc: Tero Kristo , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Udit Kumar , Abhash Kumar , Beleswar Padhi , Thomas Richard , Gregory CLEMENT , Thomas Petazzoni , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Richard Genoud Subject: [PATCH v4 7/7] arm64: dts: ti: k3-j742s2-ti-ipc-firmware: Reserve memory for LPM metadata Date: Mon, 21 Sep 2026 16:53:25 +0200 Message-ID: <20260921145325.300025-8-richard.genoud@bootlin.com> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260921145325.300025-1-richard.genoud@bootlin.com> References: <20260921145325.300025-1-richard.genoud@bootlin.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Last-TLS-Session-Version: TLSv1.3 Content-Type: text/plain; charset="utf-8" Declare a carveout memory region to store LPM metadata on J742S2. For Jacinto devices, this memory region is needed for saving ATF context and the certificate information of ATF and OPTEE and DM image. This LPM metadata area is firewalled to be accessed only by TIFS. U-Boot R5 SPL/TIFS will use this area to save and restore: - ATF context - ATF certificate information - OPTEE certificate information - DM image (which has been copied in memory at boot time by U-Boot R5-SPL) At resume, U-Boot R5 SPL is executed and detects that the board is resuming (with a flag set in the PMIC), then it: - brings out of retention the DDR - retrieves the LPM memory region from DTS - authenticates certificates from LPM memory region and applies firewalls - asks TIFS to restore TFA and its own minimal context - starts TFA on remote proc - loads back DM image from memory and jumps to DM https://software-dl.ti.com/tisci/esd/latest/2_tisci_msgs/pm/lpm.html#lpm-ms= g-lpm-save-addr As this is used by U-Boot SPL, bootph-pre-ram is added and the device is enabled. NB: This memory region is not part of DM memory (which is not retained at suspend) Signed-off-by: Prasanth Babu Mantena Signed-off-by: Richard Genoud (TI) --- arch/arm64/boot/dts/ti/k3-j742s2-evm.dts | 2 ++ .../dts/ti/k3-j742s2-ti-ipc-firmware.dtsi | 24 +++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 arch/arm64/boot/dts/ti/k3-j742s2-ti-ipc-firmware.dtsi diff --git a/arch/arm64/boot/dts/ti/k3-j742s2-evm.dts b/arch/arm64/boot/dts= /ti/k3-j742s2-evm.dts index fcb7f05d7faf..583b672ef8e9 100644 --- a/arch/arm64/boot/dts/ti/k3-j742s2-evm.dts +++ b/arch/arm64/boot/dts/ti/k3-j742s2-evm.dts @@ -24,3 +24,5 @@ memory@80000000 { bootph-all; }; }; + +#include "k3-j742s2-ti-ipc-firmware.dtsi" diff --git a/arch/arm64/boot/dts/ti/k3-j742s2-ti-ipc-firmware.dtsi b/arch/a= rm64/boot/dts/ti/k3-j742s2-ti-ipc-firmware.dtsi new file mode 100644 index 000000000000..d66bcd2f4e19 --- /dev/null +++ b/arch/arm64/boot/dts/ti/k3-j742s2-ti-ipc-firmware.dtsi @@ -0,0 +1,24 @@ +// SPDX-License-Identifier: GPL-2.0-only OR MIT +/** + * Device Tree Source for enabling IPC using TI SDK firmware on J42S2 SoCs + * + * Copyright (C) 2026 Texas Instruments Incorporated - https://www.ti.com/ + * Copyright (C) 2026 Bootlin + */ + +&reserved_memory { + lpm_memory_region: memory@ab000000 { + reg =3D <0x00 0xab000000 0x00 0x00300000>; + no-map; + bootph-pre-ram; + }; +}; + +&mcu_r5fss0_core0 { + memory-region =3D <&mcu_r5fss0_core0_dma_memory_region>, + <&mcu_r5fss0_core0_memory_region>, + <&lpm_memory_region>; + memory-region-names =3D "dma", "firmware", "lpm-metadata"; + bootph-pre-ram; + status =3D "okay"; +};