Commit Graph

109944 Commits

Author SHA1 Message Date
Bartosz Wieczorek
31ecbc1bda Fix uart logging issues 2025-04-22 11:25:15 +02:00
Bartosz Wieczorek
f5be4c4e18 fix temperature readings 2025-04-18 14:44:09 +02:00
Bartosz Wieczorek
fb083f0538 update temperature messages 2025-04-15 14:19:31 +02:00
Bartosz Wieczorek
a634cf5cfe refactor 2025-03-17 15:10:58 +01:00
Bartosz Wieczorek
4073332db9 Add exception handling 2025-03-06 11:21:22 +01:00
Bartosz Wieczorek
76e687a87a exceptions 2025-03-05 20:11:42 +01:00
Bartosz Wieczorek
242521678d uart fixes 2025-03-03 17:02:22 +01:00
Bartosz Wieczorek
25999cde55 before uart rewrite: 2025-03-01 07:43:50 +01:00
Bartosz Wieczorek
c793f56934 refactor 2025-02-28 14:24:12 +01:00
Bartosz Wieczorek
e12246b259 checkpoint 2025-02-11 08:21:05 +01:00
Manuel Argüelles
55d3deb030 tests: logging: log_backend_fs: add missing include
Include explicitly `logging/log_backend.h` header so that non POSIX
boards can build this test. For POSIX boards, this headers was indirectly
included through `ztest.h`->`ztest_assert.h`->`tc_util.h`->`log_ctrl.h`.

Fixes #85441

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-02-10 09:03:13 +01:00
Sachin D Kulkarni
a6dfdb9b8c drivers: nrf_wifi: Use mode specific APIs
Update the nrf70 Wi-Fi driver to use the mode specific
APIs (as a precursor to enable combining modes as required).

Signed-off-by: Sachin D Kulkarni <Sachin.Kulkarni@nordicsemi.no>
2025-02-10 09:02:55 +01:00
Sachin D Kulkarni
922d207c59 drivers: nrf_wifi: Use mode specific data structures
Update the driver to use the updated mode specific
data structure names.

Signed-off-by: Sachin D Kulkarni <Sachin.Kulkarni@nordicsemi.no>
2025-02-10 09:02:55 +01:00
Johann Fischer
d9f40b4e25 doc: usb: add initial USB/IP documentation
Add initial USB/IP documentation for the new USB support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
481dcf7136 snippets: add USB/IP on native simulator snippet
Snippet that helps to build USB device samples with virtual device and
host controllers and USBIP support.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
d22c0d2ec3 usb: usbip: add initial support for USBIP server
The server uses host support to export a USB device to a remote
USBIP client. It supports control and bulk transfers, interrupt
transfers may also work, but this depends on the host controller used.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
c8f3a2eb2d usb: host: allow dynamic allocation of USB devices
Allow dynamic allocation of USB devices on connected event.
Add very basic USB device validation and configuration.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
96f4f3ff14 usb: host: move bus event handling to a separate thread
Handle them in separate contexts so that the request completion callback
cannot be blocked, such as when a device connection is detected and
requires configuration.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
fa7752494d usb: host: rework usbh_xfer_alloc() parameters
The transfers require enpoint MPS for proper transaction handling,
assign it in the common place during transfer allsocation so that it can
be reused.
Some users, such as USBIP, may need to keep a reference to private data,
add a parameter for completion callback data.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
63bd9ac1d0 drivers: uhc: add opaque pointer to store upper layer private data
Add an opaque pointer to store upper layer private data and initialize
it with the USB host context during controller initialization. Use the
pointer in event processing to get the correct context.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
5d5de63d67 drivers: uhc: interrupt transaction handling
Add interrupt and start frame parameters and schedule transaction at
specific frame. Implement for virtual driver only.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
ae8ae4cf95 drivers: uhc_virtual: update SoF timer based on the bus speed
Update the SoF timer based on the bus speed of the connected device.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
2ff20a8c66 usb: host: allow partially read device descriptor
To determine bMaxPacketSize0, which is unknown after the reset.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
a7c8a8d46d drivers: uhc: remove UHC transfer parameter addr and attrib
Address parameter/argument is no longer needed because we have a pointer
to the USB device. The Attrib parameter has never been used and will be
replaced by the interval and start-frame parameters in the future.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
60884cc326 usb: host: move representation of a USB device to UHC header
This will allow the controller driver to access information about the
device in the future.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
7f53eca7c5 drivers: uhc_virtual: allow multiple transfers scheduled within a frame
With the current implementation, NACK claims all resources and prevents
scheduling multiple transfers within a frame. Place a number of
available transfers in a list at the beginning of a frame, and process
the transfers in a limited number of slots.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
a91740e1cf drivers: uhc: implement the dequeue function
Implement the dequeue function and remove the timeout parameter as it is
no longer necessary and can be handled in the upper layer. The dequeue
function is required for the USBIP implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
3fd7ea980e usb: host: fix callback parameter type
The parameter should not be a pointer to type usbh_udev_cb_t.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
5012965046 drivers: uhc_virtual: fix SOF timer handling
Do not necessarily call k_timer_init() in the uhc_bus_resume()
implementation. Restart SOF timer after bus reset and in
uhc_sof_enable() implementation.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Johann Fischer
6e6c816446 usb: device_next: lock scheduler in usbd_enable()
Lock the scheduler until the device is fully enabled, similar to
usbd_init();

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-02-10 09:02:45 +01:00
Gang Li
92dd07e51b drivers: wifi: nxp: add WPA2-PSK-SHA256 support for l2
Add WPA2-PSK-SHA256 security type support for embedded supplicant.
Convert wifi key_mgmt to zephyr security type.

Signed-off-by: Gang Li <gang.li_1@nxp.com>
2025-02-10 07:26:07 +01:00
Khoa Nguyen
907d3b7a14 dts: arm: renesas: ra: Remove unsuppoted PWM node for RA4E1
Remove unsupport pwm0 node for RA4E1 soc (r7fa4e10x)

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-02-10 07:25:53 +01:00
Khoa Nguyen
81f8100c4b dts: arm: renesas: ra: Correct MSTPD bit for PWM on ra4-cm4
Correct the MSTPD bit for PWM on ra4-cm4 soc

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-02-10 07:25:53 +01:00
Khoa Nguyen
a408aabc74 dts: arm: renesas: ra: Correct the pwm's address for ra4-cm4
Correct the address of the pwm node for the ra4-cm4 soc

Signed-off-by: Khoa Nguyen <khoa.nguyen.xh@renesas.com>
2025-02-10 07:25:53 +01:00
Maochen Wang
4174c957bf net: l2: wifi: add the check if dev is NULL
Add the check if dev is NULL (when iface is NULL, dev is NULL) when
setting Wi-Fi CMD, in case Wi-Fi driver init fails and shell crashes.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-02-10 07:25:43 +01:00
Maochen Wang
6cbb37dd4e net: l2: wifi: setting CMD only when net_if is up
Setting Wi-Fi cmd only when the net interface is up, avoid the case
that driver deinit and net interface is down, then the L2 APIs interact
with supplicant and driver, which may lead to CPU exception.

Signed-off-by: Maochen Wang <maochen.wang@nxp.com>
2025-02-10 07:25:43 +01:00
Jordan Yates
cd772b374f tests: bsim: bluetooth: central: conn timeout under load
Validate that the connection timeout code path works as expected when
the command buffer pool is under stress.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-02-10 03:41:16 +01:00
Jordan Yates
7365bcf133 bluetooth: host: hci_core: add missing NULL check
Add check that the command buffer claimed in `bt_le_create_conn_cancel`
is not `NULL`. Fixes a fault caused by providing the `NULL` buffer to
`bt_hci_cmd_state_set_init`.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2025-02-10 03:41:16 +01:00
Flavio Ceolin
bf3aa73bdc doc: releases: 4.1: Documet PM removed API
Adding information about z_pm_save_idle_exit removal.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-02-10 03:41:06 +01:00
Flavio Ceolin
5e3f3ce3f5 pm: Remove deprecated function
z_pm_save_idle_exit was deprecated before 3.7, it is time to remove it.

Signed-off-by: Flavio Ceolin <flavio@hubblenetwork.com>
2025-02-10 03:41:06 +01:00
Reto Schneider
97ddfbc962 kernel: Fix typo
The 'd' in dstate is probably there by accident.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2025-02-10 03:40:56 +01:00
Tom Hughes
67e07b7a41 net: utils: Fix unused function warning
Building with clang warns:

subsys/net/ip/utils.c:600:24: error: unused function 'pkt_calc_chksum'
[-Werror,-Wunused-function]
static inline uint16_t pkt_calc_chksum(struct net_pkt *pkt, uint16_t sum)
                       ^

pkt_calc_chksum is called by net_calc_chksum, which only exists when
CONFIG_NET_NATIVE_IP is defined.

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-02-08 19:45:38 -05:00
Filip Kokosinski
820aff101b MAINTAINERS: add the Enclustra Platforms area of maintenance
This commit adds the `Enclustra Platforms` area of maintenance, and assigns
a maintainer and a collaborator to it.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-02-08 19:45:18 -05:00
Filip Kokosinski
2ad9d60d2e boards/arm/mercury_xu: change board vendor to Enclustra
This commit changes the vendor of this board from Xilinx to Enclustra. It
also adds the `enclustra` vendor prefix to avoid potential name collisions
in the future.

See Enclustra Mercury XU and Mercury+ XU SoMs:
https://www.enclustra.com/en/products/system-on-chip-modules/.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
2025-02-08 19:45:18 -05:00
Anas Nashif
d3253a1adf ci: twister: fix steps for analyzing failures
Checkout code early, so files are downloaded and read from one single
place.

Check for job results, only run script on failures.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-02-08 19:44:53 -05:00
Thomas Deppe
f3bdd2bc8c Bluetooth: Host: Add support for Advertising Coding Selection
Adds API for Advertising Coding Selection.

Introduces two new advertising options to configure the advertiser's
requirement concerning coding scheme when LE Coded PHY is configured.
While the Bluetooth v6.0 specification makes a distinction betweeen
preferred and required advertising PHY options, a simplification is
made to only expose the required PHY options. Inline with how LE Coded
PHY is implemented; this API will set both the primary and secondary
advertising PHY's to the same coding scheme.

The support is enabled by CONFIG_BT_EXT_ADV_CODING_SELECTION, and requires
a controller that selects CONFIG_BT_CTLR_ADV_EXT_CODING_SELECTION_SUPPORT.

Signed-off-by: Thomas Deppe <thomas.deppe@nordicsemi.no>
2025-02-08 10:09:41 +01:00
Anna Wojdylo
39dcdcde12 doc: small render fix for nRF54L15 page
fixed the directive to make sure the command renders correctly

Signed-off-by: Anna Wojdylo <anna.wojdylo@nordicsemi.no>
2025-02-08 10:09:30 +01:00
Tim Lin
608d94b869 drivers/gpio: ite: Validate num_pins to prevent untrusted loop bound
Added a build assert to limit num_pins to a maximum allowable value to
prevent potential out-of-bounds access or infinite loops.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-02-08 10:09:20 +01:00
Tim Lin
db0f20c6fb drivers/gpio: ite: Modify the format to comply with check_compliance.py
Modify the format to comply with check_compliance.py.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2025-02-08 10:09:20 +01:00
Wilfried Chauveau
3e6dd56133 arch: arm: cortex_m: make reading tls pointer faster on v7m and v8m.main
Encoding T3 allows for an offset of up to 12bits in size allowing for a
single instruction instead of 3.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2025-02-08 10:09:10 +01:00