One Kconfig symbol per SoC was enough while every cluster in the family was
an Xtensa audio DSP. These dies also carry Arm clusters, so configuration
has to attach per cluster rather than per SoC.
Give every cluster its own symbol, with SOC_<soc>_<cluster> selecting
SOC_<soc>. The per-SoC symbols move out of the family Kconfig.soc into one
file per SoC, sourced with rsource, and the audio DSP defaults move
alongside them into Kconfig.defconfig.<soc>_adsp. The boards select the
cluster symbol in the same commit, since the bare SoC symbols stop being
selectable targets.
No functional change: all five DSP targets produce byte-identical images.
Signed-off-by: Aary Patil <aary.patil@mediatek.com>
soc/mediatek/mt8xxx/ held each SoC's files flat, which only worked while
every SoC exposed one cluster. These dies also carry Arm clusters, and
SOC_LINKER_SCRIPT cannot name a linker.ld once two share a directory.
Push each SoC's files into an adsp/ subdirectory, leaving room for an a55/
counterpart alongside. Almost pure movement: the linker.ld and soc.h
shims gain one level of "../", and the two cpuclk.c files are reformatted,
since compliance treats a moved file as entirely added lines.
Signed-off-by: Aary Patil <aary.patil@mediatek.com>
soc.yml names this family mt8xxx, so the hardware model v2 symbol for it is
SOC_FAMILY_MT8XXX. The tree used SOC_FAMILY_MTK, which names no family
present in soc.yml, and never set the SOC_FAMILY string at all.
Rename the symbol and add the missing default. No functional change: the
only references are inside soc/mediatek and the two audio DSP driver
Kconfig files.
Signed-off-by: Aary Patil <aary.patil@mediatek.com>
CONFIG_CBPRINTF_CONVERT_CHECK_PTR is by default enabled and allows to
detect use of %p with char pointer in logging macros. It's benefitial
but takes >650 bytes of code and VPR cores have little memory.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
The RT11xx SoC series unconditionally sourced the generic
soc/nxp/imxrt/mpu_regions.c fallback MPU table. A board that ships its
own static MPU region table (guarded by
CONFIG_BOARD_NXP_SPECIFIC_MPU_SETTINGS) would then link two
mpu_config definitions and fail.
Gate the generic table on CONFIG_ARM_MPU AND NOT
CONFIG_BOARD_NXP_SPECIFIC_MPU_SETTINGS so board-specific tables replace
the fallback cleanly. Cores and boards without a board table (cm4,
vmu_rt1170) keep using the generic file unchanged.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Add PSA Crypto driver for HSE devices. Use the PSA Crypto dispatch
layer from hal_silabs when the driver is enabled.
The driver is enabled by default if the `se` or `symcrypto` nodes
are enabled in devicetree.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
Only take the crypto mutex once the library takes ownership
of the hardware. Previously, the mutex could be held indefinitely
if the subsequent crypto call was rejected (e.g. due to invalid
parameters) before calling into the library. By taking the mutex
in the library acquire function, it is guaranteed to be released
by the library release function.
Make the fact that yield shouldn't be used on LPWAES explicit.
Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
The 5 GHz gate used a soc capability defined only by the HAL.
Add it to the esp32c5 caps, the only part that has it, under
the SOC_ESP32 prefix the soc folder uses.
Read the modem sleep frequency from the HAL as well, dropping
a second option that the HAL provided.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Wire the STM32WBA PM implementation to the new feature of the
PWRC Wake-up Controller module to trigger GPIO callbacks corresponding
to wake-up pins after resuming from S2RAM sleep.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
In some low-power states such as STANDBY on STM32WBA series, the GPIO
port controllers are not active and cannot detect interrupts to wake-up
the SoC (or just trigger a software callback). On the other hand, the
Power Controller (PWRC) remains active in all states and can monitor
specific "wake-up pins" for wake-up events: a rising OR falling edge.
When a wake-up event occurs, PWRC will set a (usually per-pin) flag in
a register and initiate the low-power state exit procedure.
Since regular GPIO interrupts are also edge-triggered, a wake-up event
on a pin should be treated as a GPIO interrupt, but this is not handled
by the hardware; however, it is possible to emulate this in software by
looking at which wake-up pins an event has occurred on, and calling the
registered GPIO callbacks for these pins manually.
Implement the logic to trigger GPIO callbacks based on wake-up events in
the PWRC Wake-up Controller module since it is generic:
- find the active wake-up flag(s)
- find the corresponding GPIO port and pin
- obtain the corresponding GPIO port controller device
- call gpio_fire_callback() as the GPIO driver would do
The function is not wired to any SoC's PM implementation yet; it should
be called from the pm_state_exit_post_ops() function which runs after
the system has been fully resumed (but before any thread gets the chance
to run).
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Rework the implementation of routine configure_wkup_line_source(), which
is renamed to set_wkup_line_source():
- make some assumptions about the register layout appear explicitly in
the code
- combine description split across two comments into a single one before
the function, shorten it and improve wording.
- gate function behind #if HAS_MUXED_WKUP_LINES
This rework will allow a cleaner introduction of the get() counterpart
of this function which will be needed for IRQ dispatching.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Instead of being a function-specific static, move the wake-up pins table
to file level so it can be accessed from other functions. This will be
used to implement GPIO interrupt dispatch.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The function exported by this module was branded as `gpioport` and its
signature was in `stm32_gpio_shared.h`, even though the function can
work with all GPIO port controllers disabled since it only operates
on PWRC registers.
Rebrand the function as `pwrc` instead of `gpioport` and move it to the
`stm32_common.h` header instead, for lack of a better location...
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Create a dedicated Kconfig option which controls compilation of the
STM32 GPIO port manager module, and select this option explicitly in
the Kconfig for the STM32 GPIO and PINCTRL drivers which require this
module.
This replaces the previous approach where the SoC common CMakeLists
would add the GPIO port manage module to the build automatically if
either of the STM32 GPIO or PINCTRL module was enabled; an explicit
select at Kconfig level makes the dependency more visible.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
esp_appcpu_image_load() bounds-checked the appcpu iram
segment and the entry point with esp_ptr_in_iram(), which
tests against SOC_IRAM_HIGH. That is the ceiling of the
SRAM0 instruction view and it falls inside SRAM1, below
where the appcpu image is placed, so the loader aborted
before starting the appcpu unless
CONFIG_ESP_APPCPU_DRAM_SIZE was inflated far past what the
appcpu application needs.
A valid placement can also cross that ceiling, which no
single esp_ptr_in_*() helper covers, so test the range from
SOC_IRAM_LOW to SOC_DIRAM_IRAM_HIGH instead. Placements
reaching below SOC_IRAM_LOW stay rejected, as they fall
into the SRAM0 cache area. The dram check already uses a
range that spans SRAM1 and is left alone.
The esp32s3 loader needs no equivalent change: there
SOC_IRAM_HIGH equals SOC_DIRAM_IRAM_HIGH, so the appcpu
placement always passes.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The appcpu area sizes were gated on
CONFIG_SOC_ESP32S3_APPCPU, which is only set on the appcpu
image's own build. On the procpu image APPCPU_SRAM_SIZE and
APPCPU_ROM_SIZE resolved to 0, so every subtraction meant
to keep the procpu regions clear of the appcpu was a no-op:
iram, dram, irom and drom all covered the areas the
bootloader loads and maps the appcpu image into. Gate them
on CONFIG_SOC_ENABLE_APPCPU instead, which is set on both
images of a pair.
The same branch redefines DRAM_USER_END to the start of the
IPC shared memory, which the procpu image did not evaluate
before. Its DRAM ceiling therefore drops from the end of
the shared buffers to the start of ipmmem0, 18180 bytes
lower, and the heap shrinks with it. That is intended: the
old ceiling let the procpu place data over the ipmmem0,
shm0, ipm0 and mbox0 windows the pair communicates
through, and the two images disagreed on where user DRAM
ended.
A procpu image that grew into any of those bytes shared
them with the running appcpu. Such an image now fails to
link instead, which is the intended behaviour. Non-AMP
builds keep the sizes at 0 and are unaffected.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
APPCPU_IRAM_SIZE and APPCPU_DRAM_SIZE were gated on
CONFIG_SOC_ESP32_APPCPU, which is only set on the appcpu
image's own build. On the procpu image both resolved to 0,
so the APPCPU_SRAM_SIZE subtraction that keeps iram0_0_seg
clear of the appcpu was a no-op and the region covered the
memory the bootloader loads the appcpu image into. Gate
them on CONFIG_SOC_ENABLE_APPCPU instead, which is set on
both images of a pair.
The appcpu dram segment also has to be carved out of
dram1_0_seg, which started at the very address the
bootloader loads it to. Its iram segment lands in SRAM0
rather than SRAM1, so only APPCPU_DRAM_SIZE is subtracted
there.
Without this a procpu image whose static data or heap
reaches into dram1_0_seg shares those bytes with the
running appcpu. Non-AMP builds keep APPCPU_SRAM_SIZE at 0
and are unaffected.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The Zephyr memory region with nodelabel `pm_s2ram` contains the S2RAM
context and must be preserved. Make sure the SoC-specific code for
STM32WBA series accounts for it when configuring which SRAM pages
(or banks) should be preserved in addition to the Zephyr SRAM itself.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Enable the dma2d node in the stm32l4r9i_disco board and allow
enabling it from within LVGL by setting LV_USE_DRAW_DMA2D=y
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Enable the dma2d node in the stm32f769i_disco board and allow
enabling it from within LVGL by setting LV_USE_DRAW_DMA2D=y
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Enable the dma2d node in the stm32h7s78_dk board and allow
enabling it from within LVGL by setting LV_USE_DRAW_DMA2D=y
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Enable the dma2d node in the stm32u5g9j_dk2 board and allow
enabling it from within LVGL by setting LV_USE_DRAW_DMA2D=y
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Enable the dma2d node in the stm32f429i_disc1 board and allow
enabling it from within LVGL by setting LV_USE_DRAW_DMA2D=y
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Update the west yaml to point to the new LVGL version.
Fix the Kconfig symbol deprecation around color formatting/depth
in all boards/shields.
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
soc_crypto.c includes sli_sxsymcrypt.h, whose include path hal_silabs
adds only with CONFIG_SILABS_SISDK_PROTOCOL_CRYPTO, but it was also
built with CONFIG_MBEDTLS. Series 3 builds with mbed TLS and without
the radio crypto failed, e.g. crypto.secp256r1.mbedtls on
sixg301_rb4407a. The radio crypto glue is the driver's only user.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
The SYSTEM_MANAGER MMU region is mapped with MT_P_RW_U_RW, giving
userspace direct read/write access to the system manager peripheral.
This looks like a copy/paste mistake from other boards and is not
appropriate for a peripheral of this kind. Change it to MT_P_RW_U_NA
so only the kernel can access it.
Signed-off-by: Muhammad Waleed Badar <muhammadx.waleedbadar@altera.com>
The Cortex-M55's branch cache is disabled upon reset. Enable it during
SoC initialization to gain some performance. A Kconfig gate is provided
to keep the old behavior (i.e., disabled) for scenarios where enabling
it could make performance worse.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The dedicated DLM region is shared by hardware crypto
algorithms (SHA, RSA...etc), rather than being used
exclusively by SHA-256. Therefore, this change renames
`SOC_IT51XXX_SHA256_HW_ACCELERATE` to
`SOC_IT51XXX_HW_CRYPTO_ACCELERATE`.
Signed-off-by: Ren Chen <Ren.Chen@ite.com.tw>
esp32s2 and esp32s3 are windowed-ABI Xtensa cores and can use the
generic Xtensa unwinder, but neither implemented the SoC
validation hooks, so the weak stubs accepted any pointer as sane
and the option was never implied.
Move the checks to a single file under common, built by every
Xtensa target and by both core variants of the dual core ones, so
the second core validates pointers too, and imply the option on
esp32s2 and esp32s3. The shared version also accepts external RAM
stacks, which esp_stack_ptr_is_sane() does not do in this build,
and runs from iram. Both are new for esp32.
Verified on hardware: a four-deep fault unwinds to z_thread_entry
on esp32, esp32s2 and esp32s3, and on an esp32s3 with octal psram
a fault on a psram stack unwinds instead of reporting CORRUPTED.
Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
The MCXA and MCXN SoC devicetrees are about to declare a power domain node
for the CORE domain, and a device that names it in power-domains takes a
reference to the domain's device object. That object only exists if the
power domain driver is built, so a devicetree that names the domain and a
configuration that leaves CONFIG_POWER_DOMAIN off do not link.
Default it on wherever device PM is on. It costs nothing when nothing needs
it: the domain node follows &deeppowerdown, which the SoC devicetree leaves
disabled, and PM_STATE_FROM_DT skips power states that are not okay, so the
domain has an empty state list and never acts until an application enables
Deep Power Down.
The devices on the domain are resumed from the idle thread, and one that
reconfigures and recalibrates its hardware from its TURN_ON handler needs
more stack than the 256 to 320 bytes an Arm target gets by default.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Every low-power state these SoCs offer gates the core clock, and with it
SysTick, so a sleep only ends if timekeeping has been handed over to the
companion timer the devicetree names in
/chosen/zephyr,system-timer-companion. That timer is driven through the
Counter API, which nothing in a PM build selects, and
CONFIG_SYSTEM_TIMER_LPM_COMPANION_COUNTER depends on it: without
CONFIG_COUNTER the companion choice falls back to none with no warning, the
kernel keeps arming a SysTick that has stopped, and the first sleep deeper
than idle never returns.
Default the Counter API on when a companion is chosen, so a board that
names one gets a working PM build from CONFIG_PM alone.
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Add SOC_MCXN546, SOC_MCXN946 and SOC_MCXN235 Kconfig/soc.yml entries
for these real MCXN silicon parts, which previously had no Zephyr
representation. Give each a composer dtsi overriding flash/SRAM sizes
over its series file, and give mcxn547, mcxn947 and mcxn236 the same
per-part composer dtsi treatment (previously included the generic
series file directly), pointing their boards at the new files.
Validated by building affected boards and confirming expected FLASH
and RAM region sizes.
Signed-off-by: Wei Feng <wei.feng_5@nxp.com>
Before NPCX4, two deep sleep sub-states have to be listed in
cpu-power-states because the 'Instant' wake-up path is only valid for
a residency shorter than 200 ms:
- suspend_to_idle0: Deep Sleep with 'Instant' wake-up
- suspend_to_idle1: Deep Sleep with 'Standard' wake-up
The PM policy picks between them from the min-residency-us property,
so a sleep the kernel expects to last longer than 200 ms falls back to
the standard wake-up sub-state.
NPCX4 and later lift that restriction with PMCSR bit 4, reserved on
earlier series, so 'Instant' wake-up can be used for an unlimited
residency. Describe the capability with a new
"nuvoton,npcx-power-state" binding that extends "zephyr,power-state"
with an "unlimited-instant-wakeup" property, and pass it down to the
clock controller.
suspend_to_idle0 alone would therefore give the best power figures on
NPCX4.
However, erratum 2.21 prevents that when eSPI is in use: two eSPI
transactions issued shortly after the EC entered Deep Sleep with
instant wake-up can produce a CRC error. Boards with eSPI enabled
must select one of
- suspend_to_idle1: Deep Sleep with 'Standard' wake-up
- suspend_to_idle2: Sleep, added here, which keeps HFCLK running
so npcx4.dtsi keeps cpu-power-states at suspend_to_idle1 and leaves
the other two sub-states for boards to opt into.
Assisted-by: Copilot:claude-opus-5
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Add DeviceTree and Kconfig support for the STM32F401XB variant of
the STM32F4 series.
The STM32F401XB provides 128 KiB of flash and 64 KiB of SRAM.
Origin: Original
Signed-off-by: Rakesh Alasyam <alasyamrakesh77@gmail.com>
On CYW20829/CYW89829 B0 silicon the BLE controller boot switches CLK_HF0
onto the 48 MHz BLE ECO (ALTHF) path. The btstack-integration HCI layer
already restores CLK_HF0 to the 96 MHz FLL path on CY_BT_IPC_BOOT_FULLY_UP,
but that restore is guarded by COMPONENT_CYW20829B0 / COMPONENT_CYW89829B0,
which the build never defined. As a result the Cortex-M33 SysTick keeps
running at 48 MHz while the kernel still assumes
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC (96 MHz), so every k_sleep()/timeout
takes twice as long once Bluetooth is enabled.
Add SOC_CYW20829_B0 / SOC_CYW89829_B0 helper symbols that track the
B0-silicon MPNs, and define COMPONENT_CYW20829B0 / COMPONENT_CYW89829B0 as
private compile definitions on the hal_infineon library, next to the
btstack-integration sources that consume them, instead of as global
defines. This compiles in the existing HAL restore only for the library
that needs it, and only on B0 silicon. B1 silicon is not covered because
the HAL has no corresponding restore path.
Verified on CYW920829M2EVK-02: with Bluetooth enabled, a
k_sleep(K_SECONDS(5)) loop was spaced about 10 s apart before the change
and about 5 s apart after. Confirmed COMPONENT_CYW20829B0 reaches the
btstack-integration HCI source on a B0 build and is absent on a B1 build.
Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Deprecate the m33 and hazard3 cpucluster's Kconfigs and replace with
m33_0 and hazard3_0 cpuclusters. The m33 cpucluster will be removed
from the soc.yml in a later release to avoid breaking downstream boards.
Signed-off-by: Andrew Fantino <fantino@qti.qualcomm.com>
The rp2350 has 2 cores that can independently configured to use either
the Cortex-M33 or the Hazard3 cpu. The current m33 and hazard3 cpu
clusters do not conform to the hardware model v2.
The m33 and hazard3 cpucluster's Kconfigs will be deprecated and
replaced with m33_0 and hazard3_0 cpuclusters.
The m33 cpucluster will be removed from the soc.yml in a later release
to avoid breaking downstream boards.
Signed-off-by: Andrew Fantino <fantino@qti.qualcomm.com>
MCUboot's soc_early_init_hook() calls CLOCK_DeinitTddrRefClk() even when
not using Ethernet, which clears the TDDR_PDB bit and powers down the
TDDR PLL. When the application later boots and re-initializes Ethernet,
the NXP SDK's clock enable functions re-enable the peripheral clock
outputs but never re-set the PLL power-down-bypass bit.
Add an explicit write of the TDDR_PDB bit to PLL_CTRL before resetting
the ENET peripherals. This is a no-op on cold boot since the bit is
already set, but fixes Ethernet after any scenario where
CLOCK_DeinitTddrRefClk() was called (sysbuild).
Fixes: zephyrproject-rtos/zephyr#108399
Signed-off-by: Mike Szczys <michael.szczys@canonical.com>
Add the STM32MP135D device variant to the STM32MP13 SoC metadata and
Kconfig selection.
The STM32Cube MP13 HAL already provides the STM32MP135Dxx device header,
so this enables boards using that variant to select the matching CMSIS
device definition.
Signed-off-by: Aleksandr Dobkin <alex@dobk.in>
Assisted-by: ChatGPT:gpt-5.6-sol
XIP is a 'select' on SOC_SERIES_RP2040, so an application cannot turn it
off to be linked to run from RAM. MCUboot's RAM load mode sets
CONFIG_XIP=n for the application it boots, which ends up being silently
discarded. Nothing about the RP2040 requires execute in place, and XIP is
already 'imply' on SOC_SERIES_RP2350, changed from a 'select' in #97010.
An 'imply' still defaults XIP on, so existing configurations are
unaffected. Verified by building for rpi_pico under sysbuild with
MCUboot RAM load.
Signed-off-by: James Smith <james@loopj.com>
DYNAMIC_THREAD are enabled in case of using the DMA2D.
DYNAMIC_THREAD_POOL_SIZE defines the amount of stacks
which can be allocated dynamically. 1 is enough in case
of only using the DMA2D but is not enough when enabling as
well the GPU2D for which it should be increased to 2.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
dma2d is an HW block part of the SOC and as such should have its
DT node with status okay. However its usage depends on the
application request which can be use via the Kconfig
LV_USE_DRAW_DMA2D.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Update the Kconfig of LVGL and STM32 common in order to
enable the GPU2D HW whenever the NEMAGFX is necessary within
LVGL. Until now the GPU2D driver was always enabled as soon
as the gpu2d node is okay within the DT, leaving a potentially
unnecessary driver compiled in even if un-necessary.
Keep the STM32_NEOCHROM_GPU2D disabled by default even if
the node is okay within the DT and make LVGL select it whenever
LVGL is compiled with the NEMAGFX support.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This patch adds nxp_crypto_hal components and enables
PSA crypto HW acceleration for MCXA, MCXN and RW6xx family devices
Also increasing default stack size when SGI_PKC enabled.
test/crypto/psa must add boards config to override main prj.conf
Signed-off-by: Vit Solcik <vit.solcik@nxp.com>