From mboxrd@z Thu Jan 1 00:00:00 1970 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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 421F0C43334 for ; Fri, 17 Jun 2022 08:57:15 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 5A989843D0; Fri, 17 Jun 2022 10:57:13 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com 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; unprotected) header.d=foss.st.com header.i=@foss.st.com header.b="d3ywCx37"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 5D2BC843C9; Fri, 17 Jun 2022 10:57:12 +0200 (CEST) Received: from mx07-00178001.pphosted.com (mx08-00178001.pphosted.com [91.207.212.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 0E456843D0 for ; Fri, 17 Jun 2022 10:57:10 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=foss.st.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=prvs=216749672a=patrick.delaunay@foss.st.com Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx07-00178001.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 25H4GZsa008247; Fri, 17 Jun 2022 10:57:08 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foss.st.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=selector1; bh=GmpJ/+Wn8SxAmx+KIj5YMt015vUb8PJ4XGKe2IGKXu8=; b=d3ywCx37FRybC2R/r6HyVXpMW3jvIh0Rr/evjWG6mZk55oM8Ob95OlrVebuHQXdQ64Ei 2KWSpie2eu8NJwWydREcYGeq9zinz9M/xCnpTmPTl5yPBN2i8pUtwCwW71vR7KpUiAPH AT0P8tKRAC96XRyF2B79PBEKil/RX2PGMLLYDvQrv4w8s5lcAvzh0Bvb7WbO/FYF+xrI lKJDZoYvwcRI054EJIrsYw6h1qQ1O3RY4Ab0/L5IxBgmjmCiCzG6s5AkbFtzIHdGRahr 4ZqMj30OTYoUFbOTCfw1NQAo7QnwpjkEkrp1u4HIwwpqwYfgBytU4JoJIxPb0yFePZvj Uw== Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx07-00178001.pphosted.com (PPS) with ESMTPS id 3gqeb14rt3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 17 Jun 2022 10:57:08 +0200 Received: from euls16034.sgp.st.com (euls16034.sgp.st.com [10.75.44.20]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 24CB710002A; Fri, 17 Jun 2022 10:57:08 +0200 (CEST) Received: from Webmail-eu.st.com (shfdag1node1.st.com [10.75.129.69]) by euls16034.sgp.st.com (STMicroelectronics) with ESMTP id 1BD7D212308; Fri, 17 Jun 2022 10:57:08 +0200 (CEST) Received: from [10.48.0.213] (10.75.127.118) by SHFDAG1NODE1.st.com (10.75.129.69) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256) id 15.1.2308.20; Fri, 17 Jun 2022 10:57:07 +0200 Message-ID: Date: Fri, 17 Jun 2022 10:57:05 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 08/16] arm: stm32mp: add support of STM32MP13x Content-Language: en-US To: CC: Marek Vasut , Patrice Chotard , Tom Rini , U-Boot STM32 References: <20220506140624.445542-1-patrick.delaunay@foss.st.com> <20220506160540.8.I48a2a2211b9cf24a69030c1499ddeb0a507025d2@changeid> From: Patrick DELAUNAY In-Reply-To: <20220506160540.8.I48a2a2211b9cf24a69030c1499ddeb0a507025d2@changeid> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.75.127.118] X-ClientProxiedBy: GPXDAG2NODE5.st.com (10.75.127.69) To SHFDAG1NODE1.st.com (10.75.129.69) X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.883,Hydra:6.0.517,FMLib:17.11.64.514 definitions=2022-06-17_08,2022-06-16_01,2022-02-23_01 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.5 at phobos.denx.de X-Virus-Status: Clean Hi, Some ad On 5/6/22 16:06, Patrick Delaunay wrote: > Introduce the code in mach-stm32mp and the configuration file > stm32mp13_defconfig for the new STM32MP family. > > Signed-off-by: Patrick Delaunay > --- > > arch/arm/mach-stm32mp/Kconfig | 21 +++- > arch/arm/mach-stm32mp/Kconfig.13x | 57 +++++++++ > arch/arm/mach-stm32mp/Makefile | 1 + > arch/arm/mach-stm32mp/cpu.c | 3 + > arch/arm/mach-stm32mp/fdt.c | 3 + > arch/arm/mach-stm32mp/include/mach/stm32.h | 26 ++++ > .../arm/mach-stm32mp/include/mach/sys_proto.h | 16 ++- > arch/arm/mach-stm32mp/stm32mp13x.c | 115 ++++++++++++++++++ > board/st/stm32mp1/Kconfig | 15 +++ > board/st/stm32mp1/MAINTAINERS | 2 + > configs/stm32mp15_basic_defconfig | 2 +- > configs/stm32mp15_defconfig | 2 +- > configs/stm32mp15_trusted_defconfig | 2 +- > include/configs/stm32mp13_common.h | 106 ++++++++++++++++ > include/configs/stm32mp13_st_common.h | 17 +++ > include/configs/stm32mp15_common.h | 4 +- > 16 files changed, 385 insertions(+), 7 deletions(-) > create mode 100644 arch/arm/mach-stm32mp/Kconfig.13x > create mode 100644 arch/arm/mach-stm32mp/stm32mp13x.c > create mode 100644 include/configs/stm32mp13_common.h > create mode 100644 include/configs/stm32mp13_st_common.h > [...] > diff --git a/include/configs/stm32mp13_common.h b/include/configs/stm32mp13_common.h > new file mode 100644 > index 0000000000..799e3f053b > --- /dev/null > +++ b/include/configs/stm32mp13_common.h > @@ -0,0 +1,106 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause */ > +/* > + * Copyright (C) 2021, STMicroelectronics - All Rights Reserved > + * > + * Configuration settings for the STM32MP15x CPU > + */ > + > +#ifndef __CONFIG_STM32MP13_COMMMON_H > +#define __CONFIG_STM32MP13_COMMMON_H > +#include > +#include > + > +/* > + * Configuration of the external SRAM memory used by U-Boot > + */ > +#define CONFIG_SYS_SDRAM_BASE STM32_DDR_BASE > +#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_TEXT_BASE + SZ_4M) => CONFIG_SYS_INIT_SP_ADDR remove and moved in Kconfig > + > +/* > + * Console I/O buffer size > + */ > +#define CONFIG_SYS_CBSIZE SZ_1K => CONFIG_SYS_CBSIZE removed and moved in Kconfig > + > +/* > + * For booting Linux, use the first 256 MB of memory, since this is > + * the maximum mapped by the Linux kernel during initialization. > + */ > +#define CONFIG_SYS_BOOTMAPSZ SZ_256M > + > +/* Extend size of kernel image for uncompression */ > +#define CONFIG_SYS_BOOTM_LEN SZ_32M > + > +/*MMC SD*/ > +#define CONFIG_SYS_MMC_MAX_DEVICE 2 > + > +/* NAND support */ > +#define CONFIG_SYS_MAX_NAND_DEVICE 1 > + > +/*****************************************************************************/ > +#ifdef CONFIG_DISTRO_DEFAULTS > +/*****************************************************************************/ > + > +#ifdef CONFIG_CMD_MMC > +#define BOOT_TARGET_MMC0(func) func(MMC, mmc, 0) > +#define BOOT_TARGET_MMC1(func) func(MMC, mmc, 1) > +#else > +#define BOOT_TARGET_MMC0(func) > +#define BOOT_TARGET_MMC1(func) > +#endif > + > +#define BOOT_TARGET_DEVICES(func) \ > + BOOT_TARGET_MMC1(func) \ > + BOOT_TARGET_MMC0(func) > + > +/* > + * default bootcmd for stm32mp13: > + * for mmc boot (eMMC, SD card), distro boot on the same mmc device > + */ > +#define STM32MP_BOOTCMD "bootcmd_stm32mp=" \ > + "echo \"Boot over ${boot_device}${boot_instance}!\";" \ > + "run env_check;" \ > + "if test ${boot_device} = mmc;" \ > + "then env set boot_targets \"mmc${boot_instance}\"; fi;" \ > + "run distro_bootcmd;" \ > + "fi;\0" > + > +#define STM32MP_EXTRA \ > + "env_check=if env info -p -d -q; then env save; fi\0" \ > + "boot_net_usb_start=true\0" > + > +#ifndef STM32MP_BOARD_EXTRA_ENV > +#define STM32MP_BOARD_EXTRA_ENV > +#endif > + > +#include > + > +/* > + * memory layout for 32M uncompressed/compressed kernel, > + * 1M fdt, 1M script, 1M pxe and 1M for overlay > + * and the ramdisk at the end. > + */ > +#define __KERNEL_ADDR_R __stringify(0xc2000000) > +#define __FDT_ADDR_R __stringify(0xc4000000) > +#define __SCRIPT_ADDR_R __stringify(0xc4100000) > +#define __PXEFILE_ADDR_R __stringify(0xc4200000) > +#define __FDTOVERLAY_ADDR_R __stringify(0xc4300000) > +#define __RAMDISK_ADDR_R __stringify(0xc4400000) > + > +#define STM32MP_MEM_LAYOUT \ > + "kernel_addr_r=" __KERNEL_ADDR_R "\0" \ > + "fdt_addr_r=" __FDT_ADDR_R "\0" \ > + "scriptaddr=" __SCRIPT_ADDR_R "\0" \ > + "pxefile_addr_r=" __PXEFILE_ADDR_R "\0" \ > + "fdtoverlay_addr_r=" __FDTOVERLAY_ADDR_R "\0" \ > + "ramdisk_addr_r=" __RAMDISK_ADDR_R "\0" > + > +#define CONFIG_EXTRA_ENV_SETTINGS \ > + STM32MP_MEM_LAYOUT \ > + STM32MP_BOOTCMD \ > + BOOTENV \ > + STM32MP_EXTRA \ > + STM32MP_BOARD_EXTRA_ENV > + > +#endif /* ifdef CONFIG_DISTRO_DEFAULTS*/ > + > +#endif /* __CONFIG_STM32MP13_COMMMON_H */ > diff --git a/include/configs/stm32mp13_st_common.h b/include/configs/stm32mp13_st_common.h > new file mode 100644 > index 0000000000..d73526f14e > --- /dev/null > +++ b/include/configs/stm32mp13_st_common.h > @@ -0,0 +1,17 @@ > +/* SPDX-License-Identifier: GPL-2.0-or-later OR BSD-3-Clause */ > +/* > + * Copyright (C) 2022, STMicroelectronics - All Rights Reserved > + * > + * Configuration settings for the STMicroelectonics STM32MP15x boards > + */ > + > +#ifndef __CONFIG_STM32MP13_ST_COMMON_H__ > +#define __CONFIG_STM32MP13_ST_COMMON_H__ > + > +#define STM32MP_BOARD_EXTRA_ENV \ > + "usb_pgood_delay=1000\0" \ > + "console=ttySTM0\0" > + > +#include > + > +#endif [...] Applied to u-boot-stm/next, with these modification thanks! Regards Patrick