soc: stm32f1: Add support for stm32f1xx SoCs

Define stm32f100xx family, tested using stm32vl_disco
(stm32f100rb).

Signed-off-by: Jonas Eriksson <jonas@upto.se>
This commit is contained in:
Jonas Eriksson 2020-01-03 12:57:26 +01:00 committed by Maureen Helm
commit 3e64e751b6
4 changed files with 103 additions and 0 deletions

View file

@ -0,0 +1,36 @@
/*
* Copyright (c) 2020 Jonas Eriksson, Up to Code AB
*
* SoC device tree include for STM32F100xB SoCs
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <mem.h>
#include <st/f1/stm32f1.dtsi>
/ {
sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(8)>;
};
soc {
flash-controller@40022000 {
flash0: flash@8000000 {
reg = <0x08000000 DT_SIZE_K(128)>;
erase-block-size = <DT_SIZE_K(1)>;
};
};
spi2: spi@40003800 {
compatible = "st,stm32-spi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40003800 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00004000>;
interrupts = <36 5>;
status = "disabled";
label = "SPI_2";
};
};
};

View file

@ -0,0 +1,35 @@
/*
* Copyright (c) 2020 Jonas Eriksson, Up to Code AB
*
* SoC device tree include for STM32F100xE SoCs
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <mem.h>
#include <st/f1/stm32f100Xb.dtsi>
/ {
sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(32)>;
};
soc {
flash-controller@40022000 {
flash0: flash@8000000 {
reg = <0x08000000 DT_SIZE_K(512)>;
};
};
spi3: spi@40003c00 {
compatible = "st,stm32-spi";
#address-cells = <1>;
#size-cells = <0>;
reg = <0x40003c00 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x00008000>;
interrupts = <51 5>;
status = "disabled";
label = "SPI_3";
};
};
};

View file

@ -0,0 +1,24 @@
# ST Microelectronics STM32F100XX MCU
# Copyright (c) 2020, Jonas Eriksson, Up to Code AB
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32F100XB
config SOC
default "stm32f100xb"
config NUM_IRQS
default 56
endif # SOC_STM32F100XB
if SOC_STM32F100XE
config SOC
default "stm32f100xe"
config NUM_IRQS
default 61
endif # SOC_STM32F100XE

View file

@ -8,6 +8,14 @@ choice
prompt "STM32F1x MCU Selection"
depends on SOC_SERIES_STM32F1X
config SOC_STM32F100XB
bool "STM32F100XB"
select SOC_STM32F10X_DENSITY_DEVICE
config SOC_STM32F100XE
bool "STM32F100XE"
select SOC_STM32F10X_DENSITY_DEVICE
config SOC_STM32F103XE
bool "STM32F103XE"
select SOC_STM32F10X_DENSITY_DEVICE