From f132c4967e416b6670d7a531c6a293f835177f82 Mon Sep 17 00:00:00 2001 From: dillon min Date: Fri, 9 Apr 2021 15:28:44 +0800 Subject: ARM: dts: stm32: add support for art-pi board based on stm32h750xbh6 This patchset has following changes: - introduce stm32h750.dtsi to support stm32h750 value line - add pin groups for usart3/uart4/spi1/sdmmc2 - add stm32h750i-art-pi.dtb (arch/arm/boot/dts/Makefile) - add stm32h750i-art-pi.dts to support art-pi board - add stm32h750i-art-pi-u-boot.dtsi to support art-pi board (u-boot) art-pi board component: - 8MiB qspi flash - 16MiB spi flash - 32MiB sdram - ap6212 wifi&bt&fm the detail board information can be found at: https://art-pi.gitee.io/website/ Signed-off-by: dillon min Reviewed-by: Patrice Chotard --- include/dt-bindings/memory/stm32-sdram.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/dt-bindings/memory/stm32-sdram.h b/include/dt-bindings/memory/stm32-sdram.h index ab91d2b7f6..90ef2e1590 100644 --- a/include/dt-bindings/memory/stm32-sdram.h +++ b/include/dt-bindings/memory/stm32-sdram.h @@ -34,8 +34,10 @@ #define TXSR_1 (1 - 1) #define TXSR_6 (6 - 1) #define TXSR_7 (7 - 1) +#define TXSR_8 (8 - 1) #define TRAS_1 (1 - 1) #define TRAS_4 (4 - 1) +#define TRAS_6 (6 - 1) #define TRC_6 (6 - 1) #define TWR_1 (1 - 1) #define TWR_2 (2 - 1) -- cgit From 38ac6a1bb3065ce34fa98d6584aa2b2ebf92a1e7 Mon Sep 17 00:00:00 2001 From: dillon min Date: Fri, 9 Apr 2021 15:28:46 +0800 Subject: board: Add rt-thread art-pi board support All these files are add for support rt-thread art-pi board - add board/st/stm32h750-art-pi, defconfig, header support for u-boot for more information about art-pi, please goto: https://art-pi.gitee.io/website/ Signed-off-by: dillon min Reviewed-by: Patrice Chotard --- include/configs/stm32h750-art-pi.h | 48 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 include/configs/stm32h750-art-pi.h (limited to 'include') diff --git a/include/configs/stm32h750-art-pi.h b/include/configs/stm32h750-art-pi.h new file mode 100644 index 0000000000..3fd5461167 --- /dev/null +++ b/include/configs/stm32h750-art-pi.h @@ -0,0 +1,48 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright (C) 2021, STMicroelectronics - All Rights Reserved + * Author(s): Dillon Min + */ + +#ifndef __CONFIG_H +#define __CONFIG_H + +#include +#include + +/* For booting Linux, use the first 16MB of memory */ +#define CONFIG_SYS_BOOTMAPSZ (SZ_16M + SZ_8M) + +#define CONFIG_SYS_FLASH_BASE 0x90000000 +#define CONFIG_SYS_INIT_SP_ADDR 0x24040000 + +/* + * Configuration of the external SDRAM memory + */ +#define CONFIG_SYS_LOAD_ADDR 0xC1800000 +#define CONFIG_LOADADDR 0xC1800000 + +#define CONFIG_SYS_HZ_CLOCK 1000000 + +#define CONFIG_CMDLINE_TAG +#define CONFIG_SETUP_MEMORY_TAGS +#define CONFIG_INITRD_TAG +#define CONFIG_REVISION_TAG + +#define CONFIG_SYS_MAXARGS 16 +#define CONFIG_SYS_MALLOC_LEN (1 * 1024 * 1024) + +#define BOOT_TARGET_DEVICES(func) \ + func(MMC, mmc, 0) + +#include +#define CONFIG_EXTRA_ENV_SETTINGS \ + "kernel_addr_r=0xC0008000\0" \ + "fdtfile=stm32h750i-art-pi.dtb\0" \ + "fdt_addr_r=0xC0408000\0" \ + "scriptaddr=0xC0418000\0" \ + "pxefile_addr_r=0xC0428000\0" \ + "ramdisk_addr_r=0xC0438000\0" \ + BOOTENV + +#endif /* __CONFIG_H */ -- cgit From 99e1191845981c931db6a54022bcfdb9e87c3ca7 Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Mon, 22 Mar 2021 08:19:59 -0500 Subject: configs: stm32mp1: stm32mp1: Increase SPL malloc() size Since commit 03f1f78a9b44 ("spl: fit: Prefer a malloc()'d buffer for loading images"), FIT images must be malloc()'d before being loaded. The old size of 1 MiB is suitable for FIT images with u-boot and an FDT, but something containing a linux kernel is almost sure to fail. It's safe to extend malloc all the way to 0xc2000000, but no further. Linux likes to be loaded at 0xc2000000, so we use that as our cutoff point. This gives us 29 MiB of malloc() space, which suited for more complex FIT images including several DTBs, kernel, and OP-TEE images. Signed-off-by: Alexandru Gagniuc Reviewed-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- include/configs/stm32mp1.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index db2117a3d7..7fdb3ffce4 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -53,7 +53,7 @@ #define CONFIG_SPL_BSS_START_ADDR 0xC0200000 #define CONFIG_SPL_BSS_MAX_SIZE 0x00100000 #define CONFIG_SYS_SPL_MALLOC_START 0xC0300000 -#define CONFIG_SYS_SPL_MALLOC_SIZE 0x00100000 +#define CONFIG_SYS_SPL_MALLOC_SIZE 0x01D00000 /* limit SYSRAM usage to first 128 KB */ #define CONFIG_SPL_MAX_SIZE 0x00020000 -- cgit From bbe10c70a2f4f055410c857c5a54625bf53ce70c Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Mon, 22 Mar 2021 08:20:00 -0500 Subject: configs: stm32mp1: Remove misleading CONFIG_SPL_BSS_START_ADDR CONFIG_SPL_BSS_START_ADDR is only used on a few mach- linker scripts. stm32mp1 uses the generic script under arch/arm/cpu/u-boot-spl.lds, which does not make use of this definition. The SPL BSS starts in SRAM, right after .text, .rodata, .data, and .u_boot_list. A very short version of the STM32MP1 memory map is: * SYSRAM: 2ffc0000 - 30000000 <- all of SPL is here * DRAM: c0000000+ 0xC0200000 is a DRAM address, and has nothing to do with SPL. It is just very misleading to have it next to CONFIG_SPL_BSS_MAX_SIZE, or to have it at all. Signed-off-by: Alexandru Gagniuc Reviewed-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- include/configs/stm32mp1.h | 1 - 1 file changed, 1 deletion(-) (limited to 'include') diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index 7fdb3ffce4..56a70cb584 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -50,7 +50,6 @@ /* SPL support */ #ifdef CONFIG_SPL /* SPL use DDR */ -#define CONFIG_SPL_BSS_START_ADDR 0xC0200000 #define CONFIG_SPL_BSS_MAX_SIZE 0x00100000 #define CONFIG_SYS_SPL_MALLOC_START 0xC0300000 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x01D00000 -- cgit From a08d1a916b9b86889c8ff54d85bc3fb8989fd91c Mon Sep 17 00:00:00 2001 From: Alexandru Gagniuc Date: Mon, 22 Mar 2021 08:20:01 -0500 Subject: configs: stm32mp1: Fix misleading SPL size limitations A now removed comment promises to "limit SYSRAM usage to first 128 KB". This would imply that only SYSRAM from 0x2ffc0000 - 0x2ffe0000 would be used. This is not what happens at all. First, SPL_MAX_SIZE is referenced from SPL_TEXT_BASE, which on all existing configs is set to 0x2ffc2500, not SYSRAM_BASE (0x2ffc0000). Some of it is in the first 128 KiB and some of it is in the second 128 KiB chunk of SYSRAM. Second, SPL_MAX_SIZE, does not restrict the BSS size. While a valiant attempt is made via SPL_BSS_MAX_SIZE, the value of 0x00100000 is much larger than SYSRAM, and doesn't account for the non-BSS sections. Because we're putting the .text and .bss in the same boat, the correct way to limit them together is via SPL_MAX_FOOTPRINT. With the current SPL_TEXT_BASE, we couldn't limit even a very basic SPL to the first 128 KiB, and there is no technical reason to do so. Because of this, simply allow the SPL to use all SYSRAM. Signed-off-by: Alexandru Gagniuc Reviewed-by: Patrice Chotard Reviewed-by: Patrick Delaunay --- include/configs/stm32mp1.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/stm32mp1.h b/include/configs/stm32mp1.h index 56a70cb584..440efa1a55 100644 --- a/include/configs/stm32mp1.h +++ b/include/configs/stm32mp1.h @@ -50,12 +50,12 @@ /* SPL support */ #ifdef CONFIG_SPL /* SPL use DDR */ -#define CONFIG_SPL_BSS_MAX_SIZE 0x00100000 #define CONFIG_SYS_SPL_MALLOC_START 0xC0300000 #define CONFIG_SYS_SPL_MALLOC_SIZE 0x01D00000 -/* limit SYSRAM usage to first 128 KB */ -#define CONFIG_SPL_MAX_SIZE 0x00020000 +/* Restrict SPL to fit within SYSRAM */ +#define STM32_SYSRAM_END (STM32_SYSRAM_BASE + STM32_SYSRAM_SIZE) +#define CONFIG_SPL_MAX_FOOTPRINT (STM32_SYSRAM_END - CONFIG_SPL_TEXT_BASE) #define CONFIG_SPL_STACK (STM32_SYSRAM_BASE + \ STM32_SYSRAM_SIZE) #endif /* #ifdef CONFIG_SPL */ -- cgit