summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-stm32
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:27:49 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-11 08:27:49 +0000
commitace9429bb58fd418f0c81d4c2835699bddf6bde6 (patch)
treeb2d64bc10158fdd5497876388cd68142ca374ed3 /arch/arm/mach-stm32
parentInitial commit. (diff)
downloadlinux-ace9429bb58fd418f0c81d4c2835699bddf6bde6.tar.xz
linux-ace9429bb58fd418f0c81d4c2835699bddf6bde6.zip
Adding upstream version 6.6.15.upstream/6.6.15
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'arch/arm/mach-stm32')
-rw-r--r--arch/arm/mach-stm32/Kconfig61
-rw-r--r--arch/arm/mach-stm32/Makefile2
-rw-r--r--arch/arm/mach-stm32/board-dt.c34
3 files changed, 97 insertions, 0 deletions
diff --git a/arch/arm/mach-stm32/Kconfig b/arch/arm/mach-stm32/Kconfig
new file mode 100644
index 0000000000..9814503158
--- /dev/null
+++ b/arch/arm/mach-stm32/Kconfig
@@ -0,0 +1,61 @@
+# SPDX-License-Identifier: GPL-2.0-only
+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 ARM_AMBA
+ 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"
+ default y
+
+config MACH_STM32F469
+ bool "STMicroelectronics STM32F469"
+ default y
+
+config MACH_STM32F746
+ bool "STMicroelectronics STM32F746"
+ default y
+
+config MACH_STM32F769
+ bool "STMicroelectronics STM32F769"
+ default y
+
+config MACH_STM32H743
+ bool "STMicroelectronics STM32H743"
+ default y
+
+endif # ARMv7-M
+
+if ARCH_MULTI_V7
+
+config MACH_STM32MP157
+ bool "STMicroelectronics STM32MP157"
+ select ARM_ERRATA_814220
+ default y
+
+config MACH_STM32MP13
+ bool "STMicroelectronics STM32MP13x"
+ select ARM_ERRATA_814220
+ default y
+ help
+ Support for STM32MP13 SoCs:
+ STM32MP131, STM32MP133, STM32MP135
+
+endif # ARMv7-A
+
+endif
diff --git a/arch/arm/mach-stm32/Makefile b/arch/arm/mach-stm32/Makefile
new file mode 100644
index 0000000000..c80d80c199
--- /dev/null
+++ b/arch/arm/mach-stm32/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0-only
+obj-y += board-dt.o
diff --git a/arch/arm/mach-stm32/board-dt.c b/arch/arm/mach-stm32/board-dt.c
new file mode 100644
index 0000000000..5dcc4ddd1a
--- /dev/null
+++ b/arch/arm/mach-stm32/board-dt.c
@@ -0,0 +1,34 @@
+// 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,stm32h750",
+ "st,stm32mp131",
+ "st,stm32mp133",
+ "st,stm32mp135",
+ "st,stm32mp151",
+ "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