Commit graph

15409 commits

Author SHA1 Message Date
Lyle Zhu
5fd98e10bd Bluetooth: L2CAP_BR: Sending multiple SDU at same time
Improve the retransmission and flow control to support sending
multiple SDU at the same time if the TX windows is not full.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-19 08:52:07 -04:00
Lyle Zhu
d2a10833dd Bluetooth: L2CAP_BR: Enable Retransmission and Flow control
Enable signaling channel configuration for retransmission and Flow
control feature.

Send I-frame and S-frame. Support retransmission and Flow control for
sending.
Receive and handle I-frame and S-frame.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-19 08:52:07 -04:00
Lyle Zhu
18b0ac9b9a Bluetooth: conn: Make bt_conn_lookup_addr_br() public
Move the declaration of the function `bt_conn_lookup_addr_br()` from
`conn_internal.h` to `conn.h`.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-19 10:58:29 +01:00
Krzysztof Chruściński
f2e1ac0da5 drivers: adc: nrfx_saadc: Add support for AIN8-AIN13 on nrf54h20
Extend support in dt bindings and in the driver to allow use of
AIN8 to AIN13 analog inputs.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-03-19 10:57:33 +01:00
Emil Gydesen
065dca7e92 Bluetooth: ISO: Make setting ISO data explicit
The stack will no longer implicitly set the data path
for ISO channel, and the responsibility for doing that is
now for the upper layers/applications.

This provides additional flexibility for the higher layers
as they can better control the values and timing of the data
path, as well as support removing and even reconfiguring the
data path at will.
This also removes some complexity from the stack.

This commit also fixed a inconsistency in the disconnected
handler. CIS for centrals as well as BIS were still valid
bt_iso_chan channels in the disconnected callback,
but CIS for peripherals were completely cleaned up at this
point. This issue is fixed by moving the disconnected callback
handling to before the code to cleanup the channel for
peripherals.

Since there is a difference in how you remove data paths
depending on the GAP role (central/peripheral), the
iso_info struct type has been expanded to be more
concise of which type of CIS it is.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-19 10:56:57 +01:00
Pieter De Gendt
1d62d835ac net: ip: Configurable IPv4 MTU
Allow to configure the initial IPv4 MTU needed to support packets without
fragmentation.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2025-03-19 03:34:26 +01:00
Nhut Nguyen
16c77ba448 drivers: gpio: Add support for RZ/A3UL
Add GPIO driver support for RZ/A3UL

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
2025-03-19 03:34:15 +01:00
Nhut Nguyen
33d9487efc drivers: pinctrl: Add support for RZ/A3UL
This is the initial commit to support pinctrl driver for Renesas RZ/A3UL

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Phuc Pham <phuc.pham.xr@bp.renesas.com>
2025-03-19 03:34:15 +01:00
Luca Burelli
681c7da7c8 llext: fix fixed-length name buffer usage
This was inspired by the detection of 2 instances of the warning:

   warning: 'strncpy' specified bound 16 equals destination size
            [-Wstringop-truncation]

The current code is already safe with regards to overflows, because
fixed-length string functions are used in the call tree. However, when
given a name 16 chars or larger, the current compare in llext_by_name()
will not work as expected because the stored extension name is truncated
to a max of 15.

Define a global LLEXT_MAX_NAME_LEN constant to simplify all this logic
and also implement name checks in the shell before calling llext_load().

Finally, using strlen() instead of strnlen() gets the real length of the
hex string passed as a parameter, which is important for the next safety
check.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-19 01:23:59 +01:00
Jérôme Pouiller
8894fa42c0 soc: silabs: siwx91x: Rename UART instances
Currently, siwx917 have three instances of uart: ulpuart, uart1 and
uart2. However:

  - The other drivers on siwx91x (i2c, dma, i2s, etc...) rather use
    'ulp', '0' and '1'.

  - The reference manual also uses 'ulp', '0' and '1'.

The source of the confusion probably come from the clock driver in
WiseConnect which use clocks USART1 and USART2. However, this probably
not expected.

So, this patch renames uart1 and uart2 in uart0 and uart1. This change
also impacts the names of pins and the names of the clocks.

Signed-off-by: Jérôme Pouiller <jerome.pouiller@silabs.com>
2025-03-18 16:43:54 +01:00
Dong Wang
872f363696 logging: Ensure atomic update of log filter slot in LOG_FILTER_SLOT_SET
Replaced the read-modify-write sequence with a single read and write
operation, preventing the intermediate value is wrongly used to filter
out logs of another thread with higher priority that preempts the current
thread.

Signed-off-by: Dong Wang <dong.d.wang@intel.com>
2025-03-18 16:42:18 +01:00
Emil Gydesen
351805435c Revert "include: util: Add generic function to count bits set in a value"
This reverts commit d05de070db.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-18 16:39:47 +01:00
Emil Gydesen
d05de070db include: util: Add generic function to count bits set in a value
Adds a generic function that will count the number of bits set in
a value.

It uses POPCOUNT (e.g. __builtin_popcount for GCC) if available,
or else it will use Brian Kernighan’s Algorithm to count bits.

POPCOUNT will likely always support unsigned ints, but the function
was implemented to use it with uint8_t for the sake of simplicity
and compatibility with Brian Kernighan’s Algorithm.

A generic solution was chosen rather than a macro/function per
type (e.g. uint8_t, uint16_t, etc.) as that is easier to maintain
and also supports array types (e.g. counting the number of bits
in 128 or 256 octet arrays).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-17 21:03:56 -04:00
Alex Fabre
ef9548355e net: lladdr: add default case to switch
This commit only eliminates warning message raised by GCC when option
'-Wswitch-default' is used.

Signed-off-by: Alex Fabre <alex.fabre@rtone.fr>
2025-03-17 20:05:09 +01:00
Luca Burelli
959f1b352d llext: support alignment requirements for sections
This patch adds support for alignment requirements for sections in the
loader. The alignment requirements are taken from the ELF file and
checked when the section is mapped to a memory region and when the
region is copied to memory (or directly used from the ELF buffer).

Supporting a larger alignment requirement than the region's current
alignment is done by adjusting the region's start address. This needs
care to avoid detecting false overlaps with other regions and to ensure
that the region address and size reported by the inspection APIs are
correct. The extra offset needed to re-adjust these values is stored in
the 'sh_info' field of the region descriptor.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Luca Burelli
219cde6621 llext: avoid direct llext_string() usage
Since 3466dab804 the generic llext_symbol_name() function abstracts
the use of llext_string() for (non-section) symbols. Define a similar
llext_section_name() function and replace current occurrences of
llext_string() with the proper abstraction.

By extending llext_symbol_name(), this commit also allows to print the
correct name of sections that are referred to by a symbol.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2025-03-17 19:58:15 +01:00
Jukka Rissanen
ac3cb9dac0 net: Change the net_linkaddr struct to not use pointers
Previously the net_linkaddr struct had pointers to the link address.
This is error prone and difficult to handle if cloning the packet as
those pointers can point to wrong place. Mitigate this issue by
allocating the space for link address in net_linkaddr struct. This will
increase the size of the net_pkt by 4 octets for IEEE 802.15.4 where the
link address length is 8, but there no increase in size if link address
is 6 bytes like in Ethernet/Wi-Fi.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2025-03-17 16:25:22 +01:00
TOKITA Hiroshi
cbcf36e1a7 dts: arm: renesas: ra: Remove old R7FA4M1AB3CFM configurations
Due to historical reasons, there were two implementations of
R7FA4M1AB3CFM. However, the migration has been completed,
so the old one is now being removed.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-03-17 16:24:42 +01:00
Lyle Zhu
1708574d0a Bluetooth: BR: Add a function bt_br_bond_exists()
Add a function `bt_br_bond_exists()` to check if the address of the
classic device has been bonded.

Update release-notes-4.2.rst

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-17 14:08:04 +01:00
Sai Santhosh Malae
c6198008f5 drivers: watchdog: siwx91x: Add siwx91x WDT driver
Implement Watchdog driver for siwx91x device

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-03-17 13:56:24 +01:00
Arif Balik
6c6d8d888f dts: bindings: added stm32 tsc driver bindings
Added tsc pripheral bindings

Signed-off-by: Arif Balik <arifbalik@outlook.com>
2025-03-17 13:55:48 +01:00
Nhut Nguyen
be6abc3208 drivers: pinctrl: Add support for RZ/T2L
This is the initial commit to support PINCTRL driver for Renesas RZ/T2L

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hieu Nguyen <hieu.nguyen.ym@bp.renesas.com>
2025-03-17 09:26:13 +01:00
Lyle Zhu
d42294d809 Bluetooth: SMP_BR: Use macros instead of hard code
Define macros for encryption value,
#define BT_HCI_ENCRYPTION_OFF           0x00
#define BT_HCI_ENCRYPTION_ON_LE_AES_CCM 0x01
#define BT_HCI_ENCRYPTION_ON_BR_E0      0x01
#define BT_HCI_ENCRYPTION_ON_BR_AES_CCM 0x02

Use the macros to replace the hard code.

Signed-off-by: Lyle Zhu <lyle.zhu@nxp.com>
2025-03-17 07:04:58 +01:00
Peter Mitsis
701aab92e2 kernel: Add Z_IS_TIMEOUT_RELATIVE() macro
Introduces the Z_IS_TIMEOUT_RELATIVE() macro to help ensure that
checking for relative/absolute timeouts is consistent. Using this
macro also helps ensure that we get the correct behavior when using
32-bit timeouts (CONFIG_TIMEOUT_64BIT=n).

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-03-17 02:21:02 +01:00
Sai Santhosh Malae
935c8e4701 drivers: pwm: siwx91x: Add siwx91x PWM driver
Implement PWM driver for siwx91x device

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-03-15 06:43:58 +01:00
Sai Santhosh Malae
128ba4490d drivers: pwm: siwx91x: PWM pinctrl name changes
Change PWM pin function names to align with wiseconnect 3.4.0

Signed-off-by: Sai Santhosh Malae <Santhosh.Malae@silabs.com>
2025-03-15 06:43:58 +01:00
Evgenii Kosenko
03f41eb40b include: sys: sys_heap: fix ifdef guards
Ifdef guard of CONFIG_SYS_HEAP_RUNTIME_STATS prevents using IS_ENABLED
macro, preferred way of guarding code. This commit fixes that by
removing ifdef macro.

Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
2025-03-15 00:35:50 +01:00
Evgenii Kosenko
a133ef8f19 include: sys: sys_heap: fix doc generation
Documentation comments describes sys_heap_runtime_stats_get function to
have stats_t argument, hoever function has stats. The commit fixes typo
introduces in a71cd8790f

Signed-off-by: Evgenii Kosenko <Evgenii.Kosenko@silabs.com>
2025-03-15 00:35:50 +01:00
Anas Nashif
f29ae72d79 kernel: rename 'dumb' scheduler and simply call it 'simple'
Improve naming of the scheduler and call it what it is: simple. Using
'dumb' for the default scheduler algorithm in Zephyr is a bad idea.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-03-15 00:34:58 +01:00
Sayooj K Karun
775712dc41 include: zephyr: net: Add NULL checks for phy API calls
Add missing NULL checks to the APIs in phy.h

Signed-off-by: Sayooj K Karun <sayooj@aerlync.com>
2025-03-14 14:41:57 +01:00
Filip Kokosinski
5dbf61aeb8 include/zephyr/drivers/clock_control: return -ENOSYS for empty on/off
There are in-tree clock controllers that don't implement the `on`/`off`
calls, e.g. in Intel Agilex. Let's return `-ENOSYS` when that's the case.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-03-14 14:40:24 +01:00
Andreas Klinger
72b2f01298 drivers: sensor: add vishay veml6031 ambient light sensor
- add driver for Vishay VEML6031 High Accuracy Ambient Light Sensor.
- add new compatible "vishay,veml6031".
- read and write consecutive 8 bit registers as bulk operation.
- add driver to build all test of sensors.
- support fetch and get.
- triggered mode and interrupt is not yet supported.

Signed-off-by: Andreas Klinger <ak@it-klinger.de>
2025-03-14 14:40:12 +01:00
James Roy
1a55ecfbe6 drivers: display: Add display_clear function
Add a display_clear function to the display subsystem
to clear the target devices screen display. Introduce
a clear interface at the driver layer to implement
the display_clear function.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2025-03-14 14:39:40 +01:00
Camille BAUD
a2a89f1fb9 drivers: clock_control: Introduce CH32V20x/30x clock control
This introduces support for CH32V20x/30x Clock schemes and
improves WCH Clock control driver

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-03-14 14:39:30 +01:00
Camille BAUD
d549af466a drivers: pinctrl: Introduce WCH CH32V20x/30x pinctrl Driver
This introduces the picntrl driver and partial bindings for
WCH CH32 V20x and V30x series

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-03-14 14:39:30 +01:00
Quang Le
b7f99ffbdd drivers: gpio: Add support for RZ/N2L
Add GPIO driver for RZ/N2L

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-03-14 09:23:50 +01:00
Quang Le
020a0d312c drivers: interrupt controller: Add support for RZ/N2L
Add interrupt controller driver support for RZ/N2L

Signed-off-by: Quang Le <quang.le.eb@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-03-14 09:23:50 +01:00
Hoang Nguyen
da0c8e5842 drivers: pinctrl: Add support for RZ/N2L
This is the initial commit to support pinctrl driver for Renesas RZ/N2L

Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-03-14 09:23:50 +01:00
Tien Nguyen
342d2d7954 drivers: dma: Initial support for RZ/G3S
Add DMA driver support for Renesas RZ/G3S

Signed-off-by: Tien Nguyen <tien.nguyen.zg@renesas.com>
Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
2025-03-14 09:16:42 +01:00
Peter Mitsis
c6bc09223e kernel: Move current_fp field out of z_kernel
The current_fp field in the z_kernel structure is only used
by 32-bit x86 (which does not support SMP). As such, it should
reside in the arch specific of section of _kernel.cpus[0].

This also changes the name of 'current_fp' to 'fpu_owner' to
be more consistent with other architectures.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2025-03-14 05:47:10 +01:00
Guennadi Liakhovetski
dc27b4219c llext: skip MMU flag adjustment for pre-located extensions
Extensions with the pre_located flag set, manage memory themselves,
including MMU permissions. Skip any such adjustments in LLEXT core.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2025-03-13 16:57:37 +00:00
Fabio Baltieri
60a9a202df kscan: drop kscan and any reference
Drop the whole kscan subsystem and reference to it.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2025-03-13 16:56:26 +00:00
Emil Gydesen
5918427278 Bluetooth: Host: Make bt_le_addr_is_bonded public
Some GATT services and profiles define specific behavior
based on whether the remote device is bonded or not.
The internal function, bt_addr_le_is_bonded, is the
only function to do this, but it was kept internal,
and could thus not be used for those services
without including hci_core.h.

The function has been moved to the public API
so that application can determine if a remote
address is bonded or not, and has been renamed
to not use the bt_addr namespace, but rather the
bt_le.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2025-03-13 10:48:19 +01:00
Kyra Lengfeld
35707831fa Bluetooth: Host: Improve bluetooth documentation
This commit adds more detailed description to the "Bluetooth APIs" and
"GAP" group within the bluetooth header.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2025-03-13 07:24:35 +01:00
Tristan Honscheid
aa240e2ecb device: Update Z_DEVICE_INIT_ENTRY_DEFINE to be C++ compatible
The `Z_DEVICE_INIT_ENTRY_DEFINE()` macro uses a designated initializer
to define a struct. Ensure all members of `struct init_entry` are
defined in order for C++ compatibility.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2025-03-13 07:24:25 +01:00
Tristan Honscheid
be4334b2d2 device: Update SYS_INIT_NAMED() to be C++ compatible
In #84394, `struct init_entry` was modified to remove an unneeded union.
The `SYS_INIT_NAMED()` macro was adjusted accordingly, but is no longer
C++ compatible due to the partial designated initializer.

Add an explicit value (NULL) for the other field (`dev`) in that struct.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2025-03-13 07:24:25 +01:00
Khoa Nguyen
cf9e92742b drivers: comparator: Initial Comparator support for Renesas RA
Initial Comparator driver support for Renesas RA

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-03-13 07:22:00 +01:00
Kyra Lengfeld
c31b962743 Bluetooth: Host: improve GATT documentation
Clarifying `bt_gatt_attr` docs.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2025-03-12 19:04:30 +01:00
Henrik Brix Andersen
0f42f89a8c lib: net_buf: remove deprecated zephyr/net/buf.h header file
Remove the deprecated zephyr/net/buf.h header file.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-03-12 19:04:19 +01:00
Henrik Brix Andersen
4d01efbf90 lib: net_buf: remove deprecated net_buf_put() and net_buf_get() functions
Remove the deprecated net_buf_put() and net_buf_get() functions.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2025-03-12 19:04:19 +01:00