Commit graph zephyr/soc
Author SHA1 Message Date
Sylvio Alves
ce9207e238 soc: espressif: add the esp32p4 ppa driver
Add a driver for the ESP32-P4 pixel processing accelerator, which
offloads solid fills, alpha blends and scale-rotate-mirror
operations from the processor through its 2D DMA channels.
Blocking and non-blocking transactions are both supported, and a
request the driver cannot express is rejected rather than run
with the wrong geometry.

The registers and the interrupt come from the devicetree node, so
the accelerator is described as hardware while the Kconfig option
only decides whether the code is built.

Assisted-by: Claude:opus-5
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2026-09-22 17:57:58 +02:00
Kate Wang
5700744c7a soc: nxp: mcxw7xx: configure MCXW72 TRDC at SoC init
Program the Trusted Resource Domain Controller (TRDC) to grant the host
CM33 access to every peripheral that device tree enables. Without this,
a future TRDC-locked Sentinel image would fault on the first access to
any LPUART, GPIO, or NBU register and prevent the kernel from booting.

TRDC access control is a property of the MCXW72 SoC, not of any board,
so run it from soc_early_init_hook() rather than a board hook. The MBC
and slave-memory layout differs per NPI, so the mcxw72_trdc.c source,
its soc.h prototype, and its call are guarded by CONFIG_SOC_MCXW727C.
This keeps the shared mcxw7xx soc.c untouched for MCXW70/MCXW71 and lets
every MCXW72 board (frdm_mcxw72, mcxw72_evk) inherit the configuration.
The fsl_trdc HAL driver it uses is pulled in by NXP_TRDC, defaulted on
for SOC_MCXW727C.

The NBU map at 0x4880_0000..0x489F_FFFF (Radio Flash/IFR, NBU CIU2,
FRO192M, RF FMU/CMC, LPTPM2, NBU SMU2) is guarded by the region checker
MRC0, not by an MBC, so add an MRC0 full-access region for it in
addition to the MBC block grants. Without it the host CM33 cannot reach
the NBU-boot and SMU2 shared-memory registers, which the MBC descriptors
alone never covered.

Grant the peripheral windows to the CM33 host domain only instead of to
all three domains, so the per-domain tables keep their intended
separation. The DAC then assigns every master (CM33, DMA3, data stream
buffer, Radio NBU) a domain, but preserves any valid boot-ROM (Sentinel)
assignment already present in the MDA registers and applies a fallback
DID only otherwise. The host grant domain is likewise read back from the
CM33 MDA register so the grants follow whatever domain the ROM chose.

Document in soc.c that soc_reset_hook and SystemInit() run before this
hook and already access SPC0 and WDOG0, so a TRDC-locked Sentinel must
pre-grant the minimal boot blocks (code flash, ECC TCM banks, SPC0,
WDOG0) before starting this image; the hook then opens the full
peripheral set the kernel and enabled drivers need.

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-09-22 17:53:45 +02:00
Kate Wang
b88f45e7fe modules: hal_nxp: rename TRDC Kconfig symbols to NXP_TRDC
Rename the TRDC HAL component gating symbols from TRDC_MCUX_TRDC and
TRDC_MCUX_TRDC_1 to NXP_TRDC and NXP_TRDC_1, and define them centrally
in modules/hal_nxp/mcux/Kconfig.mcux alongside the other MCUX_* driver
options (each with a help block, per the Kconfig style guide).

Migrate the existing users to the new symbols so no platform loses the
driver.trdc / driver.trdc_1 HAL component:
  - imxrt118x: TRDC_MCUX_TRDC   -> NXP_TRDC
  - imx93:     TRDC_MCUX_TRDC_1 -> NXP_TRDC_1

Signed-off-by: Kate Wang <yumeng.wang@nxp.com>
2026-09-22 17:53:45 +02:00
Neil Chen
bf674f6250 soc: nxp: mcx: mcxa: register mcxaxx7 derivative parts and packages
Register MCXA536/537/556/557/566/567/577/457/456/287/286 under the
existing mcxaxx7 series in Kconfig.soc.

Add the same parts to soc.yml's mcxaxx7 family and to the --erase/
--reset runner qualifier groups, so `west flash`/`west debug`/`west
erase`/`west reset` resolve correctly for each new SoC.

Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
2026-09-22 10:29:15 +02:00
Vincent Tardy
4ea9cedd81 soc: st: stm32wba: add PKA node for BLE ECC crypto
The ECC (P256 / ECDH) operations for BLE on STM32WBA devices are
based on the PKA Controller module (pka_ctrl), which requires
a PKA DTS node, instead of the legacy BLE PKA module.

Signed-off-by: Vincent Tardy <vincent.tardy@st.com>
Assisted-by: claude:haiku-4.5
2026-09-22 10:27:44 +02:00
Daniel Schultz
544e996f0e soc: aesc: hydrogen: Add Clock Controller to ElemRV-H
Add the clock controller and syscon to the Hydrogen platform.
Enable both by default and reduce the syscon priority to load
this driver before the clock controller.

Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
2026-09-22 08:57:27 +03:00
Daniel Schultz
91eb4fe62e soc: aesc: common: Add syscon table
Provide offsets at one central location to access syscon
registers.

Signed-off-by: Daniel Schultz <dnltz@aesc-silicon.de>
2026-09-22 08:57:27 +03:00
CHEN Xing
8ca2f5b704 soc: microchip: sam: sama7: sama7d6: update mmu for otpc
Update mmu region for otpc

Signed-off-by: CHEN Xing <xing.chen@microchip.com>
2026-09-22 08:57:23 +03:00
Krzysztof Chruściński
04a7bbad23 soc: nordic: common: gppi_ext_allocator: Defer to work queue
ICBMSG IPC service backend runs receive callback in the interrupt
context and when Ironside is used then GPPI connection allocation
and freeing requires communication with Ironside which is only
supported in the thread context. Defer connection allocation and
freeing to the thread context (system work queue).

Assisted-by: Claude:opus-5
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2026-09-21 16:28:19 -04:00
Jamie McCrae
64d8dbe48b kconfig: Fix formatting, correctly select DEPRECATED and have prompt
Fixes various issues with Kconfigs, including:
  - Redundent `default n` on bools
  - Not select deprecated on supposed deprecated symbols
  - Using the wrong indentation
  - Not having [DEPRECATED] in the prompt, or not having it at the
    end

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-09-21 16:27:52 -04:00
Raffael Rostagno
763b02cb94 soc: esp32: Increase idle thread stack with PM on
Going into light sleep runs a long call chain on the idle thread's
stack, and sleep code in it needs at least 680 bytes. The idle thread
gets 512 by default on RISC-V, so it overflows every time the system
sleeps: on ESP32-C5 the PMP stack guard catches this and the board
resets in a loop, elsewhere it silently overwrites whatever sits
below the stack.

Raise the default to 2048 bytes when PM is enabled.

Assisted-by: Claude:opus-5
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2026-09-21 16:27:41 -04:00
Kevin Gillespie
3bbb60316a soc: adi: max32657: Push and pop warm boot reserved memory
For MAX32657 revisions earlier than A3, ROM will use 8 bytes of SRAM
at address 0x3000a558. Use the stack to push those 8 bytes, then pop
once returned from S2RAM. Make sure we're not pushing to those 8 bytes.
Add dependency TRUSTED_EXECUTION_SECURE as a dependency for PM_S2RAM.

Signed-off-by: Kevin Gillespie <Kevin.Gillespie@analog.com>
2026-09-21 16:26:42 -04:00
Tony Han
c86a3cd1a8 soc: microchip: sam: update MMU for sama5d2 RTC
When RTC is activated in the DT, configure it's register region with
strong ordered, read and write access.

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-09-21 16:26:08 -04:00
Tony Han
9d621dd227 soc: microchip: sama5d2: fix PMC DT node label in MMU region
The MMU region for the PMC used the uppercase label PMC instead of
the correct lowercase label pmc, causing DT_NODE_HAS_STATUS_OKAY()
to silently evaluate to false and the PMC region to be omitted from
the MMU table.

There is no runtime impact because the PMC is not accessed after the
MMU is configured.

Fixes: 0443254b69 ("soc: microchip: sam: add new SoC sam5d2")

Signed-off-by: Tony Han <tony.han@microchip.com>
2026-09-21 16:26:08 -04:00
CHEN Xing
0e51a34bc1 soc: microchip: sam: sama7: sama7d65: Update soc.c for pit64b
Update sama7d65 soc.c file for pit64b counter driver.

Signed-off-by: CHEN Xing <xing.chen@microchip.com>
2026-09-21 16:25:34 -04:00
Aksel Skauge Mellbye
07d9cd3852 modules: hal_silabs: Add SE os integration
Implement abstraction layer to provide OS primitives to SE driver.

Signed-off-by: Aksel Skauge Mellbye <aksel.mellbye@silabs.com>
2026-09-21 11:26:13 +01:00
Mohamed Azhar
e31d2d9b41 soc: microchip: pic32cm_sg_gc: add pinctrl properties
Adds pinctrl properties for pic32cm_sg_gc soc family

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2026-09-21 11:25:38 +01:00
Mohamed Azhar
df4710114e soc: microchip: pic32cm_jh: add pinctrl properties
Adds pinctrl properties for pic32cm_jh soc family

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2026-09-21 11:25:38 +01:00
Mohamed Azhar
ef8f5be312 soc: microchip: pic32cx_sg: add pinctrl properties
Adds pinctrl properties for pic32cx_sg soc family

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2026-09-21 11:25:38 +01:00
Mohamed Azhar
5661b90344 soc: microchip: sam_d5x_e5x: add pinctrl properties
Adds pinctrl properties for sam_d5x_e5x soc family

Signed-off-by: Mohamed Azhar <mohamed.azhar@microchip.com>
2026-09-21 11:25:38 +01:00
Jérôme Pouiller
8af10c92ca soc: silabs: siwx91x: remove the PS4 requirement once, at NWP init
The host can't go to sleep until the NWP is initialized. So,
siwx91x_power_init() adds a PS4 requirement and this requirement is
removed from siwx91x_nwp_apply_power_profile().

However, this is confusing. The host PM policy is related to the NWP
initialization and is not related to the RF power profile. The current
code tends to mix both.

In addition, siwx91x_nwp_apply_power_profile() is called each time the
user changes the WiFi PS parameters. So,
sl_si91x_power_manager_remove_ps_requirement() is called again on a
requirement already removed. The power manager rejects the call with
SL_STATUS_INVALID_PARAMETER, which is silently ignored.

Relocate this call in siwx91x_nwp_init(), once the NWP is initialized.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Assisted-by: Claude:fable-5
2026-09-21 11:20:40 +01:00
Jérôme Pouiller
a8df91e4e0 soc: silabs: siwx91x: allow WiFi PS without CONFIG_PM
Until now, the wifi power save request was discarded if CONFIG_PM was not
set. It does not make sense since CONFIG_PM only impacts the host CPU (and
devices if we consider CONFIG_PM_DEVICE). The RF power profile of the NWP
is independent from the host power management.

Probably the condition was only here to avoid the call to
sl_si91x_power_manager_remove_ps_requirement() when CONFIG_PM is not set.

While revisiting the feature, we can notice data->power_profile was only
initialized at boot and never changed afterward. So, it has nothing to do
in the data structure. It provided the default profile applied during the
NWP initialization: ASSOCIATED_POWER_SAVE when WiFi or BLE is enabled,
DEEP_SLEEP_WITH_RAM_RETENTION otherwise. Hardcode these cases in
siwx91x_nwp_apply_power_profile().

The default WiFi profile is now HIGH_PERFORMANCE instead of
ASSOCIATED_POWER_SAVE. This is not a functional change: the WiFi driver
applies HIGH_PERFORMANCE on every association unless the user has
explicitly enabled the power save, and ASSOCIATED_POWER_SAVE has no
effect until the interface is associated. Power save has to be requested
explicitly by the user, whether CONFIG_PM is set or not.

The only observable difference is when CONFIG_PM is set with both WiFi
and BLE enabled: the coex profile is HIGH_PERFORMANCE from the boot,
while it was ASSOCIATED_POWER_SAVE until the first WiFi association. The
BLE power save now consistently follows the WiFi power save setting, as
imposed by the WiseConnect coex profile table.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Assisted-by: Claude:fable-5
2026-09-21 11:20:40 +01:00
Cristian Bulacu
6add9c587e soc: nxp: mcxw: Increase OpenThread init priority for mcxw70 platform
This commit aims to fix a HCI controller timeout assertion at boot when
mcxw70 platform is used with vendor radio implementation.
This behaviour is fixed by increasing the default OpenThread init
priority, 40, to match the IEEE driver one, 80.

Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
2026-09-21 09:43:18 +02:00
Yurii Lozynskyi
17110cae3f soc: infineon: psoc4: Add PSOC4000T SoC series support
Add devicetree sources, Kconfig, CMakeLists, and early-init source
for the Infineon PSOC4000T SoC series (CY8C4046LQI-T452), an
Arm Cortex-M0+ MCU with 64 KB flash and 8 KB SRAM.

Signed-off-by: Yurii Lozynskyi <Yurii.Lozynskyi-EE@infineon.com>
2026-09-21 09:40:15 +02:00
Jamie McCrae
47746503a3 soc: aspeed: Fix invalid usage of Kconfigs
Gets the clock speed from dts rather than a magic number, and
fixes invalid stack size configuration

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2026-09-18 13:55:18 +01:00
Anuj Deshpande
145263b2de soc: cdac: thejas32: default to the 16450 UART variant
The UART's FIFO-mode receive interrupts do not work on this SoC: with
FIFOs enabled, neither the receive trigger level nor the character
timeout raises an interrupt, so received data sits in the FIFO
unnoticed. Default to 16450 mode, where the received data available
interrupt fires for every character.

Signed-off-by: Anuj Deshpande <anuj@makerville.io>
2026-09-18 13:51:15 +01:00
Anuj Deshpande
7abe2f8851 soc: cdac: add C-DAC THEJAS32 SoC support
Add support for the C-DAC THEJAS32 SoC, based on the VEGA ET1031 32-bit
(RV32IM) single-core, in-order RISC-V processor developed under India's
Digital India RISC-V (DIR-V) programme.

The image is loaded into and executed from the 256 KB internal SRAM,
which is mapped at 0x00200000, so execute-in-place is not used. The
kernel system clock is driven by the CLINT machine timer.

THEJAS32 follows the RISC-V privileged specification for trap handling
but uses a custom (non-PLIC) interrupt controller, so the SoC does not
select RISCV_PRIVILEGED. Instead it provides its own reset entry, machine
trap acknowledge and interrupt-management code that routes second-level
interrupts to the THEJAS32 interrupt controller driver and first-level
interrupts to the mie CSR.

The memory map and register definitions were cross-checked against the
C-DAC VEGA board support package.

Signed-off-by: Anuj Deshpande <anuj@makerville.io>
2026-09-18 13:51:15 +01:00
Zhaoxiang Jin
e7e1d4bf67 soc: nxp: mcxn: make debug operation in low power modes configurable
MCXN unconditionally sets CMC DBGCTL[SOD] on every low power entry, which
shuts the debug logic off while the core is asleep. That is the right
default for power measurements, but it also drops the debug probe
connection, so a suspended target cannot be halted, inspected or
reflashed without a reset.

Add SOC_FAMILY_MCXN_DEBUG_IN_LOW_POWER to pick the other side of the
trade-off. It defaults to n, so the existing behavior is unchanged.

MCXA and MCXN are separate SoC families, each with its own power.c, so
the option is defined per family rather than once for the whole mcx
directory.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:18:20 +01:00
Zhaoxiang Jin
e6dee78ac2 soc: nxp: mcxa: make debug operation in low power modes configurable
MCXA unconditionally sets CMC DBGCTL[SOD] on every low power entry, which
shuts the debug logic off while the core is asleep. That is the right
default for power measurements, but it also drops the debug probe
connection, so a suspended target cannot be halted, inspected or
reflashed without a reset.

Add SOC_FAMILY_MCXA_DEBUG_IN_LOW_POWER to pick the other side of the
trade-off. It defaults to n, so the existing behavior is unchanged.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:18:20 +01:00
Michal Frankiewicz
1dba55166f drivers: Replace SOC dependent clock kconfig with feature oriented one
Replaced SOC dependent kconfigs CONFIG_SOC_SERIES_NRF54H,
CONFIG_SOC_SERIES_NRF92 with feature oriented
CONFIG_HAS_MULTI_OPTION_CLOCKS, in clock related drivers.

Signed-off-by: Michal Frankiewicz <michal.frankiewicz@nordicsemi.no>
2026-09-18 11:16:19 +01:00
Martin Hoff
5564e2689d soc: silabs: add SiWx91x devicetree clock report target
Add a dedicated clock_tree target and Python report script to dump resolved
SiWx91x clock topology from EDT for DTS review and debug.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Assisted-by: Cursor:Grok 4.5
2026-09-18 11:14:08 +01:00
Martin Hoff
ce00055aff soc: silabs: add SiWx91x clock shell diagnostics
Add the "silabs clocks" shell command and related build/test wiring to
inspect clock status and rate during bring-up and PM validation.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
Assisted-by: Cursor:Grok 4.5
2026-09-18 11:14:08 +01:00
Martin Hoff
1b928aeca6 soc: silabs: enable new clock managers
This commit enables the new clock managers by switching the device
tree to use the new bindings. It also moves some initialization code
from the old clock manager to soc_early_init_hook() since some clocks
configuration needs to be done before the clock drivers are initialized.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2026-09-18 11:14:08 +01:00
Martin Hoff
ddd51dbdab drivers: clock_control: add SiWx91x HP/ULP/AON clocks managers
Introduce dedicated clock-control drivers for HP, ULP and AON domains
plus the shared helper API used by consumers, and refresh helper
documentation to match the current DT wiring and ownership model.

Signed-off-by: Martin Hoff <martin.hoff@silabs.com>
2026-09-18 11:14:08 +01:00
Zhaoxiang Jin
11a20e129c soc: nxp: imxrt7xx: add cm33 poweroff integration and FDPD option
Make the Deep Power Down modes reachable from the standard API. Implement
z_sys_poweroff() on top of power_enter_deep_power_down(), compile it under
CONFIG_POWEROFF and select HAS_POWEROFF on both cm33 cores.

Add a "System power-off mode" choice so a board can pick Deep Power Down,
which keeps the VDD1V8_AON island alive, or Full Deep Power Down, which
turns off VDD1V8_PMC as well and leaves wake to the always-on RTC path.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
e78e3c836b soc: nxp: imxrt7xx: add cm33 deep power down support
Layer the poweroff modes onto the shared sequence. Both domains gain DPD
and FDPD power_mode_desc entries -- an empty request, so every resource
is voted down, and low_power_mode set to the one-way LP_DPD / LP_FDPD --
and a power_enter_deep_power_down() entry point.

power_commit() asserts the matching PDSLEEPCFG0 mode bit, and for DPD
additionally clears the DSR request bits in PDRUNCFG0 so a stale request
cannot leak into the cold-boot state. FDPD needs one more write: it
leaves the voltage references in high-power mode so that a rising VDD1V8
can wake the chip, which costs 85uA and makes FDPD -- the deeper of the
two modes -- draw more than plain DPD. Measured at the RT700-EVK SOC
supply, 381uA in FDPD against 330uA in DPD. No wake-up source here uses
that path, so POWERCFG[FDPDBGLP] puts the band gap in low-power mode
instead, which brings FDPD down to 216uA. The bit is cleared by every
cold reset, the FDPD wake-up included, so it has to be set on each entry
rather than once at init.

Extending enum low_power_mode with LP_DPD and LP_FDPD is what keeps the
sequence honest about these modes. They sort above the returning modes,
so power_mode_returns() is false for both: power_enter_common() stops at
the one-way exit instead of saving and restoring arch state, and
power_keepalive_collect() stops holding up the SLEEPCON rail for a mode
that never observes a wake-up event.

power_common.c is now shared between the PM and the poweroff paths, so
both CMakeLists gates widen to PM or POWEROFF, and the domain modules
split their contents three ways accordingly. That also means the file
must build without CONFIG_PM, where arch_pm_state_set_prepare() and
_finish() do not exist: the weak fallback in arch/common/pm.c and the
Cortex-M override in cortex_m/cpu_idle.c are both CONFIG_PM-gated.
Testing the descriptor flag at run time is not enough, since the
reference still has to resolve at link time, so those calls carry a
compile-time guard.

CONFIG_POWEROFF cannot be selected yet; the following commit adds
HAS_POWEROFF and the sys_poweroff() backend that reaches this code.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
f878ecfde0 soc: nxp: imxrt7xx: add cm33 pm_state_set integration
With both domains in place, connect them to the PM subsystem so the states
declared in devicetree can actually be entered.

pm_state_set() maps PM_STATE_RUNTIME_IDLE to a plain WFI with SLEEPDEEP
clear, PM_STATE_SUSPEND_TO_IDLE to deep sleep on either core, and
PM_STATE_STANDBY to DSR on the Compute domain only. DSR resets the OS
Timer, which therefore cannot wake the system; the system-timer low-power
companion armed by the timer driver owns wakeup instead
(CONFIG_SYSTEM_TIMER_RESET_BY_LPM). pm_state_exit_post_ops() has nothing
left to do, because power_enter_common() already restores the interrupt
state it changed.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
6634c5fbfe soc: nxp: imxrt7xx: add cm33 sense domain power modes
Supply the Sense core's half of the framework: the resource map for
SLEEPCON1, the power_domain describing CPU1 (no DSR, no XIP responsibility,
no DSP) and a power_mode_desc for deep sleep, entered through
power_enter_common().

SLEEPCON1 is the shorter of the two SLEEPCFG layouts -- no compute main
clock and no FRO0/FRO1 -- so the resources it cannot control simply carry a
zero mask and power_commit() skips them. It is also why this domain's
res_sleepcon_rail is PWR_RES_NONE: SLEEPCON1 sits in VDD1_SENSE, which no
PDSLEEPCFG0 field of PMC1 controls, so there is no rail here for
power_keepalive_collect() to hold up on RM 31.3.3's account.

Unlike Compute, the shared-clock power-down-ready ignore bits for FRO2 and
LPOSC are set unconditionally. Sense cannot tell whether the Compute
domain is still using those clocks, and it is never the arbiter of which
domain goes down first, so it must not wait for a handshake that may never
complete. The Sense deep-sleep mode may still collapse the core rails and
retain only its own SRAM: the PMC aggregates both domains' votes, so while
Compute is running its own configuration holds the shared resources up and
Sense's votes are aggregated away.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
49d1210a52 soc: nxp: imxrt7xx: add cm33 compute domain power modes
Supply the Compute core's half of the framework: the resource map for
SLEEPCON0, the power_domain describing CPU0 (the VDD2 rails, the XIP
hand-over hooks and the SYSCON0 DSP stall) and power_mode_desc entries for
deep sleep and deep sleep retention. Both entry points call
power_enter_common(), so this module contributes facts only.

The map is where this domain's SLEEPCFG layout is stated. Most of its
entries are shared modules that only power down once both SLEEPCONs have
voted them down, which is what lets the Sense core keep running while
Compute sleeps.

Note what the keep sets do not contain. Neither mode holds up anything on
the Sense core's account -- not sense_main_clk, not comn_main_clk, not FRO2
and not CPU1's SRAM partitions. Every one of those has a vote field in both
SLEEPCONs or both PMCs, and the PMC ANDs the two cores' power-down votes
(RM 27.3.2.2), so a keep vote from CPU0 would override whatever CPU1
decides about a resource CPU0 is not using -- which is what RM 12.5.2 Table
167 forbids. CPU1 casts its own run-bank votes for what it runs from. What
CPU1 has no field for at all is the one case CPU0 must cover, and that
arrives at entry through peer_needs, filtered by res_vote_exclusive.

Two shared resources are claimed here, and they are not exceptions to that
rule: they are resources CPU0 genuinely uses itself, and CPU1 goes on
voting both of them down.

* VDDN_COM, through COMPUTE_KEEP_XIP_RES, when the image is XIP. CPU0 then
  fetches from XSPI flash, which sits in that domain, so letting it reach
  retention across a window that returns brings CPU0 back to a flash
  controller and an external device that have both lost their configuration
  -- and the fetch that discovers it, along with the fault handler it would
  vector to, is itself in flash. power_xip_resume() puts the XSPI instances
  back the way it found them, but only the domain staying powered makes
  that restore mean anything. comn_main_clk, which clocks the same block,
  is not claimed with it: the clock comes back from the run bank early
  enough that the first fetch is already clocked. A non-XIP Compute image
  drops the claim.
* Whatever feeds the PLLs the modes keep, through the new res_clock_tree
  hook. CLKCTL2 selects each PLL's reference between FRO1_DIV8 and the
  system oscillator, and the board picks, so compute_res_clock_tree() reads
  the select rather than assuming one; a PLL kept powered with its
  reference gone comes back with no input and leaves CPU0 without a main
  clock.

Both gaps were invisible while an earlier revision had CPU0 casting keep
votes on CPU1's behalf: those proxy votes happened to cover CPU0's own
needs. Removing them is what made the two claims necessary, and each is now
stated where the reason for it lives.

Two details are specific to Compute, both about the power-down-ready
handshake SLEEPCON waits for before letting the PMC drop a clock:

* FRO0 and FRO1 have control bits in SLEEPCON0 only, so no other domain
  can hold them up and their ready really does arrive. Clear the ignore
  bits so SLEEPCON waits for it. A clock kept alive never powers down, so
  its bit is left untouched.
* FRO2 and LPOSC are shared with Sense and arbitrated between the two
  domains, so their ready may never arrive. Ignore it -- but only when
  Compute is the first domain going down (PMC0 STATUS DSSENS clear); if
  Sense is already in deep sleep it has released its vote and the
  handshake completes on its own.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
5ca5791dbe soc: nxp: imxrt7xx: add cm33 power management framework
The two CM33 cores enter the same family of low-power modes but differ in
which PMC/SLEEPCON block they drive, which rails they may collapse and
which resources they must retain. Writing that out per core duplicates the
entry sequence and lets the copies drift. Describe the differences as data
instead and keep exactly one copy of the sequence.

A mode is described by what it needs, not by the register bits that encode
it:

  enum power_resource      one scalar per thing that can be powered
  struct power_request     the set of resources a mode needs
  res_deps[]               resource -> the resources it depends on
  power_resolve()          closes a request over res_deps
  power_res_map[]          resource -> (register, mask), per domain
  power_commit()           one loop, one polarity flip

power_resources.h names the resources and the request type;
power_resources.c holds res_deps[] and power_resolve(), so the RM 31.2 /
Table 329 dependency rules are stated once and an illegal combination is
unrepresentable rather than repaired after the fact. power_regmap.h holds
the register enumeration, the PWR_MAP() helper and the PDSLEEPCFG0/1 half
of the map, which is shared between the domains: PMC0 and PMC1 are two
slots of one block, so the two cannot drift apart on it.

power_domain.h defines struct power_domain for the per-core facts (resource
map, SLEEPCON rail, LDO vsel mask, XIP and DSP-stall hooks, regulator ops)
and struct power_mode_desc for the per-mode facts (full-DSR, the requested
resources, PMIC mode). Which PMC and SLEEPCON instance a core drives is not
one of those facts: a core's CMSIS device header defines only its own
instances, so SOC_PMC / SOC_SLEEPCON are macros selected by the domain
Kconfig symbol -- the same symbol CMakeLists uses to pick which domain
module to compile -- rather than fields every domain would fill with the
only legal value.

power_common.c implements power_enter_common(dom, mode). One loop over
enum power_resource projects the resolved request onto SLEEPCFG and
PDSLEEPCFG0-5, voting down every resource the request does not name as
RM 31.5.2 requires -- a core that leaves a shared resource's bit at 0 to be
safe defeats the other core's power-down -- with the "1 means powered down"
inversion happening once, in that loop. Regulator programming goes through
power_regulator_ops, defaulting to power_ldo_regulator_ops, so the planned
PMIC supply can be added without touching either domain. The request is
gathered by power_keepalive_collect(), which also adds what no individual
mode should have to remember:

* the SLEEPCON rail of RM 31.3.3;
* LPOSC, for every mode that returns. LPOSC clocks the PMC itself, so it
  is what steps the power-up sequence a wake-up event kicks off. Its vote
  field is in both SLEEPCONs and the PMC ANDs the two, so when neither
  domain is clocking anything from it both vote it down and it really goes
  away -- and then no wake-up event can bring either core back, whatever
  else was kept.
  It is not a resource one domain holds up for the other; both need it to
  return at all, so both claim it and the aggregate holds. DPD and FDPD are
  excluded: they come back through a reset the PMC drives off its own
  always-on path;
* whatever the board's clock tree makes the request imply, through the new
  optional res_clock_tree hook on struct power_domain. A kept PLL is the
  case that needs it -- the PLL is only useful if its reference is still
  there, and which clock that is was chosen by the board. The hook runs
  before the dependency closure, so what it returns is closed over too, and
  it reads clock selects rather than power votes: a select is a fact about
  how the board wired itself up at boot, while the votes are what this code
  is in the middle of deciding.

That function is also the seam where device runtime PM will later
contribute its own requirements.

A following commit hooks the sequence into pm_state_set(); the poweroff
modes are layered on after that.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
22b61fae23 soc: nxp: imxrt7xx: add XIP flash hand-over helpers
The XSPI controller hosting an XIP image sits in the V2COMP domain, which
collapses for both deep sleep and deep sleep retention. Without a
hand-over the first instruction fetch after wakeup reads a dead XSPI and
hardfaults.

Add power_xip_suspend() / power_xip_resume(): quiesce the flash, drop the
caches that lose their contents and tear the XSPI down before the window,
then rebuild it on resume ahead of the next fetch. Caches are disabled
inner level first, so XCACHE write-backs still drain through a live XSPI,
and re-enabled outer level first. The reset sequence follows the SDK's
XSPI_ResetSfmAndAhbDomain(), including its six-NOP settling delays. Which
interface hosts the image is resolved at build time from the XSPI nodes'
devicetree windows, accepting either the secure or the non-secure alias.

Everything runs from RAM, since the flash it operates on is the one the
code would otherwise execute from. These are pure helpers; a following
commit wires them into the low-power entry path.
SOC_MIMXRT7XX_PM_XIP_HANDOVER is internal, defaulting on for XIP builds
(FLASH_MCUX_XSPI_XIP) with PM.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
fa52fb407f soc: nxp: imxrt7xx: derive cm33 SRAM keep-alive geometry from devicetree
An SRAM partition has to stay powered across a low-power window exactly
when the linked image occupies it, and what the image occupies is fixed at
link time. Compute that set as a compile-time constant from devicetree
rather than carry a hand-maintained mask that silently drifts from the
memory map.

The main SRAM is one contiguous 7.5 MB window of 30 partitions P0-P29,
each powered through PMC PDSLEEPCFG2 (array) and PDSLEEPCFG3 (periphery)
where bit n is partition Pn. Occupancy comes from DT_CHOSEN(zephyr_sram),
the RAM linker region holding data, bss, noinit, stacks, the kernel heap
and the libc malloc arena -- so the result does not depend on runtime
allocation -- from DT_CHOSEN(zephyr_flash), which holds text and rodata
and is off-chip on an XIP build but on-chip for a core that executes from
SRAM, plus every status-okay zephyr,memory-region node inside the window.

Mapping an address to a partition takes care. The window is mirrored at
four aliases sharing their low 24 bits, so those bits give the offset once
an address is known to be on-chip; but deciding on-chip needs more,
because off-chip memories declared as memory-regions collide there --
PSRAM at 0x0800_0000 shares the top nibble of the 0x0000_0000 alias and
PSRAM2 at 0x7000_0000 masks to offset 0. Each address is therefore tested
inside its 256 MB alias slot, requiring both a top nibble of 0-3 and an
in-window offset. An off-chip zephyr,flash falls out of the union by the
same test, so the XIP case needs no special casing.

This covers everything the linker places, not a raw write to a partition
the image never declared; such a partition can lose power, so an
application using one must declare it as a zephyr,memory-region. The
header is standalone with no PM dependency; the power framework and the
board's second-core boot path start consuming it in following commits.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
e2cdca4e27 soc: nxp: imxrt7xx: enable POWER_DOMAIN with cm33 device PM
The power-domain-soc-state-change node in the cm33_cpu0 devicetree needs
the generic power domain driver behind it, but POWER_DOMAIN has no default,
so the driver is not built and the node is silently inert: the devicetree
describes the power cycling that Deep Sleep Retention requires and nothing
acts on it.

Default POWER_DOMAIN to y whenever device PM is on, the same way
soc/nxp/rw does.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Zhaoxiang Jin
a3e7bca7c9 soc: nxp: imxrt7xx: add the second-core remote image include dir
A dual-core build shares headers between the two images, in particular
the second core's generated image header, but that directory was not on
the include path so the includes did not resolve.

Add CONFIG_SECOND_CORE_MCUX_REMOTE_DIR to the SoC include directories
when it is set.

Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
2026-09-18 11:14:01 +01:00
Hariharan Arumugam
6f1e3b8ac8 soc: microchip: Add support for PIC32CK SG SoC series
Adds initial SoC-level support for the Microchip
PIC32CK SG series, including SoC definition files.

Signed-off-by: Hariharan Arumugam <hariharan.arumugam@microchip.com>
2026-09-18 11:13:24 +01:00
Parthiban Nallathambi
2074af30e2 soc: qemu: add QEMU AURIX tricore SoC support
Add self-contained QEMU virtual SoCs for the AURIX tc3x (TC1.6.2P)
and tc4x (TC1.8P) cores under a single soc/qemu/tricore directory,
selected per board via SOC_QEMU_TC3X / SOC_QEMU_TC4X. This lets the
architecture be exercised under qemu-system-tricore without any
silicon or HAL dependency; ENDINIT and the watchdog are handled by
the arch weak stubs, which QEMU does not model.

Signed-off-by: Parthiban Nallathambi <parthiban@linumiz.com>
2026-09-18 11:13:16 +01:00
Benjamin Cabé
52b48529ae soc: intel_adsp: condition mem-coherence select on cache mgmt
The ADSP family and both series symbols select
CACHE_CAN_SAY_MEM_COHERENCE unconditionally, but that symbol is only
defined under CACHE_MANAGEMENT, so a build that turns cache management
off aborts on an unsatisfiable select. Guard the three selects with the
dependency they need.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Assisted-by: Claude:opus-5
2026-09-17 16:47:41 -07:00
Bill Waters
0250b31a09 soc: infineon: cat1c: place .cy_sharedmem SROM scratch section
The CAT1C PDL flash driver (cy_flash_srom.c) places its SROM scratch
buffers with CY_SECTION_SHAREDMEM, which resolves to
__attribute__((section(".cy_sharedmem"))). The generic Cortex-M linker
script used by CAT1C (xmc7200) has no output section for ".cy_sharedmem",
so once that source is built the section is an orphan. Under the default
ORPHAN_SECTION_WARN the link still succeeds, but the linker places this
must-be-SRAM scratch into read-only flash, so the first write faults at
runtime rather than producing a build error.

Anchor it in the noinit region via zephyr_linker_sources(NOINIT), the
same way soc/infineon/cat1a already places its .cy_sharedmem buffers.
The buffers are write-before-read SRAM scratch, so noinit (NOLOAD) is
correct and needs no zeroing or load image.

Assisted-by: AI (GitHub Copilot)
Signed-off-by: Bill Waters <bill.waters@infineon.com>
2026-09-17 13:06:29 -07:00
Michał Stasiak
abd11cb4b3 soc: nrf7120: add DEVELOP_IN symbol
Added symbol that enables running nRF7120 firmware
on nRF7120E chip.

Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2026-09-17 16:30:43 +01:00
Adam Kondraciuk
51b9c57ff4 modules: hal_nordic: Get rid of GPPIv1
Legacy GPPI helper has been removed with nrfx 4.6.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
Signed-off-by: Michał Stasiak <michal.stasiak@nordicsemi.no>
2026-09-17 16:30:43 +01:00