Commit graph

94464 commits

Author SHA1 Message Date
Chris Friedt cdb1193f3e posix: add stubs for asynchronous io
Add stubs for POSIX asynchronous io that return -1 and set
errno to ENOTSUP.

The functions and structures in aio.h are required by the
_POSIX_ASYNCHRONOUS_IO Option as detailed in Section E.1 of
IEEE-1003.1-2017.

The _POSIX_ASYNCHRONOUS_IO interface is required for PSE51,
PSE52, PSE53, and PSE54 conformance, and is otherwise mandatory
for any POSIX conforming system as per Section A.2.1.3 of
IEEE-1003-1.2017.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-04-29 11:02:11 +02:00
Théo Battrel 83f090a710 Bluetooth: Test: Update hci_prop_evt
Accept LE Read Max Advertising Data Length command during HCI
initialization.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-04-29 11:02:02 +02:00
Théo Battrel 8ba0ebab12 Bluetooth: Test: Add long AD test
Test that the Host give back the correct error when we try to set too
big advertising data. And ensure that long advertising data are
correctly transmitted.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-04-29 11:02:02 +02:00
Théo Battrel a0198fe420 Bluetooth: Host: Check max adv data len from ctrl
Send a `READ_MAX_ADV_DATA_LEN` command to the controller at the
initialization of the host to fetch the maximum advertising data length
the host can accept.

This is done because even if the Zephyr controller provide the
`CONFIG_BT_CTLR_ADV_DATA_LEN_MAX` Kconfig symbol, other controllers may
not have such Kconfig symbol. So this is a way for the host to be more
controller-agnostic and provide useful feedback to the users.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-04-29 11:02:02 +02:00
Johan Hedberg d590bcb5e0 Bluetooth: Remove BT_HCI_RESERVE and BT_HCI_RAW_RESERVE
In most cases these were defined as 1. Saving one byte for the rest
doesn't really justify the added complexity that comes with these
options. Removing them also simplifies the interface between HCI
transports/drivers and the host stack, which in turn helps pave the way
for having HCI as a proper Zephyr driver API.

Fixes #71907

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-04-29 11:01:27 +02:00
Wilfried Chauveau 2332bf0311 maintainers: add ithinuel as collaborator to TF-M and related modules
This adds ithinuel (myself) as collaborator to :
- tfm
- tfm-tests
- tfa
- PSA
- mbedtls

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-04-29 11:01:17 +02:00
Wilfried Chauveau d21f728511 maintainers: add ithinuel as maintainer for the ARM Platforms
The aim will be to maintain at least fvp_base* and mps* boards.

Signed-off-by: Wilfried Chauveau <wilfried.chauveau@arm.com>
2024-04-29 11:00:34 +02:00
Aleksandr Khromykh dad7c31e7f Bluetooth: Mesh: use bt_rand instead of sys_rand
Commit adds using host\controller based random number
generator instead of zephyr driver.
No mesh dependency anymore on zephyr system
random driver.

Signed-off-by: Aleksandr Khromykh <aleksandr.khromykh@nordicsemi.no>
2024-04-29 11:00:00 +02:00
Rubin Gerritsen 0a19c18f85 Bluetooth: Host: Document bt_le_scan_update()
This function is used in many places, but just by reading its
name it is not obvious why it is needed.
By adding some documentation it will hopefully become a bit more
clear that this function is mainly used for auto connection
establishment.

Signed-off-by: Rubin Gerritsen <rubin.gerritsen@nordicsemi.no>
2024-04-29 10:59:28 +02:00
Johan Hedberg ac804c6211 Bluetooth: shell: Fix incorrect check for error return
This line was clearly intended to check for the value returned by
ad_init(). The ad_len is unsigned, so checking for a negative value
showed up in a recent Coverity run (no GitHub issue for it yet).

Signed-off-by: Johan Hedberg <johan.hedberg@gmail.com>
2024-04-29 10:59:20 +02:00
Patryk Duda 8c6e801250 soc: xlnx: zynq7000: Select SYSCON in SoC config
The pinctrl driver actually uses SYSCON, so 'depends on' should be used
instead of 'select'. SYSCON should be selected in SoC config instead,
just like other SoC do.

This breaks Kconfig dependency loop for configs that indirectly depends
on SYSCON and causes PINCTRL to be selected.

Signed-off-by: Patryk Duda <patrykd@google.com>
2024-04-29 09:56:58 +01:00
Robert Hancock 1ad4b5c617 i2c: i2c_xilinx_axi: Fix for target mode interrupt handling
When a target was registered with the controller but a controller-mode
request was performed, the driver failed to mask the interrupts that
were occurring as a result of the controller-mode transfer, causing an
interrupt flood. Ensure that all interrupts not handled by target mode
are handled as potential controller-mode events and acknowledged
properly.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-04-29 07:11:16 +03:00
Robert Hancock 083a42d734 i2c: i2c_xilinx_axi: Fix switching from controller to target mode
It appears that a controller re-initialization is sometimes needed for
proper operation when handling target mode requests after a request from
the core is completed in controller mode. Add this re-initialization as
was already done between controller mode requests.

Signed-off-by: Robert Hancock <robert.hancock@calian.com>
2024-04-29 07:11:16 +03:00
Eric Johnson 69c5c6d511 kernel: Remove duplicate execution_cycles write and improve docstring
There is a duplicate write in `z_sched_thread_usage()` that can be
removed. Also modified the docstrings to `k_thread_runtime_stats` to
help better describe the differences between execution_cycles and
total_cycles when getting stats for the CPU or a thread

Signed-off-by: Eric Johnson <eric@memfault.com>
2024-04-28 13:04:20 -04:00
Théo Battrel 83d6cd4710 Bluetooth: Controller: BT_CTLR_ADV_DATA_CHAIN doc
Update the documentation of `BT_CTLR_ADV_DATA_CHAIN` Kconfig symbol to
say that it's only supported in *non-connectable* extended advertising.

Signed-off-by: Théo Battrel <theo.battrel@nordicsemi.no>
2024-04-28 17:23:10 +03:00
Krzysztof Chruściński 4e880e62dc drivers: cache: nrf: Use CONFIG_DCACHE_LINE_SIZE
Use Kconfig instead of fixed value in the driver code.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński 9f6567b87a drivers: cache: nrf: Optimize operation
Apply changes which significantly speed up cache operations.
Removed k_busy_wait from function which polls for cache busyness.
Removed spinlock from cache operation. Lock taking and releasing
takes time and it is faster to check if LINEADDR changed
after performing the operation. If LINEADDR changed then it
indicates that current context was preempted by another cache
operation. If such state is detected current operation is
repeated.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński b83a11281d drivers: cache: nrf: Fix case when driver may hang
Driver was disabling cache before full range operations and that
was causing hanging on polling for cache busy status since
state was never changing (because cache was disabled).

Additionally, added flushing to data cache disabling. If flushing
is not performed then execution fails since data in cache is lost.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński 73d4f58b98 drivers: cache: nrf: Handle issue with LINEADDR on secure builds
nrf54h20 has a bug that requires to manually set 28th bit in the line
address. 28th bit indicates secure memory space. Add handling to the
cache driver.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Krzysztof Chruściński 29a4bb61a0 manifest: Update hal_nordic with nrf_cache change
Add nrf_cache_lineaddr_get to nordic HAL.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-04-28 17:22:35 +03:00
Flavio Ceolin c059405da5 docs: pm: Fix typo
s/seatures/features/g

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-27 11:06:06 +03:00
Flavio Ceolin d8635905e9 xtensa: mmu: Avoid unnecessary mapping
When duplicating a page table, we don't need to copy
the mapping to the kernel l1 page table virtual address.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-04-27 11:05:45 +03:00
Benedikt Schmidt 4104012123 tests: drivers: build_all: sensor: add NCT75
Add the temperature sensor NCT75 to the build_all tests.

Signed-off-by: Benedikt Schmidt <benediktibk@gmail.com>
2024-04-26 19:22:09 -04:00
Benedikt Schmidt 10bbf7cd57 drivers: sensor: add driver for temperature sensor NCT75
Add a driver for the ON Semiconductor temperature sensor NCT75.

Signed-off-by: Benedikt Schmidt <benediktibk@gmail.com>
2024-04-26 19:22:09 -04:00
Benedikt Schmidt c107f12832 dts: bindings: sensor: add binding for temperature sensor NCT75
Add a binding for the ON Semiconductor temperature sensor NCT75.

Signed-off-by: Benedikt Schmidt <benediktibk@gmail.com>
2024-04-26 19:22:09 -04:00
Jonathan Rico 6435262284 Bluetooth: L2CAP: Handle REJECT_RSP for ECRED
We can (and do) open multiple channels with a single L2CAP command. If the
remote doesn't support dynamic channels at all, then it sends back a
REJECT_RSP.

We only destroyed the first channel that matched the command PDU
identifier. Fix that and remove all channels that match.

Also add a test that verifies the patch.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-04-26 19:21:46 -04:00
Karthikeyan Krishnasamy fc5ae0c165 net: mqtt: add user_data in mqtt client
add user_data to mqtt client to store
application related info

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-04-26 19:21:26 -04:00
Julien Vermillard 6b159c1221 boards: esp32: display for m5stickc_plus
add the st7789v LCD as the display

Co-authored-by: Benjamin Cabé <benjamin@zephyrproject.org>
Signed-off-by: Julien Vermillard <julien@vermillard.com>
2024-04-26 19:21:06 -04:00
Yong Cong Sin 0291c551a2 drivers: use DT_INST_NODE_HAS_COMPAT
Replace occurances of:

  DT_NODE_HAS_COMPAT\(DT_DRV_INST\((.*)\), (.*)\)

With:

  DT_INST_NODE_HAS_COMPAT($1, $2)

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-26 20:04:38 +01:00
Yong Cong Sin 9b7638f049 devicetree: implement DT_INST_NODE_HAS_COMPAT
Implement `DT_INST_NODE_HAS_COMPAT` to check if a node has a
compatible. This is helpful when a node has more than one
compatible, which can be used to enable additional features
in the driver.

Updated the devicetree test to play with the new API.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-04-26 20:04:38 +01:00
Declan Snyder a1916b0121 soc: nxp: rw: Fix error if PMU reset not specified
Don't build error if the reset causes is not specified on
the PMU node.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-26 19:49:54 +01:00
Alberto Escolar Piedras 076594fc1c USB_NATIVE_POSIX: Correct dependencies
USB_NATIVE_POSIX dependencies were partially broken for
native_sim as the option was duplicated in the boards
defconfigas.
Let's not define it also in the board Kconfig.defconfig
but instead default it to y in its main definition if
building for either native_posix[//64] or native_sim[//64]

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 19:48:49 +01:00
Alberto Escolar Piedras b304c26c10 logging: Default to IMMEDIATE mode for native targets
Instead of having the boards override the default
in their Kconfig.defconfig
let's just default to IMMEDIATE logging mode in the main
definition if we are building for a ARCH POSIX board.

This avoid issues w dependencies being lost if not duplicated
correctly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 19:48:49 +01:00
Alberto Escolar Piedras 6ca6e516f6 native_{posix,sim} defconfig: Do not override EEPROM_SIMULATOR
The EEPROM_SIMULATOR already defaults to 'y' with proper
dependencies in its main definition in drivers/eeprom/Kconfig.
Let's not define it also in the board Kconfig.defconfig
as that causes dependencies to be lost if not duplicated
correctly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 19:48:49 +01:00
Alberto Escolar Piedras 1748c75f40 native_{posix,sim} defconfig: Do not override FLASH_SIMULATOR
The FLASH_SIMULATOR already defaults to 'y' with proper
dependencies in its main definition in drivers/flash/Kconfig.
Let's not define it also in the board Kconfig.defconfig
as that causes dependencies to be lost if not duplicated
correctly.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-04-26 19:48:49 +01:00
Declan Snyder ee1499e93b dts: nxp_rt1010: Fix typos in comments
Fix typos in the comments in this file

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-26 19:48:24 +01:00
Declan Snyder 0d97fa3a2d dts: rt1015: Remove ethernet node
There is not an ethernet on RT1015.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-04-26 19:48:24 +01:00
Benjamin Cabé d9c40856ea drivers: counter: fix leaking NXP counter Kconfigs
fix conditions for COUNTER_NXP_PIT and COUNTER_NXP_MRT Kconfigs

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé 388c0aa68f drivers: udc: fix leaking Kconfig
UDC_DWC2_MAX_QMESSAGES was leaking.
Added proper dependency to UDC_DWC2

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé a761c55144 drivers: regulator: fix NXP VREF Kconfig leakage
Properly guard NXP VREF driver Kconfig options.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé b7bef3f8ff drivers: grove_lcd: lcd fix Kconfig leakage
Kconfig for Seeed Grove LCD RGB Backlight was looking.
Make it depend on DT_HAS_SEEED_GROVE_LCD_RGB_ENABLED.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé dce214eb3f drivers: timer: fix gRTC Kconfig leak
Add proper dependency to DT_HAS_NORDIC_NRF_GRTC_ENABLED to avoid leakage.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé 8304e82328 drivers: i2c: fix leaking Kconfig option for dw driver
Fix leaking I2C_DW_LPSS_DMA option that was showing up for all I2C
drivers

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Benjamin Cabé c165446993 drivers: i2c: fix leaking Kconfig option for mcux driver
Fix leaking I2C_NXP_TRANSFER_TIMEOUT option. It was showing up for all
I2C drivers.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-04-26 19:48:11 +01:00
Andrej Butok 31aadda646 boards: nxp: Switch the rest from Swap-Scratch to Swap-Move
Switch the default MCUBoot FW Update mode from Swap & Scratch
to more preferable Swap & Move for the rest of NXP boards.
Delete the scratch partition. Save RAM & ROM.
Slot 0 has one additional sector, for use with
the swap move algorithm.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-04-26 19:47:45 +01:00
Bram Vlerick 1e8051af34 i2c: i2c_mcux_flexcomm: add multi target support
When registering a target device, the driver will check if a slave address
is free in the peripheral. If so, the new slave address gets configured and
enabled.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-04-26 19:47:19 +01:00
Bram Vlerick e0daad64a4 i2c: i2c_mcux_flexcomm: move slave init to helper function
Move slave initialization to a separate helper function. This helper will
also be needed in the multi target support during unregistration. When
unregistering, the slave needs to be reinitialized if other remaining
targets are still attached.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-04-26 19:47:19 +01:00
Bram Vlerick 20cc510df4 i2c: i2c_mcux_flexcomm: add find target functions
Add helper functions to find a free target for configuration and find a
target based on the configured slave address. These functions are in
preparation for multi-target mode.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-04-26 19:47:19 +01:00
Bram Vlerick 39bae54b53 i2c: i2c_mcux_flexcomm: move target data to separate struct
Move target data to dedicated struct. This is in preparation for multi
target support. The target_handle can stay global since this handle is
unique per peripheral and not per slave address.

Signed-off-by: Bram Vlerick <bram.vlerick@openpixelsystems.org>
2024-04-26 19:47:19 +01:00
Chaitanya Tata 2ec243df55 tests: spi: Add a test with large transfer
To simulate Wi-Fi, add a test with larget transfer over SPI.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-04-26 19:46:05 +01:00