Commit graph

136,983 commits

Author SHA1 Message Date
Fabrice DJIATSA
d73f59a829 tests: drivers: flash: stm32: fix bus fault after blocking OPT/CR registers
On STM32H7 targets with cache management enabled by default, blocking
access to flash option/control registers using flash_ex_op() may cause
imprecise Bus Faults when attempting to unlock them immediately afterward.

This is due to instruction pipeline and cache effects, where the CPU might
execute a forbidden access before the lock is fully acknowledged.

Adding barrier_isync_fence_full() ensures that all prior
instructions are completed and the pipeline is flushed,preventing premature
access and avoiding the fault.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-11-21 12:01:41 +01:00
Jukka Rissanen
61d57c35ff net: Disable namespace compatibility support for tests
Do not enable network compatibility mode flag for network tests
so that we will get better coverage of the wrong network APIs
used.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-21 12:01:31 +01:00
Alberto Escolar Piedras
8ecbda3283 net: lwm2m: Remove use of fcntl.h
Use the underlaying zsock_ prefixed fcntl macros instead of the
POSIX_API fcntl renames.
After d45cd6716b and this, we do not
anymore use fcntl directly but use the underlaying Zephyr APIs.
So, let's also remove this include.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-21 12:01:31 +01:00
Jukka Rissanen
9795ce7bba tests: net: ocpp: Fix uninitialized variable warning
According to the compiler, the ret variable might be uninitialized
in the function (looks like a false positive but fix it anyway).

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-21 12:01:31 +01:00
Jukka Rissanen
a42c23e002 drivers: net: nsos: Convert to use namespaced net APIs
Use the namespaced network APIs instead of POSIX ones.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-21 12:01:31 +01:00
Jukka Rissanen
8046a24104 net: Fix network API calls that were not namespaced
Some of the networking calls were not namespaced so fix it.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-11-21 12:01:31 +01:00
Pieter De Gendt
506beae4bb drivers: sensor: Fix RTIO fallback scaling from sensor_value to q31
If the sensor_value only has an integer part N, this always resulted in q31
value of <N-1>.999999.
As the calculated shift value already uses 'abs(sample.val1) + 1' it is
safe to assume we can't have 100% scaling of this integer part and we can
omit the -1.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-11-21 12:01:21 +01:00
Etienne Carriere
06c231dcdf tests: drivers: build_all: misc: build test for stm32n6_axisram
Add a build-all test for stm32n6_axisram driver that is currentl not
default enabled in any STM32N6xx based boards.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-21 12:01:12 +01:00
Etienne Carriere
85088539a6 drivers: misc: stm32n6_axisram: fix clock config info
Correct clock config info recently modified that should use
STM32_DT_INST_CLOCK_INFO_BY_NAME() macro instead of
STM32_CLOCK_INFO_BY_NAME() macro.

Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
2025-11-21 12:01:12 +01:00
Peter Büchler
8d01323b2f net: lib: ptp: fix BTCA grandmaster selection and related state transition
The BMCA comparator ptp_btca_ds_cmp() did not follow the IEEE1588
ranking order: priority fields handled only the “greater” case, causing
valid winners to fall through to the clockIdentity tie-breaker and
resulting in incorrect grandmaster selection. This also caused the
state transition from TIME_TRANSMITTER to GRAND_MASTER to be missed.

Fixes: #99562
Fixes: #99566

Signed-off-by: Peter Büchler <peter.buechler@gmail.com>
2025-11-21 11:59:49 +01:00
Mathieu Choplain
a7b396f9ab drivers: gpio: stm32: use FOR_EACH to instantiate devices
Use a list of ports and FOR_EACH to instantiate GPIO devices instead of
having one line to instantiate each port. This is much shorter and also
makes it easier to add support for new ports, if necessary in the future.

While at it, cover all ports from A to Z since it is now trivial to do so.

Signed-off-by: Mathieu Choplain <mathieu.choplain-ext@st.com>
2025-11-21 11:59:40 +01:00
Christophe Dufaza
b5744c3158 doc: develop: manifests: external: add dtsh
Introduce documentation for using dtsh (a Devicetree Shell)
as an external module in Zephyr.

This module installs a West extension.

See also RFC #59863.

Signed-off-by: Christophe Dufaza <chris@openmarl.org>
2025-11-21 10:11:14 +02:00
Yongxu Wang
1266be59d6 soc: nxp: imx9: use SCMI generic power domain ON/OFF
Switch to SCMI_POWER_STATE_GENERIC_ON/OFF from the power protocol
header instead of local defines

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-21 10:10:24 +02:00
Yongxu Wang
c77b4ba46f drivers: firmware: scmi: define generic power domain ON/OFF states
Add SCMI generic power state definitions for ON and OFF as specified
by the SCMI Power Domain protocol.
These constants will be used when setting or querying power states.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-21 10:10:24 +02:00
Tomasz Bursztyka
bda00b3770 drivers: uart: Add configure/config_get API support for mspm0 driver
It is thus possible to enable CONFIG_UART_USE_RUNTIME_CONFIGURE for
this driver and re-configure a uart device at runtime.

Driver's init function was moved to the bottom of the file for two
reasons: to ease factorization and to follow the common device driver
source structure (usually: the init function is right before the
API structure and the instanciation macros).

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-11-21 10:10:11 +02:00
Yves Wang
fbf5cacbf3 tests: watchdog: Clear watchdog reset source for frdm_mcxe31b
Clear watchdog reset flag then device can retein memory.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-11-21 10:09:59 +02:00
Yves Wang
364c380681 dts: nxp: Add watchdog support for MCXE31x
Enable swt as watchdog instance for NXP MCXE31x.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-11-21 10:09:59 +02:00
Yves Wang
e909110dc4 boards: nxp: frdm_mcxce31b allow clear des fes reset flag
On destructive or functional reset, the soc_reset_hook will check reset
source and clear SRAM TCM.
Add support to let developer clear specify reset source to retein memory
content.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-11-21 10:09:59 +02:00
Yves Wang
9f81fcb5f1 drivers: clock_control: MC_CGM support get SIRC clock rate
Return fixed SIRC clock rate in nxp mc_cgm.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-11-21 10:09:59 +02:00
Yves Wang
ec7b99a855 drivers: watchdog: Make SWT compatible with hal_nxp
Avoid multiple declarations of SWT macros.
No need to log error for redundant watchdog disable.

Signed-off-by: Yves Wang <zhengjia.wang@nxp.com>
2025-11-21 10:09:59 +02:00
Tomasz Moń
7e11bc5817 usb: device_next: msc: Reduce memory usage
MSC BOT can work with just one buffer because buffer to receive CBW is
never queued at the same time as CSW. SCSI buffer needs to be multiple
of bulk endpoint wMaxPacketSize and therefore is suitable for handling
both CBW and CSW. Take advantage of this to reduce memory usage.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-11-21 10:09:49 +02:00
Tomasz Moń
1243aba8e5 usb: device_next: msc: Implement double buffering
Double buffering make it possible to significantly increase the transfer
rates by avoiding idle states. With two SCSI buffers, one buffer can be
used by disk subsystem while the other is being used by UDC (ideally
with DMA).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-11-21 10:09:49 +02:00
Tomasz Moń
78291d4fc2 usb: device_next: msc: stall endpoints on enqueue error
When endpoint enqueue fails the device has no reliable means of recovery
other than a reset. Implement 6.6.2 Internal Device Error handling on
failed enqueue.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-11-21 10:09:49 +02:00
Yongxu Wang
2c72fe58e8 soc: nxp: imx943: configure GPT as system timer for power management
Configure GPT timers as system tick source when PM is enabled to resolve
low power mode issues:
- Cortex-M SysTick loses state during mix power-off
- SysTick cannot maintain time during system suspend

Configuration changes:
- Disable Cortex-M SysTick when GPT timer is enabled
- Set GPT clock frequency to 32768 Hz for low power operation, 32k is
  reserved in soc level system sleep mode
- Configure system tick rate to 1024 Hz

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-21 10:09:40 +02:00
Yongxu Wang
923f1af2ad boards: nxp: imx943: enable GPT hardware timers for system tick
Enable GPT hardware timers on imx943_evk boards:
- gpt_hw_timer1 for M33 core
- gpt_hw_timer2 for M7_0 core
- gpt_hw_timer3 for M7_1 core

These will be used as system tick sources when PM is enabled.

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-21 10:09:40 +02:00
Yongxu Wang
2dd1bbd159 dts: arm: imx943: add GPT timer nodes for system tick and counter
Add GPT timer nodes to support system tick and counter functionality:

- gpt_hw_timer1/2/3: System timers for M33/M7_0/M7_1 cores
- gpt4: General purpose timer/counter

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-21 10:09:40 +02:00
Yongxu Wang
8583ba39fd dts: arm: nxp: fix imx943 compliance ci check formatted warning
Fix Device Tree formatting issues to comply with Zephyr coding style
guidelines for i.MX943 EVK board and dts files

Signed-off-by: Yongxu Wang <yongxu.wang@nxp.com>
2025-11-21 10:09:40 +02:00
Andrey Smirnov
4ef0ded130 usb: hid: Introduce HID_USAGE_PAGE16()
Introduce HID_USAGE_PAGE16() in order to be able to declare vendor
specific usage pages which require 16-bit numbers.

Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
2025-11-21 10:09:28 +02:00
Alberto Escolar Piedras
b4ff1f661c tests/posix/net: Fix check for host libc
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-21 10:09:08 +02:00
Alberto Escolar Piedras
bdfb7604c0 subsys/crc/crc_shell: Fix check for host libc
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-21 10:09:08 +02:00
Alberto Escolar Piedras
bc77cfafe6 shell: Fix check for host libc
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of pressuming that any build targetting the POSIX architecture
uses it. This has not been the case for several years now, as we can
select different C libraries when targetting the POSIX architecture.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-21 10:09:08 +02:00
Alberto Escolar Piedras
65b5240bd4 include posix posix_types.h: simplify libc check
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of checking for both CONFIG_ARCH_POSIX && CONFIG_EXTERNAL_LIBC
as it is just simpler since we have this option.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-21 10:09:08 +02:00
Alberto Escolar Piedras
75ac1c18fc net: include: socket_types.h simplify libc check
Let's use CONFIG_NATIVE_LIBC to detect builds with the host C library
instead of checking for both CONFIG_ARCH_POSIX && CONFIG_EXTERNAL_LIBC
as it is just simpler since we have this option.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-21 10:09:08 +02:00
Ederson de Souza
67e229fd20 dts/arm/nuvoton/npcx: Fix uart2 clock on npcx4
Commit 08fedb4a80 ("drivers: uart: npcx: add asychronous API support")
missed updating the clocks for uart2. This patch fixes it.

Signed-off-by: Ederson de Souza <ederson.desouza@intel.com>
2025-11-21 10:08:59 +02:00
Jordan Yates
f8eb167619 scripts: ci: simple ruff formatting
Basic `ruff` format operations to allow CI to enforce from now on.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-21 10:08:50 +02:00
Jordan Yates
3f77560b92 scripts: ci: test_plan: fix ruff reports
Fix problems reported by `ruff` and remove exclusions from the config
file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-21 10:08:50 +02:00
Jordan Yates
2186558f37 scripts: ci: coverage: fix ruff reports
Fix problems reported by `ruff` and remove exclusions from the config
file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-21 10:08:50 +02:00
Jordan Yates
3a165b6f5d scripts: ci: stats: merged_prs: fix ruff reports
Fix problems reported by `ruff` and remove exclusions from the config
file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-21 10:08:50 +02:00
Jordan Yates
764ad5562a scripts: ci: version_mgr: fix ruff reports
Fix problems reported by `ruff` and remove exclusions from the config
file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-21 10:08:50 +02:00
Jordan Yates
dc1c23312d scripts: ci: errno: fix ruff reports
Fix problems reported by `ruff` and remove exclusions from the config
file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-21 10:08:50 +02:00
Jordan Yates
f2af864712 scripts: ci: check_compliance: fix ruff reports
Fix problems reported by `ruff` and remove exclusions from the config
file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-21 10:08:50 +02:00
Jordan Yates
4c6bbae9cc scripts: ci: guideline_check: fix ruff reports
Fix problems reported by `ruff` and remove exclusions from the config
file.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-11-21 10:08:50 +02:00
Fabian Blatz
da9aa8fcad boards: esp32s3_touch_lcd_1_28: Make cst816s use interrupt by default
Since the interrupt line is connected, there is no reason to force
polling mode for this board.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-11-20 17:15:22 +00:00
Fabian Blatz
a7659d8460 drivers: input: cst816s: Default to interrupt if irq-gpio available
Changes the default value of the INPUT_CST816S_INTERRUPT flag to default to
true if the there is a compatible with the irq-gpio property enabled.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2025-11-20 17:15:22 +00:00
Robert Lubos
61acbb986b tests: net: all: Ensure TLS sockets are built with CID support
Some CID-related functionalities of the DTLS sockets are conditionally
compiled, make sure that code is built with tests/net/all test suite.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-20 17:15:15 +00:00
Robert Lubos
da5c9c8630 net: sockets: tls: Prefix overlooked CID-related symbols
Some CID-related symbols were prefixed but not updated in sockets_tls.c
as that configuration was not built by the tests/net/all test suite,
hence easy to miss.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2025-11-20 17:15:15 +00:00
Kfir Bracha
c53f050e02 net: http_server: Support reason phrase for chunked encoded response
Add HTTP reason phrases in chunked transfer-encoded responses

Signed-off-by: Kfir Bracha <kfirous@gmail.com>
2025-11-20 17:15:05 +00:00
Alberto Escolar Piedras
764e21032f net: l2: wifi_shell: remove unnecessary include
Since we are using sys_getopt now we do not need to pull unistd.h
for anything amore.
Let's remove it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-20 17:14:57 +00:00
Alberto Escolar Piedras
c3cd5d1c86 subsys/net wifi/wifi_shell: Fix use of sys_getopt global status
sys_getopt has now its global status variables prefixed with sys_getopt_
Let's fix the use here. Note this worked as Zephyr's POSIX_C_LIB_EXT
keeps a replica of these variables without the prefix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-20 17:14:57 +00:00
Alberto Escolar Piedras
24277bca8d subsys/crc: Fix getopt/sys_getopt use
sys_getopt has now its global status variables prefixed with sys_getopt_
Let's fix the use here. Note this worked as Zephyr's POSIX_C_LIB_EXT
keeps a replica of these variables without the prefix, and it is
enabled by default.
And since sys_getopt was split from POSIX_C_LIB_EXT this component
only needs to enable GETOPT and no the whole POSIX_C_LIB_EXT.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2025-11-20 17:14:57 +00:00