Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Maxime Coquelin and committed by
Arnd Bergmann
9b799b78 7448adca

+96
+32
Documentation/arm/stm32/overview.txt
··· 1 + STM32 ARM Linux Overview 2 + ======================== 3 + 4 + Introduction 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 + 11 + Configuration 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 + 18 + Layout 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 + 29 + Document Author 30 + --------------- 31 + 32 + Maxime Coquelin <mcoquelin.stm32@gmail.com>
+22
Documentation/arm/stm32/stm32f429-overview.txt
··· 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>
+18
arch/arm/Kconfig
··· 758 758 help 759 759 Support for older TI OMAP1 (omap7xx, omap15xx or omap16xx) 760 760 761 + config 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 + 761 779 endchoice 762 780 763 781 menu "Multiple platform selection"
+1
arch/arm/Makefile
··· 196 196 machine-$(CONFIG_ARCH_SIRF) += prima2 197 197 machine-$(CONFIG_ARCH_SOCFPGA) += socfpga 198 198 machine-$(CONFIG_ARCH_STI) += sti 199 + machine-$(CONFIG_ARCH_STM32) += stm32 199 200 machine-$(CONFIG_ARCH_SUNXI) += sunxi 200 201 machine-$(CONFIG_ARCH_TEGRA) += tegra 201 202 machine-$(CONFIG_ARCH_U300) += u300
+1
arch/arm/mach-stm32/Makefile
··· 1 + obj-y += board-dt.o
+3
arch/arm/mach-stm32/Makefile.boot
··· 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 .
+19
arch/arm/mach-stm32/board-dt.c
··· 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 + 11 + static const char *const stm32_compat[] __initconst = { 12 + "st,stm32f429", 13 + NULL 14 + }; 15 + 16 + DT_MACHINE_START(STM32DT, "STM32 (Device Tree Support)") 17 + .dt_compat = stm32_compat, 18 + .restart = armv7m_restart, 19 + MACHINE_END