Commit graph

97154 commits

Author SHA1 Message Date
Johan Hedberg
8953b4eb63 Bluetooth: drivers: Convert ESP32 HCI driver to new API
Convert the hci_esp32.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
e7637413b6 Bluetooth: drivers: Convert psoc6_bless driver to new API
Convert the hci_psoc6_bless.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
6e584a4773 Bluetooth: drivers: Convert IPC driver to new API
Convert the ipc.c HCI driver to the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
af750cd5a6 Bluetooth: Use device tree to indicate vendor exension support
Introduce a new bt-hci-vs-ext device tree boolean property to indicate
device tree support.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
589b92baaf Bluetooth: Kconfig: Remove BT_NO_DRIVER
There are no actual users in the main tree anymore, so just remove this
option.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
130ae9e120 Bluetooth: drivers: Convert Ambiq Apollo driver to new API
Convert the Ambiq Apollo HCI driver to the new HCI API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
eddac27c4e Bluetooth: samples: Fix PAwR samples to match board capabilities
These samples were enabled for an nRF board, even though there is no
upstream support for the feature. Additionally the sample.yaml files
were forcefully disabling any in-tree HCI drivers, making it impossible
to use e.g. qemu with an external HCI controller. Simply remove the nRF
board from the list, as well as the odd Kconfig HCI driver options.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
c68770eda8 qemu: Use BT_UART instead of BT_NO_DRIVER to enable serial port
The CONFIG_BT_NO_DRIVER option will be going away. Use the
CONFIG_BT_UART option instead (selected by UART HCI drivers) to
determine whether to enable the qemu serial port for Bluetooth.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
1824dcda7c Bluetooth: tests: Convert to new HCI driver API
Convert all Bluetooth tests that define dummy HCI driver instances to use
the new HCI driver API. This requires both a custom DTS binding as well
as an app-specific overlay file.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
66b53866a7 Bluetooth: drivers: userchan: don't fail everything if driver init fails
With the new HCI driver model it's not always critical if a single
instance fails to initialize. This is especially true for many test
applications which provide their own HCI drivers. Instead of causing a
complete failure, simply fail to initialize the driver instance.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
bb91aa0b7f Bluetooth: drivers: Convert userchan driver to new API
Convert the HCI User Channel driver to use the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
db753c1474 boards: nrf52_bsim: Add support for using UART as HCI
Add support for using an UART instead of the native controller. This is
accomplished with a custom DTS overlay for the tests that require it.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
97c3a1e4be Bluetooth: drivers: hci: Get rid of Kconfig choice
The drivers should be independent after the move to the new HCI driver
API. Having them as a choice also has unexpected consequences with some
drivers being unexpectedly enabled.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
00d66339fc Bluetooth: drivers: h5: Convert to new HCI driver API
Convert the H:5 HCI driver to use the new HCI driver API.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
f8befbd67a Bluetooth: host: hci_raw: Use existing H4 defines from hci_types.h
Use existing defines instead of redefining our own.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
7a4cd81376 Bluetooth: samples: hci_uart_async: Remove bt_recv() dependency
Apps shouldn't try to call bt_recv() since that's not a public API and
is going completely away with the new HCI driver API. Just inject the
buffer directly into the k_fifo which we anyway have access to in this
app.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
44e0f5fee3 Bluetooth: controller: Update to new HCI driver API
Update the native controller to the new HCI driver API. The devicetree
node is placed under existing `radio` nodes, which seemed like the most
intuitive option.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
3482a3be53 Bluetooth: drivers: Convert H4 (UART) HCI driver to new API
Convert the H4 driver to the new HCI driver API. This includes updating
also any boards that use the driver, i.e. adding the appropriate
devicetree node and chosen property to them.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
dcff0be792 Bluetooth: host: Add support for new-style HCI drivers
Add support for HCI drivers which use the newly defined HCI driver API.
Since Zephyr (currently) only supports a single HCI driver instance,
boards are expected to indicate the instance using a new devicetree
chosen property `zephyr,bt_hci`.

In order to maintain compatibility with not-yet-converted drivers the
code has been placed behind `#if DT_HAS_CHOSEN(zephyr_bt_hci)`
conditionals.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
7fb39a627b Bluetooth: include: Add initial HCI driver API definition
Add the initial HCI driver header file and driver API definition. This
is distinct from drivers/bluetooth/hci_driver.h in order to support
legacy (unconverted) drivers for the time being.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Johan Hedberg
8ae074ec18 Bluetooth: Add devicetree base binding for Bluetooth HCI drivers
Add a base binding for Bluetooth HCI drivers. All HCI drivers should
extend this binding (through an include directive) to create their own
binding files.

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-06-11 19:42:49 -04:00
Lauren Murphy
9ac63390db samples: sensor: update dht_polling to new API
Updates dht_polling sample to new sensor API.

Signed-off-by: Lauren Murphy <lauren.murphy@intel.com>
2024-06-11 19:42:24 -04:00
Johan Hedberg
aca152a941 manifest: Update hal_silabs version
Update the hal_silabs version. The only change is an added explicit name
for the module, so that it behaves consistently with other HAL modules.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-06-11 10:32:21 -07:00
Flavio Ceolin
826cbb4522 doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-5754

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-06-11 20:31:28 +03:00
Anas Nashif
1370216ea3 doc: tsc role and working group definition
- Define TSC member role and add rights & responsibilities section.
- Document elected TSC member process
- Document working groups, membership and decision making processes in
  TSC working groups.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-11 20:24:02 +03:00
Anas Nashif
911df45d8e doc: update charter link
Update link to charter and use something more recent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-06-11 20:24:02 +03:00
Thomas Stranger
19ded99c92 doc: migration-guide: sensor: sensirion: shtcx: chip property
Add release notes for removed chip dts property of the
sensirion shtcx binding.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-06-11 20:12:15 +03:00
Thomas Stranger
34cac05775 drivers: sensor: sensirion: shtcx: remove chip property
Removes the dts "chip" property, the compatible should be used instead.

Any existing dts should be converted from something like:

test_i2c_shtc3: shtc3@70 {
	compatible = "sensirion,shtcx";
	reg = <0x70>;
	chip = "shtc3";
	measure-mode = "normal";
	clock-stretching;
};

to something like:

test_i2c_shtc3: shtc3@70 {
	compatible = "sensirion,shtc3", "sensirion,shtcx";
	reg = <0x70>;
	measure-mode = "normal";
	clock-stretching;
};

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2024-06-11 20:12:15 +03:00
Nick Ward
49d09ecb28 sensor: current_amp: fix fractional value
It needs to be x1000

Also correct the units used in the log

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2024-06-11 20:11:53 +03:00
Daniel DeGrasse
5525c16c45 samples: add rt1050 to display samples with shield
Add RT1050 EVK to platform-allow list for display sample tests with
RK043* based shields.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-11 20:07:38 +03:00
Daniel DeGrasse
2061e60a78 boards: nxp: mimxrt1050: remove display, document usable shields
Remove display definition from MIMXRT1050 EVK, and document the shields
that can be used with the board's FPC 40+6 pin parallel display
interface.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-06-11 20:07:38 +03:00
Phi Bang Nguyen
59af15a219 boards: nxp: mimxrt1170_evk: Enable video feature
Enable video feature on cm7 evk and evkb which are tested with ov5640
camera.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-11 20:06:53 +03:00
Phi Bang Nguyen
67a3e71652 boards: shields: Add shield for NXP ov5640 camera modules
Add a shield for NXP ov5640 camera modules. This shield uses a 44-pin
board-to-board connector which is supported on NXP RT1170 and RT1160 EVKs.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
2024-06-11 20:06:53 +03:00
Armin Brauns
0c23cf94a4 include/kernel: check type of object passed to K_POLL_EVENT_INITIALIZER
This prevents accidentally passing the wrong pointer type (e.g. one level
of indirection too many) as the object `void *`.

Co-authored-by: Nicolas Pitre <npitre@baylibre.com>
Signed-off-by: Armin Brauns <armin.brauns@embedded-solutions.at>
2024-06-11 20:06:32 +03:00
Declan Snyder
45d3eb27b8 drivers: nxp_enet: Add fuse map address
Add functionality to use fused mac address

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-11 20:05:50 +03:00
Declan Snyder
f203a8b193 drivers: nxp_enet: Fix nxp,unique-mac
nxp,unique-mac actually is not meant to be universally
unique, the LAA bit should therefore be set, and fix the
description of the property in the binding to clarify
the intended usage of this property.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-11 20:05:50 +03:00
frei tycho
139f16702a lib: utils: avoid Boolean-to-integer type casts
Avoid casting expression to an inappropriate essential type.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-11 20:05:37 +03:00
Ruben Völl
9bb3853e67 tests: drivers: uart_emul: extend test case for async API
- Tests that the API of the uart-emul also works with the async API
- Tests that `uart_emul_set_release_buffer_on_timeout()` configures the
  behavior as expected
- The tests are now splited into three different configurations: only
  polling API enabled, additionally interrupt driven API enabled and
  additionally async API enabled
- Enabled `native_sim` board

Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
2024-06-11 20:05:24 +03:00
Ruben Völl
2c82681bec driver: uart: emul: Add support for async UART API
As it is up to a driver implementation if a partial filled buffer is
released, this behavior can be configured during runtime to allow testing
for this edge case.

Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
2024-06-11 20:05:24 +03:00
Ruben Völl
e5dd2376b3 drivers: uart: emul: Remove uart_emul_work struct
This structure is bad style and not needed. Instead get the surrounding
`struct uart_emul_data` with `CONTAINER_OF()` directly.

Signed-off-by: Ruben Völl <ruben.voell@grandcentrix.net>
2024-06-11 20:05:24 +03:00
Scott Worley
7c0b038d6b soc: microchip: mec: Common SoC init updated to MEC5 HAL v0.2
Microchip MEC5 HAL version 0.2 standardizes HAL API and register
define names. Updated the SoC common initialization code using
new HAL API names.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-06-11 20:04:46 +03:00
Scott Worley
ec1f760b6a manifest: hal_microchip: Update to version 0.2 of MEC5 HAL
Customers requested MEC5 HAL naming standardization.
Version 0.2 of MEC5 HAL completes majority part of
HAL API and register define renaming.

Signed-off-by: Scott Worley <scott.worley@microchip.com>
2024-06-11 20:04:46 +03:00
Nikolay Agishev
356dfa7e79 tests: Remove obsolete filter for ARC nSIM platform
Remove nSIM platform filter for tests/lib/heap. The filter is no
longer needed as nSIM performence was improved and test timeout
was increased because of another platforms.

Signed-off-by: Nikolay Agishev <agishev@synopsys.com>
2024-06-11 20:04:29 +03:00
Niek Ilmer
3bb95104e8 drivers: adc device: smartbond: Add power management
Add support for power management to the sdadc.

Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
2024-06-11 20:04:02 +03:00
frei tycho
44782fd8af lib: change controlling expressions in if/while to Boolean
Use `do { ... } while (false)' instead of `do { ... } while (0)'.
Use comparisons with zero instead of implicitly testing integers.
Use comparisons with NULL instead of implicitly testing pointers.
Use comparisons with NUL instead of implicitly testing plain chars.
Use `bool' instead of `int' to represent Boolean values.
Use `while (true)' instead of `while (1)' to express infinite loops.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-11 20:03:34 +03:00
frei tycho
382670690c net: change controlling expressions in while to Boolean
Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-11 20:03:16 +03:00
frei tycho
ac8620c791 tracing: change controlling expressions in while to Boolean
Use `do { ... } while (false)` instead of `do { ... } while (0)`.

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-06-11 20:02:40 +03:00
Declan Snyder
421a6820e4 dts: ke1xz: Fix base address GPIOE
Base address of gpioe is typo ignoring ranges

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-06-11 20:02:23 +03:00
Emil Gydesen
038fc8b6ac samples: Bluetooth: Refactor TX for unicast audio client
Refactored the unicast audio client sample to use a
separate thread for TXing, rather than the system workqueue.

This allows us to do blocking waiting operations like
buf = net_buf_alloc(&tx_pool, K_FOREVER);
and also splits the responsibility of TXing to a new
file as well.

LC3 handling have also been moved to a new file, so
that it does not pollute the source code for non-LC3
supported builds. This also fixes various issues and
improves the LC3 handling in the sample.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-11 17:35:30 +03:00
Emil Gydesen
ea05d61c5f samples: Bluetooth: Fix stack size for unicast audio server
The unicast audio server is actually decoding in the RX
thread, and not the system workqueue.

This is a temporary fix, as ideally it would do the
decoding in a separate thread to avoid taking too much
time in the system threads.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-06-11 17:35:30 +03:00