diff options
Diffstat (limited to 'arch/arm/mach-stm32')
-rw-r--r-- | arch/arm/mach-stm32/Kconfig | 54 | ||||
-rw-r--r-- | arch/arm/mach-stm32/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-stm32/Makefile.boot | 3 | ||||
-rw-r--r-- | arch/arm/mach-stm32/board-dt.c | 29 |
4 files changed, 87 insertions, 0 deletions
diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig new file mode 100644 index 000000000..adca4368d --- /dev/null +++ b/arch/arm/mach-stm32/Kconfig @@ -0,0 +1,54 @@ +menuconfig ARCH_STM32 + bool "STMicroelectronics STM32 family" + depends on ARM_SINGLE_ARMV7M || ARCH_MULTI_V7 + select ARMV7M_SYSTICK if ARM_SINGLE_ARMV7M + select HAVE_ARM_ARCH_TIMER if ARCH_MULTI_V7 + select ARM_GIC if ARCH_MULTI_V7 + select ARM_PSCI if ARCH_MULTI_V7 + select ARCH_HAS_RESET_CONTROLLER + select CLKSRC_STM32 + select PINCTRL + select RESET_CONTROLLER + select STM32_EXTI + help + Support for STMicroelectronics STM32 processors. + +if ARCH_STM32 + +if ARM_SINGLE_ARMV7M + +config MACH_STM32F429 + bool "STMicroelectronics STM32F429" + select ARM_AMBA + default y + +config MACH_STM32F469 + bool "STMicroelectronics STM32F469" + select ARM_AMBA + default y + +config MACH_STM32F746 + bool "STMicroelectronics STM32F746" + select ARM_AMBA + default y + +config MACH_STM32F769 + bool "STMicroelectronics STM32F769" + select ARM_AMBA + default y + +config MACH_STM32H743 + bool "STMicroelectronics STM32H743" + default y + +endif # ARMv7-M + +if ARCH_MULTI_V7 + +config MACH_STM32MP157 + bool "STMicroelectronics STM32MP157" + default y + +endif # ARMv7-A + +endif diff --git a/arch/arm/mach-stm32/Makefile b/arch/arm/mach-stm32/Makefile new file mode 100644 index 000000000..bd0b7b5d6 --- /dev/null +++ b/arch/arm/mach-stm32/Makefile @@ -0,0 +1 @@ +obj-y += board-dt.o diff --git a/arch/arm/mach-stm32/Makefile.boot b/arch/arm/mach-stm32/Makefile.boot new file mode 100644 index 000000000..eacfc3f5c --- /dev/null +++ b/arch/arm/mach-stm32/Makefile.boot @@ -0,0 +1,3 @@ +# Empty file waiting for deletion once Makefile.boot isn't needed any more. +# Patch waits for application at +# http://www.arm.linux.org.uk/developer/patches/viewpatch.php?id=7889/1 . diff --git a/arch/arm/mach-stm32/board-dt.c b/arch/arm/mach-stm32/board-dt.c new file mode 100644 index 000000000..011d57b48 --- /dev/null +++ b/arch/arm/mach-stm32/board-dt.c @@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) Maxime Coquelin 2015 + * Copyright (C) STMicroelectronics 2017 + * Author: Maxime Coquelin <mcoquelin.stm32@gmail.com> + */ + +#include <linux/kernel.h> +#include <asm/mach/arch.h> +#ifdef CONFIG_ARM_SINGLE_ARMV7M +#include <asm/v7m.h> +#endif + +static const char *const stm32_compat[] __initconst = { + "st,stm32f429", + "st,stm32f469", + "st,stm32f746", + "st,stm32f769", + "st,stm32h743", + "st,stm32mp157", + NULL +}; + +DT_MACHINE_START(STM32DT, "STM32 (Device Tree Support)") + .dt_compat = stm32_compat, +#ifdef CONFIG_ARM_SINGLE_ARMV7M + .restart = armv7m_restart, +#endif +MACHINE_END |