dts: arm: stm32: add stm32f303xb bindings

The STM32F303xB is very similar to the xC, the only difference being the
RAM and flash sizes.

Signed-off-by: Martin Gritzan <martin.gritzan@gmail.com>
This commit is contained in:
Martin Gritzan 2023-11-22 09:25:37 +01:00 committed by Carles Cufí
commit 86cf5829a4
5 changed files with 73 additions and 51 deletions

View file

@ -0,0 +1,45 @@
/*
* Copyright (c) 2023 Martin Gritzan
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <mem.h>
#include <st/f3/stm32f303.dtsi>
/ {
ccm0: memory@10000000 {
compatible = "zephyr,memory-region", "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(8)>;
zephyr,memory-region = "CCM";
};
sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(32)>;
};
soc {
flash-controller@40022000 {
flash0: flash@8000000 {
reg = <0x08000000 DT_SIZE_K(128)>;
};
};
dma2: dma@40020400 {
compatible = "st,stm32-dma-v2bis";
#dma-cells = <2>;
reg = <0x40020400 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_AHB1 0x2>;
interrupts = <56 0 57 0 58 0 59 0 60 0>;
status = "disabled";
};
rtc@40002800 {
bbram: backup_regs {
compatible = "st,stm32-bbram";
st,backup-regs = <16>;
status = "disabled";
};
};
};
};

View file

@ -1,45 +1,16 @@
/*
* Copyright (c) 2018 Linaro Limited
* Copyright (c) 2023 Martin Gritzan
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <mem.h>
#include <st/f3/stm32f303.dtsi>
#include <st/f3/stm32f303Xb.dtsi>
/ {
ccm0: memory@10000000 {
compatible = "zephyr,memory-region", "st,stm32-ccm";
reg = <0x10000000 DT_SIZE_K(8)>;
zephyr,memory-region = "CCM";
};
sram0: memory@20000000 {
reg = <0x20000000 DT_SIZE_K(40)>;
};
soc {
flash-controller@40022000 {
flash0: flash@8000000 {
reg = <0x08000000 DT_SIZE_K(256)>;
};
};
dma2: dma@40020400 {
compatible = "st,stm32-dma-v2bis";
#dma-cells = <2>;
reg = <0x40020400 0x400>;
clocks = <&rcc STM32_CLOCK_BUS_AHB1 0x2>;
interrupts = <56 0 57 0 58 0 59 0 60 0>;
status = "disabled";
};
rtc@40002800 {
bbram: backup_regs {
compatible = "st,stm32-bbram";
st,backup-regs = <16>;
status = "disabled";
};
};
};
&sram0 {
reg = <0x20000000 DT_SIZE_K(40)>;
};
&flash0 {
reg = <0x08000000 DT_SIZE_K(256)>;
};

View file

@ -0,0 +1,16 @@
# ST Microelectronics STM32F303XC MCU
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
# The HAL expects STM32F302XC to be defined for both the xB and xC variants (only RAM- and Flash-
# size differ).
if SOC_STM32F303XB || SOC_STM32F303XC
config SOC
default "stm32f303xc"
config NUM_IRQS
default 82
endif # SOC_STM32F303XB || SOC_STM32F303XC

View file

@ -1,14 +0,0 @@
# ST Microelectronics STM32F303XC MCU
# Copyright (c) 2016 RnDity Sp. z o.o.
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32F303XC
config SOC
default "stm32f303xc"
config NUM_IRQS
default 82
endif # SOC_STM32F303XC

View file

@ -17,6 +17,10 @@ config SOC_STM32F302XC
config SOC_STM32F303X8
bool "STM32F303X8"
config SOC_STM32F303XB
bool "STM32F303XB"
select CPU_HAS_ARM_MPU
config SOC_STM32F303XC
bool "STM32F303XC"
select CPU_HAS_ARM_MPU