Commit graph

95513 commits

Author SHA1 Message Date
Flavio Ceolin e9fa729a6b xtensa: mmu: Fix macro to get ring from a pte
The macro was not masking the pte correctly and it was returning
a wrong value.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-14 15:54:55 +02:00
Flavio Ceolin eb7d60dd67 xtensa: mmu: Remove duplicated macro
XTENSA_MMU_PTE was defined twice.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-14 15:54:55 +02:00
Flavio Ceolin dcaceda39b xtensa: mmu: Simplify memory map
Simplify the logic around the shared attribute. Checks if a memory
region should be shared only in the function that actually maps the
memory.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2024-05-14 15:54:55 +02:00
Trung Hieu Le dffa4e2cb7 boards: nxp: rt1170_evk: Enable XMCD as bootheader by default
Configure to use XMCD as the bootheader by default instead of DCD. As
XMCD gives a better SDRAM memory access speed.
As an example, the Pixel Processing Pipeline is 13 ms faster with XMCD
compared to DCD as the bootheader.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
2024-05-14 15:54:20 +02:00
Trung Hieu Le 3cb5e4ed54 boards: nxp: rt1170_evk: Add XMCD bootheader
Currently, only DCD bootheader was supported to configure the SDRAM.

On IMX RT1170, XMCD can be used as an alternative boot header to DCD.
XMCD is more advanced than DCD and enhances SDRAM access speed.
This is benefit for SDRAM access application.

Signed-off-by: Trung Hieu Le <trunghieu.le@nxp.com>
2024-05-14 15:54:20 +02:00
Sebastian Głąb 3a711143f4 samples: subsys: settings: Run sample on nrf54h20
Add Kconfig file that makes the sample working
on nrf54h20 Application core.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-14 15:52:42 +02:00
Jukka Rissanen 3d1b8c6116 net: shell: Add command to show HTTP server information
The new command is "net http" which shows all services and
related resources defined in the system.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 15:51:20 +02:00
Jukka Rissanen e71569fc00 net: http: Make sure not use undefined Kconfig symbols
If CONFIG_HTTP_SERVER is not enabled, then we must not use
Kconfig symbols that are only available when HTTP server is
enabled.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 15:51:20 +02:00
Jun Lin 71b71015a9 driver: espi: npcx: enable the Serial Port
Initialize and enable the Serial Port/Host UART when
CONFIG_ESPI_PERIPHERAL_UART=y.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-05-14 13:25:43 +02:00
Jun Lin b5f8b4b6b7 pinctrl: npcx: add nodes for Serial Port SIO clock selection
This commits adds required pinctrl node to provide the corresponding SIO
clock selection for the Serial Port under the different VOSCCLK.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-05-14 13:25:43 +02:00
Alberto Escolar Piedras 7c8d538982 posix: env: Fix 2 build warnings
Fix 2 build warnings in posix/options/env:
The maximum length given to strncpy() matches the input
string length, which makes the call equivalent to strcpy().
As the destination buffer size has been ensured sufficient
(in the first case by chechking just before,
in the second case by allocating it big enough),
let's just use strcpy() instead.

lib/posix/options/env.c: In function 'getenv_r':
lib/posix/options/env.c:109:17: error: 'strncpy' specified bound
depends on the length of the source argument
[-Werror=stringop-truncation]
  109 |                 strncpy(buf, val, vsize);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~
lib/posix/options/env.c:104:25: note: length computed here
  104 |                 vsize = strlen(val) + 1;
      |                         ^~~~~~~~~~~
lib/posix/options/env.c: In function 'setenv':
lib/posix/options/env.c:191:17: error: 'strncpy' output truncated
before terminating nul copying as many bytes from a string as its
length [-Werror=stringop-truncation]
  191 |                 strncpy(environ[ret], name, nsize);
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/posix/options/env.c:128:51: note: length computed here
  128 |         const size_t nsize = (name == NULL) ? 0 : strlen(name);
      |                                                   ^~~~~~~~~~~~

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-05-14 13:25:33 +02:00
Sebastian Głąb f84e082f73 samples: sensor: qdec: Run sample on nrf54h20
Add overlay file that enables sample on nrf54h20 Application core.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-05-14 13:25:27 +02:00
Bartosz Miller 7b82235e1e tests: drivers: Update uart_elementary suite with different configuration
Conigure UART to use 2 stop bits and even parity
in 'dual transmission' case
to cover more driver code cases.

Signed-off-by: Bartosz Miller <bartosz.miller@nordicsemi.no>
2024-05-14 13:24:55 +02:00
Marcin Szymczyk 41b856f8dd soc: nordic: add vpr_launcher in sysbuild
`SB_CONFIG_VPR_LAUNCHER` can now be used in building a VPR target,
to enable automatic building of image that will launch the VPR.

Signed-off-by: Marcin Szymczyk <marcin.szymczyk@nordicsemi.no>
2024-05-14 13:24:45 +02:00
Tomasz Moń 25229b2fce drivers: udc_dwc2: Submit reset after chirp sequence
DWC USB 2.0 HS OTG Controller sets USB Reset interrupt after Reset
signalling starts, but before the High-Speed Detection Handshake. This
allows software to perform most of the reset handling even before the
connection speed is known. The device controller indicates High-Speed
Detection Handshake result is available in DSTS register by setting
Enumeration Done interrupt.

USB stack expects that the connection speed is known immediately after
UDC_EVT_RESET is submitted. Due to this expectation, it is important to
submit UDC_EVT_RESET only after Enumeration Done interrupt to prevent
the USB stack from reading (and storing) actual device speed before
it is known.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-05-14 12:16:06 +01:00
Nikodem Kastelik f5ce0476c5 manifest: update hal_nordic revision to have nrfx 3.5.0
Updated hal_nordic revision brings nrfx 3.5.0 release,
that contain MDK 8.64.0, AUXPLL HAL and TWIM/RRAMC driver fixes.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-05-14 12:34:20 +02:00
Emil Gydesen 0cb828d443 Bluetooth: CAP: Fix check for volume_mute_changed callback
The callback was guarded by a wrong check.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-14 10:56:26 +02:00
Anas Nashif 681e1d41e0 doc: clarify what a subsystem is
Clarify what a subsystem is, this has been missing the docs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-05-14 10:55:55 +02:00
Jonathon Penix 99adbadad5 toolchain: llvm: Allow TLS when using llvm targeting arm
TLS for Arm targets seems to be well supported in clang/lld, so mark it as
supported by the toolchain.

Signed-off-by: Jonathon Penix <jpenix@quicinc.com>
2024-05-14 09:43:37 +02:00
Aurelien Jarno 3d4c5e2dc8 dts/arm/st: wl: change cpu0 compatible to arm,cortex-m4
The STM32WL SoC has a Cortex M4 CPU without FPU. Change the cpu0
compatible string accordingly.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2024-05-14 09:38:16 +02:00
Emil Gydesen 36c1aeaf19 Bluetooth: BAP: Shell: Add support for USB audio in
Add support for receiving audio data from e.g. a PC
over USB and LC3 encode it before sending it
on BAP audio streams.

This refactores the entire TX path, as it has moved
from only support the sine wave generator, to also
supporting USB.

The encoding and sending of data is now in it's own
thread, instead of relying on the system workqueue thread
and k_work items.

Several other refactors have taken place to reduce lines
of codec (such as the introduction of the bap_foreach_stream
function.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-05-14 09:34:19 +02:00
Jamie McCrae 92145a22d3 samples: drivers: led_strip: Remove length Kconfig
The chain-length DTS property is now mandatory, so remove the
optional Kconfig for setting the length

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae e911435d90 doc: migration/release: 3.7: Add LED strip changes
Adds changes about the LED strip driver

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 7a4f4711af drivers: led_strip: Make update channels function optional
Makes the update channels function optional, this is only
implemented in one driver so can be safely omitted from most
drivers

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 50b7d61c91 drivers: led_strip: Check length before updating LED strip
Checks that the supplied length is valid for the given driver
before passing it to the update function

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 245163cb87 drivers: led_strip: Update format
Updates the include file to fix some formatting issues

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 4bea96b68b drivers: led_strip: Add length function
Adds a length function which returns the length of the LED strip

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae 8ca399919b boards: Add chain length and colour mapping to LED strips
Adds chain length and colour mapping properties to LED strip devices
on boards where these parameters are now required

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Jamie McCrae f4a3771f8e dts: bindings: led_strip: Add common binding
Adds a common binding with a chain length and colour ordering
property

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2024-05-14 09:33:58 +02:00
Troels Nilsson 01b4f9d263 Bluetooth: Controller: Fix BIS IRC range check
Maximum possible value for IRC is 15, not 7

Signed-off-by: Troels Nilsson <trnn@demant.com>
2024-05-14 09:33:11 +02:00
Samuel Kleiser d796c117ce stm32: ospi: make all clk, dqs, ncs pins configurable
The clk, dqs and ncs pins can be remapped between OSPI instances, but the
driver doesn't support it, yet. Therefore replace hard coded numbers to
device tree optional properties.

Signed-off-by: Samuel Kleiser <s.kleiser@vega.com>
2024-05-14 09:32:57 +02:00
Nicolas Pitre 530b593275 arch: riscv: apply CONFIG_RISCV_MCAUSE_EXCEPTION_MASK to FPU code
Some implementations use bits outside of the mcause mask for other
purpose.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-05-14 09:32:39 +02:00
Reto Schneider cba18a5943 tests: drivers: dma: loop transfer: Avoid fake pass
When the needed functionality is not available, its test should be
skipped, not passed.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-05-14 09:32:21 +02:00
Jordan Yates 23ca74b756 convert: use k_uptime_seconds
Replace usage of `k_uptime_get() / MSEC_PER_SEC` and
`k_uptime_get() / 1000` with dedicated function.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jordan Yates 98deebd29b kernel: add k_uptime_seconds
Add a helper function for retrieving the system uptime in seconds
without having to do a second division.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jordan Yates aee130f8d7 sys: time_units: add seconds conversions
Add conversions between the existing time units and seconds.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jordan Yates c354f7b00b sys: time_units: move warning to doxygen command
Move the warning about code being autogenerated into the doxygen comment
instead of being added as a separate comment that then appears in the
`@return` text.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-05-14 09:32:01 +02:00
Jukka Rissanen fb1ec14938 samples: net: http_server: Close websocket connection properly
Use the websocket_unregister() to close both sockets related
to a connected websocket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 09:31:37 +02:00
Jukka Rissanen 70ab0e65a5 net: websocket: Add a way to unregister a websocket connection
Doing a normal close for a websocket does not close the underlying
real socket. If we do not have fd for the real socket, then it is
not possible to fully close a websocket connection. As we are allocating
a websocket using websocket_register() in HTTP server use case,
create a websocket_unregister() that will close both the real
socket and the websocket socket.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 09:31:37 +02:00
Jukka Rissanen 4d9d0ee64c net: websocket: Ignore error during close if we are disconnected
No need to return an error during a close if we are already
disconnected.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-05-14 09:31:37 +02:00
Daniel DeGrasse 84b8e92445 soc: nxp: imxrt: clock imxrt1042 SOC at 528 MHz
iMXRT1042 SOC should be clocked at 528 MHz maximum. Correct the clock
setup to use the system PLL.

Fixes #70755

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-13 16:37:17 -04:00
Daniel DeGrasse 9668b35ce7 soc: nxp: imxrt: allow configuring system pll on iMXRT10xx series
Allow configuration of the system pll on the iMXRT10xx series parts, via
a fractional pll node under the CCM module.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-05-13 16:37:17 -04:00
Luis Ubieda 413518e0c8 serial: bt: Set configurable options for the NUS Work-queue
Default priority set to Main Thread's and Stack-size set to 1KiB. This
should still allow for the System work-queue, considering this
Work-queue could be temporarily blocked on BT TX commands.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-13 16:17:58 -04:00
Luis Ubieda b1913fb47e drivers: serial: bt: Use dedicated Workqueue
Stop relying on the system workqueue, as the BT TX APIs should
potentially block and now by design this will not work with the
Bluetooth Stack (for good reasons). Now the UART NUS driver has a
dedicated workqueue, which all NUS instances share.

Signed-off-by: Luis Ubieda <luisf@croxel.com>
2024-05-13 16:17:58 -04:00
Abderrahmane Jarmouni cd6c948465 board: arm: nucleo_f746zg: flashing
Add the possibility to flash nucleo-f746zg board using west
STM32CubeProgrammer runner.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Abderrahmane Jarmouni b903dff44f tests: drivers: uart_async: stm32: add test cases with DCache enabled
Add test cases/configs for async DMA uart with DCache on STM32F7/H7 boards

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Abderrahmane Jarmouni fdb3457058 tests: drivers: uart: async_api: support DCache with nocache memory
Add support for running tests with DCache enabled & put DMA buffers
in a nocache memory region to avoid coherency issues.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Abderrahmane Jarmouni e783aafdd0 drivers: uart_stm32: add DCache support in async DMA mode
Adapt the driver to verify if DMA buffers are located in noncacheable
memory when DCache is activated, in order to avoid cache coherency issues.
This is required until manual cache coherency management is implemented.

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2024-05-13 16:09:20 -04:00
Gerard Marull-Paretas 0630c5cfb5 samples: sysbuild: add hello world for multiple board targets
Add a new "hello world" sample that can be built for multiple board
targets. This sample can be used to see if Zephyr boots successfully
with _minimal_ configuration on SoCs with multiple cores, or boards with
multiple SoCs.

The following configurations are provided for now:

- nRF5340 DK: cpuapp+cpunet
- nRF54H20 DK: cpuapp+cpurad, cpuapp+cpuppr, cpuapp+cpuppr(xip)

Note that because of a quoting bug somewhere in the build system,
SB_CONFIG_REMOTE_BOARD is specified in .conf files (see the sysbuild/
directory). This should be fixed in the near future.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-13 16:09:01 -04:00
Gerard Marull-Paretas 8120bd7519 samples: move with_mcuboot sample to samples/sysbuild
This creates a new category of samples that demonstrate certain features
of sysbuild. "application development" was a very generic name.

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-05-13 16:09:01 -04:00