diff options
Diffstat (limited to 'roms/u-boot/arch/arm/mach-stm32')
-rw-r--r-- | roms/u-boot/arch/arm/mach-stm32/Kconfig | 79 | ||||
-rw-r--r-- | roms/u-boot/arch/arm/mach-stm32/Makefile | 5 | ||||
-rw-r--r-- | roms/u-boot/arch/arm/mach-stm32/soc.c | 40 | ||||
-rw-r--r-- | roms/u-boot/arch/arm/mach-stm32/stm32f4/Kconfig | 16 | ||||
-rw-r--r-- | roms/u-boot/arch/arm/mach-stm32/stm32f7/Kconfig | 8 | ||||
-rw-r--r-- | roms/u-boot/arch/arm/mach-stm32/stm32h7/Kconfig | 16 |
6 files changed, 164 insertions, 0 deletions
diff --git a/roms/u-boot/arch/arm/mach-stm32/Kconfig b/roms/u-boot/arch/arm/mach-stm32/Kconfig new file mode 100644 index 000000000..b42b05669 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-stm32/Kconfig @@ -0,0 +1,79 @@ +if ARCH_STM32 + +config STM32F4 + bool "stm32f4 family" + select CLK + select DM_GPIO + select DM_RESET + select MISC + select PINCTRL + select PINCTRL_STM32 + select RAM + select STM32_RCC + select STM32_RESET + select STM32_SDRAM + select STM32_SERIAL + select STM32_TIMER + select TIMER + +config STM32F7 + bool "stm32f7 family" + select CLK + select DM_GPIO + select DM_RESET + select MISC + select PINCTRL + select PINCTRL_STM32 + select RAM + select SPL + select SPL_BOARD_INIT + select SPL_CLK + select SPL_DM + select SPL_DM_RESET + select SPL_DM_SEQ_ALIAS + select SPL_DRIVERS_MISC_SUPPORT + select SPL_GPIO_SUPPORT + select SPL_LIBCOMMON_SUPPORT + select SPL_LIBGENERIC_SUPPORT + select SPL_MTD_SUPPORT + select SPL_OF_CONTROL + select SPL_OF_LIBFDT + select SPL_OF_TRANSLATE + select SPL_PINCTRL + select SPL_RAM + select SPL_SERIAL_SUPPORT + select SPL_SYS_MALLOC_SIMPLE + select SPL_TIMER + select SPL_XIP_SUPPORT + select STM32_RCC + select STM32_RESET + select STM32_SDRAM + select STM32_SERIAL + select STM32_TIMER + select SUPPORT_SPL + select TIMER + imply SPL_OS_BOOT + +config STM32H7 + bool "stm32h7 family" + select CLK + select DM_GPIO + select DM_RESET + select MISC + select PINCTRL + select PINCTRL_STM32 + select RAM + select REGMAP + select STM32_RCC + select STM32_RESET + select STM32_SDRAM + select STM32_SERIAL + select STM32_TIMER + select SYSCON + select TIMER + +source "arch/arm/mach-stm32/stm32f4/Kconfig" +source "arch/arm/mach-stm32/stm32f7/Kconfig" +source "arch/arm/mach-stm32/stm32h7/Kconfig" + +endif diff --git a/roms/u-boot/arch/arm/mach-stm32/Makefile b/roms/u-boot/arch/arm/mach-stm32/Makefile new file mode 100644 index 000000000..03d535d81 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-stm32/Makefile @@ -0,0 +1,5 @@ +# SPDX-License-Identifier: GPL-2.0+ +# +# (C) Copyright 2000-2006 +# Wolfgang Denk, DENX Software Engineering, wd@denx.de. +obj-y += soc.o diff --git a/roms/u-boot/arch/arm/mach-stm32/soc.c b/roms/u-boot/arch/arm/mach-stm32/soc.c new file mode 100644 index 000000000..0bd8d7b22 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-stm32/soc.c @@ -0,0 +1,40 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (C) 2017, STMicroelectronics - All Rights Reserved + * Author(s): Patrice Chotard, <patrice.chotard@foss.st.com> for STMicroelectronics. + */ + +#include <common.h> +#include <init.h> +#include <asm/io.h> +#include <asm/armv7_mpu.h> + +int arch_cpu_init(void) +{ + int i; + + struct mpu_region_config stm32_region_config[] = { + /* + * Make SDRAM area cacheable & executable. + */ +#if defined(CONFIG_STM32F4) + { 0x00000000, REGION_0, XN_DIS, PRIV_RW_USR_RW, + O_I_WB_RD_WR_ALLOC, REGION_512MB }, +#endif + + { 0x90000000, REGION_1, XN_DIS, PRIV_RW_USR_RW, + SHARED_WRITE_BUFFERED, REGION_256MB }, + +#if defined(CONFIG_STM32F7) || defined(CONFIG_STM32H7) + { 0xC0000000, REGION_0, XN_DIS, PRIV_RW_USR_RW, + O_I_WB_RD_WR_ALLOC, REGION_512MB }, +#endif + }; + + disable_mpu(); + for (i = 0; i < ARRAY_SIZE(stm32_region_config); i++) + mpu_config(&stm32_region_config[i]); + enable_mpu(); + + return 0; +} diff --git a/roms/u-boot/arch/arm/mach-stm32/stm32f4/Kconfig b/roms/u-boot/arch/arm/mach-stm32/stm32f4/Kconfig new file mode 100644 index 000000000..e8fae4de4 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-stm32/stm32f4/Kconfig @@ -0,0 +1,16 @@ +if STM32F4 + +config TARGET_STM32F429_DISCOVERY + bool "STM32F429 Discovery board" + +config TARGET_STM32F429_EVALUATION + bool "STM32F429 Evaluation board" + +config TARGET_STM32F469_DISCOVERY + bool "STM32F469 Discovery board" + +source "board/st/stm32f429-discovery/Kconfig" +source "board/st/stm32f429-evaluation/Kconfig" +source "board/st/stm32f469-discovery/Kconfig" + +endif diff --git a/roms/u-boot/arch/arm/mach-stm32/stm32f7/Kconfig b/roms/u-boot/arch/arm/mach-stm32/stm32f7/Kconfig new file mode 100644 index 000000000..287e5ad4a --- /dev/null +++ b/roms/u-boot/arch/arm/mach-stm32/stm32f7/Kconfig @@ -0,0 +1,8 @@ +if STM32F7 + +config TARGET_STM32F746_DISCO + bool "STM32F746 Discovery board" + +source "board/st/stm32f746-disco/Kconfig" + +endif diff --git a/roms/u-boot/arch/arm/mach-stm32/stm32h7/Kconfig b/roms/u-boot/arch/arm/mach-stm32/stm32h7/Kconfig new file mode 100644 index 000000000..70233a4b2 --- /dev/null +++ b/roms/u-boot/arch/arm/mach-stm32/stm32h7/Kconfig @@ -0,0 +1,16 @@ +if STM32H7 + +config TARGET_STM32H743_DISCO + bool "STM32H743 Discovery board" + +config TARGET_STM32H743_EVAL + bool "STM32H743 Evaluation board" + +config TARGET_STM32H750_ART_PI + bool "STM32H750 ART Pi board" + +source "board/st/stm32h743-eval/Kconfig" +source "board/st/stm32h743-disco/Kconfig" +source "board/st/stm32h750-art-pi/Kconfig" + +endif |