Condition NPU configuration to NPU_PRESENT directive from the STM32 HAL
to prevent build errors when targeting a STM32N6xx series that do not
implement the NPU.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Do not enforce enabling of CONFIG_TRUSTED_EXECUTION_SECURE for
stm32n6x SoC series. This prepare support for non-secure Zephyr
application on related platforms.
This change requires that all board defconfig files running application
in secure state need to explicitly enable TRUSTED_EXECUTION_SECURE
since it is indirectly expected by STM32 HAL for embedding resources
related to security features as SAU support and RIF firmware configuration
functions.
Update migration guide accordingly.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Change stm32n6xx SoCs DTSI files to ease how a board can use the
secure or non-secure IOMEM and internal SRAMs address ranges depending
on whether the Zephyr application runs in secure or non-secure
world. This relies on use of the ranges DT property.
By default, the existing stm32n6xx SoC DTSI files define the secure
address mapping as prior this change, hence no functional changes.
Boards/platforms embedding a stm32n657X0 compliant SoC and expecting
to run in non-secure world can apply use the standard SoC DTSI file
and apply last stm32n657X0_ns.dtsi overlay file to select the non-secure
mapping address ranges.
For this purpose, use ranges DT properties and a node level for
peripherals and SRAMs:
- Insert axisram12@24000000 node level for the AXI SRAM1 and SRAM2 nodes
with a ranges property to define the address range of these
internal RAMS.
- Add a ranges property in ramcfg@* nodes to define the address ranges
for the AXI SRAMs they each define.
- Insert peripherals@40000000 node level with a ranges property for the
peripherals in soc node and its subnode to define the address ranges
applied.
Update stm32n6x ram_check.ld linker script to consider address ranges
instead of the reg property raw value.
Update the HAL reference that bring pinctrl DTSI files that must be
consistent with the SoC DTSI files regarding pinctrl node path change.
Sync on a MCUboot repo change to consider ranges in stm32n6 memory DT
node properties.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Perform iosync configuration in the common stm32_gpioport_configure_pin()
function instead of doing it from the pinctrl driver. This simplifies the
pinctrl driver and also opens the door to iosync configuration using the
GPIO API (via vendor-specific extensions) in the future.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Implement a device driver for XSPI manager.
This allows to define the xspi controllers configuration that should
be applied towards the xspi IO ports:
- Muxed
- Swapped
- ...
Since its configuration has impact on final application location and
implies the deactivation of xspi clocks, it should be run only at fsbl
stage and not later.
Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
Check if PWR_STOP3_SUPPORT is defined because if it is
SRAM1 does not support page-granular retention (pages 2–7).
Signed-off-by: Julien Racki <julien.racki-ext@st.com>
1. Keep drivers/timer/cortex_m_systick.h as a compatibility
shim for legacy Cortex-M-specific names.
2. Switch to use the generic low-power companion timer API
for the Cortex-M SysTick driver.
3. Mark the global CORTEX_M_SYSTICK_LPM_* kconfig options
as 'DEPRECATED' and replace them with SYSTEM_TIMER_LPM_*
4. Rename 'zephyr,cortex-m-idle-timer' to
'zephyr,system-timer-companion'
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Some test failed because of orphaned section caused by missing
sections. This fixes the issue by including common-noinit.ld.
Signed-off-by: Marek Matej <marek.matej@espressif.com>
Add the MPU entry representing ROM region.
This configuration is incompatible with
`CONFIG_NULL_POINTER_EXCEPTION_DETECTION_MPU`. The first 32 bytes
of ROM contains some read-only data used by certain ROM functions.
Enabling this can break some ROM functions.
Refer to: https://github.com/raspberrypi/pico-bootrom-rp2350
Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
Add the MPU entry representing ROM region.
This configuration is incompatible with
`CONFIG_NULL_POINTER_EXCEPTION_DETECTION_MPU`. The first 256 bytes
of ROM contains some read-only data used by certain ROM functions.
Enabling this can break some ROM functions.
Refer to: https://github.com/raspberrypi/pico-bootrom-rp2040
Signed-off-by: Andy Lin <andylinpersonal@gmail.com>
Wrap the picotool sign command (requires recent picotool) to build
signed ELF files (which can be later converted to UF2 as well).
The resulting files boot, yet this has not been tested with actual
Secure Boot yet.
Signed-off-by: Dmitrii Sharshakov <d3dx12.xx@gmail.com>
Add SoC-level support for the ESP32-C5, Espressif's first dual-band
Wi-Fi 6 SoC with a RISC-V core clocked up to 240 MHz and 384 KB SRAM.
The ESP32-C5 uses a CLIC interrupt controller (not PLIC like ESP32-C6).
CLIC requires special handling for mret to restore mintstatus.mil from
mcause.mpil: bit 31 (interrupt flag) must be set in mcause before mret,
otherwise mil is not restored and interrupts at the same level are
permanently blocked. This is handled via RISCV_SOC_CONTEXT_SAVE with
mcause and mintthresh save/restore in soc_irq.S, following the same
pattern used by GD32VF103 (Nuclei ECLIC) and Nordic VPR.
The systimer on ESP32-C5 always runs at 16 MHz regardless of the XTAL
frequency (40 or 48 MHz), which requires a SoC-specific override for
SYS_CLOCK_HW_CYCLES_PER_SEC.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Add timer subnodes under the MAX32657 Wake‑up Timer device nodes to
enable system timer configuration in devicetree.
Also set default SYS_CLOCK_TICKS_PER_SECOND to 8192 if Wake-up Timer is
selected as system timer.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
Add platform shims, FreeRTOS compatibility layer, and linker scripts
to support the BL702 on-chip BLE controller binary blob under Zephyr.
The BLE blob expects a FreeRTOS environment and vendor HAL functions.
This commit provides:
- FreeRTOS API shim (xTaskCreate, xQueueGenericSend, pvPortMalloc,
etc.) mapping to Zephyr kernel primitives (k_thread, k_msgq,
k_malloc)
- Platform shims for bl_irq_*, bl_timer_*, BL702_Delay_*, GLB_*,
and UART stub functions the blob references
- RF calibration callbacks required by libbl702_rf.a
- Linker scripts placing BLE/FreeRTOS ROM writable data regions and
__global_pointer$ for GP-relative addressing from ROM code
- ROM function address table (PROVIDE symbols) as fallback for
un-shimmed FreeRTOS functions
- HAL module CMakeLists selecting controller library variant and
linking BLE/RF blobs
- Exchange memory configuration (8KB) when BLE is enabled
- RISCV_NO_MTVAL_ON_FP_TRAP selection for FPU trap handling
Signed-off-by: William Markezana <william.markezana@gmail.com>
If runtime power management is enabled for idle mode timer, it must be
explicitly resumed after waking up from suspend-to-RAM modes. Call
pm_device_runtime_put() before suspending to decrement the usage counter
so that pm_device_runtime_resume() can successfully resume the device
after wake up.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
The MPC is currently set up to allow R,W,X,Priv access to all RAM
and MRAM for all cores. This is not sufficient if CONFIG_USERSPACE
is enabled, in which case the application core will be accessing
memory unprivileged, using the MPU to manage memory access.
Update MPC configuration to allow R,W,X,Unpriv access to all RAM and
MRAM for all cores. The R,W,X MPC configuration has to be applied
regardless of CONFIG_USERSPACE, so no need to conditionally include
the MPU configuration based in CONFIG_USERSPACE.
Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
Travis Lam <travis.lam@nordicsemi.no>
Enable UART_NS16550_TI_K3 driver by default for AM6X A53 cores.
This ensures the TI K3 specific UART variant is used on A53 cores,
matching the configuration already enabled for M4 and R5 cores.
Signed-off-by: Soumya Tripathy <s-tripathy@ti.com>
definition of KConfigs STM32WBA_LL_THREAD_STACK_SIZE,
STM32WBA_BLE_CTLR_THREAD_STACK_SIZE, STM32WBA_LL_THREAD_PRIO,
and STM32WBA_BLE_CTLR_THREAD_PRIO to confige the
threads dedicated to BLE Controller and Link Layer
process.
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Ble host and link layer threads initialization is no more done
during the system initialization.
Add stm32wba_ble_ctlr_thread_init() and
stm32wba_ll_ctlr_thread_init() functions calls
during ble and ieee802.15.4 driver initialization
Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Add missing header file in stm32l1x poweroff.c drivers to get
stm32_enter_poweroff() and LL_DBGMCU_DisableDBGStandbyMode() declared.
Remove inclusion of stm32_ll_cortex.h that is not needed.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The image array entry in the boot container had incorrect values for
offset, size, and load_addr fields, preventing use with NXP Secure
Provisioning Tool (SPT).
The offset was calculated as -1 * CONFIG_IMAGE_CONTAINER_OFFSET
(0xFFFFF000) instead of CONFIG_CONTAINER_USER_IMAGE_OFFSET (0xA000).
The size and load_addr fields did not account for the header region.
These fields now correctly reflect the flash layout with container
at 0x1000 and application code at 0xB000.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
- Define the HCI node in the SoC series' dtsi.
- Adjust main thread stack sizes and buffer counts required
for Blutooth operation.
Signed-off-by: Zhiyuan Tang <zhiyuan_tang@realsil.com.cn>
The RXv2 and RXv3 core support FPU in CPU.
This enable FPU instruction build for the RX140, RX261 and RX26T
Signed-off-by: Duy Nguyen <duy.nguyen.xa@renesas.com>
esp_restart_noos() and esp_system_reset_modules_on_exit() disable the
flash cache before resetting the CPU. Without proper IRAM placement,
these functions remain in flash. After Cache_Disable_Cache() returns,
the CPU attempts to fetch the next instruction from flash-mapped
memory which is no longer accessible, causing a CPU_LOCKUP on SoCs
where cache invalidation is immediate.
Add linker entries to place esp_restart_noos,
esp_system_reset_modules_on_exit (and esp_restart_noos_dig for ESP32)
in IRAM text and DRAM rodata sections across all Espressif SoCs.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Since the enum validation for load-capacitance-femtofarad was removed
from the DTS binding, add a BUILD_ASSERT to ensure the provided value
is within the valid range (3000-18000 fF) at compile time.
Signed-off-by: Jakub Zymelka <jakub.zymelka@nordicsemi.no>
Add SoC support for the Bouffalo Lab BL70XL series (BL702L, BL704L).
RISC-V E24 core with CLIC interrupt controller, L1 cache, FPU, and
XIP flash execution.
Includes SoC initialization (CLIC clear, HBN/PDS fastboot flag clear,
SEAM config), system reboot, Kconfig for two SoC variants
(BL702L10Q2I, BL704L22Q2H), soc.yml entries, and e24 common code
inclusion.
Signed-off-by: William Markezana <william.markezana@gmail.com>
In the current implementation the platforms samd20/21 and samr21 can
only use an external crystal or clock to drive RTC. This enable the
possibility to select the internal OSC32K as an alternative for low
cost boards that don't use an external 32.768 kHz source.
Fixes#102352
Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
This is necessary for ADC to control GPIO analog multiplexes,
when GPIOs are set as secure (by default).
Signed-off-by: Adam BERLINGER <adam.berlinger@st.com>
Add the new stm32h5e4/5 and stm32h5f4/5 devices of the stm32H5 family
with 4MB of flash and Arm® Cortex®-M33 core.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
Rename SOC_XILINX_XC7Z* Kconfig symbols to SOC_XC7Z* to align
with HWMv2 guidelines. The SOC Kconfig symbol name must match
the uppercase version of the SOC name defined in soc.yml.
Before: config SOC_XILINX_XC7Z010 with default "xc7z010"
After: config SOC_XC7Z010 with default "xc7z010"
This allows CI checks to detect typos and enables future
auto-generation of SOC_* symbols from soc.yml files.
Updated files:
- soc/xlnx/zynq7000/xc7zxxx/Kconfig.soc
- soc/xlnx/zynq7000/xc7zxxxs/Kconfig.soc
- boards/digilent/zybo/Kconfig.zybo
- boards/qemu/cortex_a9/Kconfig.qemu_cortex_a9
Fixes: #69317
Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>
The nodelabels do not have any relation to the Nordic MDK and can be
named differently between SoCs.
Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
This commit addresses two issues during ISR restoration:
1. Support IRQ_DIRECT_CONNECT: Compare the current RAM vector table
against Zephyr's initial flash vector table (`_vector_start`)
instead of hardcoding `_isr_wrapper`. This correctly identifies
ROM-patched ISRs without falsely overriding Zephyr direct ISRs.
2. Prevent race conditions: Add `irq_lock()` and reorder
`NVIC_EnableIRQ` to safely handle driver interrupts that might
already be active during late initialization.
Note: There is a known limitation with this approach. If a user
registers a direct ISR on an IRQ that the ROM also registers, the
ROM's ISR will take precedence. However, this overlap is practically
rare as users do not typically override ROM-owned interrupts.
Signed-off-by: Zhiyuan Tang <zhiyuan_tang@realsil.com.cn>