It was only needed because TF-M relied on TF-PSA-Crypto to expose its
header files.
Make TF-M install the TF-PSA-Crypto headers by default instead when
TF-PSA-Crypto is not enabled.
Assisted-by: Cursor:claude-opus-5
Signed-off-by: Tomi Fontanilles <tomi.fontanilles@nordicsemi.no>
Raise the minimum required CMake version from 3.20.0 (documented as
3.20.5) to 3.28.0, which is satisfied by the CMake 3.28.3 package
shipped in the Ubuntu 24.04 LTS repositories. Ubuntu 24.04 is the
current Ubuntu LTS release targeted by the Zephyr getting started
guide, and by the time of the next Zephyr release, Ubuntu 22.04 will be
within months of its end of standard support. Users of distributions
shipping an older CMake can use the Kitware APT repository or a
pip-installed CMake, as the documentation already suggests.
Raising the floor to 3.28 unlocks a range of modern CMake features for
the build system, among which the cmake_file_api() command (3.27),
file(COPY_FILE) (3.21), block()/endblock() (3.25), and allows removal
of several version-conditional workarounds.
The tree-wide cmake_minimum_required() occurrences in samples, tests
and boards are updated accordingly, together with the documentation
and the sysbuild CMake presets. The IAR C-STAT integration keeps its
own higher requirement (4.1.0).
Assisted-by: Claude:fable-5
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
Add a mux controller driver for the NXP TRGMUX peripheral, used to
multiplex trigger signals between on-chip peripherals. The
controller exposes two address cells (trgmux instance / output id)
and supports register-level lock so that an applied routing can be
frozen for the lifetime of the system.
Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
Add a pin controller driver for the WCH CH570 SoC.
Implements `pinctrl_configure_pins` to enable GPIO initialization and
alternate function configuration.
Update hal_wch revision in west.yml and hal_ch32fun.h to sync with
changes merged in zephyrproject-rtos/hal_wch#6
Signed-off-by: Elie Carrot <elie.carrot@smile.fr>
rpu_pwron() logs the BUCKEN and IOVDD_CTRL levels with gpio_pin_get_dt(),
but rpu_gpio_config() configures both pins as GPIO_OUTPUT only. The nRF
GPIO driver then leaves the input buffer disconnected, and its
port_get_raw() reads the IN register, so the log printed 0 for both pins
regardless of what they were actually driving.
Add GPIO_INPUT alongside GPIO_OUTPUT for BUCKEN and IOVDD_CTRL so the
values read back reflect reality. Drive strength is unaffected, and the
input buffer sees an actively driven level, so no pin is left floating.
The supply pin added by the previous commit gets the same treatment, for
the same reason. rpu_gpio_config_early() is left alone: it only exists to
keep the pins from floating before the interface comes up, and reads
nothing back.
Verified on an out-of-tree nRF5340 + nRF7002 board with
samples/net/wifi/shell, where the power-up log now prints
"Bucken = 1, IOVDD = 1" instead of "Bucken = 0, IOVDD = 0".
Signed-off-by: Buster Bøgild Nielsen <busterbbn@gmail.com>
Boards that gate the nRF70 VBAT/BUCKVBAT/AFEVBAT rail themselves had no
way to describe it, so the rail could not be raised and settled before
BUCKEN was asserted as the datasheet requires.
Include power.yaml in the nRF70 binding so the nodes accept the standard
supply-gpios and vin-supply properties, and add supply-power-up-delay-ms
for the settling time. Its 6 ms default is the minimum stated in the
nRF7002 datasheet, section 14.3.5, supply sequencing requirements. The
SPI bindings already inherited both properties through spi-device.yaml
while the QSPI ones did not, so in practice only QSPI gains them.
rpu_pwron() raises the supply and waits before touching BUCKEN, and
rpu_pwroff() releases it once IOVDD and BUCKEN are down. The two
properties are handled independently rather than as an either/or, so a
board with a shared regulator feeding a per-device load switch works:
power.yaml requires the regulator to be requested before the supply GPIO
goes active and the GPIO to go inactive before the regulator is
released, which is the order implemented here.
The supply spec and the regulator device are declared unconditionally,
using GPIO_DT_SPEC_GET_OR() and DEVICE_DT_GET_OR_NULL() so both are
present but empty when the properties are absent. That lets the call
sites use IS_ENABLED() instead of #ifdef, so every configuration
compiles the code and build errors are caught without adding twister
combinations. A vin-supply phandle to a node that is not okay yields
NULL, so rpu_gpio_config() checks device_is_ready(vin_supply) alongside
the GPIO ports.
If rpu_pwron() fails, rpu_init() only removes the GPIOs, which leaves a
switched rail undriven rather than off. It now releases the supply
first: the GPIO is driven inactive, and the regulator is released only
when this driver holds a reference on it, tracked in vin_supply_enabled.
regulator_is_enabled() cannot answer that question, as it is also true
when another consumer enabled a shared regulator.
Three Kconfig symbols are derived from the devicetree, one per property,
and NRF70_SUPPLY combines the two supply ones so the settling delay sits
behind a single condition. NRF70_VIN_SUPPLY and NRF70_IOVDD_REGULATOR
select REGULATOR, since the driver calls regulator_enable() and
regulator_disable(). Without that select such a configuration failed to
link with undefined references to those symbols. The iovdd-regulator
path has had this gap since 57baf7cf72 ("modules: nrf_wifi: Allow using
a regulator for IOVDD"); no in-tree board uses it, which is why it went
unnoticed.
Tested on an out-of-tree nRF5340 + nRF7002 board with
samples/net/wifi/shell in three configurations: the supply on a GPIO
only, behind a regulator-fixed node only, and both at once with the
regulator feeding the switch. All three power the RPU up and return
results from wifi scan.
Signed-off-by: Buster Bøgild Nielsen <busterbbn@gmail.com>
- Update the rpi_pico HAL to version 2.3.0.
- Add pico_util to include dirs to solve dependencies.
Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
wpa_supplicant initializes wpa_ssid::ieee80211w to
MGMT_FRAME_PROTECTION_DEFAULT (3), which is a #define rather than an
enum mfp_options member, and keeps that value whenever the network has
no explicit ieee80211w setting. supplicant_connect() only issues
"set_network <id> ieee80211w" when a non-zero MFP level is requested,
so a plain open or WPA2-PSK connection leaves the default in place.
get_mfp() had no handling for it, so every status query on such a
connection took the switch default: it logged a bogus "Invalid mfp
mapping 3" error and reported WIFI_MFP_DISABLE.
Handle the value explicitly (before the switch, as a case label outside
enum mfp_options triggers -Wswitch) and map it to WIFI_MFP_UNKNOWN,
since the effective level cannot be derived from the network block
alone. To keep the reported status meaningful, resolve it in
supplicant_status() with wpas_get_ssid_pmf(), which applies the same
global "pmf", key-management and driver-capability rules the supplicant
uses when associating.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-5
Align the public UART async API with its microsecond-based implementation.
Update the wide-data (u16 variant) TX and RX API documentation to
specify microseconds and SYS_FOREVER_US.
Replace millisecond-named forever sentinels in the serial test driver and
asynchronous UART callers, while retaining existing microsecond timeout
values in drivers, tests, and samples.
Assisted-by: Copilot:GPT-5.6 Terra
Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
Platform subdirectory is now added after `add_definitions` block so it
can correctly inherit the needed definitions.
Assisted-by: Claude:claude-opus-4.8
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
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:
$ scripts/check_quoted_includes.py -w modules/hal_realtek
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Enable NXP_IEEE802154_MAC by default when
OPENTHREAD_RADIO_VENDOR_IMPLEMENTATION is selected, ensuring the NBU MAC
intercore messaging layer is active for OpenThread on MCXW7XX platforms.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
This PR introduces support for compiling an OpenThread application using
a proprietary radio implementation without relying on the networking layer
and `CONFIG_NET_L2_OPENTHREAD`.
This mechanism is fully generic, not tied to any specific SoC or vendor.
Any vendor can add a compliant radio.c implementation into platform/vendor/
and enable it via Kconfig, without modifying any Zephyr platform code.
By bypassing CONFIG_NET_L2_OPENTHREAD, the full Zephyr networking stack
(CONFIG_NETWORKING) is not required. This eliminates the overhead of the L2
layer, network interface management, and associated buffers, resulting in
lower RAM usage, relevant for memory constrained targets.
Related to radio vendor specific file, there are multiple ways from which
this can be referenced. If the path is absolute, it will be used directly.
If the path is relative, it will be resolved in the following order:
first, a check will be done in APPLICATION_SOURCE_DIR.
If it is not found, check will be performed against
CMAKE_CURRENT_LIST_DIR/vendor/.
For radio specific file, usage of openthread-platform-utils-static is now
enabled.This gives access to otPlatRadio and otLinkMetrics API.
When picolibc and Zephyr's minimal C++ runtime are in use,
guards for function-local statics are not enabled, this leading to compile
errors. -fno-threadsafe-statics is added when
openthread-platform-utils-static is built against these runtimes.
Since initialization of these static local occurs only during OpenThread
stack bring-up, thread-safety guarantee is not required for the moment.
Signed-off-by: Cristian Bulacu <cristian.bulacu@nxp.com>
Co-authored-by : George Stefan <george.stefan@nxp.com>
Header file include/zephyr/sys_clock.h is deprecated and will be removed
someday. Update the whole file tree to include zephyr/sys/clock.h
straight instead of zephyr/sys_clock.h.
This change was made running the sed shell command below:
$ sed -i 's/zephyr\/sys_clock\.h/zephyr\/sys\/clock\.h/' \
`grep -rsl "zephyr/sys_clock\.h" modules/`
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
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
proposed in P-R 112135 with the Linux shell command below and manually
selecting the applicable changes:
$ ./scripts/check_quoted_includes.py -w modules/trusted-firmware-m
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Zephyr did not support remove and add supp and hostapd interfaces.
some legacy configurations and internal variables in wpa_supplicant
and hostapd were not cleared, This could lead to conflicts between
the newly initialized Wi-Fi.
configuration and the existing wpa_supplicant/hostapd state.
Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
Previously the code claimed that there could only be one flush event at a
time which is only true if there's a single display, with mulitple displays
LVGL doesn't wait for one display to render another meaning that there can
be two display flushing at the same time
Additionally it also claimed that LVGL can call `flush_wait` for a non
flushing display which is untrue. Unless a semaphore is used to track
the state of multiple displays there's no need for a `flush_request`
display semaphore
Signed-off-by: André Costa <andre_miguel_costa@hotmail.com>
Add the CH32H41X SoC series under the ch32v family. The CH32H417 is
an asymmetric dual-core (AMP) RISC-V part with a QingKe V3F boot
core and a QingKe V5F application core.
Model the two cores as cpuclusters with separate CPU descriptions,
runtime-idle power states, interrupt entry, vector handling, and
non-overlapping memory. Keep the external HSE frequency
board-specific.
The optional SOC_CH32H417_BOOT_V5F setting lets the V3F early-init
hook wake the V5F image at its real flash address, 0x08010000, while
allowing standalone V3F applications to disable that behavior.
Signed-off-by: Liu Changjie <liucj1228@outlook.com>
i.MX943 device headers unconditionally include "fsl_elec_spec.h", which
is only added to the include path when a drivers/ component is selected.
Cortex-A cores do not enable driver.reset, so enable driver.elec_spec
for the device. Also drop ca55/exception.c, which includes the SDK debug
console (not present in hal_nxp and unused by Zephyr).
Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
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_nxp -type f -exec \
./scripts/check_quoted_includes.py -w {} \;
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Interface PLL is started in siwx91x_clock_init(). However, it was not
restored after deep sleep. Therefore some devices used the wrong frequency.
Especially, the QSPI ran at 40MHz instead of 80MHz.
This patch ask to the HAL to restore the clock.
It also initialize it in sl_si91x_clock_manager_init(). So, the clock is
now initialize twice. However, since sl_si91x_clock_manager_init() doesn't
take the device tree into account, I believe it is better to keep both
initializations.
Fixes: 2ed508222d ("drivers: clock: siwx91x: Update QSPI clock source...")
Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
rtos_critical_is_in_interrupt() branched on CONFIG_ARM_CORE_CM4, a
Kconfig symbol defined only inside the external hal_realtek west
module (modules/hal/realtek/ameba/<soc>/Kconfig), not in the zephyr
tree itself. When check_compliance.py runs against a checkout where
the hal_realtek module has not been fetched via west update, that
symbol is never parsed and the Kconfig undefined-reference check
flags it as a false positive.
Both branches of the #ifdef are functionally identical: on Cortex-M,
__get_xPSR() & 0x1FF extracts the ISR_NUMBER field, which is exactly
what __get_IPSR() already returns directly. Drop the conditional and
call __get_IPSR() unconditionally, removing the dependency on the
HAL-only symbol.
Signed-off-by: Minyuan Xue <minyuan_xue@realsil.com.cn>
Assisted-by: Claude:claude-opus-4-7
Signed-off-by: Minyuan Xue <minyuan_xue@realsil.com.cn>
The dynamic rendering buffer allocator rejects PIXEL_FORMAT_RGB_565X
with -ENOTSUP even though it is a 2 bytes per pixel format like
PIXEL_FORMAT_RGB_565, so any RGB_565X display fails before rendering
anything when CONFIG_LV_Z_BUFFER_ALLOC_DYNAMIC is used.
Signed-off-by: Yeray Lois Sanchez <yerayloissanchez@gmail.com>
Displays exposing PIXEL_FORMAT_RGB_565X expect big-endian RGB565
pixel data, but the LVGL glue treats them as PIXEL_FORMAT_RGB_565
and renders little-endian, producing corrupted colors on every
RGB_565X panel that does not enable the legacy LV_COLOR_16_SWAP
flush-time swap.
Map RGB_565X to LV_COLOR_FORMAT_RGB565_SWAPPED so LVGL renders the
bytes in panel order directly, and drop LV_COLOR_16_SWAP from the
three in-tree boards that pair an RGB_565X panel with it (t_deck,
m5stack_core2 and wio_terminal), since keeping it would swap the
buffer a second time at flush. Boards pairing the option with an
RGB_565 pixel format are unaffected.
Signed-off-by: Yeray Lois Sanchez <yerayloissanchez@gmail.com>
Add in the missing RAIL blob stubs to enable non-blob builds,
specifically for the OpenThread Shell sample applications.
Fixeszephyrproject-rtos/zephyr#113574
Signed-off-by: David Boullie <David.Boullie@silabs.com>
Expose the OpenThread work queue pointer so callers can submit work
without relying on the deprecated k_work_q.thread field.
Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
The idle-hook based CPU load module lived under subsys/debug, required
CONFIG_TRACING, and exposed its API through <zephyr/debug/cpu_load.h>.
It does not conceptually belong to the debug subsystem, and its only
dependency on tracing was the idle notification hooks, now available
through CONFIG_SYS_IDLE_HOOKS.
Move the module to lib/os/cpu_load with its own CMakeLists and Kconfig,
relocate the public header to <zephyr/sys/cpu_load.h>, and select
SYS_IDLE_HOOKS instead of TRACING. Update all includers (the tracing
backends, samples and tests) to the new header path.
CONFIG_CPU_LOAD now builds and runs without the tracing subsystem.
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The wpa_supplicant-based software AP (SAP) path accepted only open and
WPA2-PSK security types and never enabled management-frame protection,
so a SoftAP could not run WPA3-SAE. Allow the SAE key management types
for SAP and set ieee80211w=2 (PMF required, mandatory for SAE) when a
SAE network is configured for AP mode.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
Check the net_if_get_by_name() result before indexing in
supplicant_send_wifi_mgmt_event() and supplicant_generate_state_event(),
and log the failing index on error. Tidy the declarations so the event
handling no longer needs an extra unindented scope block.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
When SoftAP is provided via wpa_supplicant
(CONFIG_WIFI_NM_WPA_SUPPLICANT_AP) a single Wi-Fi interface can act as
both a station and a SoftAP. Register the interface as SAP capable in
addition to STA so the Wi-Fi shell and management layer accept AP
requests on it.
To keep a single managed-interface entry per net_if, make
wifi_nm_register_mgd_type_iface() OR the new role into an existing
entry instead of consuming a second slot. Previously registering the
same interface as both STA and SAP created two entries, and
unregistration only removed the first, leaking the second and
confusing type detection.
Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
Assisted-by: Claude:claude-opus-4.8
When a user connects to an AP that advertises both PSK and
FT-PSK key management, wpa_supplicant sets ssid->key_mgmt to
WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_FT_PSK (0x42). The existing
switch in wpas_key_mgmt_to_zephyr() has no matching case for
this combined bitmask, causing wifi status to report the
security type as UNKNOWN.
Add a case for the combined WPA_KEY_MGMT_PSK | WPA_KEY_MGMT_FT_PSK
value that falls through to return WIFI_SECURITY_TYPE_FT_PSK,
which correctly reflects the active security mode.
Assisted-by: WChat:Claude
Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
TLS 1.3 session tickets derive a resumption PSK as long as the hash of
the negotiated ciphersuite. Mbed TLS stores it in a buffer sized
automatically (48 bytes when SHA-384 is available), but loading the
PSK into a resumption handshake goes through mbedtls_ssl_set_hs_psk(),
which rejects keys longer than MBEDTLS_PSK_MAX_LEN. With the previous
default of 32, a cached ticket from a SHA-384 based ciphersuite was
offered to the server, accepted, and then failed the handshake on the
client side, breaking reconnection for as long as the ticket stayed
cached.
Default MBEDTLS_PSK_MAX_LEN to 48 when session tickets and SHA-384 are
both enabled, mirroring the resumption key storage size in Mbed TLS.
Signed-off-by: Siddhant Modi <siddhant.modi@gmail.com>
SB_CONFIG_BOOT_SIGNATURE_KEY_FILE now accepts a comma-separated list of
PEM paths in addition to a single path. When a list is given, the MCUboot
bootloader embeds the public half of every key and accepts an image
signed with any of them. The first entry is also the key the application
is signed with; every entry past the first must be a public-only PEM of
the same signature type (MCUboot enforces this at build time with
'imgtool keyinfo --require public'). A common use is a development
bootloader that boots both development- and production-signed images
while never holding the production private key.
The keys the bootloader embeds and the single key the application is
signed with are both derived from this one list through the sysbuild
helpers sysbuild_mcuboot_resolve_signature_key_files() and
sysbuild_mcuboot_application_signature_key_file(). Entries are forwarded
verbatim for each image to resolve, so a single-key value behaves exactly
as before and no previously working configuration breaks.
The feature is exercised at runtime by tests/boot/mcuboot_multiple_keys,
which builds a two-key bootloader on the mps2/an385 QEMU machine and
boots an application signed with either embedded key, asserting MCUboot
validates it against the matching key (key_id 0 and key_id 1). The two
keys are MCUboot's own ed25519 test keys: a development key (key_id 0)
and a production key embedded by its public half only (key_id 1). The
application is signed at build time with the development key; the second
scenario re-signs the built image with the production key afterwards,
the way a production custodian signs a release binary out-of-band, so
the production private key never enters the build configuration.
Signed-off-by: JP Hutchins <jp@intercreate.io>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The original commit introducing this option was mistaken about the
version of Zephyr that updated to TF-M 2.2.0 and thus introduced the
initial break. It was updated in commit f67be667, first present in
Zephyr v4.2, with the version of TF-M reverting the size change
included in Zephyr v4.3.
Since the fix only needs to be set for applications originally
programmed with Zephyr v4.2, update the Kconfig name to reflect this
fact.
Signed-off-by: Jordan Yates <jordan@embeint.com>
Convert the CONFIG_WIFI_NM_WPA_SUPPLICANT guard to an early return
instead of wrapping the whole file, so the body no longer needs
re-indenting, and fix the remaining nested-block indentation.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.8
Convert the CONFIG_OPENTHREAD and CONFIG_OPENTHREAD_SOURCES guards to
early returns instead of wrapping the whole file, so the body no longer
needs re-indenting, and fix the remaining nested-block indentation.
Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Assisted-by: Claude:claude-opus-4.8
New command is added to remove P2P persistent network(s).
wifi p2p persistent_remove <idx>
If idx >= 0, check existance of persistent network with the given idx
and remove it if exists.
If idx = -1, remove all saved persistent networks.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
With current implementation, the response of wifi p2p power_save is
actually "UNKNOWN COMMAND".
The command content should be "P2P_SET ps %d".
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Add persistent support in P2P connect command
Add new parameter -a which indicates adding new persistent group.
No argument. No persistent group will be added without -a.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
The persistent parameter doesn't work when trying to add persistent
group in wifi p2p group_add command. The fixes are as below:
1. Add new parameter -a to indicatie adding persistent group (default
false).
2. Parameter -a has high priority than -p. This which means if both -a and
-p parameters are adding in group_add command, -a will finally take
effect.
3. If -a is added, will issue command "set persistent_reconnect 1" to ctrl
interface so that the persistent group could be re-invoked by other
peers.
4. Added sanity check if persistent index is indicated. Check if the
persistent group is exist or not. If not exist, print error log.
Signed-off-by: Hui Bai <hui.bai@nxp.com>
Update header files in include/zephyr/ to use a ZEPHYR_INCLUDE_ prefixed
header guard macro with the macro name matching the header file path
in include/zephyr/ file tree.
These changes were made using zephyr_header_guards.py script proposed
in https://github.com/zephyrproject-rtos/zephyr/pull/111768 with a
Linux shell command like the on below:
$ scripts/zephyr_header_guards.py --apply include/zephyr/toolchain
Also manually update modules/cmsis-dsp/CMakeLists.txt to prevent build
failures due to include/zephyr/toolchain/zephyr_stdint.h header guard
macro renaming.
Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
Add wpa3 transition disable bitmap configuration parameter.
This feature used to verify if station fallback can select
secure algorithms correctly under AP transition disable
configured.
Signed-off-by: Rex Chen <rex.chen_1@nxp.com>