Commit graph

4130 commits

Author SHA1 Message Date
Adrien Ricciardi 863f6affef lib: crc: Add OpenPGP CRC-24
Implementation is based on the section 6.1 of the RFC 4880.

Signed-off-by: Adrien Ricciardi <aricciardi@baylibre.com>
2024-05-29 10:51:21 -07:00
Bjarki Arge Andreasen 79640aea09 drivers: console: remove uart_mux and gsm_mux
Remove the deprecated uart_mux and gsm_mux modules and all of
their configurations/dependencies across zephyr.

Optimally uart_mux and gsm_mux would be removed in their own
respective PRs, but the two modules are directly coupled, so
to preserve bisectability, they must be removed together.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Bjarki Arge Andreasen e79428cda8 drivers: modem: remove gsm_ppp.c device driver
Remove the deprecated gsm_ppp.c device driver and associated
dts compatible.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-29 10:49:08 -07:00
Reto Schneider f9dce2d87f drivers: hwinfo: Fix typo
Fixing than vs then.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-29 10:49:01 -07:00
Nathan Olff b58e242a52 sys: ignore ineffective bitwise and from clang-tidy
When running clang-tidy, an 'ineffective bitwise and operation' (type
misc-redundant-expression) was detected on Z_CBPRINTF_IS_PCHAR macro.

As this behavior is expected, we are adding comment to ignore this macro
for the specific misc-redundant-expression check of clang-tidy

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-05-29 10:48:27 -07:00
Nathan Olff 67c1661d65 sys: fix implicit conversion uint32 to uint8
When running clang-tidy and logging module is used through any of the
LOG_ macro, an issue was raised in Z_CBPRINTF_PACK_ARG2 macro.

A uint32_t variable was copied into a _rws_buffer array with an implicit
cast (error: implicit conversion loses integer precision: 'uint32_t'
(aka 'unsigned int') to 'uint8_t' (aka 'unsigned char')).

Here we are adding an explicit cast to get rid of the implicit
conversion error.

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-05-29 10:48:20 -07:00
Ajay Parida e493d8c268 net: l2: wifi: Fix for typo
Typo: "RTS threashold" changed to "RTS threshold".

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida d4b22cd10e net: wifi_mgmt: Support to configure AP parameter max_num_sta
Support to set BSS parameter "max_num_sta" at compile and run time

Added support to configure `max_num_sta` BSS parameter.
Maximum number of stations allowed in station table. New stations will be
rejected after the station table is full.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida bedd38ce65 net: wifi_mgmt: Support AP parameter configuration "Skip inactivity poll"
Support for configuration of AP parameter "Skip inactivity poll".
Only build time setting is supported.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Ajay Parida c6d1a91372 net: wifi_mgmt: Support to configure AP mode parameter
Support to set BSS parameter at compile and run time.

Added support to configure `max_inactivity` BSS parameter.
Station inactivity timeout is the period for which AP may keep a client
in associated state while there is no traffic from that particular client.
If a non-zero value is set, AP may choose to disassociate the
client after the timeout.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-05-29 14:09:59 +02:00
Dominik Ermel 25138ff99c storeage/stream_flash: Cache write_block_size to ctx on init
The commit caches write_block_size and erase_value to stream flash
context, at init, to avoid calling Flash API multiple times
to get these values at various stages of code exectuion,
at run-time.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-05-29 07:35:19 +02:00
Sadik Ozer d6e1753125 drivers: Add MAX32690 gpio driver
GPIO driver for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer f76256d2f1 drivers: Add MAX32690 pinctrl driver
Pincontrol driver for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Sadik Ozer 45df8963f1 drivers: Add MAX32690 clock control driver
Clock control for MAX32690

Co-authored-by: Okan Sahin <okan.sahin@analog.com>
Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
2024-05-29 07:30:12 +02:00
Yong Cong Sin bbe5e1e6eb build: namespace the generated headers with zephyr/
Namespaced the generated headers with `zephyr` to prevent
potential conflict with other headers.

Introduce a temporary Kconfig `LEGACY_GENERATED_INCLUDE_PATH`
that is enabled by default. This allows the developers to
continue the use of the old include paths for the time being
until it is deprecated and eventually removed. The Kconfig will
generate a build-time warning message, similar to the
`CONFIG_TIMER_RANDOM_GENERATOR`.

Updated the includes path of in-tree sources accordingly.

Most of the changes here are scripted, check the PR for more
info.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-28 22:03:55 +02:00
Adam Kondraciuk cac0da313b drivers: timer: grtc: Update GRTC driver
This commit aligns the GRTC driver to changes introduced in
hal_nordic. Some of the features regarding GRTC sleep/wakeup
functionality has been modified and moved out to the nrfx
driver's code.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +02:00
Adam Kondraciuk b4047307fa drivers: timer: grtc: Fix ticks calculation for GRTC
Fixed calculation of GRTC ticks inside
`z_nrf_grtc_timer_get_ticks()` function.

Signed-off-by: Adam Kondraciuk <adam.kondraciuk@nordicsemi.no>
2024-05-28 18:53:39 +02:00
Rubin Gerritsen 3ce106c620 Bluetooth: Host: Fix not clearing IDs and keys upon bt_disable()
Expectation: After calling `bt_disable()` it is possible to
use the Bluetooth APIs as if `bt_enable()` was never called.

This was not the case for `bt_id_create()`, it was not possible
to set the default identity. This prevented an application
developer to restart the stack as a different identity.

Keys also need to be cleared to avoid the following pattern:
1. Pair two devices
2. Central calls `bt_disable()` and `bt_enable()`.
   The central will now generate a new identity address.
3. Connect the two devices.
4. Re-establish encryption. Now the central will try to use
   the previously used keys. The procedure will fail
   because the peripheral does not have any keys associated
   with the new central address.

The API documentation is updated accordingly.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-05-28 09:11:52 -07:00
Fin Maaß 8c37f14b98 tracing: add k_realloc trace
For `k_realloc` add tracing feature.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 17:55:12 +02:00
Fin Maaß 09eaa8757f kernel: implement k_realloc
implement k_realloc.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-05-28 17:55:12 +02:00
Abderrahmane Jarmouni 39e472ffba include: drivers: gpio: fix gpio_dt_flags_t overflow
when GPIO_INT_WAKEUP flag is used in a DT gpios property
the gpio_dt_flags_t var that holds the flags overflows
Hence moving GPIO_INT_WAKEUP flag from bit 28 to bit 6

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-28 17:53:21 +02:00
Robert Lubos 87bacf378d net: l2: ethernet: arp: Fix ARP probe target HW address matching
According to RFC3927 and RFC5227, an ARP probe target HW address should
be set to all-zeroes:

"The 'target hardware address' field is ignored and
SHOULD be set to all zeroes."

Hence, we should allow the ARP probes to have all-zeroes target HW
address as well.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-05-28 17:49:03 +02:00
Mark Wang bdca41d0bf Bluetooth: A2DP: Implement the a2dp and avdtp
implement a2dp.c and avdtp.c
add a2dp related Kconfig:
BT_AVDTP_RTP_VERSION, BT_A2DP_SOURCE and BT_A2DP_SINK
a2dp_codec_sbc.c/h are used to provide some APIs to get
A2DP SBC codec information. (like: channel num).

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-05-28 12:56:42 +02:00
IBEN EL HADJ MESSAOUD Marwa 343f2842bd include: zephyr: dt-bindings: dma: Add flag STM32_DMA_16BITS
Add flag STM32_DMA_16BITS as a combination of
STM32_DMA_PERIPH_16BITS and STM32_DMA_MEM_16BITS

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-05-28 12:51:00 +02:00
Bjarki Arge Andreasen 000784b91d modem: chat: Add runtime APIs for chat scripts
Add runtime APIs for chat scripts.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-28 10:02:06 +02:00
Bjarki Arge Andreasen 2a575a6bf5 modem: chat: Add runtime API to modem_chat_script_chat
Add APIs allowing for modifying the modem_chat_script_chat
safely at runtime.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-28 10:02:06 +02:00
Bjarki Arge Andreasen 8b4822861b modem: chat: Add runtime API to modem chat matches
Add APIs for changing the contents of modem chat matches
safely at runtime.

This allows for reusing a single modem_chat_match at the cost
of placing the match and its buffers in RAM.

Signed-off-by: Bjarki Arge Andreasen <bjarki@arge-andreasen.me>
2024-05-28 10:02:06 +02:00
Alvis Sun 4cec19952f drivers: i3c: add hdr command code for i3c_msg
Support 128 possible write and read commands for
HDR-DDR, HDR-TSP and HDR-TSL.

Signed-off-by: Alvis Sun <yfsun@nuvoton.com>
2024-05-28 09:54:03 +02:00
Konrad Derda 3da35039ce net: ipv6: scope checking function fix
Change the implementation of net_ipv6_is_addr_mcast_scope() inline
function that let us check if a given IPv6 address has a specified
scope. Previously, it was comparing the whole byte including flags
of a multicast address. It meant, that while checking for a specific
scope a one was also checking the flags. Even in Zephyr's net stack
there are checks for a IPv6 link local scope that are failing for
addresses that are not marked as "well known" (when least significant
bit of the flags is set).

Signed-off-by: Konrad Derda <konrad.derda@nordicsemi.no>
2024-05-28 09:47:14 +02:00
Jukka Rissanen ee6805d3e0 net: dns: resolver: No need to double the socket count
The socket allocation count was incorrectly calculated as
we have only one socket per DNS server.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-27 05:01:28 -07:00
Jukka Rissanen 631c0a3aab net: doc: socket_select.h: Document zsock_fd_set
This fix avoids this warning:

WARNING:root:Unused expression: \
  .*Duplicate C declaration.*\n.*'\.\. c:.*:: zsock_fd_set'.*

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-27 05:01:28 -07:00
Yong Cong Sin d084d83baf userspace: fix minor typo in k_is_in_user_syscall
'generasted' should have been 'generated' fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-27 06:19:32 -04:00
Flavio Ceolin 4d85f3d91c pm: Deprecate z_pm_save_idle_exit
Deprecate z_pm_save_idle_exit and promote pm_system_resume.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 02:10:03 -07:00
Flavio Ceolin f7437ac3b1 pm: Move z_pm_save_idle_exit to pm subsys
There is no need to this function be defined inside the kernel since
all places using it are protecting the call under ifdef PM guards.

This way we can also remove the ifdef condition inside the implementation.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-27 02:10:03 -07:00
Lucas Tamborrino e282b0ea84 soc: esp32xx: refactor clock and RTC subsystems
The RTC subsystem in espressif's SOCs, among other tasks
is responsible for clock selection for CPU and for low
power domain clocks such as RTC_SLOW and RTC_FAST.

This commit allows for proper clock source and rate
selection for CPU, using the espressif,riscv and
espressif,xtensa-lx6/7 bindings.

It also enables clock selection for RTC_FAST and RTC_SLOW,
that impacts some peripherals, such as rtc_timer.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-05-27 01:37:18 -07:00
Younghyun Park ea29ef36bb debug: coredump: Move COREDUMP_*_STR strings to the public header
This allows a customized coredump_backend_other API to re-use the
COREDUMP_*_STR without re-defining the same strings.

Signed-off-by: Younghyun Park <younghyunpark@google.com>
2024-05-25 14:39:18 -04:00
Marco Widmer ef8a5b7275 debug: coredump: fix multiple definitions
When compiling with CONFIG_DEBUG_COREDUMP=n and including
<zephyr/debug/coredump.h> from any file, linking fails with a multiple
definitions error. Define the functions in the header file as static
inline.

Signed-off-by: Marco Widmer <marco.widmer@bytesatwork.ch>
2024-05-25 14:38:51 -04:00
Yong Cong Sin dcaf217336 irq: multilevel: add APIs with level as argument
Add APIs that accept an additional `level` argument, and use
that to call the respective functions. In some cases this can
reduce code complexity, especially when the level isn't known
at build time.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Yong Cong Sin c5f5b964c1 arch: sw_isr: revamp multi-level interrupt architecture
Previously the multi-level irq lookup table is generated by
looping through the devicetree nodes using macros & Kconfig,
which is hard to read and flimsy.

This PR shifts the heavy lifting to devicetree & DT macros such
that an interrupt controller driver, which has its info in the
devicetree, can register itself directly with the multi-level
interrupt architecture, which is more straightforward.

The previous auto-generated look up table with macros is now
moved in a file of its own. A new compatibility Kconfig:
`CONFIG_LEGACY_MULTI_LEVEL_TABLE_GENERATION` is added and
enabled by default to compile the legacy look up table for
interrupt controller drivers that aren't updated to support the
new architecture yet.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-25 11:24:32 +03:00
Babak Arisian b0dceffacc Bluetooth: Audio: add bt_audio_get_chan_count
Implement a function bt_audio_get_chan_count that takes an enum
bt_audio_location and returns the number of channels in that value.

This PR fixes #69617
(https://github.com/zephyrproject-rtos/zephyr/issues/69617)

Signed-off-by: Babak Arisian <bbaa@demant.com>
2024-05-24 09:55:37 -05:00
Kapil Bhatt cc42d16b1c net: wifi: Add disconnection success code
When disconnect request is successful, the status
was taking as WIFI_REASON_DISCONN_UNSPECIFIED only.
Adding WIFI_REASON_DISCONN_SUCCESS which can be help
to determine status of disconnect request. If this status
is failed then reason can be useful.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-05-24 08:04:59 -04:00
Ping Wang 1339ce4bf0 Bluetooth: Audio: Get function for bt_audio_codec_qos_pref.
Get the preferred QoS settings via bt_bap_ep_get_info()
Therefore no need to use the internal header file to get it.

This PR fixes https://github.com/zephyrproject-rtos/zephyr/issues/72359

Signed-off-by: Ping Wang <pinw@demant.com>
2024-05-24 08:04:45 -04:00
Yong Cong Sin e993e994ea sensors: add new channel SENSOR_CHAN_POS_DXYZ
Add new channel: `SENSOR_CHAN_POS_DXYZ`, so that it is
consistent with other 3-axis channels.

Updated pytest, `sensor_shell` & `fake_sensor` accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-24 07:49:27 -04:00
Gerard Marull-Paretas 33665348c2 dt-bindings: pinctrl: nrf: allow for more ports
New nRF54H20 SoC series expose more ports, e.g. P9, so reserve more bits
for the Port+Pin field.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-24 07:48:30 -04:00
Yong Cong Sin e1ce0aefff debug: implement symtab generation
Use pyelftools to extract the symbol table from the
link stage executable. Then, filter out the function names
and sort them based on their offsets before writing into the
`symtab.c`, this is similar to how the `isr_tables` works.

To access the structure, simply include the new header:
```c
#include <zephyr/debug/symtab.h>
```

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-23 11:52:08 -04:00
Phi Bang Nguyen e3ad40f883 include: video: Add XYUV32 pixel format
Add XYUV32 pixel format

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-05-23 07:52:09 -04:00
Rick Bruyninckx 39f99d84d2 data: Use designated initializers consistently in macro's
This PR updates the json macros to be consistend with C++20
Signed-off-by: Rick Bruyninckx <xactme@gmail.com>
2024-05-23 07:51:56 -04:00
Dong Wang e17618c00c x86: ia32: linker: move bss/noinit sections after data section
With this change, bss/noinit sections are excluded from generated
kernel binary. Smaller image size saves storage space and reduces
loading time.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2024-05-23 07:49:06 -04:00
Lucas Romero 672dab0566 docs: bitarray: fix missing documentation
for method sys_bitarray_xor that was added recently.

Signed-off-by: Lucas Romero <luqasn@gmail.com>
2024-05-23 07:45:59 -04:00
Glenn Andrews 531c457550 Lib: SMF Modify HSM operation for UML-Style transitions
Modify the SMF such that state transitions from parent states choose the
correct Least Common Ancestor based on the transition source rather than
the current state.

SMF set as experimental.

Signed-off-by: Glenn Andrews <glenn.andrews.42@gmail.com>
2024-05-22 21:41:06 -04:00