The MCUX LPTMR system-timer driver previously defaulted to enabled
whenever the /chosen/zephyr,system-timer node was compatible with
nxp,lptmr. On SoCs whose devicetree points zephyr,system-timer at an
LPTMR instance (e.g. frdm_mcxw71/mcxw716c), this forced every build,
including non-power-management builds, to select the 32.768 kHz LPTMR
and disable the Cortex-M SysTick. Tests that rely on the high-resolution
SysTick clock (tests/kernel/timer/timer_api) then failed because the
1024 tick/s LPTMR does not provide the required timing resolution.
Restore the explicit per-SoC policy: the generic driver no longer
defaults MCUX_LPTMR_TIMER on, and each SoC opts in on its own terms.
MCXW7xx, KE1xF and MCXC enable the LPTMR only when power management is
enabled (default y if PM); i.MX95 and i.MX952 M7 enable it only when the
LPTMR is not claimed by the counter driver (default y if
!COUNTER_MCUX_LPTMR). This keeps SysTick as the system timer for plain
builds while preserving the low-power LPTMR configuration for PM builds.
Update the 4.5 migration guide accordingly.
Fixes#115491
Signed-off-by: Holt Sun <holt.sun@nxp.com>
Define labeled Cortex-A55 and Cortex-A76 CPU nodes for RK3588 and select
the combined Cortex-A76/A55 CPU configuration. Keep the existing
ROC-RK3588-PC SMP variant on its supported Cortex-A55 CPUs.
Signed-off-by: Chao Liu <chao.liu@processmission.com>
PSRAM timing tuning reprograms the MSPI core clock, which is
shared between flash and PSRAM. The esp_flash driver had already
cached the flash timing in its HAL context during
esp_flash_config(), so the stale values made SPI1 erase and write
operations fail once tuning ran.
Re-read the timing settled on by the tuning code after PSRAM chip
init. This restores flash access on ESP32-S3 with octal PSRAM at
80 MHz. Add a Zephyr-side capability symbol for the SoCs that
support MSPI timing tuning instead of relying on the HAL one.
Assisted-by: Claude:opus-4-8
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
This commit migrates the existing pinmux driver for the musca-b1
board to the newer pinctrl API. The new implementation also fixes
a bug in the original pinmux driver which would have selected
alternative function 2 instead of ALTF1 as desired.
The musca-s1 pinmux driver has been left as this board is
deprecated.
Signed-off-by: Laurie Fay <Laurie.Fay@arm.com>
The Renesas RZ and Smartbond DA1469x Kconfig.defconfig files derive
FLASH_SIZE, FLASH_BASE_ADDRESS and BUILD_OUTPUT_ADJUST_LMA from
$(DT_CHOSEN_Z_FLASH), but never assign that preprocessor variable.
Kconfig.zephyr does assign it, at a point after the SoC Kconfig.defconfig
files have already been sourced, so these trees were picking up the
assignment from an unrelated vendor's tree that happened to be parsed
first, the way the ST, NXP and Realtek trees each assign it for
themselves.
Assign the variable in the files that use it, as the other SoC trees do.
Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The npcx4 series did not provide a custom fixed SoC MPU region
definition, so it fell back to the default single-region flash
configuration in arch/arm/core/mpu/arm_mpu_regions.c.
On this SoC the flash is 384 KB based at 0x10060000, which the
default logic rounds up to a single 512 KB (REGION_512K) region.
The ARMv7-M MPU requires a region base aligned to the region size,
but 0x10060000 is not 512 KB aligned. The hardware masks the base
down to 0x10000000, so the region only covers 0x10000000-0x10080000
and leaves flash above 0x10080000 unprotected.
This is latent until the image grows past 0x10080000. With
CONFIG_NO_OPTIMIZATIONS=y the arm_thread_swap test image exceeds
that boundary and takes an MPU fault (Data Access Violation) when
code runs in the upper Code RAM.
Add a custom mpu_regions.c mirroring the npcx7 approach: split the
flash into two properly aligned 256 KB regions covering
0x10060000-0x100c0000
Fixes#114538
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
The ztest benchmark framework places its iterable sections via
zephyr_linker_sources(DATA_SECTIONS ...), which end up in the generated
snippets-data-sections.ld. This linker script did not include that file,
so the _ztest_benchmark_*_list_start/end symbols were undefined and
benchmark tests failed to link.
Include snippets-data-sections.ld to fix it.
Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
SLEEP_HOLD_EN is enabled by default, which gates SysTick and causes
the system to hang in tests like test_gpio_pin_configure_single_ended.
Set CPU sleep mode to RUN via SCMI CPU domain protocol during
soc_init() to clear SLEEP_HOLD_EN and allow SysTick to run.
Signed-off-by: Qiang Zhao <qiang.zhao@nxp.com>
All STM32 SoC and platforms embedding Zephyr MCUboot application or$
embedding TF-M (with or without its BL2 bootloader) do expect
a 1024 bytes header blob in the Zephyr application layout. Factorize
this default value instead of adding the same information in each
SoC series or at board level.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add pinctrl support for Renesas RZ/A3M
Remove the default from the binding and use DT_PROP_OR(..., 0) when
extracting FILNUM/FILCLKSEL, so DT_NODE_HAS_PROP() distinguishes an
explicitly requested filter from an absent property.
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Support Zephyr RTOS on Cortex A720 for R-Car X5H.
For more information and documentation, please visit the product page:
https://www.renesas.com/secure/gen5-r-car-x5h
Signed-off-by: Nam Nguyen <nam.nguyen.xn@renesas.com>
Allow host-side remoteproc to locate a Versal RPU resource table in a
remoteproc-visible RPROC memory region. Publish its location using the
metadata format required when attaching to an RPU started before the APU.
Optionally use RPROC as the load region for initialized runtime data.
This supports layouts whose code and data use different memories without
making that layout a requirement for other Versal boards.
Signed-off-by: Takumi Ando <takumi@spacecubics.com>
Add the fixed NXP System MPU region table for the MCXE24X SoC series and
wire it into the build:
- Select CPU_HAS_NXP_SYSMPU for SOC_SERIES_MCXE24X.
- Compile the SoC MPU region table (nxp_mpu_regions.c) when
CONFIG_ARM_MPU is enabled.
The region table enforces execute-never for data/heap/stack and
read-only for rodata/text. Because the NXP MPU uses OR semantics (a
region granting access cannot be revoked by another), the background
region is split around SRAM when MPU_STACK_GUARD is enabled so the stack
guard can deny supervisor writes; a single background region is used
otherwise to save one boot region.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Inside an output section, assigning __rom_region_size without
ABSOLUTE() yields a section-relative ELF symbol. Zephyr's PMP
init casts that symbol's address to a size, so the ROM TOR entry
becomes section_base + size instead of the actual region length
and can cover the peripheral window (0x60000000+), causing
Store/AMO faults on protected accesses.
Force an absolute symbol on ESP32-C5/C6/P4.
Signed-off-by: Tiago Medicci <tiago.medicci@espressif.com>
Add support for the i.MX RT1150 family (MIMXRT1151/MIMXRT1152),
single Cortex-M7 core SoCs of the i.MX RT11xx series running at up
to 800MHz, to the shared imxrt11xx SoC layer. Clock init configures
the M7 root from the ARM PLL at 798MHz, keeps the bus roots at
240MHz and enables Forward Body Biasing in OverDrive mode. All
orderable part numbers are defined.
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Clear RET and RET2 during secure early initialization. Skip the
redundant nRF71 System OFF clear and use the nrfx all-sections helper
for other Nordic SoCs.
Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
When CONFIG_SOC_SERIES_NRF71_TFM_RAM_CTRL_SERVICE is set, route
z_nrf_retained_mem_retention_apply() to the secure RAM-control service
(tfm_platform_ram_ctrl_retention_set) instead of nrfx_ram_ctrl; the secure
build keeps the direct nrfx path. Apply regions best-effort and return
-EIO if the secure service rejects one.
Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
Add SOC_SERIES_NRF71_TFM_RAM_CTRL_SERVICE for nRF71 TF-M builds
and pass it to the TF-M build as -DNRF_RAM_CTRL_SERVICE, so the secure
RAM-control service is compiled into the secure image for non-secure
builds.
Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
Enable hardware-backed System OFF RAM retention (MEMCONF RET) for
nRF7120 via the nrfx_ram_ctrl / retained_mem path.
Signed-off-by: Erdem Simsek <erdem.simsek@nordicsemi.no>
When TRNG 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>
Rename the source file for sama7d6 and simplify the sources file by
using "${CONFIG_SOC_SERIES}.c" in "CMakeLists.txt".
Signed-off-by: Tony Han <tony.han@microchip.com>
Configure the Cortex-R52 GIC so Group 1 interrupts, including
the virtual timer PPI, are delivered correctly.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
Calling timer_5ms_one_shot() from chip_run_pll_sequence() can result
in a R_RISCV_RVC_JUMP linker relocation truncaction error because
timer_5ms_one_shot() links into flash, and chip_run_pll_sequence()
links into RAM.
Move the timer_5ms_one_shot() call out of chip_run_pll_sequence()
and into chip_configure_pll() right before chip_run_pll_sequence()
is invoked.
Tested on IT8xxx2 EC board.
Signed-off-by: Keith Short <keithshort@google.com>
Assisted-by: Antigravity:gemini-1.5-pro
Xtensa architecture does not have native inter-processor
interrupts and must rely on mechanism on SoC or board to do
that. Because of this, the architecture should not select
CONFIG_ARCH_HAS_DIRECTED_IPIS and should let SoC or board
layer to do that, where CONFIG_SCHED_IPI_SUPPORTED is also
being selected.
Note that CONFIG_XTENSA_LAZY_HIFI_SHARING is now dependent
on CONFIG_ARCH_HAS_DIRECTED_IPIS as it uses directed IPI.
Due to that it keeps sending IPI under the other has saved
HIFI state, it is not really appopriate to broadcast IPIs.
That's why it can only be enabled when directed IPI is
supported.
Signed-off-by: Daniel Leung <daniel.leung@intel.com>
The SiWx91x reference manual describes a dedicated JTAG_TDO/SWO pin
that outputs Serial Wire Viewer (SWV) trace data over SWO, same as
the ARM CoreSight infrastructure used on other Silabs SoCs that
already select HAS_SWO. Select HAS_SWO so LOG_BACKEND_SWO becomes
available for this family.
While there, sort the select statements, as done in the rest of the Silabs
SoC Kconfig files.
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
The xg22 and xg27 Series 2 SoCs (Cortex-M33) and the siwx91x family
(Cortex-M4) did not select CPU_CORTEX_M_HAS_DWT, unlike their sibling
SoCs based on the same core.
The Silicon Labs reference manuals for EFR32xG22 and EFR32xG27
("DBG - Debug Interface" section) and for SiWx917 ("Trace and Debug"
chapter) explicitly list the Data Watchpoint and Trace (DWT) unit as
an implemented feature, same as on xg21/xg23/xg24/xg26/xg28/xg29.
Select CPU_CORTEX_M_HAS_DWT for these SoCs to match the hardware and
be consistent with the rest of the series.
Assisted-by: Claude:claude-sonnet-5
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
Powering down the peripheral domain in light sleep allocates the CPU
retention frames from the system heap at each sleep entry. Declare the
requirement so builds enabling it get the heap they need instead of
relying on each application to size it.
Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
Add SoC and devicetree support for the R-Car Gen4 R8A779G0 A76.
Co-authored-by: Yuya Hamamachi <yuya.hamamachi.sx@renesas.com>
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
When the STM32 GPIO driver is not enabled, drop the gpio_driver_config
common field from the instance configuration and don't create instance
data blocks as they become unnecessary. This reduces the footprint in
this configuration.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Stop instantiation of the GPIO port nodes as proper devices when the
STM32 GPIO driver is disabled. This allows application to build but
then fail miserably at runtime because they try to using the GPIO API
without CONFIG_GPIO=y.
Instead, when CONFIG_GPIO_STM32=n, use the DEVICE_DEFINE() macro
to still create `struct device`s (which are needed by our API and to
use PM services), but with a name that doesn't match the one expected
by DEVICE_DT_GET(). This ensures any naive consumer trying to use the
GPIO ports will get a "__device_dts_ord_N not found" linker error at
build, as it would if the GPIO driver (which isn't built in this case)
did handle instantiation, without loosing access to device servicis
since we still creating an actual `struct device`. The only downside
of this approach is that the GPIO ports become "software devices" so
they don't have any dependencies and their initialization priority
is not checked. This should be fine because in this configuration,
the devices are private and very little code will interact with them.
(Really, only the STM32-specific pinctrl driver will...)
An alternative option would be to call Z_DEVICE_DEFINE() directly
to create frankenstein-esque devices which would be recognized as
coming from a Devicetree node but forced to have the "wrong" name.
However, this requires usage of an internal macro so it has been
avoided here.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Use GPIO_COMMON_CONFIG_FROM_DT_NODE() to initialize the GPIO subsystem
`common` field of the instance's configuration instead of manually
initializing each field.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The soc.c non-secure build initialisation was using __NRF_TFM__, which
is meant to be for sdk-nrf only. New ifdef function is updated to
replace the secure initialisation condition. So that now power related,
wifi, wicr setup is done in secure environment for non secure build.
Also updated SystemCoreClock as global variable with retrival from the
DT. SystemCoreClock setting will be done in non secure environment
aligning to other nordic soc.
Signed-off-by: Travis Lam <travis.lam@nordicsemi.no>
The newly added/enabled microchip,xec-kbd driver in input_xec_kbd.c
relies on the XEC_KBD_ register offsets for accessing keyboard scan
registers. These offsets are defined in the Zephyr-specific
soc/microchip/mec/common/reg/mec_keyscan.h header.
However, the legacy mec15xx SoC port does not include the common
soc_common.h or reg/mec_keyscan.h headers in its soc.h due to Fatal
Name Collisions with the vendor HAL's component/keyscan.h structs
(which are not present or were refactored in newer MEC SoCs).
Because other drivers like GPIO and UART work around this by only
including their respective isolated register headers, we do the same
for keyscan by defining the missing 5 legacy offsets directly in
mec15xx/soc.h. This restores compatibility with the new input driver
without breaking any of the vendor HAL dependencies.
Assisted-by: Antigravity:gemini-1.5-pro
Signed-off-by: Jeremy Bettis <jbettis@google.com>
Modified the Microchip XEC eSPI TAF V2 driver adding support for
MEC174x/5x/165x. We agree with code quality tool analysis the eSPI
TAF register structure is too larger and not maintainable. The driver
now uses Zephyr's system memory mapped register access routines.
quality check tools find the structure too large.
Signed-off-by: Manimaran A <manimaran.a@microchip.com>
Add a soc_core_clock_get() helper returning the core clock frequency in
Hz across the MEC15xx, MEC172x and newer series, and extend the eSPI
TAF and QMSPI register headers with the offsets, field helpers and
opcode definitions needed by the V2 driver.
Correct the RPMC OP1/OP2 chip-select 1 opcodes to 0x23/0x24, keeping the
previous 0x83/0x84 values as deprecated aliases, and remove the
deprecated monolithic register structs.
Signed-off-by: Manimaran A <manimaran.a@microchip.com>
Since backup mode is enabled by default, lock this power state during
for the duration of standby delay as well.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
With NVIC state preserved across S2RAM, restoring the counter state via PM
device runtime ops is no longer necessary.
Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
WICR is now programmed at runtime. Remove the build-time hex
generator (gen_wicr.py), its sysbuild integration, and the
SB_CONFIG_SOC_NRF71_GENERATE_WICR Kconfig option.
Signed-off-by: Dhanoo Surasarang <dhanoo.surasarang@nordicsemi.no>
Program the Wi-Fi Information Configuration Registers (WICR) at boot.
Values are derived from devicetree phandles and travel inside the
application image, making them DFU-upgradable.
The programming logic lives in wicr_setup.c, shared between the
Zephyr secure build and TF-M. Out-of-tree Wi-Fi patches can override
the ROM patch addresses via compile definitions. Writes are skipped
when the register already holds the correct value to minimise MRAM
wear.
Signed-off-by: Dhanoo Surasarang <dhanoo.surasarang@nordicsemi.no>
This macro eliminates manual size/alignment management and prevents
namespace collisions by moving internal queues to file-private scope.
Signed-off-by: Cesar Vandevelde <cesar.vandevelde@gmail.com>
Skipping the LL_PWR_DisableUCPDDeadBattery() call is not sufficient to
guarantee the Type-C dead-battery CC pull-downs are active by the time
the application runs. PWR->UCPDR.DBDIS is not reset by a chain-load, so
whatever an earlier boot stage left behind in the same power cycle
persists into the application.
MCUboot is the common case: its own build enables neither USB device
stack, so its pass through this hook disables the pull-downs, and it
then chain-loads the application without an intervening hardware reset.
The application's own (now correct) condition evaluates false, leaves
the register alone, and the port is still dead.
Make the application pass authoritative by explicitly re-enabling the
pull-downs when a USB device stack is in use.
Verified on stm32h5f5j_dk booting through MCUboot: PWR->UCPDR read back
0x1 (DBDIS set) on the idling application with only the condition fix
in place, and 0x0 with this change, sampled over SWD.
Signed-off-by: Arkadiusz Grzelka <devitwise@gmail.com>