Commit graph

100853 commits

Author SHA1 Message Date
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
Michael Zimmermann
d49cc8a56f drivers: clock_control: Add initial SiM3U1xx support
This serves two main purposes:
- change the CPU clock via devicetree nodes
- provide the APB frequency to device drivers via the clock driver
  interface

Theoretically this could also support choosing between the available
clock sources, but right now we only support LPOSC0 going into PLL0,
going into AHB.

Turning the PLL back off is also not supported since the only current
use case is to set the PLL frequency, turn it on, and switch the AHB
over to it.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
e1eeefea84 dts: bindings: Add Si32 clocks
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
5a1c4cd2e9 soc: Add initial SiM3U1xx support
This is the bare minimum and includes the SoC, pinctrl, flash and
devicetree.

I had to include the flash driver that early because I couldn't make
Zephyr compile without flash driver nodes in the device tree.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
2e1a87543c drivers: flash: Add Si32 support
Can be used only once the SiM3U SoC support has been added.

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Reto Schneider
a6737ba864 dts: bindings: Add Si32 flash controller
Initial version

Developed-by: Michael Zimmermann

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Reto Schneider
f64182dc7d dts: bindings: Add Si32 pinctrl
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
3be0fef64a manifest: hal_silabs: Update HAL version
This bumps the hal_silabs in order to add initial support for SiM3U
SoCs.

Signed-off-by: Michael Zimmermann <michael.zimmermann@grandcentrix.net>
2024-08-26 18:51:36 +02:00
Reto Schneider
9673cd14f4 soc: silabs: Simplify logic
This makes it easier to add non-gecko SoCs.

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 18:51:36 +02:00
Anuj Pathak
1f05d03489 Drivers: Sensor: mc3419: Moved Decimation Rate config to DT
- Similar to LPF settings decimation rate could be applied to
per instance basis, thus moved to DT prop

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-26 18:51:28 +02:00
Anuj Pathak
932e207741 Drivers: Sensor: mc3419: Added LPF CutOff select using dt
For applications that rely on low noise/variance in accelerometer
sample reading. Application can take advantage of integrated LPF
Thus this PR adds LPF configuration capability to the mc3419 driver

Signed-off-by: Anuj Pathak <anuj@croxel.com>
2024-08-26 18:51:28 +02:00
Jonathan Rico
4ab8073b87 tests: Bluetooth: disable optimizations in unit test
Very very weird behavior.

Deleting the `options & BT_LE_ADV_OPT_USE_NRPA` branch in
`id.c:bt_id_set_adv_own_addr` makes the test pass. But add a log in that
branch, and you'll see that we never take it in the UT binary..

I don't have time for this, maybe some compiler guru or C language
lawyer can look at that decompiled function and figure out the root
cause.

Someone should also really fix the Bluetooth unit tests and make them
run on any Bluetooth related PR. Also nightly.

Signed-off-by: Jonathan Rico <jonathan.rico@nordicsemi.no>
2024-08-26 18:51:11 +02:00
Johan Hedberg
5736b71193 Bluetooth: Host: Fix incorrect build assert
We want to make sure `struct closure` fits in the user data, so a user data
size of `sizeof(struct closure)` is valid.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-08-26 18:51:11 +02:00
IBEN EL HADJ MESSAOUD Marwa
4215078617 boards: st: Add stm32u083c_dk board support
Add board support for stm32u083c_dk

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
0b5e915b9d boards: st: Add nucleo_u083rc board support
Add board support for nucleo_u083rc

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
0cebee5ae7 drivers: clock_control: Add stm32u0 clock control support
Reuse the file clock_stm32g0.c for the STM32U0 and
rename it to clock_stm32g0_u0.c
because the G0 and U0 series share the same clock control.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
d7db52feb2 drivers: flash: flash_stm32: Fix log warning
Cast the argument to "unsigned long" to avoid the
warning

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
a0c1ca409e soc: st: stm32: Add serie stm32u0
Add STM32U0 familly support

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
1ac85d3492 drivers: hwinfo: stm32u0: Clear standby and stop flags
Add the function that clear standby and stop flags

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
ece8001d76 dts: bindings: clock: Add binding for stm32u0
Add binding "st,stm32u0-pll-clock" for U0 clocks.

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
db4f90fa2a include: zephyr: Add the stm32u0 clock control and the reset register
Add the stm32u0 clock control and the RCC bus reset register offset

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
1e5b2eb235 dts: arm: st: add stm32u0 support
Provide support for the familly STM32U0 and ST32U083

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
IBEN EL HADJ MESSAOUD Marwa
b340abadfe west.yml: hal_stm32: Add STM32Cube package of the familly stm32u0
Add STM32U0 pinctrl.dtsi and HAL-LL files

Signed-off-by: IBEN EL HADJ MESSAOUD Marwa <marwa.ibenelhadjmessaoud-ext@st.com>
2024-08-26 11:28:04 -04:00
Tomasz Moń
d3e1bc8b59 samples: usb: add UAC2 implicit feedback sample
The sample illustates how to achieve bidirectional asynchronous audio.
Implicit feedback is the only way to achieve asynchronous USB headset
on devices that have only one isochronous IN and one isochronous OUT
endpoint.

The sample implements stereo playback and mono recording. While it would
be possible to have stereo recording, the commonly available headsets
are mono only. The number of channels can differ between audio sink and
source because the only requirement is that the two run on same clock.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2024-08-26 11:27:30 -04:00
Lluis Campos
1973bc565f samples: subsys: nvs: Print rc on errors
So that the user gets a hint of what the problem can be.

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2024-08-26 17:08:32 +02:00
Sebastian Głąb
ffd065f93e tests: drivers: flash: Move negative tests to a separate project
Move negative tests for flash driver to a separate test suite.
Run negative tests only on platforms that are aligned.

Signed-off-by: Sebastian Głąb <sebastian.glab@nordicsemi.no>
2024-08-26 17:08:19 +02:00
Daekeun Kang
b24c5201a0 net: fix handle unaligned memory access in net_context_bind()
This commit addresses an issue in net_context_bind() where unaligned
memory access was not properly handled when checking for INADDR_ANY.
The problem primarily affected MCUs like ARMv6 that don't support
unaligned memory access.

- Use UNALIGNED_GET() to safely access the sin_addr.s_addr field
- Ensures correct behavior on architectures with alignment restrictions

This fix improves compatibility and prevents potential crashes or
unexpected behavior on affected platforms.

Signed-off-by: Daekeun Kang <dkkang@huconn.com>
2024-08-26 17:08:08 +02:00