Commit graph

15409 commits

Author SHA1 Message Date
Olivier Lesage
6c954782d2 bluetooth: host: Add defines for mode 1 packet quality and RSSI
Add some defines for packet quality and rssi for RTT,
these are useful for filtering out steps where the RTT exchange
was unsuccessful

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Olivier Lesage
b1f34a1b19 bluetooth: host: uint16_t -> int16_t mode 1 deltas
These are signed 16-bit integers by spec

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Olivier Lesage
5d0366404a bluetooth: host: Add docs for t_XX times in CS Test
These options are in microseconds but not fully configurable,
document what options are allowed in 6.0

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Olivier Lesage
51a0e9484d bluetooth: host: Fix values for minimizing/maximizing TX power
The values were swapped, leading to the opposite of the intended
behavior

Signed-off-by: Olivier Lesage <olivier.lesage@nordicsemi.no>
2024-10-17 15:37:38 -04:00
Johan Hedberg
a20f842728 Bluetooth: HCI: Use lower-case values for bus and quirks in devicetree
It's more common (and more readable) convention to use lower-case
names for string-based device tree property values. Convert the HCI bus
and quirks to follow this convention. Also take advantage of the
recently added support for string-array enums to enforce that the
correct values are used.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-10-17 15:36:49 -04:00
Robert Lubos
4a4e4ec7d0 net: lwm2m: Make LwM2M context lists access thread safe
System lists are not thread safe, therefore all accesses should be
protected with a mutex. Introduce a LwM2M context specific mutex,
and use it whenever lists defined per-context are acessed.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2024-10-17 10:49:19 -04:00
Krzysztof Chruściński
74746760fe shell: Extract shell creation from SHELL_DEFINE
Extract shell instance creation from SHELL_DEFINE to Z_SHELL_DEFINE.
SHELL_DEFINE creates logging backend and calls Z_SHELL_DEFINE to
create a shell instance with that logging backend. With this split
it is possible to create a shell instance with logging integration
but without the default shell logging backend.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-17 10:48:25 -04:00
Mirko Becker
4d4938fa2e sensor: fix assertion
With rtio_sqe_prep_read() buf is assigned to userdata. The __ASSERT
should check if the same userdata arrived with rtio_cqe_consume_block()$

Signed-off-by: Mirko Becker <mirko.becker@phoenixcontact.com>
2024-10-17 10:48:15 -04:00
Lukas Gehreke
4c0317fa47 drivers: usb_dc_rpi_pico: Implemented vbus detection handling
As per USB 2.0 specification 7.1.5.1: The voltage source on the pull-up
resistor must be derived from or controlled by the power supplied on the
USB cable such that when VBUS is removed, the pull-up resistor does not
supply current on the data line to which it is attached.

Signed-off-by: Lukas Gehreke <lk.gehreke@gmail.com>
2024-10-17 10:47:15 -04:00
Daniel DeGrasse
66577a9d23 tracing: add named event trace
Add support for a "named event" trace. This trace is intentionally not
used by the system. The purpose of this trace is to allow driver or
application developers to quickly add tracing for events for debug
purposes, and to provide an example of how tracing subsystems can be
extended with additional trace identifiers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-17 10:46:52 -04:00
Anas Nashif
6f937c9cea Revert "tests: posix: net: fix missing clock_t and clockid_t with newlib"
This reverts commit 45b3010d74.

Issue introduced in #79884.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-10-17 06:51:02 -04:00
Rex Chen
be151908d8 net: wifi: shell: add enterprise support for station
Add EAP-TLS, EAP-PEAP-MSCHAPv2, EAP-PEAP-GTC, EAP-TTLS-MSCHAPv2,
EAP-PEAP-TLS, EAP-TLS-SHA256  enterprise wpa2 and wpa3 suiteb
support for station.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-10-17 09:46:02 +02:00
Ajay Parida
0ce5da6da8 wifi_mgmt: Add support for configuring PS exit strategy
If AP indicates the presence of buffered traffic, then it is up to the
STA to decide whether to stay in PS or come out of PS, add configuration
options that can be used at runtime to choose this.

This is tagged as "noup" because it's a backport and "fromlist" cannot
be used as it won't apply cleanly.

Signed-off-by: Ajay Parida <ajay.parida@nordicsemi.no>
2024-10-17 09:45:34 +02:00
Aleksander Strzebonski
18fb3f9a32 usb: dwc2: Allow for enabling USB if the cable is disconnected
Adds CONFIG_UDC_DWC2_USBHS_VBUS_READY_TIMEOUT_MS that allows
for waiting for a USBHS VBUS ready event for a specified
amount of time. Earlier it waited forever and because of that,
the udc_enable() was blocked forever if the USB cable was
disconnected. Now the function returns error on timeout.

Signed-off-by: Aleksander Strzebonski <aleksander.strzebonski@nordicsemi.no>
2024-10-16 16:37:31 +01:00
Chris Friedt
45b3010d74 tests: posix: net: fix missing clock_t and clockid_t with newlib
Fix errors found in CI for missing clock_t and clockid_t types
when building the tests/posix/net testsuite.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-16 16:32:51 +01:00
Victor Chavez
db4c206d4e zbus: fix extern declaration for cpp
Declaration with const keyword (subscriber, listener,message)
require extern cpp declaration otherwise the name is mangled.

Fixes  https://github.com/zephyrproject-rtos/zephyr/issues/79664

Signed-off-by: Victor Chavez <vchavezb@protonmail.com>
2024-10-16 12:25:40 +02:00
Yangbo Lu
6a8cdf42b5 drivers: clock_control_mcux_ccm_rev2: add NETC clock support
Added NETC clock support for clock_control_mcux_ccm_rev2.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
2024-10-16 10:00:32 +02:00
Nikodem Kastelik
d494769948 dts: nordic: refactor bindings helper symbols for SAADC
Split header files containing symbols denoting SAADC inputs
so that only supported inputs can be used for given device.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-10-16 09:59:16 +02:00
Gaofeng Zhang
0c54a3f8c7 hostapd: add ap status in l2 wifi
add ap status in l2 wifi

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-10-15 19:09:33 -04:00
Burak Gorduk
bfe3c4353c bluetooth: host Accommodate platform endianness for CS types
Modifies the CS bitfields that are used for accessing HCI
event data to take platform endiannes into consideration.

Signed-off-by: Burak Gorduk <burak.gorduk@nordicsemi.no>
2024-10-15 19:09:05 -04:00
Burak Gorduk
c5a126cedb bluetooth: host: LE CS subevent result reassembly
Adds HCI support for LE CS subevent result continue
event and the reassembly logic for the partial results.

When subevent results are completed or the subevent is
aborted, the user callback is invoked with a buffer
pointing to the HCI event buffer, so no copy is done.

When subevent results are incomplete, then a reassembly
buffer is allocated from a fixed sized pool. This buffer
is used for the reassembling of the subevent result
containing all of the step data, which is then passed
to the user via the callback. kconfigs have been added
to set the size and the count of the reassembly buffer.

Signed-off-by: Burak Gorduk <burak.gorduk@nordicsemi.no>
2024-10-15 19:09:05 -04:00
Kapil Bhatt
28b74947e0 wifi: Add wrapper APIs for offloaded raw TX feature
Add wrapper APIs for the offloaded raw TX feature supported
by nRF70 devices.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-10-15 19:06:52 +01:00
Chris Friedt
f4e07d15d6 sys: util: define bits per byte, nibble, and nibbles per byte
Collect some common bit-widths redefined in various locations
and put them under sys/util.h .

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-15 19:05:06 +01:00
Jilay Pandya
ecada895da drivers: stepper: update drivers as per the api changes
This commit deprecates passing of async signal in functions such as move
and set_target_position. As per the new API, the async signal has to be
set via set_async_signal.

If RAMPSTAT_POLL is activated then enable_constant_velocity_mode would be
able to raise signals like END_STOP_DETECTED & SENSORLESS_STALL_DETECTED.
This commit also adjusts shell script in order to test these signals.

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-15 13:53:16 +02:00
Jilay Pandya
4f18d64b30 drivers: stepper: api: introduce stepper_set_event_callback function
- Refactor stepper_signal_result to stepper_event.
- Introduce stepper_set_event_callback function
- Deprecate k_poll_signal

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-10-15 13:53:16 +02:00
Joel Hirsbrunner
ae747c4fa1 Devicetree: Devicetree Bindings: Add new APIs
The existing APIs for enums were rewritten to support the changes.
Additional macros were added to now also support getting specific
indices from the array / string-array.
The macros can be evoked the same way like before, since nothing changed
for the interface. Therefore, these changes are backward compatible.

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-10-15 04:11:36 -04:00
Grzegorz Swiderski
365e9d63d0 dts: bindings: Update Nordic owned memory bindings
This concerns both `nordic,owned-memory` and `nordic,owned-partitions`.

Introduce a property named `nordic,access`, which is meant to replace
the `owner-id` and `perm-*` properties. It allows for describing how
multiple domains should access a single memory region, possibly with
different permissions per owner, but without having to create more than
one DT node for this purpose.

This change is also motivated by updated memory protection requirements
on the nRF54H20, which mandate that a given memory region must only be
reserved by one domain, even if multiple domains can have access to it.
This restriction is now described in the binding itself.

Signed-off-by: Grzegorz Swiderski <grzegorz.swiderski@nordicsemi.no>
2024-10-15 04:11:21 -04:00
Jukka Rissanen
7510e2d940 shell: backend: Create a websocket transport backend
This creates a websocket based shell backend that is used to
implement a websocket console that can be connected using a browser.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-10-15 04:11:03 -04:00
Daniel DeGrasse
126306981d drivers: dma: dma_mcux_smartdma: update interface to support custom FW
The SMARTDMA is a programmable DMA engine, and supports custom firmware
in order to run complex DMA operations. Update the driver to increase
the flexibility users have when configuring the SMARTDMA with
custom firmware, and remove the RT500 display firmware specific
definitions and functionality from the driver.

This display setup is now handled from the MIPI DSI driver, since the
firmware used for this case is specific to the MIPI DSI IP.

This change also requires an update to the RT500 devicetree, as the
register definition for the SMARTDMA has changed, so the base address
must as well.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
04a007f9fe drivers: video: add line_offset field to video_buffer structure
Add line_offset field to the video_buffer structure. This field
indicates the offset (in horizontal lines) within a frame that a video
buffer starts at. This is useful for video devices that produce or
consume video buffers that constitute a partial frame.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Daniel DeGrasse
f46e5342c4 drivers: video: add min_line_count and max_line_count to video_caps
Add min and max line count to the video_caps structure- these fields can
be used by applications to determine the size of video buffer they need
to allocate for a video endpoint

The min and max line count fields are designed to enable supporting
endpoints that may produce or consume partial frames within each video
buffer, and may support arbitrarily sized video buffers.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-10-15 04:10:50 -04:00
Emil Gydesen
203bcf3774 Bluetooth: CCID: Make the CCID API public
Move the CCID header to the include directory
to make it public.

This also compiles the ccid.c file whenver CONFIG_BT_CONN
is enabled, rather than having an additional Kconfig for it,
since the API is now public and may be used by other than
our internal services.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-10-15 04:10:28 -04:00
Krzysztof Chruściński
835dd0b83e logging: Refactor filtering macros
Create a macro that encapsulates all filtering and use it in standard
and hexdump macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 04:09:04 -04:00
Krzysztof Chruściński
6adfd4ba89 logging: Minor cleanup in logging helper macros
Change logging level definitions to just numbers instead of
numbers with unsigned indicator (e.g. 1 instead of 1U). Levels
from Kconfig comes as just numbers and often levels are used
for IS_ENABLED-type of macros where values are concatenated
into tokens and it actually makes the difference if value is
1 or 1U. It allows minor cleanup in the internal macros.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-10-15 04:09:04 -04:00
Daniel Mangum
52540d8412 net: fix note about source address in net_context
Removes extraneous word in note on net_context struct describing why the
source address is not stored directly in struct.

Signed-off-by: Daniel Mangum <georgedanielmangum@gmail.com>
2024-10-14 13:05:54 +02:00
Jordan Yates
fec7156b03 adc: current_sense_amplifier: reduce valid scaling range
Reduce the valid scaling range for the gain multipliers and dividers to
provide more headroom on int64_t overflows in the calculations. Take
advantage of this headroom to perform all multiplications before
divisions.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-14 13:05:07 +02:00
Jordan Yates
4361c96c48 adc: current_sense_amplifier: resistance in milli-ohms
Change the unit of the sense resistor in the devicetree binding from
micro-ohms to milli-ohms. This is done for three reasons.

Firstly, the maximum value resistor that can currently be represented
is 4.2 kOhms, due to the limitation of devicetree properties to 32 bits.

Secondly, storing the resistance at such a high resolution makes
overflows much more likely when the desired output unit is micro-amps,
not milli-amps.

Finally, micro-ohms, are an unnecessarily precise unit for the purpose
of these calculations, and a resolution that is not realistic to
achieve. The high resistor resolution results in large divisors that
reduce the resolution of outputs. Unlike resistors characterised down to
the micro-ohm, devices wanting to measure micro-amps are actually
realistic.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-10-14 13:05:07 +02:00
Lars Knudsen
e0a262b33f Bluetooth: Audio: Fix initial Broadcast source values
If the Broadcast ID is initially set to 0x000000,
which is valid, comparison logic on add of an
actual Broadcast ID of 0x000000 fails.

Likewise for SID.

Moving INVALID_BROADCAST_ID define to bap.h

Signed-off-by: Lars Knudsen <LAKD@demant.com>
2024-10-14 13:04:31 +02:00
Declan Snyder
ca829e1b77 include: spi: Clarify data frame units and meaning
Make clear in the include/ header that data frame size
is the same thing as word size for the context of this API.

Also, add some comments to the spi_context to make it easier
for driver writers to understand how to use the functions,
by noting the meaning of the dfs and len parameters to the update
functions. Otherwise it takes some time to understand what they mean.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-10-14 13:03:10 +02:00
Christoph Seitz
74ca0a499a net: ethernet: Add 2.5G and 5G hardware capabilities.
Add the 2.5G and 5G link speeds as possible capabilities
to ethernet drivers.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2024-10-14 13:02:50 +02:00
Christoph Seitz
6fa74eea36 net: ethernet: Add 2.5GBase-T and 5GBase-T phy speeds
The possible link speeds of ethernet phys are extended by
the 2.5G and 5G constants.

Signed-off-by: Christoph Seitz <christoph.seitz@infineon.com>
2024-10-14 13:02:50 +02:00
Josuah Demangeon
0ef69c8815 drivers: video: fix a typo in get_ctrl API function type
The "struct video_driver_api" struct field "get_ctrl" had the wrong type
although this did not have any practical effect as "video_api_set_ctrl_t"
and "video_api_get_ctrl_t" have the same signature.

Signed-off-by: Josuah Demangeon <me@josuah.net>
2024-10-14 13:02:29 +02:00
Robert Lubos
c4803752a8 net: Deprecate CONFIG_NET_SOCKETS_POLL_MAX
CONFIG_ZVFS_POLL_MAX is now used to control the maximum number of poll()
entires. Thereby, CONFIG_NET_SOCKETS_POLL_MAX is redundant and shall
be deprecated.

Modify the defaults for NET_SOCKETS_POLL_MAX and ZVS_POLL_MAX so that
the deprecation actually makes sense instead of symbol removal. In case
the application still sets the old config, it will modify the
ZVS_POLL_MAX default.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
e82b2ea924 fdtable: workaround posix->zephyr->posix dependency cycle
Currently Zephyr depends on POSIX, which presents a
dependency cycle.

Newlib does not seem to like this dependency cycle so it
requires that we re-declare off_t and ssize_t.

We should really stop using off_t and ssize_t below the
POSIX API line in Zephyr.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
1715196cff posix: device_io: implement pselect()
Implement pselect() as it's required by POSIX_DEVICE_IO

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
b3d3d4fff7 net: sockets: move select() implementation to zvfs
Move the implementation of zsock_select() to zvfs_select(). This
allows other types of file descriptors to also make use of
select() functionality even when the network subsystem is not
enabled.

Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Chris Friedt
881dc1fa7a net: sockets: move poll implementation to zvfs
Move the implementation of zsock_poll to zvfs_poll. This allows
other types of file descriptors to also make use of poll()
functionality even when the network subsystem is not enabled.

Additionally, it partially removes a dependency cycle between
posix and networking by moving functionality into a mutual
dependency.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-10-14 13:01:51 +02:00
Phi Bang Nguyen
eac7e604c2 dts: bindings: video: Add common video interface binding
Add common video interface binding. This binding contains the most
common properties needed to configure an endpoint subnode for data
exchange with other device.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-10-14 13:01:40 +02:00
Yonatan Schachter
8b2cdd4577 bindesc.h: Include missing device.h
bindesc.h did not explicitly include device.h. For some build scenarios
this caused compilation warnings, failing the CI.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-14 13:01:23 +02:00
Yonatan Schachter
00800d4818 bindesc: Add support for reading binary descriptors
This commit adds support for reading and parsing binary descriptors.
It can be used for reading the descriptors of another image, or for
iterating over one's own descriptors.

Signed-off-by: Yonatan Schachter <yonatan.schachter@gmail.com>
2024-10-11 13:20:49 -04:00