Commit Graph

90829 Commits

Author SHA1 Message Date
Petr Hlineny a97c825d64 drivers: i2c: stm32: Disable suspend to idle during transaction
Suspend-to-idle stops I2C module clocks, which must remain active during
transaction

Signed-off-by: Petr Hlineny <development@hlineny.cz>
2024-02-02 10:07:59 +01:00
Chun-Chieh Li bc1a988f9d drivers: usb: device: support Nuvoton NuMaker series USBD controller driver
1. Configure 'core-clock' to 192MHz to generate necessary 48MHz
2. Support workaround to disallowing ISO IN/OUT EPs to be assigned
   the same EP numbers

Signed-off-by: Chun-Chieh Li <ccli8@nuvoton.com>
2024-02-02 10:07:43 +01:00
Derek Snell 9260c5b6b2 doc: linkserver: update PATH
Added details to update PATH environment variable for linkserver

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-02-02 09:09:20 +01:00
Kshitij Shah 24ebebdcc9 drivers: sensor: bma4xx: Add bma4xx emulator
Add emulator for bma4xx sensor.

Signed-off-by: Kshitij Shah <tij@google.com>
2024-02-01 21:42:49 -06:00
Daniel DeGrasse a8a0eb5243 MAINTAINERS: add danieldegrasse to display collaborators
Add myself to display collaborators list to aid in reviewing PRs, as I
have been working with SPI based and parallel displays within Zephyr

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-01 15:25:34 -06:00
Jordan Yates 84ce10658c tests: cmsis-dsp: request required features
Request the CMSIS DSP features required for each test.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-02-01 14:49:03 -06:00
Jordan Yates 5c849f8e2e modules: cmsis-dsp: re-add compilation control
Re-add finer grained compilation control that was lost in the CMSIS
split (#56957). CMSIS DSP is several hundred files and has a measurable
effect on compile times.

Only compiling features that are required improves this.

Signed-off-by: Jordan Yates <jordan.yates@data61.csiro.au>
2024-02-01 14:49:03 -06:00
Anas Nashif b64af4008f twister: deal with predicates and skipped tests
Using ztest predicate feature, testcases are skipped, however, the skip
is only reported as part of the summary and not through normal
execution. Until now such tests were reported as blocked or had a null
status in the twister json output.

This changes will look into summary results and use them to confirm
parsed results and add any missing results that either were not reported
or not captured through the serial console.

The issue can be observed with the drivers.can.api test for example on
the frdm_k64f board.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-02-01 14:31:05 -06:00
Anas Nashif 2a260a84c8 tests: CAN: change duplicate test name: get_capabilities
In twister, we do not include the ZTEST testsuite as part of the
identifier, something we should start doing especially for tests with
multiple suites. The issue happens with same testcase name in different
suites, where results get messed up.
Work around this for now by making the testcase names unqiue until we
have a better solution twister.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-02-01 14:31:05 -06:00
Sumit Batra 286a3ce37f drivers: eth: phy: tja1103: Handle link change
drivers: eth: phy: tja1103: Handle link change
These changes enable -
TJA1103 driver to gracefully handle Link connect or disconnect events
between Ethernet PHY and its link partner and notify it to the
upper network layers

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2024-02-01 14:29:43 -06:00
Sumit Batra bbc1087e83 drivers: eth: s32 gmac: Handle link change
These changes enable -
1. S32 gmac driver to gracefully handle
net iface down and up net shell commands and
2. Link connect or disconnect events between
Ethernet PHY and its link partner.

Signed-off-by: Sumit Batra <sumit.batra@nxp.com>
2024-02-01 14:29:43 -06:00
Laurentiu Mihalcea 6644fa9104 dai: nxp: sai: Disable data line on pause trigger
Currently, whenever performing TRIGGER_PAUSE operation, the
data line is not disabled. This works well if TX and RX don't
operate at the same time or they operate in ASYNC-ASYNC mode. This
is because sai_tx_rx_disable() will disable transmitter/receiver
all the time since there's no dependencies to take into consideration.
However, in the ASYNC-SYNC mode, sai_tx_rx_disable() may not disable
the current asynchronous side if the synchronous side is still enabled.
As a consequence, the asynchronous side will remain enabled, thus
leading to an underrun/overrun.

To fix this issue, sai_trigger_pause() should disable the data line
each time it's called. This way, even if sai_tx_rx_disable() doesn't
disable the current direction, the data line will be disabled, thus
stopping the consumption/production of frames.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-01 14:27:37 -06:00
Laurentiu Mihalcea 83283a04a1 manifest: update hal_nxp
Update hal_nxp revision to contain the fix for build error
when trying to use dma_nxp_edma.c DMA driver.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-02-01 14:26:21 -06:00
Patrick Wildt f61bbad625 spsc_pbuf: fix cache invalidation in spsc_pbuf_free
In case the read index points to the end of the packet buffer and thus
wraps around, we must not invalidate the cache, otherwise we draw
outside of the lines and purge data outside of our responsibility.

Signed-off-by: Patrick Wildt <pwildt@google.com>
2024-02-01 13:10:28 -06:00
Daniel Leung 02baa658d2 xtensa: remove unneeded addi in xtensa_userspace_enter
There is no need to do a addi to a1 because it is
immediately overwritten anyway.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-02-01 13:09:53 -06:00
Daniel Leung 39d9d0a2fc xtensa: remove ARG_UNUSED from arch_syscall_oops
ssf is being passed to xtensa_arch_kernel_oops() so there is
no need to mark ssf with ARG_UNUSED.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-02-01 13:09:53 -06:00
Daniel Leung 5d8b43feff xtensa: only need ZSR_FLUSH if CONFIG_KERNEL_COHERENCE
The ZSR_FLUSH scratch register is only needed if kconfig
CONFIG_KERNEL_COHERENCE is enabled. So update gen_zsr.py
for that.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-02-01 13:09:53 -06:00
Daniel Leung 545cf8cd2f xtensa: print THREADPTR when dumping stack
Print THREADPTR when dumping stack just like other registers.
There is no need to guard that behind CONFIG_USERSPACE.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2024-02-01 13:09:53 -06:00
Andries Kruithof 38e0e6e555 Bluetooth: audio: BAP: fix Kconfig description
The description for BT_BAP_SCAN_DELEGATOR_BUF_TIMEOUT is a bit misleading.
Rewriting this to be more accurate

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-02-01 13:09:17 -06:00
Krzysztof Chruściński 8bc61e2b51 drivers: spi: Add missing retval to spi_read calls
spi_transceive returns number of received frames for slave mode.
This information was missing for spi_read type of functions.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-02-01 10:23:44 -06:00
Derek Snell de5586d7ec boards: arm: lpcxpresso55s69_cpu0: enable DMA
The DMA is already enabled for this board, but updating the board doc
page to make that clear, and enabling the DMA loop_transfer test.

Signed-off-by: Derek Snell <derek.snell@nxp.com>
2024-02-01 10:23:11 -06:00
Jukka Rissanen 508a261286 log: net: Convert syslog network transmitter to use sockets
Convert the network log backend to use socket API instead of
net_context API. This allows the backend to be used also
with socket offloading network drivers.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-02-01 10:22:47 -06:00
Emil Gydesen 81a1826e13 tests: bsim: Bluetooth: CSIP: Increase EXECUTE_TIMEOUT to 30
Some of the CSIP tests take a while to run given the number of
devices, and some of them started to fail in CI because of a
timeout, so we increase the EXECUTE_TIMEOUT a bit.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-02-01 17:00:47 +01:00
huajiang zheng 3d9f76b8e5 Bluetooth: Host: add unregister connection callback function
[Description]
tests: shell: Restart bt will register the same connection callback twice.
Callback next node point to itself, when link established callback function
loop infinitely.
[Fix]
Unregister the previous callback to avoid register repeatedly.
[Test]
After bt init/disable times, create connection successfully.

Signed-off-by: huajiang zheng <huajiang.zheng@nxp.com>
2024-02-01 16:05:38 +01:00
Eve Redero 7f5b332b58 doc: fix index typo in sdl bindings
Label "key1" is used twice in the exemple, renaming to "key2".

Signed-off-by: Eve Redero <eve.redero@gmail.com>
2024-02-01 14:32:03 +00:00
Fabio Baltieri 9c038c6c34 github: hello_world_multiplatform: update standard action version
Align the standard action versions with the other workflows, those have
been updated in 0dcb0518be but this file was merged after.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-02-01 14:31:35 +00:00
Fabio Baltieri 86568638fa github: hello_world_multiplatform: run on SDK_VERSION changes
Add the SDK_VERSION file to the pathlist for running the workflow on
pull requests.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-02-01 14:31:35 +00:00
Luis Ubieda 2745f6a885 samples: bluetooth: Added sample for Extended Advertisements
Both advertiser and scanner demonstrate the use of extended advertising
and scanning, and how to gracefully restart the extended advertisements
through the use of recycle() callback. In the sample, the advertiser
initiates a connectable advertisement set, which prompts the scanner to
connect. After the connection is established, the advertiser waits for
5 seconds to disconnect. After the connection is dropped, the advertiser
immediately restarts broadcasting, while the scanner cools-down for
5 seconds to restart its process.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-02-01 14:31:27 +00:00
Luis Ubieda 7e5b2a79fc Tests: Bluetooth: Host: Added Test for extended Advertisements
Where extended advertising is restablished through the use of
recycled() callback, registers over bt_conn_cb_register().

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-02-01 14:31:27 +00:00
Luis Ubieda 56e2e7608d doc: releases: release-notes: 3.6: bt: Added recycled cb info
Added on the bt_conn_cb set, used to notify listeners that a previously
allocated connection object has been freed. Used for e.g: restart
extended advertisements.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-02-01 14:31:27 +00:00
Luis Ubieda efb5d8372d Bluetooth: Host: Added Recycled evt notifying conn object is available
- Which allow listeners to attempt to use the freed connection object to
perform actions as e.g: start connectable advertisements.
- Refactored bt_conn_unref() so it does not access conn struct after
decrementing its reference count.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-02-01 14:31:27 +00:00
Daniel Gaston Ochoa 4c88deaa82 drivers: spi: stm32h7: Ignore spurious interrupts
Supurious interrupts can be generated when the SPI device
is disabled. Ignore them within the SPI IRQ handler.

Co-authored-by: Georgij Cernysiov <geo.cgv@gmail.com>

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-02-01 14:31:12 +00:00
Daniel Gaston Ochoa 9991d2ba65 drivers: spi: stm32h7: Use SPI FIFO
Allow to use H7 SPI FIFO to improve performance.

SPI FIFO usage can be enabled/disabled from devicetree.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-02-01 14:31:12 +00:00
Daniel Gaston Ochoa eb78d4dfde drivers: spi: stm32h7: Use transferSize and EOT
Set the transfer size in SPI H7 and check EOT instead of TXC
to be sure the transaction has finished. This is required to
enable the use of the SPI FIFO, as otherwise SPI seems to
operate in "continuous mode", which produces several SCK cycles
after the last frame has been sent/received. More details in the PR.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-02-01 14:31:12 +00:00
Daniel Gaston Ochoa cc9c90c767 devicetree: spi: stm32h7: Allow to enable SPI FIFO from DT
Allow to enable/disable the STM32 SPI FIFO usage from
devicetree.

Signed-off-by: Daniel Gaston Ochoa <dgastonochoa@gmail.com>
2024-02-01 14:31:12 +00:00
Gaetan Perrot 042b522506 tests: posix: add tests for pthread_testcancel()
Add tests for pthread_testcancel()

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-02-01 15:14:28 +01:00
Gaetan Perrot fe5806aff0 doc: posix: mark pthread_testcancel as supported
`pthread_testcancel()` is now implemented, mark it so.

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-02-01 15:14:28 +01:00
Gaetan Perrot 9cd7564ab0 posix: pthread_testcancel zephyrproject-rtos#59946
Implement posix pthread_testcancel()

signed-off-by: Gaetan Perrot <gaetanperrotpro@gmail.com>
2024-02-01 15:14:28 +01:00
Tomasz Moń f00f846fe3 samples: usb: add UAC2 explicit feedback sample
The sample illustrates how to calculate feedback value based on I2S
sample clock measurement or indirect I2S FRAMESTART and USBD SOF.
The sample is currently only supported on nrf5340dk_nrf5340_cpuapp
target because the feedback measurement uses target specific
peripherals.

While it should be possible to perform feedback value calculation
entirely in software (possibly with some additional filtering due
to software scheduling jitter), the I2S API does not provide necessary
timestamps.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-02-01 15:07:37 +01:00
Tomasz Moń c83ad53442 usb: device_next: new USB Audio 2 implementation
Introduce new USB Audio 2 implementation written from scratch. Main goal
behind new implementation was to perform entity configuration with
devicetree bindings, hiding the descriptor complexity from application.

Initial implementation is working at Full-Speed only. High-Speed support
will come later, but even at Full-Speed only this is viable replacement
for old stack USB Audio 1 class (USB Audio 1 is limited to Full-Speed by
specification, i.e. it is explicitly forbidden for USB Audio 1 device to
work at High-Speed).

Implemented is only absolute minimum set of features required for basic
implicit and explicit feedback samples. Only one sample frequency is
currently supported. Optional interrupt notifications are not supported.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-02-01 15:07:37 +01:00
Tomasz Moń 31de122ec0 usb: device_next: broadcast SOF to classes
Start of Frame is not relevant for most classes, but it is crucial for
isochronous operation. The most prominent example where SOF is necessary
is USB Audio class.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-02-01 15:07:37 +01:00
Krzysztof Chruściński ee13631362 pm: device_runtime: Extend existing API with ISR_SAFE mode
Extend macros from creating a PM device with an optional argument
which indicate whether type of device is ISR_SAFE or not.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-02-01 15:03:42 +01:00
Krzysztof Chruściński 5ce4348311 tests: pm: device_runtime_api: Extend with synchronous device
Extended test to support case when PM device is defined as
synchronous.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-02-01 15:03:42 +01:00
Krzysztof Chruściński 25173f71cd pm: device_runtime: Extend with synchronous runtime PM
In many cases suspending or resuming of a device is limited to
just a few register writes. Current solution assumes that those
operations may be blocking, asynchronous and take a lot of time.
Due to this assumption runtime PM API cannot be effectively used
from the interrupt context. Zephyr has few driver APIs which
can be used from an interrupt context and now use of runtime PM
is limited in those cases.

Patch introduces a new type of PM device - synchronous PM. If
device is specified as capable of synchronous PM operations then
device runtime getting and putting is executed in the critical
section. In that case, runtime API can be used from an interrupt
context. Additionally, this approach reduces RAM needed for
PM device (104 -> 20 bytes of RAM on ARM Cortex-M).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-02-01 15:03:42 +01:00
Andries Kruithof b7078286d2 Bluetooth: audio: test: add test for long write
Added a test for long write, long read, and notifications

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-02-01 14:37:40 +01:00
Andries Kruithof 3ef1b045ce Bluetooth: audio: fix bug in scan delegator sync
In the scan delegator when modifying the source we only want to
send a sync request to the upper layers if we are not yet synced,
and not also on a state change

Note that without this change the babblesim test for long writes
will fail

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>

Scan del bugfix

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-02-01 14:37:40 +01:00
Andries Kruithof c5dcc1a4ce Bluetooth: audio: bap: add support for long notifications
Add support for sending long notifications, coming
from a long read, back to the application

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-02-01 14:37:40 +01:00
Andries Kruithof 90a5d02710 Bluetooth: audio: bap: add support for long read
Make sure that buffers are large enough and add
semaphores so that we can do long reads

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-02-01 14:37:40 +01:00
Andries Kruithof 9887ebf471 Bluetooth: audio: bap: long write
Increase the buffer size to allow for long writes

Signed-off-by: Andries Kruithof <andries.kruithof@nordicsemi.no>
2024-02-01 14:37:40 +01:00
Daniel DeGrasse 5df4e513f7 drivers: mipi_dbi: mipi_dbi_spi: cleanup pin checks
Add cleanups to pin presence checks within the mipi_dbi SPI driver.
The cleanups now verify that GPIO and RESET pin devices are ready,
if they are present for the device instance.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-02-01 14:37:30 +01:00