Commit graph

107 commits

Author SHA1 Message Date
Henrik Lindblom
9de3d6bf64 soc: stm32: use cache peripheral driver
Use the Zephyr cache API in soc initialization code instead of calling the
HAL directly. The change does not modify the pre-existing cache settings,
just changes the path they are enabled.

Signed-off-by: Henrik Lindblom <henrik.lindblom@vaisala.com>
2025-04-25 11:04:37 +02:00
Erwan Gouriou
b4c1dc63a8 soc: stm32h7r/s: smps is supported on all SoCs
Remove the sanity check between Cube HAL SMPS symbol and Kconfig SMPS
configuration.
SMPS is available on all STM32H7R/S SoC, so misalignment isn't possible.

Additionally, point to the hal commit which revert the fix which was done
on hal_stm32 to add this symbol.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-04-24 10:39:34 +02:00
Ricardo Rivera-Matos
2b553ba74f soc: stm32: Adds support for STM32F401XD variants
Introduces config file entries for STM32F401XD variants. The
STM32F401XD family is related to the STM32F401XE family but with a
reduced flash memory.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2025-04-24 01:27:43 +02:00
Guillaume Gautier
9f02634d3f soc: st: stm32n6: configure regulator for best performance
Configure the main internal Regulator output voltage for best performance
on STM32N6.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-04-22 14:03:22 +02:00
Arnaud Pouliquen
cea2487d3d soc: st: stm32mp13: add missing arm_mmu.h include
The samples/subsys/llext/shell_loader test fails when running as a
twister test on the stm32mp135f_dk/stm32mp135fxx platform, with the
following error:

soc/st/stm32/stm32mp13x/soc.c:46:36:
error: array type has incomplete element type 'struct arm_mmu_region'
   46 | static const struct arm_mmu_region mmu_regions[] = {

This commit adds the missing arm_mmu.h include to fix the build issue.

Signed-off-by: Arnaud Pouliquen <arnaud.pouliquen@foss.st.com>
2025-04-16 17:08:37 +02:00
Charles Dias
389c9e7b67 soc: st: stm32: add support for stm32u5g9xx
Add Kconfig and YML SoC configurations for STM32U5G9xx.

Signed-off-by: Charles Dias <charlesdias.cd@outlook.com>
2025-04-16 01:10:06 +02:00
Francois Ramu
82d0c7aa5c soc: stm32: Adds the STM32WBA65x device.
This commit adds support for the STM32WBA65x MCU.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2025-04-15 15:33:15 +02:00
Tomáš Juřena
d700943d29 soc: st: stm32: Add poweroff to F4 family
Allows F4 MCUs to enter standby mode which behave similar to the poweroff
mode.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2025-04-11 06:33:56 +02:00
Tomáš Juřena
315ea56fef soc: st: common: Rename STM32_PWR_WKUP_PIN_SRC_x
This renames the STM32_PWR_WKUP_PIN_SRC_x symbols to better match
their meaning. It also adds a new symbol (STM32_PWR_WKUP_PIN_NOT_MUXED)
for SoCs without wake-up mux support.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2025-04-09 15:22:59 +02:00
Tomáš Juřena
f1e3784b9d soc: st: stm32: poweroff uses stm32_wkup_pins
Update the poweroff code to use stm32_pwr_wkup_pin_cfg_pupd if enabled.

Signed-off-by: Tomáš Juřena <jurenatomas@gmail.com>
2025-04-08 11:45:24 +02:00
Christopher Cichiwskyj
7dcec3384e soc: add support for STM32F479
This chip shares its design with STM32F469, but with
an added cryptography accelerator.

Signed-off-by: Christopher Cichiwskyj <cichiwskyj@gmail.com>
2025-04-04 12:06:29 +02:00
Julien Racki
c099e27c06 soc: st: stm32: Provide basic support for STM32MP13 series
Enable basic support to STM32MP13, in single core configuration (A7)
with I and D cache enabled.

Signed-off-by: Julien Racki <julien.racki@st.com>
2025-04-04 09:35:03 +02:00
Fin Maaß
d139d84338 drivers: ethernet: stm32: make mac a child like the mdio node
mac and mdio are now on the same level, this way
phy-handle can be used.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2025-04-02 10:31:34 +02:00
Georgij Cernysiov
b2b6b9be7e soc: st: h7: m7: remove voltage scale setting
The voltage scaling is set during h7 clock initialization.

Signed-off-by: Georgij Cernysiov <geo.cgv@gmail.com>
2025-03-31 21:59:28 +02:00
Mathieu Anquetin
bd0de75090 soc: st: stm32: add support for stm32f439
STM32F439 SoC is an STM32F429 with an integrated crypto/hash processor
providing hardware acceleration for encryption (AES and TDES) and hash
(MD5, SHA-1 and SHA-2).

Signed-off-by: Mathieu Anquetin <mathieu.anquetin@groupe-cahors.com>
2025-03-28 16:09:50 +01:00
Nidhal BEN OTHMEN
9a82e95d72 soc: stm32wbax: hci_if: Re-write enable/disable IRQs
Migrate LINKLAYER_PLAT_EnableIRQ and LINKLAYER_PLAT_DisableIRQ
from linklayer_plat.c (hal/stm32 module).

Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
2025-03-20 14:22:21 +01:00
Nidhal BEN OTHMEN
b357f81ce9 soc: stm32wbax: hci_if: Re-write enable/disable Radio IRQ with irq API
Migrate LINKLAYER_PLAT_EnableRadioIT and LINKLAYER_PLAT_DisableRadioIT
from linklayer_plat.c (hal/stm32 module) and adapt it using irq
Zephyr APIs.
Correct casting of irq type between using NVIC APIs or irq Zephyr APIs

Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
2025-03-20 14:22:21 +01:00
Nidhal BEN OTHMEN
1b3feecfd8 soc: stm32wbax: hci_if: Increase the link layer thread priority
Increase the link layer thread priority to be more than the BLE CTRL
thread and more than the Zephyr BLE stack threads.

Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
2025-03-20 14:22:21 +01:00
Nidhal BEN OTHMEN
43c00e5b6c soc: stm32wbax: hci_if: Clean code
Clean the code, rename some constants and variables for more
consistency.

Signed-off-by: Nidhal BEN OTHMEN <nidhal.benothmen@st.com>
2025-03-20 14:22:21 +01:00
Guillaume Gautier
a8ae1dcdcc soc: st: stm32: n6: set vddio voltage
Set VddIO 2 and 3 voltage to 1.8V

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-03-20 12:17:32 +01:00
Jordan Yates
65bc07c95e soc: st: stm32: build warning for STM32_ENABLE_DEBUG_SLEEP_STOP
Add a warning in the build system if both `CONFIG_PM` and
`STM32_ENABLE_DEBUG_SLEEP_STOP` are enabled at the same time. The first
is likely only enabled if the SoC is intended to be driven into low
power states to save power, while the later prevents the SoC from being
as low power as it can be.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-03-19 17:14:19 +01:00
Robin Kastberg
ddd1063715 soc: stm32: handle CCM in LINKER_GENERATOR
Currently, the soc/stm32/ccm.ld is not handled in
CMAKE_LINKER_GENERATOR.

This commit adds support, making STM32 supportable by
alternative linkers such as AC6 and IAR.

This commit also renames a variable to match all other
LOADADDR symbols.

Signed-off-by: Robin Kastberg <robin.kastberg@iar.com>
2025-03-07 19:54:24 +01:00
Erwan Gouriou
329df07a67 soc: stm32n6: CMakelists.txt: Fix signing tool if/else
If/else does fit here.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-02-21 15:13:11 +00:00
Erwan Gouriou
8c415f8e62 soc: stm32n6: Image signing: Refer to board documentation
Update missing signing tool warning to redirect to board doc.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-02-21 15:13:11 +00:00
Benjamin Cabé
703313aa54 soc: st: stm32: fix spelling of "corresponding"
s/correspending/corresponding/

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-02-19 18:51:13 +01:00
Alexander Kozhinov
2f211f415b soc: st: stm32: stm32h7x
This change splits eth sram region name definition
and configuration.
In the end the configuration is stored only once
er declared name.
This name shall increase readability and maintainability

Signed-off-by: Alexander Kozhinov <ak.alexander.kozhinov@gmail.com>
2025-02-14 10:43:00 +01:00
Guillaume Gautier
a024d5b984 soc: st: stm32n6: add missing kconfig for init hook
Add missing SOC_EARLY_INIT_HOOK Kconfig to STM32N6.

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-02-11 03:07:12 +01:00
Erwan Gouriou
3d04068393 soc: stm32n6: Generate a warning when signing tool is not available
Generate a proper Cmake warning when signing tool isn't available.
This also allows not to fail in Github CI.


Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-02-03 19:56:49 +01:00
Erwan Gouriou
3c097d8662 soc: stm32n6: Add Boot serial option
This option should be used to load and run binary using "serial boot"
configuration for boot ROM.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2025-02-03 19:56:49 +01:00
Guillaume Gautier
25dea79d4c soc: st: stm32: stm32n6x: add signing tool
Generate signed binary necessary to start a program from Flash on STM32N6

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-01-28 18:14:45 +01:00
Guillaume Gautier
722310e6b1 soc: st: stm32: add a comment for kconfig source priority
Add a comment describing Kconfig source order priority to prevent
future questions (after overriding SYS_CLOCK_HW_CYCLES_PER_SEC config
for STM32N6).

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-01-28 18:14:45 +01:00
Guillaume Gautier
016d048ded soc: st: stm32: add stm32n6 series
Add STM32N6 series

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2025-01-28 18:14:45 +01:00
Ali Hozhabri
e4389a2921 soc: st: stm32wb0x: Increase main stack size for BLE applications
Increase the size of the main stack for BLE applications to avoid
stack overflow on STM32WB0x series. Beacon sample was considered as
a reference for the size increase.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2025-01-22 15:50:41 +01:00
Mathieu Choplain
db8a47a2ec soc: stm32wb0: replace SYS_INIT with early init hook
STM32WB0 series was missed when SoC initialization code was migrated
from SYS_INIT routines to the new soc_early_init_hook method
(c.f. commit c6a03606c2)

Update that series' initialization code to align it with all others.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-01-15 15:05:23 +01:00
Fabian Blatz
910ec595a0 boards: stm32h7b3i_dk: Move LV_DRAW_DMA2D_HAL_INCLUDE to the soc
Moves the LV_DRAW_DMA2D_HAL_INCLUDE to the soc instead of the development
kit since the hal include is the same across all boards using the soc.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-01-08 23:49:52 +01:00
Grzegorz Runc
9fcb17400b soc: stm32: add support for stm32h757
Add support for STM32H757 SoC, which shares its design
with STM32H747 with added cryptography peripherals.

Signed-off-by: Grzegorz Runc <g.runc@grinn-global.com>
2025-01-06 17:12:55 +00:00
Fabio Baltieri
d532d58316 Revert "soc: st: warn if running with debug on sleep enabled"
This reverts commit b33b3b17f7, turns out
it's causing issues in CI all over the place, the condition needs more
thinking.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-22 18:19:49 +00:00
Fabrice DJIATSA
12703bf633 soc: st: stm32: add soc for stm32c071
select soc for stm32c071 and irq configuration

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-12-20 12:37:00 +01:00
Fabio Baltieri
b33b3b17f7 soc: st: warn if running with debug on sleep enabled
Add a compiler warning when building for an STM32 series MCU with PM
enabled but STM32_ENABLE_DEBUG_SLEEP_STOP=y. That option greatly
increases the power consumption during sleep, which is probably
undesirable when building with PM=y, and it can be activated silently
as a side effect of other options (namely RTT) making it tricky to find
out.

Add a warning to expose the situation.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-20 00:50:10 +01:00
Samuel Coleman
5a93b27aa9 soc: st: stm32: common: fix wakeup off-by-one.
Wakeup pin indices are 1-based, but `LISTIFY` is 0-based. Consequently, the
last element of the pin-to-register-bit lookup table was never populated.

Signed-off-by: Samuel Coleman <samuel.coleman@rbr-global.com>
2024-12-19 17:37:11 +01:00
Fabrice DJIATSA
c666c4db1b soc: st: stm32: stm32g0x: add soc configs for i2c shared irq
check if multiples UART instances with same irq are enabled
at same time then enable shared_interrupt handler.

set the default value of SHARED_IRQ_MAX_NUM_CLIENTS config if
we have more than 2 usarts instances enabled.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2024-12-03 10:16:55 +01:00
Jonny Gellhaar
9bb5d1e784 soc: stm32wb: fix ble low-power
Release HSI CLK48 semaphore when going to sleep to allow C2 (M0)
core to start and stop clock as needed while C1 core is not running.

CLK48 is shared between RNG and USB. RNG is needed by M0 during BLE
advertisement. If semaphore is locked, C2 core can start it when it
needs to but not stop it.

Fixes zephyrproject-rtos#69955.

Signed-off-by: Jonny Gellhaar <jonny.gellhaar@prevas.se>
2024-11-29 11:45:20 +01:00
Ali Hozhabri
b2d4c2e2b1 soc: stm32: stm32wb0x: Disable BT_AUTO_PHY_UPDATE & BT_AUTO_DATA_LEN_UPDATE
Put the default value for BT_AUTO_PHY_UPDATE and BT_AUTO_DATA_LEN_UPDATE
to "n" at SOC level since they cause "controller busy" due to starting
several parallel BLE procedures during connection by
"perform_auto_initiated_procedures" function. At the moment, ST controller
does not support parallelism, i.e. host should not initiate a new procedure
before previous one is completed.

Disable CONFIG_BT_HCI_ACL_FLOW_CONTROL at SOC level.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Ali Hozhabri
c8d034cf0b soc: stm32: stm32wb0x: Dedicate RAM section for BLE part
Dedicate RAM section on STM32WB0x for BLE part based on the number
of radio tasks and device type.

Signed-off-by: Ali Hozhabri <ali.hozhabri@st.com>
2024-11-25 14:42:54 +01:00
Jamie McCrae
2f800cea8f soc: Remove re-defining some defined types
Removes re-defining some Kconfigs that are already defined
e.g. in arch

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-11-18 07:41:23 -05:00
Francois Ramu
f781d7a26f soc: st: stm32U5/L5 series also have SWO line
Add the SWO trace output to the stm32H5/H7RS/L5/U5/WB series

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-11-07 18:05:07 -06:00
Alessandro Manganaro
4b4bba4fa4 soc: st: stm32: stm32wbax: STM32WBA Cube 1.4.1 integration
Removed unnecessary pure HAL stm32 functions

Headers cleanup

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-10-27 01:08:47 +02:00
Alessandro Manganaro
13f1200e77 soc: st: stm32: stm32wbax: Files renaming
Files renaming done to better isolate zephyr related
functions from stm32 hal related functions

Signed-off-by: Alessandro Manganaro <alessandro.manganaro@st.com>
2024-10-27 01:08:47 +02:00
Mathieu Choplain
51412b5875 soc: st: stm32wb0: make SMPS mode visible to drivers
Make the SMPS_MODE define visible from drivers by moving it to soc.h

This define is for example used by the ADC driver to determine if sampling
should be synchronized with the SMPS clock.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2024-10-27 01:08:25 +02:00
Francois Ramu
48a2aedb78 soc: st: stm32h7rs serie requires specific power rails
Enables the XSPIM2 rail when using GPIO bank N
Enables the XSPIM1 rail when using GPIO bank O or P
Enables the USBvoltage detector when using the GPIO M

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-10-11 13:16:43 -04:00