Commit graph

108238 commits

Author SHA1 Message Date
James Roy
34bc4c3e3e style: edtlib: Use a better format string
Use f-strings as recommended by PEP-8
instead of the .format() method.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-01-10 18:57:39 +01:00
Raffael Rostagno
d20140d014 tests: esp32c3: Add USB variant
Add USB variant config files for esp32c3 boards.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-10 18:57:07 +01:00
Raffael Rostagno
8048a6ab67 samples: esp32c3: Add USB variant
Add USB variant config files for esp32c3 boards.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2025-01-10 18:57:07 +01:00
Henrik Brix Andersen
f07063db20 doc: update copyright notice in the documentation
Update copyright notice to reflect current year.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-01-10 14:56:01 +01:00
Henrik Brix Andersen
557515884b tests: drivers: build_all: eeprom: use unique SPI CS lines
Use unique SPI CS lines in the EEPROM build-all test.

Fixes: #83696

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-01-10 14:48:35 +01:00
Nazar Palamar
01252ad877 drivers: dma: initial implementation CAT1 DMA driver
Initial implementation of DMA driver for CAT1 device

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2025-01-10 14:48:24 +01:00
Patryk Duda
bcaa59d444 drivers: dai: intel: ssp: Use IS_BIT_SET() macro from utils_macro.h
Replace DAI_INTEL_SSP_IS_BIT_SET() macro with IS_BIT_SET() macro from
utils_macro.h.

Signed-off-by: Patryk Duda <patrykd@google.com>
2025-01-10 14:48:13 +01:00
Patryk Duda
22d3173a61 include: zephyr: sys: Introduce IS_BIT_SET() macro
This macro is defined in a few places which leads to macro redefinition
error e.g. when compiling prometheus network sample for NPCX boards.

Provide one definition of IS_BIT_SET() in util_macro.h to fix the
problem.

Signed-off-by: Patryk Duda <patrykd@google.com>
2025-01-10 14:48:13 +01:00
Lyle Zhu
132a24d21c Bluetooth: LE: BAP: Check buf len before using it
Check whether the length of buf is consistent with the valid data
received for op code BT_BAP_BASS_OP_ADD_SRC and BT_BAP_BASS_OP_MOD_SRC.

If the length of buf is inconsistent with the valid data received, the
response is error code BT_ATT_ERR_WRITE_REQ_REJECTED instead of other
errors.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-01-10 14:47:54 +01:00
Eric Ackermann
4921ce2118 tests: llext: Add RISC-V CB-Type edge case test
All immediates in RISC-V are encoded as two's complement. This commit
adds a test for relocating jumps that utilize the full range of the
immediate, in both positive and negative direction.
To this end, the test uses the compressed b-type (CB) instruction to
branch to its maximum negative (-256) and maximum positive (+254)
targets.
In case of test failure, expect relocating the corresponding llext to
fail.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-01-10 14:47:39 +01:00
Eric Ackermann
2d3390f866 llext: Fix off-by-one in RISC-V truncation check
The RISC-V architecture-specific relocations need to check whether
each required relocation can fit into the modified instruction's
immediate. All immediates in RISC-V are encoded as two's complement.
The current truncation check has an off-by-one error for checking
the maximum negative distance, as two's complement encoding can
represent a negative value that is the maximum positive value plus
one, causing LLEXT to refuse loading valid code.
This commit adds an additional condition to the check that fixes
the aforementioned issue.

Signed-off-by: Eric Ackermann <eric.ackermann@cispa.de>
2025-01-10 14:47:39 +01:00
Jordan Yates
5faf471ce0 drivers: watchdog: stm32 iwdg: constant to config
Move the instance pointer, which is a constant value, into a dedicated
config structure. At the same time, remove the type casting macros as
this pattern has been removed from the tree for some years now.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-10 11:58:31 +01:00
Jordan Yates
2509de7d3e drivers: watchdog: stm32 iwdg: explicit single channel
The STM32 IWDG is a single channel watchdog, and therefore should be
returning `-ENOMEM` when a user attempt to install additional timeouts,
instead of overwriting previous values.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-01-10 11:58:31 +01:00
Fabrice DJIATSA
e0da2d917f samples: boards: st: uart: add sample for uart circular mode
This code example  will demonstrate how to use uart
circular mode on STM32 boards.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
2025-01-10 11:58:18 +01:00
Fabrice DJIATSA
450e63ea7a drivers: serial: add circular mode in uart driver
the following implementations are added:
- set cyclic variable to handle circular/normal mode :
  enable dest/source_reload_en variable to set CIRC bit to 1 for RX or TX.
- DMA_STATUS_COMPLETE(0), DMA_STATUS_BLOCK(1) macros to handle half
 and full irq
- add ASYNC_UART_STATUS_TIMEOUT(3)  macro to work with  default mode
- add status input in uart_stm32_dma_rx_flush function  to handle
 async events depending on the  mode we are in.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
co-authored-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
2025-01-10 11:58:18 +01:00
Fabrice DJIATSA
6292997b03 include: zephyr: drivers: dma: add support for circular DMA
This macro will help us to enable the 5th bit CIRC on the DMA_CCRx
register for all stm32 series having this configuration.
Thus the DMA will be able to handle the circular buffers.

Signed-off-by: Fabrice DJIATSA <fabrice.djiatsa-ext@st.com>
co-authored-by: Cyril Fougeray <cyril.fougeray@worldcoin.org>
2025-01-10 11:58:18 +01:00
Lin Yu-Cheng
a4d0591ddf MAINTAINERS: add maintainer for Realtek EC api and driver
This commit adds api and driver of Realtek EC to maintainers.yml

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
7762d3ea2b boards: realtek: Add rts5912_evb board
Add support for Realtek rts5912_evb board

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
a3c0b03915 driver: serial: Add UART driver initial version of RTS5912.
Add UART driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
2656029c3a driver: gpio: Add gpio driver initial version of RTS5912.
Add gpio driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
cfb2074a5e driver: timer: Add timer driver initial version of RTS5912.
Add timer driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
471cc3512d soc: realrek: ec: Add debug_swj initial version of RTS5912.
Add swj driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
2c25182572 driver: pinctrl: Add pinctrl initial version of RTS5912.
Add pinctrl driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
6ea7560ce2 driver: clock_control: Add clock controller initial version of RTS5912.
Add clock controller driver for Realtek RTS5912.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
041bf2e4c6 dts: realtek: Add RTS5912 device tree files
Add Realtek RTS5912 chip and driver device tree files.

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Lin Yu-Cheng
b83501e6cc soc: realrek: ec: Add Realtek RTS5912 SoC
Add support for Realtek RTS5912 embedded controller (EC).

Signed-off-by: Lin Yu-Cheng <lin_yu_cheng@realtek.com>
2025-01-10 11:58:02 +01:00
Luca Burelli
ddd795a028 tests: llext-edk: get the Zephyr SDK path from build_info.yml
The LLEXT EDK test works by packaging an EDK and then testing its
functionality to build the extension in an external CMake build step.
That CMakelists.txt file currently references the required tools using
the ZEPHYR_SDK_INSTALL_DIR environment variable, which must be manually
set by the user.

This change modifies the test to read the newly added 'build_info.yml'
file, generated by Zephyr during the first build step. This allows to
set the ZEPHYR_SDK_INSTALL_DIR environment variable automatically based
on the (possibly auto-discovered) SDK path.

A few minor compliance cleanups are also included.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-10 09:51:54 +01:00
Jamie McCrae
2e436564a6 cmake: Configure custom linker script Kconfig before usage
Allows having CMake variables inside of this Kconfig to e.g. use a
value that can specify a board directory or path relative to a
CMake file location variable

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2025-01-10 09:50:19 +01:00
Gang Li
50bcb122e8 net: wifi: shell: fix 11k neighbor request cannot specify ssid
Fix the issue of sending neighbor report request failing
when specifying ssid.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-01-10 09:49:55 +01:00
Gang Li
227f04a0ea driver: wifi: nxp: 11k neighbor request support for embedded supplicant
Add 11k neighbor request support for embedded supplicant.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-01-10 09:49:55 +01:00
Krzysztof Chruściński
eebaf819b6 modules: hal_nordic: nrfx_config: Customize NRFX_SPIM_EXTENDED_ENABLED
nrfx_config is setting NRFX_SPIM_EXTENDED_ENABLED based on presence of
a DT property. However, there are test cases when it is expected that
extended SPIM features will be disabled on a target that supports
extended features. Allow that by not setting the value if it is already
defined.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-01-10 09:48:59 +01:00
Nicolas Pitre
bc6eded597 kernel: mark z_smp_current_get() with the const attribute
Repeated references to _current won't produce a different result as the
executing thread instance is always the same. Use the const attribute to
let the compiler know it may reuse a previously obtained value. This offset
the penalty for moving z_smp_current_get() out of line and provides yet
more binary size reduction.

This change is isolated in its own commit to ease bisecting in case some
unexpected misbehavior is eventually observed.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Nicolas Pitre
7a3124d866 kernel: move current thread pointer management to core code
Define the generic _current directly and get rid of the generic
arch_current_get().

The SMP default implementation is now known as z_smp_current_get().
It is no longer inlined which saves significant binary size (about 10%
for some random test case I checked).

Introduce z_current_thread_set() and use it in place of
arch_current_thread_set() for updating the current thread pointer
given this is not necessarily an architecture specific operation.
The architecture specific optimization, when enabled, should only care
about its own things and not have to also update the generic
_current_cpu->current copy.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Nicolas Pitre
46aa6717ff Revert "arch: deprecate _current"
Mostly a revert of commit b1def7145f ("arch: deprecate `_current`").

This commit was part of PR #80716 whose initial purpose was about providing
an architecture specific optimization for _current. The actual deprecation
was sneaked in later on without proper discussion.

The Zephyr core always used _current before and that was fine. It is quite
prevalent as well and the alternative is proving rather verbose.
Furthermore, as a concept, the "current thread" is not something that is
necessarily architecture specific. Therefore the primary abstraction
should not carry the arch_ prefix.

Hence this revert.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2025-01-10 07:49:08 +01:00
Henrik Brix Andersen
31f581951f boards: others: add support for the CANbardo USB to CAN adapter board
Add support for the open hardware CANbardo Universal Serial Bus (USB) to
Controller Area Network (CAN) adapter board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2025-01-10 07:48:49 +01:00
Maochen Wang
76fd272652 net: wifi: fix wifi connect parameter count error
Fix wrong parameter count error when input 'wifi connect' in
enterprise mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-10 07:48:40 +01:00
Maochen Wang
65545997b6 net: wifi: should enable MFP when connect to WPA3 network
Add check that should enable MFP when connect to WPA3 network,
as MFP required is mandatory for WPA3 network.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-10 07:48:40 +01:00
Maochen Wang
bc370ea075 net: wifi: support printing WPA3 enterprise in scan result
Support printing WPA3 enterprise type in scan result for more
accurate display, including the suiteb, suiteb-192 and WPA3
enterprise only.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-10 07:48:40 +01:00
Maochen Wang
f2f2fbb315 hostap: support getting enterprise type by status cmd
For 'wifi status' and 'wifi ap status' cmd of the hostap case,
originally only support getting 'EAP-TLS' for the enterprise
mode, which is not correct. Now support getting the specific
enterprise mode, including the WPA3 enterprise mode and
the EAP method type.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-10 07:48:40 +01:00
Maochen Wang
eb81fba890 net: wifi: fix typo of EAP method
Fix typo of EAP method, instead of EPA.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-10 07:48:40 +01:00
Maochen Wang
c1782420d5 hostap: add WPA3 enterprise security type
Change Wi-Fi suiteb type into WPA3 enterprise security type, it
includes suiteB, suiteB-192 and WPA3 enterprise only mode.
Support setting WPA3 enterprise only mode, which should use
cipher_config->key_mgmt as WPA-EAP-SHA256, and the AKM in RSN
IE will show 00-0F-AC:5.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-10 07:48:40 +01:00
Maochen Wang
4777dfaa28 net: l2: wifi: remove EAP TLS SHA256 security
Remove EAP TLS SHA256 security, as it was added to support the AKM
of 00-0F-AC:5 in RSN IE, but actually this AKM is used by WPA3
enterprise only mode.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-01-10 07:48:40 +01:00
Luca Burelli
820f0ae15b llext: fix minor Coverity issue #434586 (again)
The check combination of "is zero" and then "less than zero" leaves open
the theoretical possibility of a positive return value, which would
continue on with an uinitialized 'sym'.

Checking for "not zero" has the same effect and covers all situations.

Commit 56fd85442 did the same thing for 'rela' a few lines above, but
missed this instance. No other places in the llext code have this issue.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-01-10 07:28:51 +01:00
Chris Friedt
ec7d272979 fs: allow mounting filesystems at /
Previously, filesystems could not be mounted at '/' because
mount points were restricted to being at least 2 characters.

Since '/' corresponds to the standard POSIX root filesystem
location, reduce the minimum length of a mount point to
1 character.

With that, we can mount a POSIX root filesystem.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2025-01-10 04:13:01 +01:00
Pieter De Gendt
60da065f03 doc: develop: test: twister: Add ctest harness option
Add ctest to the list of harnesses and the ctest_args harness config
option.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-10 04:12:42 +01:00
Pieter De Gendt
4895b1f47b tests: Add CTest base harness testing
Add a testcase to validate the added CTest twister harness.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-10 04:12:42 +01:00
Pieter De Gendt
0b67255b0f scripts: twister: Add CTest harness
Introduce a twister harness for CMake's CTest.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-10 04:12:42 +01:00
Pieter De Gendt
33f257b12b ci: Add junitparser to the west_cmds workflow
Add the junitparser package to installed python packages for the west
commands workflow.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-01-10 04:12:42 +01:00
Anas Nashif
5769966d0f twister: deal with variants set on command line
not force host variant if environment is setting something different in
the case of posix arch.

Fixes #83766

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-01-09 22:12:26 -05:00
Eric Holmberg
3d42a1cfbc west: runners: add option 'v' prefix to OpenOCD version string
The Espressif branch of OpenOCD uses the version string "v0.12.0" instead
of "0.12.0" causing the version regex match to fail.

Add an optional 'v' prefix to avoid the failure.

Fixes: #83373
Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
2025-01-10 02:16:04 +01:00