Commit graph

95529 commits

Author SHA1 Message Date
Emil Gydesen c547079cc2 Bluetooth: Audio: Upgrade from experimental to unstable
This commit upgrades the LE audio API and implementation
from experimental to unstable.

LE Audio have existing for quite a few years in Zephyr
and is not going anywhere, but at the same time it still
has significant effort remaining before it can be
considered stable.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-17 14:33:39 +02:00
Jens Rehhoff Thomsen a2ebe49259 Bluetooth samples: Keep broadcast assistant connected
When Broadcast Sink is connected to Broadcast Assistant then keep
connection when Broadcast Source is removed.

Signed-off-by: Jens Rehhoff Thomsen <jthm@demant.com>
2024-05-17 12:41:04 +02:00
Evgeniy Paltsev 47b334c619 ARC: nSIM: cmake: launch cores in direct order for simulation run
Align cmake launch script with west runners

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-05-17 12:40:52 +02:00
Evgeniy Paltsev 0af51b072c ARC: nSIM: west: launch cores in direct order for simulation run
We've reversed core launch order to workaround issue of
ARConnect initialization interfere with secondary cores
startup (we don't want to workaround it in runtime as it's
only possible in case of debug session).

However it bring us new issues with the simulation run:
 - mismatch arcnum (core ID) with ARConnect ID
 - mismatch arcnum (core ID) with CPU name in nSIM instruction traces

To avoid these issues let's use direct core order for simulation
runs.

Signed-off-by: Evgeniy Paltsev <PaltsevEvgeniy@gmail.com>
Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com>
2024-05-17 12:40:52 +02:00
Laurentiu Mihalcea ae082064ff drivers: dai: sai: write some data into TX FIFO before start
While running the following command:

	aplay ... | arecord ...

multiple times, it was discovered that the SAI transmit
FIFO goes into underrun. This only happened in the
beginning, a few BCLK cycles after unmasking the transmit
data line. With the following flow:

	1) Trigger start on RX
		a) Do TX and RX software reset
		b) Enable RX FIFO error interrupt
		c) Enable RX DMA requests
		d) Enable receive data line
		e) Enable transmitter
		f) Enable receiver

	    ..... some time has passed .....

	2) Trigger start on TX
		a) Enable DMA requests
		b) Enable transmit data line

and configuration in mind:

	1) RX is SYNC with TX
	2) TX is ASYNC
	3) Each FSYNC edge is 32-bit wide
	4) Each frame contains 2 32-bit words

this points to the following possibilites:

	1) The transmitter is enabled so close to the
	start of a new frame that even though the DMA requests
	are asserted, the DMAC doesn't have enough time
	to service them until the module goes into underrun
	=> the timing is bad.

	2) The transmitter is enabled somewhat close to
	the start of a new frame such that the DMAC is not
	fast enough to service the module until it goes into
	underrun => DMAC is too slow AND the timing is bad.

Although the exact cause was not pinpointed, this patch
aims to fix the problem by writing a frame's worth of 0s
in the transmit FIFO. This way, even if we're dealing with
scenario 1) or 2), the DMAC has plenty of time to perform
the transfer (i.e: a frame), thus avoiding the underrun.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-05-17 12:40:43 +02:00
Yong Cong Sin b0394425e1 drivers: sensor: st: vbat: check for ADC nodes
The vbat driver requires the adc node to be enabled:

```c
.adc = DEVICE_DT_GET(DT_INST_IO_CHANNELS_CTLR(inst))
```

Update its Kconfig to depend on `DT_HAS_ST_STM32_ADC_ENABLED`,
which is the `"st,stm32-adc"` compat that all ST ADC bindings
include, this will guarantee that at least one ADC node is
enabled, but not necessarily the ADC used by the vbat node.

To make sure that it at least compiles, we init the `adc`
pointer only if the specified ADC node is enabled, otherwise
it will points to `NULL`.

Finally, check if the `adc` points to `NULL` in
`stm32_vbat_init`. We are not relying on the existing
`device_is_ready` check because `DEVICE_DT_GET` will not
return `NULL` if the ADC is enabled. `adc == NULL` means
that the ADC node is not enabled in the devicetree.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-05-17 11:39:19 +02:00
Marcin Niestroj a15cc704e0 samples: net: echo_server: set IPV6_V6ONLY
This sample assumes that two separate sockets can be bound on IPv4 and
IPv6. On Linux (via Native Simulator Offloaded Sockets) this is possible
when there is no IPv4 to IPv6 mapping. Same can be true to other offloaded
sockets.

CONFIG_NET_IPV4_MAPPING_TO_IPV6 is disabled for this sample, so IPv4 to
IPv6 mapping is disabled for Zephyr native IPv6 layer. For offloaded
sockets this option does not define whether mapping is enabled or not, so
try to unconditionally (and without error checking) disable it.

This patch fixes compatibility with NSOS, since two separate sockets can be
bound on the same address and port, one for IPv4 and second for IPv6.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj 3a9ae1878f tests: socket: udp: reduce SO_PRIORITY from 8 to 6 for NSOS compatbility
According to 'man 7 socket' about SO_PRIORITY:

  Setting a priority outside the range 0 to 6 requires the CAP_NET_ADMIN
  capability.

So use 6 instead of 8, in order to make UDP socket tests pass with native
offloaded sockets on native_sim platform.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj 87a6df2a9b drivers: nsos: support IPV6_V6ONLY getsockopt() and setsockopt()
Handle IPV6_V6ONLY option in getsockopt() and setsockopt() APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj d47ec4f75d drivers: nsos: support IPPROTO_TCP getsockopt() and setsockopt()
Handle IPPROTO_TCP specific options in getsockopt() and setsockopt() APIs.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj 736fe29349 drivers: nsos: support ioctl(FIONREAD)
This further increases compatibility with tests defined in
'tests/net/socket/udp/'.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj cd2c425efe drivers: nsos: support setsockopt(SO_RCVTIMEO)
Handle timeout on receive that is configured using SO_RCVTIMEO.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Marcin Niestroj a3f2b5f4b3 drivers: nsos: initial support for getsockopt() and setsockopt()
Add initial support for getsockopt() and setsockopt() on SOL_SOCKET level.

Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2024-05-17 11:12:43 +02:00
Chaitanya Tata 29f81872ce samples: drivers: spi_flash: Add nRF54H20DK support
Verified on nRF54H20DK, useful for testing external flash access.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-05-17 10:34:31 +02:00
Pete Skeggs f04f8b2422 net: lib: coap_client: Improve cancel function
Improve coap_client_cancel_requests(). Ensure it can be
called from a callback. Report error to waiting callbacks.
Clear active flag.

This is useful when the network becomes unavailable
or prior to disconnecting in order to save power.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2024-05-17 10:34:12 +02:00
Krzysztof Chruściński 90b654ee86 tests: drivers: uart: uart_mix_fifo_poll: Add nrf54h20dk overlays
Add overlays for nrf54h20dk (cpuapp and cpurad).

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-05-17 10:34:02 +02:00
Andrei Emeltchenko adeb19b30c drivers: apic_tsc: Use toolchain cpuid()
We have already code using toolchain provided __get_cpuid(), clean up
apic_tsc and make it consistent with the rest of the code.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2024-05-17 09:30:27 +02:00
Tom Burdick b249535093 sensors: Add channel specifier
Use a structured channel specifier rather than a single enum when
specifying channels to read in the new read/decoder API.

Replaces usages of a seperate channel and channel_index parameter
where previously used with a struct sensor_chan_spec.

Signed-off-by: Tom Burdick <thomas.burdick@intel.com>
2024-05-17 09:30:18 +02:00
Daniel DeGrasse a2087bed16 drivers: sdhc: sdhc_spi: rework CMD12 failure logic
Rework CMD12 failure logic for SDHC SPI driver. Previously, the error
code of CMD12 was not checked, so even if CMD12 failed to send the
initial command would be retried. Change this behavior to retry CMD12
until it succeeds. If CMD12 fails, its error code will be propagated to
the caller. Otherwise, the return code from the command being sent by
the caller will be propagated.

Fixes #72365

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-17 09:30:12 +02:00
Daniel DeGrasse cb9d8bac54 drivers: sdhc: sdhc_spi: release bus on error
Properly release SPI bus on transmit error within the SDHC SPI driver.
In these cases return code is not checked, as we wish to return the
error code from the failed transfer to the SD stack.

Fixes #72364

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-17 09:30:12 +02:00
Flavio Ceolin 696a1a0a13 doc: release-notes-3.7: Removed PCIe APIs
Add information about PCIe APIs removed in this release.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Flavio Ceolin 8cd1ab8896 drivers: pcie: Remove deprecated pcie_bdf_lookup
pcie_bdf_lookup() was deprecated before 3.3 release. Time to remove
it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Flavio Ceolin f4aefc281b drivers: pcie: Remove deprecated pcie_probe
pcie_probe() was deprecated before 3.3 release. Time to remove it.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Flavio Ceolin 4e91d8e7c3 tests: smbus_emul: Remove unnecessary definition
pcie_prob() has been deprecated and it is not needed
in the test.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-17 09:30:04 +02:00
Jerzy Kasenberg 82ca880fb9 drivers: clock_control: Smartbond: Add runtime frequency support
RC32K and RCX low power clocks require runtime calibration to work
correctly.
Frequency of those clock can differ from chip to chip, one constant
value from Kconfig may not be best when low power clock (sourced
from RCX or RC32K) is used for system tick.

This code modifies global z_clock_hw_cycles_per_sec variable that
is used when TIMER_READS_ITS_FREQUENCY_AT_RUNTIME is enabled
in Kconfig.

Signed-off-by: Jerzy Kasenberg <jerzy.kasenberg@codecoup.pl>
2024-05-17 09:29:58 +02:00
Abderrahmane Jarmouni 32c04c6b25 include: dt-bindings: gpio: fix flag value
'1u' causes devicetree parsing error.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-17 09:29:53 +02:00
frei tycho caf332e745 drivers: added missing parenthesis
- added missing parenthesis around macro argument expansion

Signed-off-by: frei tycho <tfrei@baumer.com>
2024-05-17 09:29:48 +02:00
Luis Ubieda 8433268043 MAINTAINERS: Add ubieda to sensor drivers collaborator
Add self as Sensor drivers collaborator.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-17 09:29:06 +02:00
Andrzej Kaczmarek dd395e72f7 boards: renesas: Add configuration for BT
Adds required defconfigs for BT on DA1469x DK.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-16 18:58:00 -04:00
Andrzej Kaczmarek 6306596b27 drivers: hci: da1469x: Add driver for CMAC core on DA1469x
This adds HCI driver which enables communication with CMAC core on
Renesas SmartBond DA1469x series. The CMAC core is running an Apache
NimBLE controller binary and uses shared memory for communcation via
mailboxes.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-16 18:58:00 -04:00
Andrzej Kaczmarek 68029a6309 west.yml: Update revision for hal_renesas
Pull changes required for CMAC driver.

Signed-off-by: Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
2024-05-16 18:58:00 -04:00
Jeppe Odgaard 332d362595 tests: drivers: build_all: sensor: add tsic_xx6
Enable PWM and PWM_CAPTURE in conf and add pwm node to app.overlay.

Add TSic xx6 node to pwm.dtsi.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-16 18:57:24 -04:00
Jeppe Odgaard c9f53d3374 drivers: sensor: add Innovative Sensor Technology TSic xx6 driver
Add driver for TSic 206/306/316/506F/516/716 temperature sensor.
The driver uses PWM capture driver to read a single wire with
Manchester-like encoding.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2024-05-16 18:57:24 -04:00
Jamie McCrae af1b627065 west.yml: MCUboot synchronization from upstream
Update Zephyr fork of MCUboot to revision:
  018dc01d484358d81f889c36471d9ce5590965b6

Brings following Zephyr relevant fixes:
  - 018dc01d boot/zephyr: use socs conf
  - d4394c2f mbedtls config: fix too early check_config.h
    includes

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-05-16 18:57:09 -04:00
Daniel DeGrasse 1de7574d3a drivers: flash: flash_mcux_flexspi_nor: better handle legacy SFDP tables
Implement more robust handling for legacy SFDP tables, which may not
implement some of the JEDEC defined DWORDS for SFDP data. Instead of
failing to probe/initialize the flash when these DWORDS are not defined
in the basic flash parameter table, revert to sane defaults for SPI
flash.

Fixes #72051

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 18:56:33 -04:00
Alberto Escolar Piedras a1576af7af tests/kernel timer_api: Test absolute timers with loosing ticks
Let's also explicitly test that absolute timeouts trigger
at the correct time, even if the kernel has not seen
system clock timer announcements for a while.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-16 18:56:14 -04:00
Jordan Yates 7ddbe9d4bd sensor: voltage_divider: fix power-gpio
`CONFIG_PM_DEVICE` being disabled does not mean that the `power-gpio`
does not need to be controlled.

Additionally, not having a `power-gpio` property does not mean that
power management is not supported, just that is has no work to do.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-16 18:55:45 -04:00
Ioannis Karachalios 97bd924f59 drivers: entropy: smartbond: Bug fix
This commit should fix few wrong expressions

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2024-05-16 18:55:18 -04:00
Frederic Pillon 43039afbdf boards: st: sensortile_box_pro: fix usb console init
Init should return errno value.

Signed-off-by: Frederic Pillon <frederic.pillon@st.com>
2024-05-16 18:55:02 -04:00
Sylvio Alves bda05fb51a drivers: wifi: esp32: remove pre-defined mbedTLS requirements
In #72651, build fails due to conflict when enabling mbedTLS components.
Current Wi-Fi implementation for ESP32 can discard those selected cryptos.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2024-05-16 18:54:43 -04:00
Daniel DeGrasse 05c84ccb2d sd: sd_ops: take card lock when issuing IOCTL command
Take card lock when running IOCTL command, to avoid race conditions that
could occur within the lower SDHC transfer implementations (as these
will be called by sdmmc_wait_ready)

Fixes #72368

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-16 18:54:21 -04:00
Mahesh Mahadevan d44a414574 tests: pm: power_mgmt_soc: enable testing on rd_rw612_bga
Enable the SoC power management test suite on the NXP RW612 EVK
development board.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-05-16 18:53:51 -04:00
Mahesh Mahadevan 161978d398 boards: rd_rw612: Update board documentation
Add information about OS Timer and Power Management support.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-05-16 18:53:51 -04:00
Mahesh Mahadevan 8824fa8bdd soc: rw6xx: Add power management support
Add support for Power modes 1 and 2.
The wakeup from power mode 2 is from the os timer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-05-16 18:53:51 -04:00
Mahesh Mahadevan 648bc402dc dts: rw61x: Add Idle and Suspend power modes
The Power states map to Power Mode 1 and 2.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-05-16 18:53:51 -04:00
Mahesh Mahadevan 8d214448f1 boards: rd_rw61x: Switch to OS Timer for System clock
This clock is better suited for Power Management support
than Systick.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-05-16 18:53:51 -04:00
Mahesh Mahadevan 1192c9be6b soc: nxp: Enable support for OS Timer on RW platform
The OS Timer will be used as the System Timer.

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-05-16 18:53:51 -04:00
Declan Snyder c63cef98fc dts: arm: nxp_rw610: Add OS_Timer
Add OS Timer to device tree

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2024-05-16 18:53:51 -04:00
Flavio Ceolin cec23830e4 doc: vuln: Add CVE under embargo
Add an entry to CVE-2024-4785

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-16 18:53:02 -04:00
Flavio Ceolin 6b27f48938 doc: release-notes-3.7: Add CVE-2024-4785
Add CVE under embargo.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-16 18:53:02 -04:00