aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxime Coquelin <mcoquelin.stm32@gmail.com>2015-05-09 03:53:54 -0400
committerArnd Bergmann <arnd@arndb.de>2015-05-15 15:43:23 -0400
commit9b799b78372c925d3204567741e3ff8fe0cc1c7d (patch)
treee956041743bb2b3b39d6ff65cc1c684bf2883005
parent7448adca9361b4ad97614a08c487e215f1990ad7 (diff)
ARM: Add STM32 family machine
STMicrolectronics's STM32 series is a family of Cortex-M microcontrollers. It is used in various applications, and proposes a wide range of peripherals. Tested-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
-rw-r--r--Documentation/arm/stm32/overview.txt32
-rw-r--r--Documentation/arm/stm32/stm32f429-overview.txt22
-rw-r--r--arch/arm/Kconfig18
-rw-r--r--arch/arm/Makefile1
-rw-r--r--arch/arm/mach-stm32/Makefile1
-rw-r--r--arch/arm/mach-stm32/Makefile.boot3
-rw-r--r--arch/arm/mach-stm32/board-dt.c19
7 files changed, 96 insertions, 0 deletions
diff --git a/Documentation/arm/stm32/overview.txt b/Documentation/arm/stm32/overview.txt
new file mode 100644
index 000000000000..09aed5588d7c
--- /dev/null
+++ b/Documentation/arm/stm32/overview.txt
@@ -0,0 +1,32 @@
1 STM32 ARM Linux Overview
2 ========================
3
4Introduction
5------------
6
7 The STMicroelectronics family of Cortex-M based MCUs are supported by the
8 'STM32' platform of ARM Linux. Currently only the STM32F429 is supported.
9
10
11Configuration
12-------------
13
14 A generic configuration is provided for STM32 family, and can be used as the
15 default by
16 make stm32_defconfig
17
18Layout
19------
20
21 All the files for multiple machine families are located in the platform code
22 contained in arch/arm/mach-stm32
23
24 There is a generic board board-dt.c in the mach folder which support
25 Flattened Device Tree, which means, it works with any compatible board with
26 Device Trees.
27
28
29Document Author
30---------------
31
32 Maxime Coquelin <mcoquelin.stm32@gmail.com>
diff --git a/Documentation/arm/stm32/stm32f429-overview.txt b/Documentation/arm/stm32/stm32f429-overview.txt
new file mode 100644
index 000000000000..5206822bd8ef
--- /dev/null
+++ b/Documentation/arm/stm32/stm32f429-overview.txt
@@ -0,0 +1,22 @@
1 STM32F429 Overview
2 ==================
3
4 Introduction
5 ------------
6 The STM32F429 is a Cortex-M4 MCU aimed at various applications.
7 It features:
8 - ARM Cortex-M4 up to 180MHz with FPU
9 - 2MB internal Flash Memory
10 - External memory support through FMC controller (PSRAM, SDRAM, NOR, NAND)
11 - I2C, SPI, SAI, CAN, USB OTG, Ethernet controllers
12 - LCD controller & Camera interface
13 - Cryptographic processor
14
15 Resources
16 ---------
17 Datasheet and reference manual are publicly available on ST website:
18 - http://www.st.com/web/en/catalog/mmc/FM141/SC1169/SS1577/LN1806?ecmp=stm32f429-439_pron_pr-ces2014_nov2013
19
20 Document Author
21 ---------------
22 Maxime Coquelin <mcoquelin.stm32@gmail.com>
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 7cd23bb03244..99544479ab01 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -758,6 +758,24 @@ config ARCH_OMAP1
758 help 758 help
759 Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx) 759 Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx)
760 760
761config ARCH_STM32
762 bool "STMicrolectronics STM32"
763 depends on !MMU
764 select ARCH_HAS_RESET_CONTROLLER
765 select ARM_NVIC
766 select ARMV7M_SYSTICK
767 select AUTO_ZRELADDR
768 select CLKSRC_OF
769 select COMMON_CLK
770 select CPU_V7M
771 select GENERIC_CLOCKEVENTS
772 select NO_IOPORT_MAP
773 select RESET_CONTROLLER
774 select SPARSE_IRQ
775 select USE_OF
776 help
777 Support for STMicroelectronics STM32 processors.
778
761endchoice 779endchoice
762 780
763menu "Multiple platform selection" 781menu "Multiple platform selection"
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index fe8f9ef89395..d7af1922f56f 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -196,6 +196,7 @@ machine-$(CONFIG_ARCH_SHMOBILE) += shmobile
196machine-$(CONFIG_ARCH_SIRF) += prima2 196machine-$(CONFIG_ARCH_SIRF) += prima2
197machine-$(CONFIG_ARCH_SOCFPGA) += socfpga 197machine-$(CONFIG_ARCH_SOCFPGA) += socfpga
198machine-$(CONFIG_ARCH_STI) += sti 198machine-$(CONFIG_ARCH_STI) += sti
199machine-$(CONFIG_ARCH_STM32) += stm32
199machine-$(CONFIG_ARCH_SUNXI) += sunxi 200machine-$(CONFIG_ARCH_SUNXI) += sunxi
200machine-$(CONFIG_ARCH_TEGRA) += tegra 201machine-$(CONFIG_ARCH_TEGRA) += tegra
201machine-$(CONFIG_ARCH_U300) += u300 202machine-$(CONFIG_ARCH_U300) += u300
diff --git a/arch/arm/mach-stm32/Makefile b/arch/arm/mach-stm32/Makefile
new file mode 100644
index 000000000000..bd0b7b5d6e9d
--- /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 000000000000..eacfc3f5c33e
--- /dev/null
+++ b/arch/arm/mach-stm32/Makefile.boot
@@ -0,0 +1,3 @@
1# Empty file waiting for deletion once Makefile.boot isn't needed any more.
2# Patch waits for application at
3# 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 000000000000..f2ad7723d034
--- /dev/null
+++ b/arch/arm/mach-stm32/board-dt.c
@@ -0,0 +1,19 @@
1/*
2 * Copyright (C) Maxime Coquelin 2015
3 * Author: Maxime Coquelin <mcoquelin.stm32@gmail.com>
4 * License terms: GNU General Public License (GPL), version 2
5 */
6
7#include <linux/kernel.h>
8#include <asm/v7m.h>
9#include <asm/mach/arch.h>
10
11static const char *const stm32_compat[] __initconst = {
12 "st,stm32f429",
13 NULL
14};
15
16DT_MACHINE_START(STM32DT, "STM32 (Device Tree Support)")
17 .dt_compat = stm32_compat,
18 .restart = armv7m_restart,
19MACHINE_END