From patchwork Mon May 12 16:44:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 2084543 X-Patchwork-Delegate: patrice.chotard@st.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=eDba/7ah; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.a=rsa-sha256 header.s=mail20150812 header.b=diXDsmsd; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=patchwork.ozlabs.org) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4Zx56Z4VhGz1yPv for ; Tue, 13 May 2025 02:44:22 +1000 (AEST) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id BF67B80C83; Mon, 12 May 2025 18:44:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; secure) header.d=mailbox.org header.i=@mailbox.org header.b="eDba/7ah"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="diXDsmsd"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id D1207826AA; Mon, 12 May 2025 18:44:34 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050:0:465::102]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 1616080584 for ; Mon, 12 May 2025 18:44:32 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut@mailbox.org Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4Zx56l5QBNz9slv; Mon, 12 May 2025 18:44:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1747068271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7tU9C4G36M3TmoqXvgky5u+kJa+6BteBh7IdA2hKN7s=; b=eDba/7ahGzmycA8OVglFNBXHEKpChyudmRacJl3PAeGVqr0ZpEhAyfMsbcLokV/wZoH9RZ mPg2AR83ddCQNjHeH0Uhu2UFwfflaR0HV/bRxz3SRgf8r2cp7QqqenkdRyFEw6WalY2vDU Oe0mNE88rbbO6oylwtvCdYa3aK637lTYmrM+ufw2XqY8yanfIOPiHAR3Vy8MDXiaMHZ/WV tpEXx49tWYQHyfZiG7U0cbjqmoEu+I7ICrBp0tdh5iMvY6210tYa5ZEZ/ItoFU5KGthJFT T11JluS/gaUezh0lWVwUyR10Min6wJqnYQV07Vc30umwlGj0fqMr0sz0A2BBHA== From: Marek Vasut DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1747068270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=7tU9C4G36M3TmoqXvgky5u+kJa+6BteBh7IdA2hKN7s=; b=diXDsmsdEmTCLXjS5ug3lPjS4oDOFJKMR9hNeNav0bNz5HxeCS6OXORFIxnsQuE/AFDYH5 +UBPBRSOnOa7ugwdSglVMqVnx5R8bGVupMXHTcM8bP84UMwSzwWIKnrERSMAgZ/jJB6BcM FlHuJXc3vwLXSWczu3DCviMwH2X5NYWc0OgOiw9AxtiCGJa4kpyASahFePQHQkIosjmsqO 97qYcDonWbum0lYWniVwNltH4pLdYwRw+fy2VT5CdkKdYdsTKNPutGFUqOzUb1tdiB1c5l puaZUsArfTspB7xl4sfmj/JmnUs0ZeRdU29WgvwKUWzEGYkvgybx15OWLtKrnQ== To: u-boot@lists.denx.de Cc: Marek Vasut , Patrice Chotard , Patrick Delaunay , Simon Glass , Sughosh Ganu , Tom Rini , uboot-stm32@st-md-mailman.stormreply.com Subject: [PATCH] ARM: stm32: Fix SYSRAM size on STM32MP13xx Date: Mon, 12 May 2025 18:44:04 +0200 Message-ID: <20250512164418.147714-1-marek.vasut@mailbox.org> MIME-Version: 1.0 X-MBO-RS-ID: d71e54a9b6fc67e18af X-MBO-RS-META: m63g6musfdrxnxibtinqmbojqgguggif X-Rspamd-Queue-Id: 4Zx56l5QBNz9slv X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean The STM32MP13xx has only 128 kiB of SYSRAM starting at address 0x2ffe0000 . The STM32MP15xx has 256 kiB of SYSRAM starting at address 0x2ffc0000 . Make sure both SoCs configure ARMV7_SECURE_BASE correctly . Define the SYSRAM base in stm32.h to be consistent with the STM32MP15xx macro. Signed-off-by: Marek Vasut Reviewed-by: Patrice Chotard --- Cc: Patrice Chotard Cc: Patrick Delaunay Cc: Simon Glass Cc: Sughosh Ganu Cc: Tom Rini Cc: u-boot@lists.denx.de Cc: uboot-stm32@st-md-mailman.stormreply.com --- arch/arm/cpu/armv7/Kconfig | 3 ++- arch/arm/mach-stm32mp/include/mach/stm32.h | 5 +++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/arch/arm/cpu/armv7/Kconfig b/arch/arm/cpu/armv7/Kconfig index 4eb34b7b449..ab86d642eee 100644 --- a/arch/arm/cpu/armv7/Kconfig +++ b/arch/arm/cpu/armv7/Kconfig @@ -36,7 +36,8 @@ config ARMV7_SECURE_BASE hex "Base address for secure mode memory" depends on HAS_ARMV7_SECURE_BASE default 0xfff00000 if TEGRA124 - default 0x2ffc0000 if ARCH_STM32MP + default 0x2ffe0000 if STM32MP13X + default 0x2ffc0000 if STM32MP15X default 0x2f000000 if ARCH_MX7ULP default 0x10010000 if ARCH_LS1021A default 0x00900000 if ARCH_MX7 diff --git a/arch/arm/mach-stm32mp/include/mach/stm32.h b/arch/arm/mach-stm32mp/include/mach/stm32.h index a9ac49bc5d2..47b459b75d1 100644 --- a/arch/arm/mach-stm32mp/include/mach/stm32.h +++ b/arch/arm/mach-stm32mp/include/mach/stm32.h @@ -110,6 +110,11 @@ enum forced_boot_mode { #define STM32_SDMMC2_BASE 0x58007000 #define STM32_SDMMC3_BASE 0x48004000 +#ifdef CONFIG_STM32MP13X +#define STM32_SYSRAM_BASE 0x2FFE0000 +#define STM32_SYSRAM_SIZE SZ_128K +#endif + #ifdef CONFIG_STM32MP15X #define STM32_SYSRAM_BASE 0x2FFC0000 #define STM32_SYSRAM_SIZE SZ_256K