virtio_pci_read_cap() only asserted cap_len == cap_struct_size, which
compiles out in production. A device-supplied cap_len below the base
struct size underflows extra_data_words, and a value above the caller's
buffer overflows it during the config read loop, smashing the guest
stack during probe.
Replace the assert with a runtime range check.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
virtio_isr() took the descriptor id from the device-written used ring and
used it directly to index recv_cbs[] and desc[] (both sized vq->num),
then invoked the callback pointer found there. A malicious or compromised
hypervisor could thus call an arbitrary function pointer in the guest.
Reject a descriptor id >= vq->num before using it.
Assisted-by: Claude:claude-opus-4.6
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
- Only modify salve mode registers when not in 4-channel capture mode
- Add compile time check for not compatible configuration.
Capture support is only allowed if:
- No slave mode is selected
- or capture runs in four_channel_capture_support mode
Signed-off-by: Matthias Plöger <matthias.ploeger@phoenixcontact.com>
If the TX FIFO is too small, these calls can fail. While this usually
doesn't happen, I ran into this issue while porting this driver to
efr32mg13p and was wondering why sending data doesn't work properly.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Sleep End Devices (SED) use data poll packets to check if the coordinator
has data to send. These packets use the type
IEEE802154_FRAME_TYPE_MAC_COMMAND, which as an additional field inside the
part of the header thats supposed to be part of the authenticated data
rather than the encrypted payload.
sl_802154_get_mhr_length has to detect this situation and adjust the
returned header size accordingly. The check is modeled after what the
function FindPayloadIndex does inside of the openthread source code. That
code is used, if the device doesn't support IEEE802154_HW_TX_SEC.
Before this fix, neither Wireshark nor the receiver of the message were
able to decrypt the message. This caused sleepy devices to be unable to
communicate.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
- tx_errno was set before giving the semaphore in several places. This can
cause the tx function to use the old value.
- The code tried to wait for an ACK even if the tx has failed. This caused
a dead lock. To solve this without relying on the order in which the ack
and the TX result are received, a new variable `ack_errno` is introduced,
so the success of the ack can be tracked and waited for separately.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
If mailbox is used for communication with VPR co-processor then
initilize mailbox just after vpr is launched. Otherwise, compilation
will fail due to devicetree hierarchy.
Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
Add a hwinfo device-id backend that reads the unique chip identifier
stored in an NXP OTP flash memory area, as documented in the MCXE31xx
Reference Manual UTEST memory map. Add the nxp,otp-uid devicetree
binding that describes the identifier, and read it directly as memory
(8 bytes, most-significant byte first).
The hwinfo subsystem exposes its z_impl_hwinfo_* entry points as weak
symbols, so this backend implements only hwinfo_get_device_id() and
coexists with a separate reset-cause backend on the same SoC.
The backend is selected only when a node with the nxp,otp-uid
compatible is enabled, so it has no effect on its own; it is build
tested through tests/drivers/hwinfo/api once a board enables the node
(done later in this series).
Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
Use NET_ETH_ADDR_LEN instead of raw 6 value to define MAC address
byte array size in STM32 ethernet drivers.
Assert at build time that the MAC address array size in HAL do match
those in Zephyr.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The XSPI_NOR_STM32_INIT macro initialized the jedec_id field
unconditionally when the DT node has a jedec-id property, but
the field in flash_stm32_xspi_data is only declared when
CONFIG_FLASH_JESD216_API is enabled. Guard the initialization
accordingly to fix build failures when jedec-id is present in
DT but CONFIG_FLASH_JESD216_API is not set.
Signed-off-by: Filip Stojanovic <filipembedded@gmail.com>
This commit fixes a bug where esp32 UART errors are cleared before they
can be read. Additionally, all line errors (such as break and FIFO
overflow) are now watched and reported.
Assisted-by: Claude:claude-opus-4.7
Signed-off-by: Perry Naseck <pnaseck@media.mit.edu>
The USART init sequence configured BRR and CTLR1 (enabling the UART) and
only afterwards applied the pinctrl state. Reorder so that:
1. The clock is enabled.
2. The pinctrl state is applied before the peripheral is enabled.
3. CTLR1 is cleared first to ensure the UART is disabled while CTLR2/CTLR3
and the baud-rate divisor (BRR) are programmed, then CTLR1 is written
last to enable the UART with the final configuration.
Programming the control and baud-rate registers while the UART is disabled
and bringing up the pins before enabling avoids configuring the peripheral
in an undefined intermediate state. This is the ordering required by the
CH32H417 (QingKe V5F) and was regression-tested on a CH32V317 to confirm it
does not affect existing single-core parts.
Signed-off-by: Liu Changjie <liucj1228@outlook.com>
It turns out the GPIO FIFO has its own clock gate marked as a reserved bit,
Also the wrong bit was set for GPIP
Signed-off-by: Camille BAUD <mail@massdriver.space>
Move the CONFIG_I2C_TARGET_BUFFER_MODE guard to the proper location and
update the enable condition.
The option is enabled when either target_shared_fifo_mode or
target_fifo_mode property is specified, ensuring the required buffer mode
support is enabled.
Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
The init, network and dial scripts are keyed to the devicetree
compatible, so board-specific configuration on a shared modem (RF tuner
band routing, for example) can only be added by forking the vendor
driver. Add MODEM_CELLULAR_BOARD_INIT_DEFINE, registering a
board-supplied chat script against a modem instance via an iterable
section. The driver runs it over the AT control channel in a new
RUN_BOARD_INIT_SCRIPT state, entered after CMUX is up and before APN and
network configuration, and only when a script is registered.
Signed-off-by: Paulo Santos <pauloxrms@gmail.com>
Add WWDT (Windowed WatchDog Timer) support for all LPC55Sxx variants
(LPC55S06/S16/S28/S36/S69):
DTS / board changes:
- Add wwdt0 node (compatible = "nxp,lpc-wwdt", reg = 0xc000) and
watchdog0 alias to nxp_lpc55S0x/S1x/S3x_common.dtsi
- Enable wwdt0 and add watchdog to supported features on
lpcxpresso55s06, lpcxpresso55s16, lpcxpresso55s36 boards
SoC / clock:
- soc.c: call CLOCK_SetClkDiv(kCLOCK_DivWdtClk, 1U, true) when
wwdt0 is enabled, alongside the existing FRO1MHz enable
Driver hardening (per hakehuang review):
- Add `bool started` flag to mcux_wwdt_data to track post-setup state
- Set started=true in mcux_wwdt_setup(), clear in mcux_wwdt_disable()
and PM_DEVICE_ACTION_TURN_OFF
- Guard mcux_wwdt_isr() with early return when !started, preventing
spurious callbacks from warm-reset stale WWDT status on LPC55S36
- Clear WWDT status flags + NVIC pending bit before irq_enable() in
the IRQ init macro
Tests:
- Add per-board .conf files for wdt_basic_api; lpcxpresso55s06/s16
use SRAMX noinit section to survive TrustZone NS Boot ROM clears;
all boards enable WDT_MCUX_WWDT_WARNING_INTERRUPT_CFG=10
- Update testcase.yaml filter to allow SOC_SERIES_LPC55XXX and
exclude lpcxpresso55s69 NS variant
Tested with tests/drivers/watchdog/wdt_basic_api on lpcxpresso55s36:
SUITE PASS 100% [wdt_basic_test_suite]: pass=1, fail=0, skip=0
Signed-off-by: Peter Wang <chaoyi.wang@nxp.com>
Handle necessary code relocation better,
clearly delimiting what is required and what is not
Also group RAM together
Signed-off-by: Camille BAUD <mail@massdriver.space>
BFLB flash driver is updated:
- Add support for bank 2
- Add support for SFDP
- Add ability to use writable devices (MRAM, PSRAM, FRAM) via bank2 mapping
- Improve overall organization
- Add QPI and continous read support
Signed-off-by: Camille BAUD <mail@massdriver.space>
The CAT1 PDL I2C driver mutated a single file-scope global
_i2c_default_config at run time (i2cMode, slaveAddress, slaveAddressMask
and ackGeneralAddr) from ifx_cat1_i2c_configure(). With more than one I2C
controller instance, one instance's configure() call could corrupt the
configuration of another, and the dev_config == 0 path read i2cMode back
from the shared global, potentially observing a value left behind by a
different instance.
Make _i2c_default_config a const read-only template and give each
device instance its own mutable copy (scb_config) in struct
ifx_cat1_i2c_data. The copy is seeded from the template in
ifx_cat1_i2c_init() before the first configure() call, and all reads and
writes in ifx_cat1_i2c_configure() now operate on the per-instance copy,
which is also passed to Cy_SCB_I2C_Init(). This keeps each controller's
mode and address state isolated while preserving the existing read-back
semantics on a per-instance basis.
Reset slaveAddressMask and ackGeneralAddr to their defaults in the
controller-mode branch of configure(). The PDL consults these slave-only
fields only in target mode, but because scb_config is now a persistent
per-instance copy, an earlier target configuration would otherwise leave
a stale 0xFE mask in the struct across a target-to-controller switch.
The Infineon SPI drivers were swept for the same pattern; they already
copy the SCB config into a local variable before mutating it, so no
change was needed there.
Built tests/drivers/i2c/i2c_api for
kit_pse84_eval/pse846gps2dbzc4a/m55 to confirm the driver compiles and
links.
Assisted-by: Copilot:claude-opus-4.8
Signed-off-by: Bill Waters <bill.waters@infineon.com>
rename i2c_is_reset_op into i2c_is_restart_op.
restart is the right name.
this function was only added after the last release,
so this is not a breaking change.
Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
CONFIG_LINKER_USE_PINNED_SECTION is the second half of the selective
kernel-pinning model removed in issue #108773. With the kernel image
now always resident at boot (previous commit), the __pinned_*
attribute family is a no-op: every page they would have segregated is
already pinned by z_mem_manage_init()'s whole-image loop, so the
tagging contract neither adds safety nor remains maintainable.
Drop it.
Mechanical removals:
* All ~219 in-tree uses of __pinned_text, __pinned_rodata,
__pinned_data, __pinned_bss, __pinned_noinit, and __pinned_func
across arch/x86, drivers/interrupt_controller, drivers/timer,
arch/common, kernel, lib/libc, subsys/portability/posix, tests, and
the syscall code generator (scripts/build/gen_syscalls.py).
* The assembly aliases PINNED_TEXT/RODATA/DATA/BSS/NOINIT used in
arch/x86/core/ia32/*.S and drivers/interrupt_controller/
intc_loapic_spurious.S become plain TEXT/RODATA/DATA/BSS/NOINIT.
* K_KERNEL_PINNED_STACK_DEFINE, K_KERNEL_PINNED_STACK_ARRAY_DEFINE,
K_KERNEL_PINNED_STACK_ARRAY_DECLARE, K_THREAD_PINNED_STACK_DEFINE,
and K_THREAD_PINNED_STACK_ARRAY_DEFINE are removed. The few
in-tree callers (kernel/init.c, arch/arm/core/cortex_a_r/smp.c,
arch/arm64/core/fatal.c, arch/rx/core/prep_c.c,
arch/x86/core/prep_c.c, kernel/include/kernel_internal.h,
tests/bluetooth/hci_uart_async) move to the corresponding
non-pinned macros.
Machinery removals:
* Kconfig.zephyr drops CONFIG_LINKER_USE_PINNED_SECTION.
qemu_x86_tiny and qemu_x86_atom_virt drop their =y overrides.
* include/zephyr/linker/section_tags.h drops the __pinned_* macro
definitions (both arms). __isr collapses to an empty macro since
its only purpose was to alias __pinned_func.
* include/zephyr/linker/sections.h drops PINNED_TEXT_SECTION_NAME,
PINNED_BSS_SECTION_NAME, etc. and the bare PINNED_TEXT/RODATA/etc.
forwarders, plus the _APP_SMEM_PINNED_SECTION_NAME constant.
* include/zephyr/linker/linker-defs.h drops the lnkr_pinned_*
externs, the _app_smem_pinned_* externs, and the lnkr_is_pinned()
/ lnkr_is_region_pinned() inline helpers.
* include/zephyr/linker/utils.h drops the lnkr_pinned_rodata branch
in linker_is_in_rodata().
* include/zephyr/linker/app_smem_pinned{,_aligned,_unaligned}.ld
are deleted; cmake/linker/ld/target_configure.cmake stops
configuring them.
* boards/qemu/x86/qemu_x86_tiny.ld and
include/zephyr/arch/x86/ia32/linker.ld drop their pinned-section
blocks and the now-redundant #ifndef CONFIG_LINKER_USE_PINNED_SECTION
conditionals throughout the body. The
LIB_KERNEL_IN_SECT / LIB_ARCH_X86_IN_SECT / LIB_ZEPHYR_IN_SECT /
LIB_C_IN_SECT / LIB_DRIVERS_IN_SECT / LIB_SUBSYS_LOGGING_IN_SECT /
LIB_ZEPHYR_OBJECT_FILE_IN_SECT / ZEPHYR_KERNEL_FUNCS_IN_SECT macros
in qemu_x86_tiny.ld are deleted; they existed only to feed the
pinned text/rodata/data/bss/noinit sections.
* kernel/mmu.c drops the mark_linker_section_pinned(lnkr_pinned_start,
...) call. The mark_linker_section_pinned() helper survives but is
now gated only on CONFIG_LINKER_USE_BOOT_SECTION.
* arch/common/init.c and include/zephyr/arch/common/init.h drop
arch_bss_zero_pinned(); arch/x86/core/ia32/crt0.S drops the call
to it.
* arch/x86/core/userspace.c drops the eager k_mem_page_in() of the
thread's privileged stack on user-mode entry. With the kernel
image fully resident the stack is already mapped.
* arch/x86/gen_mmu.py drops map_region("lnkr_pinned") and the
set_region_perms() calls for lnkr_pinned_text / lnkr_pinned_rodata.
* CMakeLists.txt drops the LINKER_USE_PINNED_SECTION block that
generated APP_SMEM_PINNED_* variables and the
pinned_partitions target property feeding gen_app_partitions.py.
cmake/modules/extensions.cmake removes the PINNED_RODATA /
PINNED_RAM_SECTIONS / PINNED_DATA_SECTIONS zephyr_linker_sources()
location keywords and their snippet files.
scripts/build/gen_app_partitions.py drops --pinoutput /
--pinpartitions arguments and the pinned-output branch.
subsys/testsuite/coverage/CMakeLists.txt drops its
CONFIG_DEMAND_PAGING-conditional fork.
* scripts/build/gen_kobject_list.py drops the
app_smem_pinned_start / _end fallback for kobject placement
validation.
* tests/arch/x86/pagetables and tests/kernel/mem_protect/userspace
drop their lnkr_pinned_text / lnkr_pinned_rodata branches.
* include/zephyr/arch/x86/ia32/arch.h folds IRQSTUBS_TEXT_SECTION
to the unconditional ".text.irqstubs" form.
* tests/subsys/llext/src/syscalls_ext.c drops a stale comment about
syscalls landing in .pinned_text.
Targeted retentions:
* arch/x86/core/bootargs.c keeps multiboot_cmdline and efi_bootargs
in .noinit (was __pinned_noinit, which decayed to __noinit when
LINKER_USE_PINNED_SECTION was unset). The multiboot and zefi loader
paths write these buffers before Zephyr's BSS-zero step, so
zeroing them at boot loses the cmdline.
* arch/x86/core/ia32/fatal.c keeps _df_esf and _df_stack in .noinit.
They are scratch space written by the double-fault handler and have
no zero-init requirement; keeping them in .noinit also preserves
the historical post-noinit alignment that gen_mmu.py relies on
(z_mapped_size is computed before CMake-injected iterable sections
are appended to the linker script, so the post-noinit page padding
is what keeps those sections within the mapped region).
* include/zephyr/arch/x86/ia32/syscall.h and
include/zephyr/arch/x86/arch.h wrap the per-arch
arch_syscall_invoke* / arch_is_user_context / arch_k_cycle_get_*
implementations in @cond INTERNAL_HIDDEN. The public Doxygen
contract lives on the prototypes in
include/zephyr/arch/arch_interface.h; the per-arch implementations
are internal. Without this, removing the __pinned_func attribute
exposes the implementations to the doxygen-coverage delta check
as 10 newly-undocumented APIs.
Documentation updates are deferred to a separate commit.
Issue: #108773
Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
Add optional H.264 test stream support to the video software generator.
Generate the Annex-B stream at build time with ffmpeg and copy one access
unit into each video buffer.
Signed-off-by: Mohammad Massoudi <m.massoudi32@gmail.com>
find_msb_set() returns 0 for a 0 argument, so the unconditional
"find_msb_set(cfg->source_burst_length) - 1" underflowed msize to
UINT_MAX when source_burst_length was 0, clobbering the msize = 3
default set at declaration.
Signed-off-by: Adrian Bonislawski <adrian.bonislawski@intel.com>
Move the hot functions to ITCM_TEXT (SRAM) to improve
throughput for UDP TX.
net_arp_prepare() is called on every IPv4 TX packet
from ethernet_send() for MAC address resolution.
Signed-off-by: Gang Li <gang.li_1@nxp.com>
Some review showed there were some small issues in the airoc_wifi
driver. A duplicated semaphore give on error and a memory leak when not
releasing a buffer.
Signed-off-by: Tom Burdick <thomas.burdick@infineon.com>
The SAM SPI peripheral natively supports 8-16 bit word sizes via
the SPI_CSR.BITS field, but the driver rejects anything other than
8-bit with -ENOTSUP.
Remove the 8-bit-only restriction and map word_size to the BITS
field. Add 16-bit-wide fast-path transfer functions (TX, RX, TXRX)
for word sizes > 8, where each word occupies a uint16_t in the
buffer. The spi_sam_fast_{tx,rx,txrx} wrappers added in the
previous commit now dispatch to the 8-bit or 16-bit variant based
on the configured word size.
This enables MIPI DBI Type C (3-wire 9-bit SPI) displays and other
peripherals that require non-8-bit word sizes on SAM MCUs.
Tested on SAM4S with a 9-bit SPI display (ILI9806 via MIPI DBI).
Signed-off-by: Ričards Poriņš <ricards.porins@gmail.com>
Rename spi_sam_fast_{tx,rx,txrx} to *_8 to make the 8-bit nature
explicit, and introduce thin wrappers with the original names that
take a device handle and delegate to the _8 variant. Update the
callers in spi_sam_{tx,rx,txrx} to pass the device handle through.
This is a pure refactor with no functional change; it sets up the
follow-up patch that adds 9-16 bit word size support by dispatching
to a 16-bit variant inside the wrapper.
Signed-off-by: Ričards Poriņš <ricards.porins@gmail.com>
INA228_DRIVER_INIT sets CAL with
`.cal = (INA237_DT_CAL(inst) * 16)`, where INA237_DT_CAL ends in
`/ 10000000ULL`. C operator precedence runs the divide before the
*16, so the truncation residual gets amplified 16x — and for small
current_lsb * rshunt products (e.g. 191 nA LSB, 5 mOhm shunt) the
numerator is below 1e10 and CAL collapses to 0, leaving the CURRENT
register stuck at zero (datasheet section 8.1.2).
Replace both CAL macros with a single parameterized
INA2XX_DT_CAL(inst, scaling) so the *16 (folded into
INA228_CAL_SCALING) happens inside the product, and the divide is the
last operation. INA237 path is functionally unchanged.
Signed-off-by: Noah Luskey <luskey@meta.com>
pmu_init() powers on every LP clock source. After selecting the RTC
slow clock, re-narrow the LP clock power to the chosen source while
keeping FOSC on for the LP timer, so the post-init LP clock power
state is correct on c5, c6, h2 and p4.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
Adds Driver emulation tests to validate configuration,
data fetching and temperature edge case checks.
Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
Fixes a computation issue that causes negative temperature values
to be erroneously parsed from the device driver.
Signed-off-by: Jan Carlo Roleda <jancarlo.roleda@analog.com>
The HASH_InitTypeDef field in the session structure seems unused.
Get rid of it as well as the type alias created just for it.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
The UART bit clock is peripheral_clock / (divider * oversample), so the
driver must choose an oversample factor for the requested baud.
ifx_cat1_uart_set_baud() ranked candidates with ifx_uart_baud_diff(),
which returns the error as an integer percentage. At 100 MHz / 115200
every oversample (8-16) is under 1% and rounds to 0, so the first
candidate (oversample 8, -0.45%) always won, the least accurate option
with the smallest sampling margin.
Compare the error in absolute Hz instead. This selects oversample 14
(divider 62, 115207 baud, -0.006%), improving both accuracy and margin.
A zero divider is skipped to avoid divide-by-zero and the percentage
tolerance is kept as the validity check.
Assisted-by: Copilot:claude-opus-4.8
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
Add error logging on the device-not-ready, HCI_RESET and firmware
download failure paths, and include the image size in the firmware
download debug message, to make bring-up failures easier to diagnose.
Assisted-by: Copilot:claude-opus-4.8
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>
The PM_DEVICE_ACTION_RESUME handler started the SCT counter
unconditionally. When RESUME runs before the first pwm_set_cycles()
no period match or counter limit event exists yet, so the counter
free-runs across its full 32-bit range. By the time a channel is
configured, COUNT has climbed past the period match installed as the
counter limit; since the limit only fires on COUNT == match, the
counter never resets and the output is stranded until a full 32-bit
wrap. Guard the start with pwm_channel_active so the counter is only
started once at least one channel has been configured.
Signed-off-by: Jacob Wienecke <jacob.wienecke@nxp.com>
Two bugs are fixed in the instance monitor dispatch path:
1. Instance monitor callbacks were invoked while holding the
notification spinlock. The lock protects the linked list of
runtime monitors, so holding it across a user callback can
deadlock when the callback tries to register or unregister a
monitor. Replace with a heap-snapshot approach: allocate a
temporary array under the lock, copy the instance monitor
pointers, release the lock, then invoke each callback outside
the critical section.
2. The heap allocation for the deferred FIFO snapshot was sized
as sizeof(fifo_node) + sizeof(notif), adding an extra notif
worth of bytes that were never used. The correct allocation
is sizeof(fifo_node) only, since the notification is owned by
the caller and passed by pointer.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
Add hl78xx_at_monitor, an optional library that lets application
code subscribe to parsed unsolicited AT notifications without
touching driver internals.
Static monitors are declared with HL78XX_AT_MONITOR() (deferred,
system workqueue) or HL78XX_AT_MONITOR_DIRECT() (direct, modem RX
context) and stored in a dedicated linker section. Runtime monitors
can be registered and unregistered via hl78xx_at_monitor_register().
A per-notification k_heap slab carries argument vectors to deferred
handlers.
All URC matches in hl78xx_unsol_matches are now routed through a
single hl78xx_on_unsol_monitored() entry point. This function
dispatches to the AT monitor first, then calls the driver's own
handler via an index into hl78xx_unsol_handlers[]. Existing driver
behavior is unchanged; the subsystem adds zero overhead when
CONFIG_HL78XX_AT_MONITOR is not set.
The hello_hl78xx sample is extended with a +CEREG AT monitor as a
usage demonstration.
Signed-off-by: Zafer SEN <zafersn93@gmail.com>
hostapd clears the AUTHORIZED flag while a station is being torn
down (e.g. the EAP-Failure that ends every WPS/WSC exchange), by
which point the peer may already be gone from the driver peer
table. Clearing a flag on an absent peer is a harmless no-op, so
treat it as success instead of logging "Unknown PEER" and failing
the op. Setting a flag on a missing peer remains a logged error.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
The LPTMR system timer driver used WUC_DT_SPEC_INST_GET_OR() which
relies on DT_DRV_COMPAT to resolve the device instance. Since the
system timer obtains its node via DT_CHOSEN(zephyr_system_timer)
rather than the standard device model, DT_DRV_COMPAT is undefined
and the macro silently falls back to the default value {0}. This
leaves wuc.dev as NULL and wuc_enable_wakeup_source_dt() is never
called, so the WUU module wakeup source for LPTMR is not programmed.
On MCXW7xx platforms this means timed wakeup from low-power states
fails: the board enters sleep and never returns.
Use WUC_DT_SPEC_GET_OR(LPTMR_NODE, ...) instead, which resolves
directly from the chosen system-timer node where the wakeup-ctrls
property is defined.
Signed-off-by: Albort Xue <yao.xue@nxp.com>
Added functions to make radio access technology and lte channels
runtime configurable. Defaults are still derived from kconfig values.
Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>