From fa53d93107b82d1af92ca0eae959300480fa24de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Conny=20Marco=20Menebr=C3=B6cker?= Date: Wed, 9 Apr 2025 22:37:32 +0200 Subject: [PATCH] soc: add stm32l100xb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This patch adds support for the stm32l100 SoC. Tested on private board. Signed-off-by: Conny Marco Menebröcker --- dts/arm/st/l1/stm32l100.dtsi | 13 +++++++ dts/arm/st/l1/stm32l100Xb.dtsi | 34 +++++++++++++++++++ soc/st/stm32/soc.yml | 1 + .../stm32l1x/Kconfig.defconfig.stm32l100xb | 11 ++++++ soc/st/stm32/stm32l1x/Kconfig.soc | 5 +++ 5 files changed, 64 insertions(+) create mode 100644 dts/arm/st/l1/stm32l100.dtsi create mode 100644 dts/arm/st/l1/stm32l100Xb.dtsi create mode 100644 soc/st/stm32/stm32l1x/Kconfig.defconfig.stm32l100xb diff --git a/dts/arm/st/l1/stm32l100.dtsi b/dts/arm/st/l1/stm32l100.dtsi new file mode 100644 index 00000000000..0f7d178ac3d --- /dev/null +++ b/dts/arm/st/l1/stm32l100.dtsi @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2025 Conny Marco Menebröcker + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + soc { + compatible = "st,stm32l100", "st,stm32l1", "simple-bus"; + }; +}; diff --git a/dts/arm/st/l1/stm32l100Xb.dtsi b/dts/arm/st/l1/stm32l100Xb.dtsi new file mode 100644 index 00000000000..95c440b1286 --- /dev/null +++ b/dts/arm/st/l1/stm32l100Xb.dtsi @@ -0,0 +1,34 @@ +/* + * Copyright (c) 2025 Conny Marco Menebröcker + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + sram0: memory@20000000 { + reg = <0x20000000 DT_SIZE_K(10)>; + }; + + soc { + flash-controller@40023c00 { + flash0: flash@8000000 { + reg = <0x08000000 DT_SIZE_K(128)>; + }; + }; + + eeprom: eeprom@8080000{ + reg = <0x08080000 DT_SIZE_K(2)>; + }; + + rtc@40002800 { + bbram: backup_regs { + compatible = "st,stm32-bbram"; + st,backup-regs = <5>; + status = "disabled"; + }; + }; + }; +}; diff --git a/soc/st/stm32/soc.yml b/soc/st/stm32/soc.yml index 5b74c7a43ef..26f5b1e3251 100644 --- a/soc/st/stm32/soc.yml +++ b/soc/st/stm32/soc.yml @@ -156,6 +156,7 @@ family: - name: stm32l081xx - name: stm32l1x socs: + - name: stm32l100xb - name: stm32l151xb - name: stm32l151xba - name: stm32l151xc diff --git a/soc/st/stm32/stm32l1x/Kconfig.defconfig.stm32l100xb b/soc/st/stm32/stm32l1x/Kconfig.defconfig.stm32l100xb new file mode 100644 index 00000000000..5caacae9825 --- /dev/null +++ b/soc/st/stm32/stm32l1x/Kconfig.defconfig.stm32l100xb @@ -0,0 +1,11 @@ +# STMicroelectronics STM32L100XB MCU + +# Copyright (c) 2025 Conny Marco Menebröcker +# SPDX-License-Identifier: Apache-2.0 + +if SOC_STM32L100XB + +config NUM_IRQS + default 46 + +endif # SOC_STM32L100XB diff --git a/soc/st/stm32/stm32l1x/Kconfig.soc b/soc/st/stm32/stm32l1x/Kconfig.soc index b0165c76991..cab29ffe96b 100644 --- a/soc/st/stm32/stm32l1x/Kconfig.soc +++ b/soc/st/stm32/stm32l1x/Kconfig.soc @@ -10,6 +10,10 @@ config SOC_SERIES_STM32L1X config SOC_SERIES default "stm32l1x" if SOC_SERIES_STM32L1X +config SOC_STM32L100XB + bool + select SOC_SERIES_STM32L1X + config SOC_STM32L151XB bool select SOC_SERIES_STM32L1X @@ -31,6 +35,7 @@ config SOC_STM32L152XE select SOC_SERIES_STM32L1X config SOC + default "stm32l100xb" if SOC_STM32L100XB default "stm32l151xb" if SOC_STM32L151XB default "stm32l151xba" if SOC_STM32L151XBA default "stm32l151xc" if SOC_STM32L151XC