Commit graph

118,807 commits

Author SHA1 Message Date
Chris Friedt
97519002ad sys: clock: re-apply change to Z_IS_TIMEOUT_RELATIVE
A mid-air collision between two different changes to sys_clock.h
resulted in a test failure.

```shell
tests/kernel/timer/timer_api/src/main.c:763:
  timer_api_test_timeout_abs: Z_IS_TIMEOUT_RELATIVE(t2) is false
```

Re-apply the change that was added in

9075d53355

to keep tests running smoothly.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 11:25:51 -04:00
Khaoula Bidani
f2c37c4b13 tests: drivers: spi: spi_loopback: add stm32u3 boards overlays
add SPI loopback test overlays for Nucleo U385RG-Q board.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-06-24 14:22:58 +02:00
Khaoula Bidani
df7d9ba90d boards: st: stm32u3: enable spi for stm32u3 boards
Enable SPI for Nucleo U385RG_Q board.

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-06-24 14:22:58 +02:00
Khaoula Bidani
29c7500360 dts: arm: st: u3: add spi
Add SPI support to STM32U3

Signed-off-by: Khaoula Bidani <khaoula.bidani-ext@st.com>
2025-06-24 14:22:58 +02:00
Tallplay Lin
da4b8ec802 drivers: gpio: Support gpio_pin_get_config_dt
Add CONFIG_GPIO_GET_CONFIG feature to gpio_cmsdk_ahb.c

Signed-off-by: Tallplay Lin <tlin@atmosic.com>
2025-06-24 14:22:49 +02:00
Tien Nguyen
7368758bd1 soc: renesas: rz: Update Renesas RZ/V2N, RZ/V2L according to RZ/V2H
Porting gp_renesas_isr_context variable used in FSP interrupt source
to unify with RZ/V2H and prevent build error since they share the same
hal_renesas source code.

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-06-24 14:22:43 +02:00
Tien Nguyen
7d21bdfb38 tests: drivers: gpio: Add support for RZ/V2H-EVK R8 core
Add support for RZ/V2H-EVK R8 core

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-06-24 14:22:43 +02:00
Tien Nguyen
23bf54f330 boards: renesas: Add support for Renesas RZ/V2H-EVK R8 core
Add support for Renesas RZ/V2H-EVK R8 core

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-06-24 14:22:43 +02:00
Tien Nguyen
cff21ea2be dts: arm: renesas: Add support for Renesas RZ/V2H R8 core
Add devicetree to support for Renesas RZ/V2H R8 core

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-06-24 14:22:43 +02:00
Tien Nguyen
9688b7510f soc: renesas: Add support for Renesas RZ/V2H R8 core
Add support for Renesas RZ/V2H R8 core

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-06-24 14:22:43 +02:00
Tien Nguyen
f0acbd6402 manifest: Update commit id for hal_renesas
Update commit id for hal_renesas

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-06-24 14:22:43 +02:00
Tien Nguyen
b8215ec539 dts: bindings: Add CPU device bindings for Cortex-R8
This commit adds device bindings for Cortex-R8

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-06-24 14:22:43 +02:00
Maochen Wang
1e5b21f487 drivers: wifi: nxp: add Kconfig of NXP_WIFI_AUTO_INIT
Automatically initialize NXP Wi-Fi driver and FW for Wi-Fi networking
operation. Disable this setting if Wi-Fi module will be used for
non-Wi-Fi use cases (manufacturing/calibration/test).

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-24 14:20:02 +02:00
Davi Herculano
c3dd356f1a soc: imxrt10xx: fix SAI3 pll clock config
Fix the sai3 case in imxrt_audio_codec_pll_init which
was using sai2 constants.

Signed-off-by: Davi Herculano <herculanodavi@gmail.com>
2025-06-24 14:19:43 +02:00
Benjamin Cabé
f3b028ac3a tests: drivers: disk: add test for loopback_disk_access_unregister
Make sure this previously uncovered function is tested.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-24 14:19:33 +02:00
Fabio Baltieri
1914050f3c bindings: uart-bridge: add PM hooks
Add PM hooks to release or reattach the serial ports from the bridge.
Does not save power per se but allows switch the lower level serial
ports for something else in runtime.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-06-24 14:19:24 +02:00
Fabio Baltieri
f2934c8b8a bindings: uart-bridge: add missing base include
Add missing base include for the uart-bridge binding.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-06-24 14:19:24 +02:00
Chris Friedt
c08544a87b sys: clock: merge sys_clock.h into sys/clock.h
Merge sys_clock.h into sys/clock.h and preserve the original header.

This allows us to use a slightly more intuitive name for the
sys/clock.h header, while reducing churn throughout the codebase.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
45b3dbd008 samples: net: remove POSIX_TIMERS and XSI_SINGLE_PROCESS
Remove POSIX_TIMERS and XSI_SINGLE_PROCESS dependencies from the aws
cloud sample and the lwm2m client sample, as they are no longer
required.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
03db50b79d net: remove dependency on posix for iso c time() function
The ISO C function time() should not depend on POSIX and this was
corrected recently via the common libc time() implementation.

Remove this dependency from the network subsystem where it has
been unduly needed for some time.

Similarly, XSI_SINGLE_PROCESS was a dependency for time() via
picolibc, because the time() implementation in picolibc relies
on the POSIX gettimeofday() call.

However, since Zephyr's common libc time() implementation no longer
depends on that, it can be removed as a dependency in the network
subsystem as well.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
8743da2f32 posix: use sys_clock implementation
Use the newly added sys_clock API in lib/os for

* clock_gettime()
* clock_settime()
* clock_nanosleep() and nanosleep()
* gettimeofday()

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
3e30e2eddd tests: lib: move time testsuite to c_lib
Presumably the time testsuite was separate from the c library set of
testsuites because it had a depedency on POSIX.

Since that dependency no longer exists, colocate the time testsuite
with the other c library testsuites.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
9ecb7965b6 tests: libc: thrd: use sys_clock_gettime() and timespec_add()
Use sys_clock_gettime() instead of clock_gettime() and use
timespec_add() instead of manually adding timespec structures.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
ec62630950 tests: libc: thrd: use timespec_from_timeout()
Use `timespec_from_timeout(K_MSEC(msec), &ts)` instead of leaning on
lazily-crafted timespecs with invalid tv_nsec fields.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
a17497162e tests: libc: thrd: do not pass NULL for thrd_sleep() duration
The specification does not say that the first struct timespec passed to
thrd_sleep() may be NULL.

Preserving the testpoint so that a possible future testsuite can be
run that expects faults to occur when undefined behaviour is used.

Faults are one possible solution to handling undefined behaviour, but
it would be good to come to a concensus about how that should be
handled in Zephyr for standard function calls belonging to ISO C or
POSIX.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
a5a824db91 tests: libc: thrd: compare with thrd_success rather than ok or zero
The C standard does not guarantee that `thrd_success` is equal to
zero, so ensure that the test takes that into account.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
49cc01d4b5 libc: common: thrd: use sys_clock_nanosleep() instead of nanosleep()
Reduce the dependency on POSIX by taking advantage of the newly added
sys_clock_nanosleep().

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
ff7825b9aa libc: use the common libc time() implementation for most libcs
Use the implementation of time() from the common libc, since there
it no longer pulls in POSIX.

Use is implied for minimal, newlib, and picolibc, and selected
for IAR.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
17964083d3 libc: common: time: use sys_clock api rather than posix
Remove POSIX clock_gettime() from the common libc time implementation,
since POSIX should not be a dependency for ISO C.

Instead, use the newly added lib/os sys_clock API.

Specifically, sys_clock_gettime().

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
7868b4d54d logging: use sys_clock_gettime()
Use the newly added sys_clock_gettime() to avoid the unnecessary
dependency on POSIX APIs.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
bb7aa4dd79 doc: release: 4.2.0: add sys_clock gettime settime nanosleep notes
Add bullets to release notes for sys_clock_gettime(),
sys_clock_settime(), and sys_clock_nanosleep().

These changes were significant, as they make timekeeping dependencies
more independent between libc and posix, and remove several unnecessary
dependencies on posix for ISO C library routines.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
a3e934f12c sys: clock: additional sys_clock api calls
Additional entries for the sys_clock API, comprised of:

* sys_clock_gettime()
* sys_clock_settime()
* sys_clock_nanosleep()

along with the constants

* SYS_CLOCK_REALTIME
* SYS_CLOCK_MONOTONIC
* SYS_TIMER_ABSTIME

The primary motivation for this API is so that libc and other
libraries have a familiar-enough API to reach to when POSIX
is not available, since POSIX is optional in Zephyr.

By adding this API to lib/os, we also eliminate dependency cycles
between libc and posix, as lib/os is a mutual dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
282b47cf37 posix: cond + mutex: log messages generate warnings for 32-bit timeouts
Previously, log messages would generate warnings (escalated to errors
in CI) when CONFIG_TIMEOUT_64BIT=n.

For example,

```
west build -p auto -b qemu_cortex_m0 -t run tests/posix/timers/ \
  -- -DCONFIG_TIMEOUT_64BIT=n
..
warning: format '%llx' expects argument of type \
  'long long unsigned int', but argument 3 has type 'k_ticks_t' \
  {aka 'unsigned int'}
```

Use portable print specifiers and cast the argument to int64_t.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Chris Friedt
e363fdd16b scripts: ci: check_compliance: allow CONFIG_BOARD_UNIT_TESTING
Previously, code like the snippet below would not pass compliance checks.
With this change, we add `CONFIG_BOARD_UNIT_TESTING` to the Kconfig allow
list, so that code like the snippet below is not incorrectly reported as
a compliance failure.

```
if defined(CONFIG_BOARD_UNIT_TESTING)
/* unit-testing only */
endif
```

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-06-24 14:18:52 +02:00
Phi Tran
3fa9495172 drivers: gpio: add gpio interrupt support for RX130
- Add support for gpio interrupt on RX130.
- Add support for gpio-keys input subsys on RSK_RX130_512KB boards.

Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-06-24 14:18:41 +02:00
Phi Tran
da38a779ea drivers: external interrupt: add external interrupt support for RX130
Add support for external interrupt on RX130.

Signed-off-by: Phi Tran <phi.tran.jg@bp.renesas.com>
2025-06-24 14:18:41 +02:00
Tatsuya Ogawa
5560c9f12a drivers: interrupt_controller: Add interrupt controller support for RX130
Add interrupt controller driver support for RX130 series

Signed-off-by: Tatsuya Ogawa <tatsuya.ogawa.nx@renesas.com>
Signed-off-by: Quy Tran <quy.tran.pz@renesas.com>
2025-06-24 14:18:41 +02:00
Maochen Wang
f4a0beb2b7 samples: net: wifi: Enable NXP_WIFI_TX_RX_ZERO_COPY for IW610
Enable NXP_WIFI_TX_RX_ZERO_COPY for IW610, which will reduce extra memcpy
between net stack and driver in TX data path and avoid the allocation of
RXPD and mlan_buffer in RX data path, to improve the throughput
performance.
Increase CONFIG_NET_BUF_DATA_SIZE to hold one packet in one buffer.
NXP_WIFI_TX_RX_ZERO_COPY can be enabled not only for NXP_RW610 case.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-24 09:17:03 +02:00
Raymond Lei
7a582c5586 drivers: nxp: flexio: mask invalid ISR calling
Flexio ISR handle all flags even they are not interrupt enabled.
This will cause invalid calling of ISR callback functions.

Signed-off-by: Raymond Lei <raymond.lei@nxp.com>
2025-06-24 09:16:51 +02:00
John Barbero Unenge
f7f73bd0c3 driver: flash: mcux_flexspi_nor: Second attempt to fix is25lpXXX chips
This commit changes the implementation to distinguish between is25lpXXX
and is25lpXXXd. Using RDERP as in the original solution didn't work for
is25wpXXX chips and would cause a halt. This new implementation reads
the AutoBoot register instead, which is not present in is25lpXXX but
present in is25lpXXXd, is25wpXXX and is25wpXXXd.

Tested on:
- mimxrt1020-evk
- mimxrt1170-evk rev. A
- custom board with mimxrt1170 and is25lp128d

Signed-off-by: John Barbero Unenge <git@lsrkttn.com>
2025-06-24 09:16:04 +02:00
Maochen Wang
a9fd2306e4 manifest: update hal_nxp for RW612 and IW610 FW
upgrade RW612 FW to version 6.p40,
upgrade IW610 FW to version 5.p66.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-06-24 09:15:56 +02:00
Pieter De Gendt
f14907eb3e boards: nxp: mimxrt1170_evk: Add note for Arduino R3 gpio input interrupts
For future developers to hopefully save some time trying to figure out why
no GPIO interrupt callback is fired.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-06-24 09:15:40 +02:00
Gang Li
fd7201c52d boards: mimxrt1060: add lpuart8 pinctrl nodes for RT1060
The lpuart8 pinctrl nodes for RT1060 need to be defined, as WIFI + BT
(bt_tester) scenario requires three uart.
- LPUART1: shell uart
- LPUART3: bt hci uart
- LPUART8: uart pipe

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-06-24 09:15:20 +02:00
Tahsin Mutlugun
dd5681a217 tests: counter: counter_basic_api: Enable tests for MAX32657EVKIT
Add overlay files for MAX32657EVKIT secure and nonsecure boards.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-06-24 09:15:07 +02:00
Anıl Kara
adba582424 boards: adi: max32657: Enable PWM driver
PWM is added to the supported list for max32657evkit.

Signed-off-by: Anıl Kara <anil.kara@analog.com>
2025-06-24 09:15:07 +02:00
Tahsin Mutlugun
7336d1faed boards: adi: max32657evkit: Enable counter driver
Add counter to the list of supported drivers for MAX32657EVKIT secure
and nonsecure boards.

Signed-off-by: Tahsin Mutlugun <Tahsin.Mutlugun@analog.com>
2025-06-24 09:15:07 +02:00
Anıl Kara
34b06f89fe dts: arm: adi: Add timer nodes to max32657
Add nodes timer0 to timer5. Add pwm and counter subnodes.

Signed-off-by: Anıl Kara <anil.kara@analog.com>
2025-06-24 09:15:07 +02:00
cyliang tw
03f919fc4c drivers: spi: fix numaker spi driver bug of frame size
Set right frame size in spi_context_buffers_setup and fetch
the right rx size based on frame size. Also clear SPI control register
before set mode & data width in spi configure routine.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2025-06-24 09:14:33 +02:00
Bjarki Arge Andreasen
ce95b7033c pm: device_runtime: fix unbalanced domain get/put
pm_device_runtime has inconsistent behavior regarding
getting and putting a device's domain. This commit
aligns it to get the domain only once, once device
is resumed, and put only once, once device is
suspended.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-24 09:14:20 +02:00
Bjarki Arge Andreasen
21b785da38 tests: pm: device_power_domain: test async put
Assert async put correctly releases device's power domain.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2025-06-24 09:14:20 +02:00