Commit graph

15409 commits

Author SHA1 Message Date
Andrew Featherstone
2d768fd3a5 rpi_pico2: rp2350: Add DMA support
Add initial support for the RP2350's DMA peripheral, allow tests
under drivers/dma/loop_transfer to run on on the Raspberry Pi Pico 2,
and update the board's documentation.

Signed-off-by: Manuel Aebischer <manuel.aebischer@belden.com>
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Peter Johanson
05e0aad2f3 rp2350: Fix for storing larger pinctrl alt func
On RP2350, the alt function value can be up to 0x1F, so store as 5 bits.

Signed-off-by: Peter Johanson <peter@peterjohanson.com>
Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
ae1a098c7a pinctrl: raspberrypi: rp2350: Add support for RP2350X
A significant amount of the pin muxing is duplicated between the RP2040,
the RP2350A, and RP2350B. Reflect this in the file structure, with a
`-common` suffix used to to indicate this.

Macros are defined in ascending order of the function index in the
relevant table in the datasheet. SoC/SoC-series specific macros are
defined in their respective tables. Functions that are not currently
used (e.g. the new HSTX) are intentionally not defined here as they do
not (currently) have any use in the Zephyr tree (i.e. there's no drivers
that make use of this functionality).

clang-format has been run over the existing definitions to reduce the
noise generated by CI. These are cosmetic changes; I've tried to retain
attribution to the relevant authors where applicable.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Benjamin Cabé
cc4a985316 soc: rp2350: Add initial support for the Raspberry Pi RP2350
RP2350 is Raspberry Pi's newest SoC. From the datasheet:

"RP2350 is a new family of microcontrollers from Raspberry Pi that
offers significant enhancements over RP2040. Key features include:
• Dual Cortex-M33 or Hazard3 processors at 150 MHz
• 520 kB on-chip SRAM, in 10 independent banks
• 8 kB of one-time-programmable storage (OTP)
• Up to 16 MB of external QSPI flash/PSRAM via dedicated QSPI bus
...
"

This commit introduces some changes to support the existing RP2040 and
what is describe by Raspberry Pi as the "RP2350 family". Currently there
are 4 published products in the family: RP2350A, RP2350B, RP2354A, and
RP2354A. Within Zephyr's taxonomy, split the configuration as follows:
Family: Raspberry Pi Pico. This contains all RP2XXX SoCs,
SoC Series: RP2040 and RP2350.
SoC: RP2040 and, for now, just the RP2350A, which is present on the Pico
2, where the A suffix indicates  QFN-60 package type. This structure is
reflected in `soc/raspberrypi/soc.yml`, and somewhat assumes that there
won't be a RP2050, for example, as a RP2040 with more RAM.

This is foundation work ahead of introducing support for Raspberry Pi's
Pico 2 board, which is fitted with a RP2350A and 4MB of flash.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2024-12-23 23:57:57 +01:00
Andrew Featherstone
122784df15 drivers: clock_control: rpi_pico: Add support for the RP2350.
Add support for SoC-specific clock ids and update the initialization
function to support the existing RP2040 and add support for the RP2350.

clock_control_rpi_pico.c uses numerical values for clock ids taken from
rpi_pico_clock.h which are the "clock generator". For the RP2350 these
values are different for some of the same logical clock sources, as well
as the RP2040 and RP2350 having different clock sources available.

Signed-off-by: Andrew Featherstone <andrew.featherstone@gmail.com>
2024-12-23 23:57:57 +01:00
Jilay Pandya
24914d7489 drivers: stepper: api: add -ECANCELED error code for move operations
If the stepper is not enabled, calling any of the move operations
shall return -ECANCELED

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-23 22:00:35 +01:00
Nikodem Kastelik
7e84571dcd drivers: retained_mem: nrf: make ram_ctrl variant explicit
Updated retained_mem driver variant exposes vendor-specific API,
rather than executing implicitly during boot.

Signed-off-by: Nikodem Kastelik <nikodem.kastelik@nordicsemi.no>
2024-12-23 18:40:52 +01:00
Fin Maaß
49f5bc9698 mgmt: hawkbit: add callbacks for events
add callbacks for events.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-23 09:17:14 +01:00
Fin Maaß
41f7ae9488 mgmt: hawkbit: use SMF
use smf for hawkbit.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
2024-12-23 09:17:14 +01:00
Mark Wang
70c73aa317 Bluetooth: A2DP: implement close, suspend and abort
implement avdtp close, suspend and abort and the a2dp
interfaces.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-12-23 09:15:35 +01:00
Mark Wang
6a6f2c2fca Bluetooth: A2DP: implement reconfig and optimize codes
Implement the bt_a2dp_stream_reconfig: Modify reconfig_req callback to
pass codec_cfg to application. Remove reconfig_rsp callback,
config_rsp is used. Remove reconfigured callback,
configured callback is used.

move the status to common struct bt_avdtp_req,
use same bt_avdtp_ctrl_params to process control-like avdtp
cmds (start, open etc), use the same a2dp_ctrl_ind to process
control-like cmds (start, open etc), use the same
bt_a2dp_ctrl_cb to process control-like cmds (start, open etc),
use the same bt_avdtp_ctrl to process control-like cmds
(start, open etc), optimize getting a2dp conn by index,
use sem to replace mutex and optimze the lock codes to be
based on context/instance.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-12-23 09:15:35 +01:00
Mark Wang
b8399c31a2 Bluetooth: A2DP: clang-format the codes
run clang-format

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2024-12-23 09:15:35 +01:00
Grant Ramsay
b1c678ffd7 arch: arm: cortex_m: Move bss/noinit sections to the end of linker script
This results in a smaller binary with CONFIG_XIP=n as these NOLOAD
sections can be excluded.

bss/noinit have been included in CONFIG_XIP=n binaries by default since
c107827bb7. This also occurs if using
iterable sections or adding code/data to ITCM/DTCM sections.
Moving bss/noinit to the end of the linker file should ensure they are
always excluded

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2024-12-23 01:01:51 +01:00
Dominik Ermel
196fc5c36c storage/stream_flash: Make write callback optional
The commit adds Kconfig option CONFIG_STREAM_FLASH_POST_WRITE_CALLBACK
that allows to turn off support for callback invoked after data
is written to storage device.
If the feature is not used disabling it allows to save some storage.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-21 20:48:53 +01:00
Aleksander Dejewski
a4e31487d5 drivers: lora: Add user_data to lora_recv_async
The LoRa driver does not allow to pass void* user_data to callback in
lora_recv_async function. This leads to complex way of using the API. This
commit fixes the issue and adds the field to the function and to the
callback.

Signed-off-by: Aleksander Dejewski <aleksander.dejewski@gmail.com>
2024-12-21 05:51:52 +01:00
The Nguyen
ee04db8b4d drivers: memc: enable support for SDRAM controller on Renesas RA family
First commit to add support for SDRAM controller on Renesas RA SoC

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-20 23:53:37 +02:00
Dominik Ermel
dd86a4dcf8 storage/flash_map: Fix hiding of internal definitions
Move /** @cond INTERNAL_HIDDEN */ up to cover additional definitions.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-20 23:52:46 +02:00
Luca Burelli
b4b8070dee llext: export all Z_DEVICE_DEFINE devices
Some device types (SPI, network, etc) use customized versions of
DEVICE_DT_DEFINE; however, all of these ultimately use Z_DEVICE_DEFINE,
which is where the object that has to be exported is defined.

Move the Z_DEVICE_EXPORT macro to Z_DEVICE_DEFINE and make it depend on
'node_id' being valid, so that it properly covers all exportable devices
defined in the build.

Signed-off-by: Luca Burelli <l.burelli@arduino.cc>
2024-12-20 20:19:05 +01:00
Raffael Rostagno
0cb755a0e3 drivers: mcpwm: esp32c6: Add support
Add MCPWM support to ESP32C6

Signed-off-by: Raffael Rostagno <raffael.rostagno@espressif.com>
2024-12-20 18:30:59 +01:00
Bjarki Arge Andreasen
4103c8236b drivers: pinctrl: add support for nrf twis pins
Add support for TWIS pins to nrf pinctrl.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
2024-12-20 16:14:05 +01:00
Johan Hedberg
532830a1b7 Bluetooth: hci_types: Fix alignment of struct members
The convention in this file is to align the struct members vertically. This
hasn't been properly followed for some of the more recent additions, so
let's fix it.

Signed-off-by: Johan Hedberg <johan.hedberg@silabs.com>
2024-12-20 16:05:43 +01:00
Emil Gydesen
6bcfdaf37a Bluetooth: ISO: Add support for cis_established_v2 in host
Add support for the bt_hci_evt_le_cis_established_v2 event in
the host.

This provided additional information to the host and application
about the CIS paramters. Especially the peripheral gets new an
important information such as the SDU size and interval.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-20 10:19:23 +01:00
Stine Akredalen
8df332714b bluetooth: mesh: health_cli: Add callback to pull msg for periodic pub
The Health Client model supports periodic publication and thus requires
the update callback to be initialized.

This commit implements a callback inside the health client model and
adds a wrapper to it so that the user can fill up the msg buffer.
This way, the Config Server will always accept
Config Model Publication Set message with periodic publication
parameters. If the users callback returns an error or is not
implemented, the periodic publication will be aborted.

Signed-off-by: Stine Åkredalen <stine.akredalen@nordicsemi.no>
2024-12-20 10:18:54 +01:00
Pete Skeggs
6ec5729a3d net: lib: tls_credentials: return size required
If either no buffer is provided or the size of it
is too small, return the required length.

Signed-off-by: Pete Skeggs <peter.skeggs@nordicsemi.no>
2024-12-20 03:17:10 +01:00
Sarah Renkhoff
79d62944b1 drivers: stepper: Add driver for DRV8424 stepper motor controller
Adds a step/dir stepper driver for the drv8424 stepper driver.

Signed-off-by: Sarah Renkhoff <sarah.renkhoff@navimatix.de>
2024-12-19 15:21:44 +01:00
Maciej Baczmanski
fb633641b3 posix: Ignore Wshadow warning for sigaction
Wrap `sigaction()` declaration with `TOOLCHAIN_IGNORE_WSHADOW_BEGIN`
and `TOOLCHAIN_IGNORE_WSHADOW_END` to ignore Wshadow warning
which occurs because `struct sigaction` already exists.

fixes: #83111

Signed-off-by: Maciej Baczmanski <maciej.baczmanski@nordicsemi.no>
2024-12-19 15:18:45 +01:00
Jukka Rissanen
81c60e7257 net: icmp: Add a way to send ICMP Echo-Req without waiting
Create a net_icmp_send_echo_request_no_wait() variant that will
not wait when allocating net_buf to be sent. This variant will avoid
a warning to be printed when sending Echo-Req from a system workqueue
because the work cannot sleep in this case.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-19 15:18:33 +01:00
Jukka Rissanen
45ac1f9848 net: pkt: Add possibility to reserve link layer header
Allow network device driver to configure the system so that
when a network packet is sent to it, the link layer header
is stored just before the L2 payload in the same packet.

Currently the link layer header is stored in a separate
net_buf that is linked in front of the L2 payload.

This option can typically save one net_buf when sending
a network packet. Note that if you are using variable data
size buffers (CONFIG_NET_BUF_VARIABLE_DATA_SIZE) then this
embedding is not needed because one can allocate just the
right size network buffers and not waste any memory.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-19 10:21:28 +01:00
The Nguyen
69735397bd drivers: gpio: add support for gpio interrupt on Renesas RA family
First commit to add support for gpio interrupt on Renesas RA
- Add support for external interrupt driver
- Add support for gpio interrupt config

Signed-off-by: The Nguyen <the.nguyen.yf@renesas.com>
2024-12-19 08:39:10 +01:00
Dominik Ermel
54435e000a storage/flash_map: Add FIXED_PARTITION_BY_NODE macro
Macro allows to instantiate flash_area object pointer from DTS node.

Signed-off-by: Dominik Ermel <dominik.ermel@nordicsemi.no>
2024-12-19 07:07:07 +01:00
Romain Pelletant
0d6fe2f96a pinctrl: add esp32c6 i2c support
- Add esp32c6 i2c pinctrl definition

Signed-off-by: Romain Pelletant <romain.pelletant@fullfreqs.com>
2024-12-19 07:06:55 +01:00
Pisit Sawangvonganan
2db4b85b27 rtio: remove padding field _resv0 from struct rtio_sqe
The `_resv0` field is no longer needed after increasing the size of
`iodev_flags` from `uint16_t` to `uint32_t` by this PR #80177.

Signed-off-by: Pisit Sawangvonganan <pisit@ndrsolution.com>
2024-12-19 07:06:39 +01:00
Yishai Jaffe
5694b24a6e soc: silabs: Add support for SiLabs EFR32ZG23 SoC
Add support for Silicon Labs EFR32ZG23 SoC.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-18 20:32:46 +01:00
Peter Mitsis
35435928c2 kernel: Decouple sleep from suspend
Sleeping and suspended are now orthogonal states. That is, a thread
may be both sleeping and suspended and the two do not interact. One
repercussion of this is that suspending a thread will no longer
abort its timeout.

Threads are now created in the 'sleeping' state instead of a
'suspended' state. This dovetails nicely with the start delay that
can be given to a newly created thread--it is as though the very
first operation that a thread with a start delay is a sleep.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-18 18:17:03 +01:00
Peter Mitsis
5710e034e7 kernel: Introduce _THREAD_SLEEPING state bit
At the present time, Zephyr does has overlap between sleeping and
suspending. Not only should sleeping and suspended be orthogonal
states, but we should ensure users always employ the correct API.
For example, to wake a sleeping thread, k_wakeup() should be used,
and to resume a suspended thread, k_thread_resume() should be used.
However, at the present time k_thread_resume() can be used on a
thread that called k_sleep(K_FOREVER). Sleeping should have nothing
to do with suspension.

This commit introduces the new _THREAD_SLEEPING thread state along
with some prep-work to facilitate the decoupling of the sleeping and
suspended thread states.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-18 18:17:03 +01:00
Karthikeyan Krishnasamy
b0389ce5b5 drivers: adc: add ads131m02 adc driver
ADS131M02 is Texas Instruments 2-channel, 24-Bit differential
input ADC which support wide range datarate.
Driver add support for adc read, channel configure, adc sampling
mode configuration and power management.

[1]. https://www.ti.com/lit/ds/symlink/ads131m02.pdf

Signed-off-by: Karthikeyan Krishnasamy <karthikeyan@linumiz.com>
2024-12-18 18:16:40 +01:00
Guillaume Gautier
420b2a053c drivers: adc: stm32: move define from dt-binding into driver
Now that clock source and sequencer are defined with strings in device
tree, move the old defines directly in the driver

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
2024-12-18 15:32:35 +01:00
Jordan Yates
d2bb5973ae zbus: optional unique channel numeric identifiers
Add the option for a unique numeric identifiers to be attached to a
zbus channel. This identifier can then be used to lookup the channel
structure at runtime. This is useful in two situations (that I can
immediately think of).

Firstly for external interaction, i.e a text shell or remote procedure
calls. The current state of a channel can be queried by an ID that never
changes, as opposed to the external entity needing to know the exact
memory address of the channel for a given application binary.

Secondly for integrating with dynamically loaded extensions (llext).
These extensions can hook into the existing data streams without each
individual channel needing to be exported and visible to the loader.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-18 12:47:24 +01:00
Francois Ramu
7cbb1dd836 include: drivers: clock_control stm32 bus clock index can exceed 256
For some stm32 devices, especially the stm32H7RS serie,
the RCC register map is larger that 256 (example  AHB1 is 0x138).
The mask is extended to 0x1ff in the .bus of the clock info structure,
using the GENMASK macro from STM32_CLOCK_DIV_SHIFT

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2024-12-18 12:45:06 +01:00
Qingling Wu
d22026c440 net: wifi: hostap: add set RTS threshold command support
Add set RTS threshold command support for sta and sap.

Signed-off-by: Qingling Wu <qingling.wu@nxp.com>
2024-12-18 10:17:24 +01:00
James Roy
4553a21fe5 devicetree: Add DT_FOREACH_ANCESTOR macro
Add 'DT_FOREACH_ANCESTOR' macro to get a list of
ancestor node of a given node_id.

Signed-off-by: James Roy <rruuaanng@outlook.com>
2024-12-18 10:17:09 +01:00
Nathan Olff
42e7095d1e drivers: adc: adc_emul: implement raw func set function in adc_emul
allow setting a function as generator of raw adc values in adc_emul

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-12-18 08:33:26 +01:00
Nathan Olff
d793b86a82 drivers: adc: adc_emul: write function to set const raw value
implement storage and retrieval of raw value in adc_emul

Signed-off-by: Nathan Olff <nathan@kickmaker.net>
2024-12-18 08:33:26 +01:00
Anthony Williams
4272353e29 Tracing: Fix extra function calls when using FIFO tracing macros.
Fixes issue where function returns being used as data arguments to
k_fifo tracing macros were being called mulitple times due to
preprocessor copying  macro arguments during expansion.

Signed-off-by: Anthony Williams <anthony289478@gmail.com>
2024-12-18 03:05:13 +01:00
Aurelie Fontaine
8a0469dc4f drivers: sensor: icm42670: supports icm42670-P/-S
Prepare to use official TDK Invensense Inc. driver for icm42670-P/-S
sensor in tdk_hal module. Simplify I2C and SPI transport files.
Driver code moves in hal_tdk module.
Adds APEX features, such as Pedometer, Tilt detection, Wake on Motion
and Significant Motion Detector.

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2024-12-18 03:04:31 +01:00
Lucien Zhao
a831f7df6d drivers: clock_control: add i3c clock for clock_control_mcux_ccm_rev2.c
add i3c case to get i3c instance clock

Signed-off-by: Lucien Zhao <lucien.zhao@nxp.com>
2024-12-18 01:01:37 +01:00
Yanir Levin
d1f8e1f823 include: sys: util: Fix LOG2CEIL macro
LOG2CEIL(1) results in undefined behaviour,
as LOG2CEIL(1) expands to __builtin_clz(0),
which is undefined according to GCC docs.

Signed-off-by: Yanir Levin <yanir10@gmail.com>
2024-12-18 01:00:45 +01:00
Mikhail Siomin
a5a955d024 fs: littlefs: add littlefs disk version selection
Add the ability to select littlefs disk version
to maintain backward compatibility
with existing littlefs
with the same major disk version.

Signed-off-by: Mikhail Siomin <victorovich.01@mail.ru>
2024-12-17 20:55:51 +01:00
Matías Román Camilletti
4ca5acac45 dsp: utils: Implemented float/fixed type conversions
The DSP library does not provide functions to convert fixed
representations (Q7,Q15,Q31) to float or double and viceversa. This commit
implements those functions using a shift argument to indicate the number
of decimal places.

Signed-off-by: Matías Román Camilletti <matias.camilletti@owl-services.com>
2024-12-17 20:55:27 +01:00
Guennadi Liakhovetski
024f43b1f0 llext: move a calculation to a more logical location
Currently llext_link_plt() calculates offsets to relocation addresses
relative to the .text section and passes them to
arch_elf_relocate_global() and arch_elf_relocate_local(), where then
.text memory address is added to them. Instead it's more logical to
concentrate the entire calculation in the caller, which then also
removes the assumption, that all sections have the same VMA - LMA
offset from those functions.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-12-17 20:55:15 +01:00