Commit graph

100779 commits

Author SHA1 Message Date
Tomasz Moń
0b242dea42 drivers: udc_dwc2: Do not enable inactive endpoint
Fail TxFIFO write if the endpoint is not activated, because there is
essentially no fifo assigned. Writing to not activated endpoint is
possible, but it does tend to corrupt fifo number 0 which is used for
control transfers. USB stack should not really be attempting to write to
endpoints that have not been activated (ep_enable called).

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
c3daf6f220 drivers: udc_dwc2: Support isochronous endpoints
Store SOF frame number and use the information to set the Even/Odd
microframe bit when enabling isochronous endpoints. Reject received
isochronous data if number of packets received does not align with
received PID.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
de28a828c5 drivers: udc_dwc2: Unify OUT transfers in Completer and DMA mode
RxFLvl interrupt should only handle the actual data movement from RxFIFO
to the buffer. OUT transfers are completed in XferCompl handler both in
DMA and Completer mode. This reduces code size by avoiding having
separate code paths based on operating mode.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
31ee5d9787 drivers: udc_dwc2: Pass fifo number to tx fifo flush
Function dwc2_set_dedicated_fifo() calls dwc2_flush_tx_fifo() before the
diepctl register is written. The register will be only written after the
dwc2_set_dedicated_fifo() finishes. Solve the problem by passing fifo
number directly instead of endpoint address to dwc2_flush_tx_fifo().

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Tomasz Moń
9f98ee854c drivers: udc_dwc2: Add isochronous register bit defines
Add all register bit defines necessary for isochronous transfers. Clean
up the endpoint transfer size register defines clearly separating IN and
OUT registers because they do use different bit fields. Add alternate
bit names for bits that do have different meaning based on configured
endpoint transfer type.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-27 12:45:42 +02:00
Chaitanya Tata
29921bbf92 manifest: hal_nordic: Pull fix for FW blobs path
Fixes west blobs fetch.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2024-08-27 12:45:35 +02:00
Pieter De Gendt
fda5ca34c2 scripts: ci: Fix clang-format notice at file beginning/end
The clang-format check outputs a git diff with surrounding context. It
naively removed the first and last 3 lines, but this does not work if
there are less lines.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-27 12:45:21 +02:00
Henrik Brix Andersen
15f5e2de07 boards: st: nucleo_h723zg: enable fdcan1
Enable FDCAN1 on the ST Nucleo H723ZG development board.

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2024-08-27 12:45:15 +02:00
Kapil Bhatt
b9ef207ee1 net: wifi: Display rts threshold in wifi shell
Add a new offload API to get rts threshold and
display to the user in wifi shell.

Signed-off-by: Kapil Bhatt <kapil.bhatt@nordicsemi.no>
2024-08-27 12:45:02 +02:00
Andrej Butok
c1fe3150e9 runners: pyocd: Add support for .elf files to the pyocd flash command
As the .bin & .hex build output is optional
and it can be disabled by CONFIG_BUILD_OUTPUT_BIN/HEX,
add support for the mandatory .elf build output
to the pyocd runner flash command.

Signed-off-by: Andrej Butok <andrey.butok@nxp.com>
2024-08-27 12:44:55 +02:00
Yong Cong Sin
fd1be9849c shell: shell_help: fix width for subcommands help text
The terminal offset for subcommands' help text isn't
computed correctly, fix it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-27 12:44:46 +02:00
Yong Cong Sin
276ccd04e7 shell: devmem: minor optimizations
- Use `SHELL_CMD_ARG_REGISTER` for the main cmd to state the
  required number of arguments, this helps to remove the
  runtime check from the command, and also print the help
  message to the terminal when the argument count is
  unexpected.
- Some changes to the help text that hopefully makes the
  mandatory and optional arguments more obvious to the user

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-27 12:44:46 +02:00
Daniel DeGrasse
ff7ac415d7 drivers: mipi_dbi: nxp_lcdic: calculate reset delay correctly
Reset delay was not being calculated correctly in lcdic driver, the
ticks field needs to be accessed directly within the timeout structure
to calculate the correct delay time

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-27 12:44:38 +02:00
Anas Nashif
b2a9fca9c8 ci: twister: remove reference to opensearch
We have been using elasticsearch for a while now. Remove references and
old script.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-08-27 12:44:31 +02:00
Daniel DeGrasse
138e9591f8 tests: net: wifi: exclude RW612 based boards
Exclude RW612 based boards from the WiFi testsuite, as these boards
require binary blobs be downloaded in order to build as expected

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2024-08-27 12:44:22 +02:00
Jilay Pandya
19203c2655 MAINTAINERS: add maintainer for stepper api and driver
This commit adds stepper api and drivers to maintainers.yml

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
179f990e46 tests: drivers: stepper: build all
This commit introduces preliminary build all test for stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Fabian Blatz
32390d55ab doc: stepper: Add Stepper motor controller documentation
Added stepper motor controller documentation entry to peripherals.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
4f36fa8010 stepper: driver: introduce gpio driver
This commit introduces a basic gpio stepper driver

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-27 12:43:39 +02:00
Jilay Pandya
1af0ec1d96 stepper motor controller: introduce api
This commit introduces api for stepper motor controllers

Signed-off-by: Dipak Shetty <dipak.shetty@zeiss.com>
Signed-off-by: Florian Guhl <florian.guhl@zeiss.com>
Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-08-27 12:43:39 +02:00
Emil Gydesen
eaf92a1494 tests: Bluetooth: CAP: Initiator unicast start unittests
Adds unittests for the CAP Initiator start procedure, simply
verifying that the procedure works as well as
testing invalid parameters.
This also allows us to remove the invalid behavior checks
from the babblesim test implementation.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-08-26 17:27:36 -04:00
Jordan Yates
d97cc46bdd gnss: rename u-blox M10 driver to M8
The driver in tree is for u-blox M8 devices, not M10. The M10 series
devices (from Protocol Version 23.01) use a different, non backwards
compatible interface for configuring the modem behaviour.

Of the two boards tested in the original PR, the "VMU RT1170" is
explicitly listed as having a u-blox NEO-M8N modem, while I have
been unable to find any information online about the "FMURT6" board.

Leaving the naming as-is will cause problems when M10 drivers are
contributed.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:27:12 -04:00
Alexi Demers
bf41e53e00 disk: disk_access: changed mutex for a spinlock
disk_access functions were called from an interupt context, thus
crashing on mutexes (no sleep is allowed in interrupt context).
The usage of a spinlock is permitted. The functions guarded by
the spinlock are executed very quickly anyway, so the spinlock
is applicable.

Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
2024-08-26 17:26:36 -04:00
Alexi Demers
32481b6418 usb: fix wrong capacity report for USB mass storage device
Usb "write" method never copies the input data buffer, it uses the
buffer pointer directly. The fact that it was on the stack made
the buffer ephemeral, and could disappear before the USB transfer
actually occurred. The data transmitted was then random. This commit
converts the transfer buffer to a static buffer, so that it always
exists for the duration of the USB transfer.

Known side-effect: if "read capacity" command is read twice
simultaneously, the same buffer will be used twice. As the capacity of a
USB drive should not change between 2 calls, this side effect can be
ignored.

Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
2024-08-26 17:26:36 -04:00
Lucien Zhao
15a2ec66a8 dts: arm: nxp_rt118x: Complement full LPUART/GPIO devices and ocram spaces
Complement full LPUART and GPIO devices, and ocram spaces

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-08-26 17:26:02 -04:00
Nicolas Pitre
c9aa98ebc0 kernel: mmu: support for on-demand mappings
This provides memory mappings with the ability to be initialized in their
paged-out state and be paged in on demand. This is especially nice for
anonymous memory mappings as they no longer have to allocate all memory
at mem_map time. This also allows for file mappings to be implemented by
simply providing backing store location tokens.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-26 17:25:41 -04:00
David T. Pocock
b2475804f8 serial: bluetooth: Print warning once when ring buffer is full
This avoids cluttering the logging subsystem.

Signed-off-by: David T. Pocock <davidtpocock@gmail.com>
2024-08-26 17:24:47 -04:00
Pisit Sawangvonganan
2f4ca35105 drivers: gpio: renesas_ra_ioport: simplify pin configuration logic
- Removed zero initialization of `pincfg` structure as all members
  are guaranteed to be set.
- Introduced `pfs_cfg` as an intermediate variable to store data in
  the CPU register instead of stack.
- Simplified pin setting logic by relying on `pfs_cfg` being
  zero-initialized, eliminating the need for explicit bit clearing.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-08-26 17:23:31 -04:00
Fabio Baltieri
947ff45e7a input: kbd: add power management support to all keyboard scan drivers
Add power management support to various drivers:
- gpio-kbd-matrix
- ite,it8xxx2-kbd
- nuvoton,npcx-kbd
- microchip,xec-kbd

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-26 14:45:21 -04:00
Fabio Baltieri
eff584bf2d input: kbd_matrix: add power management support
Add power management support to the keyboard matrix library. This
provides a generic pm_action function that changes the keyboard matrix
scan in two places when suspended:
- reset the state to 0 for all columns
- do not enable key press detection

This ensures that any key that was pressed when the device is suspended
is released, and no other scan happens until the device is resumed.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-08-26 14:45:21 -04:00
Peter Mitsis
ee7bbf55e0 tests: latency_measure: Add busy threads for SMP
The latency_measure benchmark is designed for systems with a single
CPU. When the system allows for multiple CPUs, instead of forcing
a single CPU to be used via 'prj.conf', spawn a non-preemptible
thread to keep the other CPUs busy.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-08-26 14:45:04 -04:00
Yong Cong Sin
57651fca01 doc: releases: update changes about arch_stack_walk()
Update changes about `arch_stack_walk()` in RISCV, ARM64 & X86.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
74f46bd421 arch: riscv: stacktrace: print additional arg when fatal error
Print `sp`/`fp` in traces.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
074931057c subsys/debug: remove CONFIG_EXCEPTION_STACK_TRACE_SYMTAB
Having `CONFIG_EXCEPTION_STACK_TRACE_SYMTAB` to select the
`CONFIG_SYMTAB` or to explicitly not print the symbol name
during exception stack unwind seems unnecessary, as the extra
code to print the symbol name is negligible when compared with
the symbol table, so just remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
ab676fdb86 arch: arm64: implement arch_stack_walk()
Currently it supports `esf` based unwinding only.

Then, update the exception stack unwinding to use
`arch_stack_walk()`, and update the Kconfigs & testcase
accordingly.

Also, `EXCEPTION_STACK_TRACE_MAX_FRAMES` is unused and
made redundant after this change, so remove it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
06a8c35316 arch: x86: implement arch_stack_walk()
Currently it supports `esf` based unwinding only.

Then, update the exception stack unwinding to use
`arch_stack_walk()`, and update the Kconfigs & testcase
accordingly.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
6fae891c7e arch: reorg the dependencies around (exception) stack trace
This commit introduces a new ARCH_STACKWALK Kconfig which
determines if the `arch_stack_walk()` is available should the
arch supports it.

Starting from RISCV, this will be able to converge the exception
stack trace implementation & stack walking features. Existing
exception stack trace implementation will be updated later.
Eventually we will end up with the following:

1. If an arch implements `arch_stack_walk()`
   `ARCH_HAS_STACKWALK` should be selected.
2. If the above is enabled, `ARCH_SUPPORTS_STACKWALK` indicates
   if the dependencies are met for arch to enable stack walking.
   This Kconfig replaces `<arch>_EXCEPTION_STACK_TRACE`
2. If the above is enabled, then, `ARCH_STACKWALK` determines
   if `arch_stack_walk()` should be compiled.
3. `EXCEPTION_STACK_TRACE` should build on top of the
   `ARCH_STACKWALK`, stack traces will be printed when it
   is enabled.
4. `ARCH_STACKWALK_MAX_FRAMES` will be removed as it is
   replaced by `ARCH_STACKWALK_MAX_FRAMES`

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Yong Cong Sin
e0770d4557 arch: document arch_stack_walk()
Add `arch_stack_walk()` under the `arch-interface` group and
add documentation on how to add support for it.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
Signed-off-by: Yong Cong Sin <yongcong.sin@gmail.com>
2024-08-26 14:44:53 -04:00
Raffael Rostagno
3968753b63 boards: doc: esp8684_devkitm: Update with wifi support
Update board document indicating wifi support.

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 14:44:37 -04:00
Raffael Rostagno
91f8487845 wifi: esp32c2: Add support
Added wifi support to ESP32C2 and ESP8684

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 14:44:37 -04:00
Raffael Rostagno
77d25a48e8 west.yml: Update for ESP32C2 wifi support
Updates hal_espressif for ESP32C2/ESP8684 wifi support

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 14:44:37 -04:00
Pieter De Gendt
1f7c9605cb scripts: Minimum clang-format version
Set the minimum supported clang-format version to v15.

Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2024-08-26 14:39:02 -04:00
Vinayak Kariappa Chettimada
f05d16dabb Bluetooth: Controller: Fix missing Broadcast ISO Sync MIC failure
Fix missing implementation to handle Broadcast ISO MIC
failure during Broadcast ISO establishment, and during an
already established Broadcast ISO sync.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-26 18:52:55 +02:00
Vinayak Kariappa Chettimada
d5da582e00 Bluetooth: Controller: Fix PA setup for ISO Broadcast
Fix missing PA setup for ISO Broadcast subevent transmits.

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-08-26 18:52:42 +02:00
Reto Schneider
a6c8158da5 MAINTAINERS: Add SiM3U maintainer and collaborators
Adding myself as maintainer because my employer Husqvarna wants to
upstream SiM3U support to Zephyr, and keep it well-supported.

Adding as collaborator M1cha, because he did the initial port and
Asmellby, jerome-pouiller, and jhedberg because they take care of
all Silabs products.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Reto Schneider
1c8a15867e boards: silabs: Add SiM3U1xx-B-DK
SiM3U1xx-B-DK is the official development kit offered by Silicon Labs.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Michael Zimmermann
aa3f46cbbf drivers: serial: Add initial SiM3U1xx support
This supports polling and interrupt APIs, but not the async API.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
d8598e8a5d dts: bindings: Add Si32 UART
Initial version

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Michael Zimmermann
2ab246d17e drivers: gpio: Add initial SiM3U1xx support
This is just the driver for banks 0 to 3. Bank 4 will come via a
separate commit since it needs a different driver.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
bc9fc8ed91 dts: bindings: Add Si32 GPIO
Initial version

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00