Gate the uart21 branch on NRF_SECURE_UART_INSTANCE == 21 so it only applies
on platforms whose secure UART actually is instance 21 (nrf7120). Boards
using uart30 as the secure console fall through to the uart30 branch again.
Fixes issue introduced with commit 192ec301a3.
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This is needed to integrate nicely with librail, the closed source radio
library for silabs SoCs. It also integrates nicely with sleeptimer, which
Zephyrs silabs_sleeptimer_timer.c uses internally.
While this might also work with Series 0, I don't have the hardware to test
that, so it stays disabled for now.
Adjustments I made to soc_power_pmgr.c:
- gecko_sdk doesn't have hfxo manager, so surround it by the relevant
ifdefs.
- gecko_sdks power manager doesn't support EM4, so call EMU_EnterEM4 for
that, like their SDK code does.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
Handle zero-length output buffers before writing the terminator and
check the destination bound before reading the current source byte.
This keeps P2P peer info parsing inside the helper-provided output
range.
Signed-off-by: Old Ding <ai.neo.ae86@gmail.com>
nRF7120DK will use uart21 for console output from S domain and so
RTE_USART21 must be included for config.
Signed-off-by: Robert Robinson <robert.robinson@nordicsemi.no>
Use #include <> instead of #include "" to include a header file which path
is not relative to the directory path of the file emitting the #include
directive.
This change was made running scripts/check_quoted_includes.py script
with the Linux shell command below and manually selecting the applicable
changes:
$ find modules/hal_silabs -type f -exec \
./scripts/check_quoted_includes.py -w {} \;
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add wl80211 RTOS shim (semaphores, mutexes, timers, lock/unlock) and
supplicant bridge for the macsw blob.
Refactor bl61x blob linkage: share libbl616_phyrf.a between BLE and
WiFi, add MACSW variant selection (default/bridge/ack/coex), and link
wl80211 and macsw libraries when CONFIG_BFLB_WIFI is enabled.
Signed-off-by: William Markezana <william.markezana@gmail.com>
Host the public ESP_HAL_LOG_LEVEL and ESP_HAL_EARLY_LOG_LEVEL options
in modules/Kconfig.esp32, which is sourced directly by modules/Kconfig.
Drop the separate modules/hal_espressif glue directory whose Kconfig
sourced the hal tree back with an unconditional osource. That osource
ran even when the module directory variable was empty, collapsing to
a path that recursed into Kconfig.zephyr when the repo sits at root.
Signed-off-by: Sylvio Alves <sylviojalves@gmail.com>
Add CH32V10x chip family selection macro and include ch32fun.h
for the QingKe V3A SoC series, consistent with existing V2A, V2C,
and V4B series support.
Signed-off-by: Lucy Wong <mova845@outlook.com>
The sleeptimer service from the gecko_sdk is a generic API which supports
multiple hardware timer peripherals internally. The reason we want to use
this rather than a Zephyr native driver, is that sleeptimer is what's used
by the power_manager service from the SDK which in turn is used by librail.
Combined with other, future commits, this will allow reducing the power
consumption of gecko_sdk based SoCs while they are idle.
Since the APIs between gecko_sdk and simplicity_sdk are the same, all
that's needed is to adjust the Kconfig dependencies and compile the
relevant sdk code. For now, this supports the RTCC peripheral only, which
is used on efr32mg13p, which is what I test with.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
NXP's USDHC SDK driver knows how to do its own cache maintenance and
does so on platforms that set HAS_MCUX_CACHE[1]. Recently, a copy of
that cache maintenance logic was added on the Zephyr side because
certain cores, like the Cortex-M33 of the i.MX RT1180, use an external
cache controller and instead set HAS_MCUX_XCACHE.
However, the Zephyr-side cache logic is buggy: it clobbers the response
data in cases when the SDK can't use DMA (specifically, when the RX
buffer isn't 4-byte aligned[2]): in those cases, the SDK code writes to
the buffer, those writes go to cache, then Zephyr invalidates the cache
discarding the written data.
NXP's SDK abstracts over different cache drivers just like Zephyr does,
so it's fine to enable its cache control for platforms with any type of
cache. Do that instead of reimplementing cache maintenance in Zephyr.
This partially reverts commit 0b8babdcc3 ("drivers: sdhc: imx_usdhc:
add cache maintenance on DMA path"), leaving only the new default value
for CONFIG_SDHC_BUFFER_ALIGNMENT.
[1] 2d8b1b1133/modules/hal_nxp/mcux/CMakeLists.txt (L140-L142)
[2] cddb388583/mcux/mcux-sdk-ng/drivers/usdhc/fsl_usdhc.c (L1343-L1346)
Signed-off-by: Thomas Hebb <tommyhebb@gmail.com>
Implies building a confirmed hex image when RAM with revert mode
is used, as without using a confirmed image it will not boot
Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
Add a sensor driver for the NXP MCUX Enhanced Quadrature Decoder (EQDC)
using the fsl_eqdc HAL. The PHASEA/PHASEB decoder inputs are routed
through the on-chip INPUTMUX, described by an "inputmux-connections"
phandle-array following the nxp,inputmux convention.
The driver exposes SENSOR_CHAN_ROTATION, SENSOR_CHAN_RPM,
SENSOR_CHAN_ENCODER_COUNT and SENSOR_CHAN_ENCODER_REVOLUTIONS; the last
channel is added to the sensor API. Velocity uses the EQDC period
measurement (POSDH/POSDPERH), so a prescaler keeps the 16-bit period
counter from saturating at the sample rate.
A single-phase-mode property selects single-phase decode (one count per
PHASEA pulse, with the direction taken from PHASEB) instead of the
default quadrature X4 decoding, with the counts-per-revolution scaling
adjusted accordingly.
Co-authored-by: bnina-ayoub <ouba.bnina@gmail.com>
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Per WPA3 specification, stations connecting via SAE
authentication must have PMF (Protected Management Frames)
capability enabled. Set sae_require_mfp to 1 in hostapd AP
configuration (hostapd_config_read2) so that in WPA3-Personal
Transition mode (ieee80211w=1), the AP rejects SAE stations
that do not advertise MFPC in their RSN capabilities. This
allows legacy PSK stations to connect without PMF while
enforcing PMF for all SAE connections.
Assisted-by: WChat:Claude
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
Add a system timer driver for the NXP RTC (rtc_jdp) IP on the MCXE31x
family. It implements the standard system clock interfaces and is
selected through the zephyr,system-timer chosen property pointing at an
nxp,rtc-jdp node.
The RTC is a free-running 32-bit up-counter with a single absolute
compare register (RTCVAL); the driver runs tickless against it. Because
the RTC keeps counting in all low-power states, it can serve as the
kernel tick source without a companion timer.
RTCVAL is an equality compare that synchronizes into the slow RTC clock
domain and sets INV_RTC while in progress, during which further RTCVAL
writes are ignored. The driver waits for INV_RTC to clear before a write
and, after it, re-reads the counter and retries with the compare bumped
forward if the count has already reached it, so a match is never lost to
the sync latency (a miss would only recur after a full 32-bit wrap). The
scheduling horizon is capped at half the counter range so a compare
cannot wrap past the counter and look like the past, mirroring
mcux_stm_timer.c.
The counter rate (clock-frequency / prescaler) is published at runtime
via TIMER_READS_ITS_FREQUENCY_AT_RUNTIME, making the devicetree
prescaler the single source of truth for the tick rate. The MCXE31x SoC
defconfig disables SysTick and defaults the tick rate when this timer is
selected.
Validated on frdm_mcxe31b: tests/kernel/timer/timer_api passes 15/15.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
For RTOS Wi-Fi device, SNR is more often required than throughput.
Throughput-based selection favors APs advertising higher data rates or
wider channel bandwidth, which may not reflect actual link quality in
embedded/IoT deployments. In contrast, SNR-based selection prioritizes
signal quality, leading to more stable connections, fewer
retransmissions, and better roaming decisions — all critical for
resource-constrained RTOS devices that prioritize connection stability
over raw throughput.
So choose WIFI_NM_WPA_SUPPLICANT_NW_SEL_RELIABILITY by default.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Wire the RPMsg-Lite library (from hal_nxp mcux-sdk-ng multicore
middleware) into the Zephyr build system:
- modules/Kconfig: source the new Kconfig.rpmsg-lite shim so that
RPMSGLITE becomes selectable as a west module.
- modules/Kconfig.rpmsg-lite: osource the rpmsg-lite Zephyr Kconfig
when the standalone module is present.
- modules/hal_nxp/mcux/Kconfig.mcux: expose RPMSGLITE and related
RL_* symbols from the hal_nxp copy of rpmsg-lite.
- modules/hal_nxp/mcux/mcux-sdk-ng/middleware/Kconfig,
Kconfig.multicore: hook the multicore middleware Kconfig chain.
- modules/hal_nxp/mcux/mcux-sdk-ng/middleware/multicore.cmake:
add the rpmsg-lite CMake fragment to the hal_nxp build.
- west.yml: pin hal_nxp to the PR branch that restores the Zephyr
RPMsg-Lite integration files.
Signed-off-by: Tomas Galbicka <tomas.galbicka@nxp.com>
Use <> operator to include a Zephyr header file instead of "" that
is intended to local header files, not header files relative to
specifically defined search paths.
This change was made running the sed shell command below:
$ sed -i -E 's/#include "zephyr\/([^"]+)\.h"/#include <zephyr\/\1.h>/g' \
`grep -rsl "#include \"zephyr/" modules/`
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
The `thread` field is not initialized, if it's being animated via
k_work_queue_run instead of k_work_queue_start.
Signed-off-by: Michael Zimmermann <michael.zimmermann@sevenlab.de>
This option can be used to override `CONFIG_SOC` at STM32Cube HAL module
level, which is useful for a few specific products where the SoC name
does not match the preprocessor definition that the HAL needs to add
in order to work properly.
While at it, update the STM32F0 and STM32F4 series Kconfig to make use
of this new option, allowing `CONFIG_SOC` to now always reflect the
selected SoC's actual name.
Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
Add support to the API for signifying that the provided PSK is the
pre-computed PBKDF2 output, instead of the ASCII passphrase. For
drivers that support that option, it allows for significant execution
time optimisations, as the computation has been measured as taking over
700ms on a 128MHz Cortex-M33 (nRF54L15). Computing the PBKDF2 value is
left for the caller to implement.
Support for this option is added to the HostAP (wpa_supplicant) driver.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Add roaming retry count to fall back roaming method to next one.
Roaming 11K/11V may fail because AP does not carry right candidate.
In this case we can jump to next method when we receive signal change
event again.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Deprecate explicit 11R roaming api.
11R is not a way of getting candidate. It is a way of getting keys.
So it can combine with 11K/11V/legacy roaming method
and controlled by wifi_connect -R param.
Signed-off-by: Fengming Ye <frank.ye@nxp.com>
Enable the iap driver to LPC84x series when CONFIG_SOC_FLASH_LPC84X_IAP
is set.
Signed-off-by: Dilip Raman <dilipr@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Link the lpc_miniusart SDK component when CONFIG_UART_LPC84X is
enabled and disable SDK-managed clock control to let Zephyr
handle peripheral clocks.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Co-authored-by: Dilip Raman <dilipr@aerlync.com>
This allows Zephyr's LPC84X pinctrl driver to use the underlying
MCUX HAL support for IOCON and Switch Matrix configuration.
Signed-off-by: Surya Prakash T <suryat@aerlync.com>
Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
Co-authored-by: Dilip Raman <dilipr@aerlync.com>
Select the MCUXpresso SDK STM driver component when CONFIG_MCUX_STM_TIMER
is enabled so the system timer driver can link against fsl_stm.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
MBEDTLS_HAVE_ASM defaults to "y if !ARM", so it is disabled on all ARM
targets. The ARM exclusion goes back to commit d599af40c8 ("ext/lib/
mbedtls: Add the TLS configuration file", 2017), where the #define was
guarded by "#if !defined(CONFIG_ARM)"; commit a6d82db50f (2019) kept
that default when it made the option configurable via Kconfig. At the
time there was no per-core ARM granularity to rely on, so a blanket
exclusion was a reasonable default.
The Mbed TLS MPI assembly (bn_mul.h MULADDC) uses the long multiply
(umull/umlal), which is available on the ARMv7-M and ARMv8-M mainline
cores (Cortex-M3/M4/M7/M33/M55) but not on the ARMv6-M / ARMv8-M
baseline cores (Cortex-M0/M0+/M23). The blanket exclusion therefore
also turns the assembly off on the mainline cores, where it is usable.
Enable it on ARMV7_M_ARMV8_M_MAINLINE, where it speeds up asymmetric
crypto noticeably (e.g. a WPA3-SAE group 19 handshake) at no code-size
cost; the asm path is in fact slightly smaller than the C multiply
loop. Baseline cores keep the previous default of n.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
Move the osource of the HAL zephyr/Kconfig inside the
SOC_FAMILY_ESPRESSIF_ESP32 guard. When the module directory
variable is undefined on non-Espressif builds the path collapsed
to /zephyr/Kconfig and caused recursive source errors.
Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
MCXE31X standby wake uses WKPU source 1 to route the RTC alarm
into the mode-entry wake logic. Enable the MCUX WKPU component
when CONFIG_POWEROFF is selected for the SoC series.
Keep the component selection separate from the SoC poweroff
implementation so intermediate revisions remain buildable while
bisecting the series.
Signed-off-by: Holt Sun <holt.sun@nxp.com>
This driver supports CLOCK_MONITOR_MODE_MEASURE:
configure programs REF_CNT from the user's window_ns and the
reference clock rate queried via clock_control; start() triggers a
single measurement whose completion is delivered through the
configure-time callback, with the device auto-disarmed before the
callback runs so the callback may restart the next measurement from
ISR context. get_rate() returns the most recent completed result.
stop() is ISR-safe and aborts an in-flight measurement; a transient
CONFIGURING state guards configure()'s unlocked clock query and HAL
init against concurrent start().
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
This driver supports CLOCK_MONITOR_MODE_WINDOW:
configure programs HFREF and LFREF from the user's expected_hz +
tolerance_ppm (auto-derived from the monitored clock via
clock_control when expected_hz is 0), start begins the background
comparison and stop disables it.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
When an application issues a WiFi management request (e.g.
NET_REQUEST_WIFI_CONNECT) shortly after boot, wpa_supplicant may not
have finished initializing the per-interface control connection yet.
In that window get_wpa_s_handle() already returns a valid wpa_s, but
wpa_s->ctrl_conn is still NULL because zephyr_wpa_ctrl_init() has not
run.
The wpa_cli_cmd_v() macro and a few direct callers passed this NULL
ctrl_conn down to zephyr_wpa_cli_cmd_v() -> wpa_request() and on into
send_data(), which dereferenced the connection (its send fifo),
producing a hard fault / NULL pointer dereference. Calls that go
through global_ctrl_conn were unaffected, which is why only some
commands crashed.
Add NULL checks so the supplicant fails the request gracefully with
-EAGAIN ("not ready yet") instead of faulting:
- wpa_cli_cmd_v(): central guard covering all command call sites,
including the unlocked ones.
- wpas_add_and_config_network(), supplicant_connect() and
supplicant_status(): explicit early checks before the direct
z_wpa_ctrl_*() uses, returning a clear error to the caller.
- Also propagate -EINVAL when "remove_network all" fails so the
connect path no longer reports success on a dropped command.
The ctrl_conn pointer is only ever opened once during interface bring
up (NULL -> valid, never freed), so the NULL check alone is sufficient
for the reported boot-time race. To keep the check correct against
interface teardown as well (valid -> NULL + freed in del_interface),
serialize the open/close of ctrl_conn with the existing
wpa_supplicant_mutex that the API entry points already hold, so a
command holding the mutex cannot have ctrl_conn torn down underneath
it.
Applications should still wait for the NET_EVENT_SUPPLICANT_CMD_READY
event before issuing requests; this change just makes premature calls
fail safely.
Fix#111756.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
This commit adds the option to externally manage the mDNS hostname
creation from application layer which runs alongside border router
sample.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
MBEDTLS_ECP_NIST_OPTIM enables optimized modular reduction for the NIST
curves (P-256/P-384/P-521). Upstream Mbed TLS and TF-PSA-Crypto define
this option by default in their configuration headers, but when it was
converted to a Kconfig symbol it was given no default and therefore
silently defaults to n.
Without it, every field multiplication on a NIST curve falls back to
generic modular reduction, which is roughly an order of magnitude
slower. This significantly penalizes ECC-heavy paths; for example a
WPA3-SAE (group 19) handshake slows from ~450 ms to ~5 s.
Restore the upstream default by defaulting the option to y. It is
already gated on PSA_WANT_KEY_TYPE_ECC_KEY_PAIR_BASIC, so it only takes
effect when ECC is in use; the only cost is a small amount of flash for
the reduction tables.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
While most of the XMClib was enabled for all xmc4xxx parts, ethercat was
completely ommitted. Enable it for the xmc4500 and xmc4800, the two
variants that support ethercat.
Signed-off-by: Karl Palsson <karl.palsson@marel.com>
The addition of a default value for LV_DRAW_BUF_ALIGN in STM32
led to build warning due to a Kconfig defined without a type.
Set its type to int in modules/lvgl/Kconfig, matching the type
defined for this Kconfig option in the LVGL Kconfig.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Expose the LV_USE_DRAW_DMA2D_INTERRUPT config in order to
enable/disable the interrupt based DMA2D usage in LVGL.
Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
Remove `$(ZEPHYR_BASE)` from `source "<file>"`.
Source is always relative to ZEPHYR_BASE, so no need to specify it.
Signed-off-by: Torsten Rasmussen <Torsten.Rasmussen@nordicsemi.no>
Map CONFIG_MCUX_SYSCTR_TIMER to the mcux-sdk-ng driver.sysctr component
so the HAL's fsl_sysctr sources and headers are pulled into the build
whenever the new MCUX System Counter timer driver is selected.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
CONFIG_MBEDTLS_DECLARE_PRIVATE_IDENTIFIERS no longer mirrors TF-PSA-Crypto
builtin private headers into CMAKE_BINARY_DIR without the private/
segment. Consumers must include mbedtls/private/... explicitly; the
mbedtls library INTERFACE already exposes drivers/builtin/include.
When building the MCUboot image, add drivers/builtin/src to the mbedTLS
INTERFACE include path so bootutil can include rsa_alt_helpers.h by
basename.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Cursor: Auto