Commit graph

100779 commits

Author SHA1 Message Date
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
Jukka Rissanen
5b41ea7863 net: ipv6: Do not print error for non-erros for incoming NS
If we receive incoming neighbor solicitation packet and drop
it for some reason, ignore some of the errors which are not
really errors so that the icmpv6 handler does not complain.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-26 11:07:59 -04:00
Jukka Rissanen
9c5e59085d net: ipv6: Allow incoming DAD NS message
Make sure that incoming DAD NS message is allowed in
so that we can detect duplicate address detection NS packets.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-08-26 11:07:59 -04:00
Nicolas Pitre
57b2eaa09b demand_paging: LRU eviction: add missing documentation
Document missing eviction algorithm interface functions, and mention LRU.

Signed-off-by: Nicolas Pitre <npitre@baylibre.com>
2024-08-26 17:07:49 +02:00
Reto Schneider
7f1c3d1841 twister: runner: j-link: Fix parameter passing
To specify the serial number, JLink expects either one argument
('--dev-id=xxx') or two (e.g. '--dev-id' 'xxx'), but it can not deal
with a single one that is '--dev-id xxx'.

The problem has been introduced (or just made visible?) by commit
5ee4284320 (twister: runner: j-link: use
dev-id instead of SelectEmuBySN) in PR #76931.

How to reproduce:

1. Create a HW configuration map, e.g.:

```
$ cat zephyr-hw-map-nrf52840dk-1.yml
- connected: true
  id: '683517317'
  platform: nrf52840dk/nrf52840
  product: nRF52840 DK 1
  runner: jlink
  serial: /dev/ttyACM-nrf-dk-1
```

2. Run test `logging.dictionary` with Twister:

```
$ west twister --platform nrf52840dk/nrf52840 --device-testing \
  --hardware-map zephyr-hw-map-nrf52840dk-1.yml -s logging.dictionary
```

3. The build will fail, and the `twister_harness.log` contains:

```
10:21:24.375:DEBUG:twister_harness.device.factory: Get device type
  "hardware"
10:21:24.375:DEBUG:twister_harness.device.hardware_adapter: Opening
  serial connection for /dev/ttyACM-nrf-dk-1
10:21:24.376:DEBUG:twister_harness.device.hardware_adapter: Flashing
  device 683517317
10:21:24.376:DEBUG:twister_harness.device.hardware_adapter: Flashing
  command: <snip>/bin/west flash --skip-rebuild --build-dir
  twister-out/<snip>/tests/subsys/logging/dictionary/logging.dictionary
  --runner jlink '--dev-id 683517317'
10:21:24.590:ERROR:twister_harness.device.hardware_adapter: Could not
  flash device 683517317
10:21:24.592:DEBUG:twister_harness.device.hardware_adapter: Closed
  serial connection for /dev/ttyACM-nrf-dk-1
```
(note the '--dev-id 683517317' part)

4. Running the stated `west flash` command shows the following error
   message:

```
-- west flash: using runner jlink
FATAL ERROR: runner jlink received unknown arguments: ['--dev-id
  683517317']
```

Signed-off-by: Reto Schneider <reto.schneider@husqvarnagroup.com>
2024-08-26 17:07:40 +02:00
Benjamin Cabé
b3776ca97c doc: fix issue with keydown/keyup being ignored
Ensure initial search menu visibility is properly set so that key
events don't get trapped preventing arrow key navigation on the
document.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-08-26 11:07:30 -04:00
Lluis Campos
7075c69419 doc: esp32: Update board identifier
Clears CMake warning:
```
Deprecated BOARD=esp32_ethernet_kit specified, board automatically changed
  to: esp32_ethernet_kit/esp32/procpu.
```

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2024-08-26 11:06:55 -04:00
Florian Grandel
9d1874f7f9 net: capture: enable capturing of IPv6/v4 only
Net capturing would not link when either IPv6 or IPv4 was switched off
due to missing symbols. This change allows for capturing a single IP
protocol only.

To reproduce:

samples/net/sockets/http_client/prj.conf
```
-CONFIG_NET_IPV4=y
+CONFIG_NET_IPV4=n
-CONFIG_NET_CONFIG_NEED_IPV4=y
+CONFIG_NET_CONFIG_NEED_IPV4=n
+
+CONFIG_NET_CAPTURE=y
```

This will cause the following linker error:
```
.../subsys/net/lib/capture/capture.c:648:
    undefined reference to `net_if_ipv4_get_ttl'
```

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
c19feadbdb net: l2: ieee802154: 6lo_fragment: improved error message
Improved error messages, especially the fragment cache message that
occurs very often.

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
d4729dfa36 net: l2: ieee802154: mgmt: improved logging
Improved debuggability of IEEE 802.15.4 network management commands.
Some of these conditions were especially hard to debug (e.g. invalid
channels due to the wrong driver being selected, conflict between
settings, ...)

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
0e6769719c samples: net: http_client/server: add IEEE 802.15.4 support
Adds overlays to support HTTP over IEEE 802.15.4 (including SubG for a
sample SoC).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
adbbf05b19 samples: net: http_client/server: add logging boilerplate
Added some additional useful logging configuration for convenience
(default: off).

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Florian Grandel
bc1b85c47f samples: net: http_client: increase resource requirements
Low throughput links (e.g. IEEE 802.15.4) require additional stack and
buffering resources. Therefore some stack and buffer pool sizes were
increased to cater for over-the-air scenarios.

Fixes: #77287

Signed-off-by: Florian Grandel <fgrandel@code-for-humans.de>
2024-08-26 17:06:37 +02:00
Lucas Tamborrino
9938022eff drivers: video: ov2640: Add 240x240 video format
Add 240x240 RGB format support for OV2640.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-08-26 17:06:28 +02:00
Laurentiu Mihalcea
2b96bfb2e5 drivers: dma: dma_nxp_sof_host_dma: do cache WB after HOST_TO_MEMORY copy
SOF is designed with the idea that the data transfer
between the host memory and local memory is performed via
DMA. This is not true for imx platform in which the DSP
performs this operation.

Because of the aforementioned design, SOF performs a
cache invalidation operation on the destination memory
region before data is copied further down the pipeline.

For some imx platforms, the destination memory region is
cacheable. As such, some of the data transferred from the
host memory region is held entirely in cache, which means
the RAM and the cache have different data for the same
memory region.

In such cases, performing cache invalidation forces
the DSP to fetch data from RAM instead of the cache, which
means the DSP will read stale data and propagate it further
down the pipeline.

Although not optimal and mostly as a workaround to this issue,
perform a cache WB operation on the destination memory region
to make sure that the cache and the RAM hold the same data.
During the data read operation (to copy it further down the
pipeline) after the aforemention cache invalidation, the DSP
will no longer end up reading stale data.

Signed-off-by: Laurentiu Mihalcea <laurentiu.mihalcea@nxp.com>
2024-08-26 17:06:20 +02:00
Elias Speinle
c4dba39548 drivers: fpga: add driver for renesas slg471X5
add driver for renesas slg471X5

Signed-off-by: Elias Speinle <e.speinle@vogl-electronic.com>
2024-08-26 17:06:14 +02:00
Raffael Rostagno
2ea9483009 drivers: spi: esp32c2: esp8684: Add support
Addded support to SPI2 module for ESP32C2 and ESP8684 devices

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-08-26 17:06:02 +02:00
Jimmy Zheng
a7096fac7d drivers: interrupt_controller: nuclei_eclic: always use clic common entry
When CONFIG_RISCV_VECTORED_MODE is disabled, CLIC claims interrupts using
CSR 'mnxti' and handles all pending interrupts before exiting the ISR.

When CONFIG_RISCV_VECTORED_MODE is enabled, all interrupts use vector mode
and are claimed automatically. The RISC-V common ISR is used for interrupts
hooked into SW ISR table, but it only handle one pending interrupt per ISR.

This commit enhances CLIC to set vector mode for direct ISRs only and use
the CLIC common entry for regular ISRs to handles multiple pending
interrupts in an ISR.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
d55950c23f drivers: interrupt_controller: nuclei_eclic: support vector mode setting
Implement riscv_clic_irq_vector_set() for Nuclei CLIC driver.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
91e524862d soc: common: riscv-privileged: add riscv_clic_irq_vector_set() for clic
Introduce riscv_clic_irq_vector_set() to implement z_riscv_irq_vector_set()
for CLIC. This commit also introduces CONFIG_CLIC_SMCLICSHV_EXT to indicate
support for the smclicshv extenion and riscv_clic_irq_vector_set().

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jimmy Zheng
9ec596674b arch: riscv: add z_riscv_irq_vector_set() to set vector ISR
Introduce z_riscv_irq_vector_set() to hook into ARCH_IRQ_DIRECT_CONNECT(),
allowing users to set vector mode for a specified ISR.

Signed-off-by: Jimmy Zheng <jimmyzhe@andestech.com>
2024-08-26 17:05:53 +02:00
Jordan Yates
2f143fb2c1 doc: add make html-live and html-live-fast
Add two new commands that automatically locally host the generated
documentation upon completion and rebuild/rehost when the input files
change without any user interaction.

For more info see: https://pypi.org/project/sphinx-autobuild/

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:05:39 +02:00
Jordan Yates
2e99de8047 doc: conf.py: build directory from environment
Get the output directory from environment variables instead of
attempting to reparse the CLI arguments, as these can actually refer
to a program other than `sphinx-build` (for example `sphinx-autobuild`).

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-08-26 17:05:39 +02:00
Jamie McCrae
09a67ad678 doc: release: 4.0: Add note on new MCUmgr enum mgmt group
Adds a note about this new group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00
Jamie McCrae
edee1ed9a0 tests: mgmt: mcumgr: Add enum_mgmt test
Adds a test that checks the functionality of this new management
group

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-08-26 17:05:27 +02:00