From 7dcec3384edd2fa9ecd879fa0123dc786f17b49c Mon Sep 17 00:00:00 2001 From: Christopher Cichiwskyj Date: Tue, 14 Jan 2025 15:05:36 +0100 Subject: [PATCH] soc: add support for STM32F479 This chip shares its design with STM32F469, but with an added cryptography accelerator. Signed-off-by: Christopher Cichiwskyj --- dts/arm/st/f4/stm32f479.dtsi | 21 ++++++++++++++ dts/arm/st/f4/stm32f479Xi.dtsi | 28 +++++++++++++++++++ soc/st/stm32/soc.yml | 1 + .../stm32f4x/Kconfig.defconfig.stm32f479xx | 11 ++++++++ soc/st/stm32/stm32f4x/Kconfig.soc | 5 ++++ 5 files changed, 66 insertions(+) create mode 100644 dts/arm/st/f4/stm32f479.dtsi create mode 100644 dts/arm/st/f4/stm32f479Xi.dtsi create mode 100644 soc/st/stm32/stm32f4x/Kconfig.defconfig.stm32f479xx diff --git a/dts/arm/st/f4/stm32f479.dtsi b/dts/arm/st/f4/stm32f479.dtsi new file mode 100644 index 00000000000..ca6b023b085 --- /dev/null +++ b/dts/arm/st/f4/stm32f479.dtsi @@ -0,0 +1,21 @@ +/* + * Copyright (C) 2025 Christopher Cichiwskyj + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + soc { + compatible = "st,stm32f479", "st,stm32f4", "simple-bus"; + + cryp: cryp@50060000 { + compatible = "st,stm32-cryp"; + reg = <0x50060000 0x400>; + clocks = <&rcc STM32_CLOCK(AHB2, 4)>; + interrupts = <79 0>; + status = "disabled"; + }; + }; +}; diff --git a/dts/arm/st/f4/stm32f479Xi.dtsi b/dts/arm/st/f4/stm32f479Xi.dtsi new file mode 100644 index 00000000000..42eb8c07afe --- /dev/null +++ b/dts/arm/st/f4/stm32f479Xi.dtsi @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2025 Christopher Cichiwskyj + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + ccm0: memory@10000000 { + compatible = "zephyr,memory-region", "st,stm32-ccm"; + reg = <0x10000000 DT_SIZE_K(64)>; + zephyr,memory-region = "CCM"; + }; + + sram0: memory@20000000 { + reg = <0x20000000 DT_SIZE_K(320)>; + }; + + soc { + flash-controller@40023c00 { + flash0: flash@8000000 { + reg = <0x08000000 DT_SIZE_K(2048)>; + }; + }; + }; +}; diff --git a/soc/st/stm32/soc.yml b/soc/st/stm32/soc.yml index a1221317095..7999b323ebe 100644 --- a/soc/st/stm32/soc.yml +++ b/soc/st/stm32/soc.yml @@ -62,6 +62,7 @@ family: - name: stm32f439xx - name: stm32f446xx - name: stm32f469xx + - name: stm32f479xx - name: stm32f7x socs: - name: stm32f722xx diff --git a/soc/st/stm32/stm32f4x/Kconfig.defconfig.stm32f479xx b/soc/st/stm32/stm32f4x/Kconfig.defconfig.stm32f479xx new file mode 100644 index 00000000000..baea858199f --- /dev/null +++ b/soc/st/stm32/stm32f4x/Kconfig.defconfig.stm32f479xx @@ -0,0 +1,11 @@ +# ST STM32F479XI MCU configuration options + +# Copyright (c) 2025 Christopher Cichiwskyj +# SPDX-License-Identifier: Apache-2.0 + +if SOC_STM32F479XX + +config NUM_IRQS + default 93 + +endif # SOC_STM32F479XX diff --git a/soc/st/stm32/stm32f4x/Kconfig.soc b/soc/st/stm32/stm32f4x/Kconfig.soc index ed84b4de31b..3ee84f5fb5d 100644 --- a/soc/st/stm32/stm32f4x/Kconfig.soc +++ b/soc/st/stm32/stm32f4x/Kconfig.soc @@ -94,6 +94,10 @@ config SOC_STM32F469XX bool select SOC_SERIES_STM32F4X +config SOC_STM32F479XX + bool + select SOC_SERIES_STM32F4X + config SOC default "stm32f401xc" if SOC_STM32F401XC default "stm32f401xe" if SOC_STM32F401XE @@ -116,3 +120,4 @@ config SOC default "stm32f439xx" if SOC_STM32F439XX default "stm32f446xx" if SOC_STM32F446XX default "stm32f469xx" if SOC_STM32F469XX + default "stm32f479xx" if SOC_STM32F479XX