Commit graph

116624 commits

Author SHA1 Message Date
cyliang tw
4a486ce51b drivers: spi: fix the update of spi_context tx & rx length
The unit of spi_context's tx_len and rx_len is byte instead of frame.
Thus, in spi_context_update_tx(), the value of ctx->tx_len should be
reduced by (len * dfs).
Also to fix the update of ctx->tx_len in spi_context_update_rx().

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2025-06-03 21:36:39 -07:00
Ryan McClelland
2bda9ad99b drivers: spi: cdns: fixup spi clk divisor
Remove the auto setting of the external spi clock if its not there,
also fix the calculation of calucation the spi divisor value.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-03 21:34:25 -07:00
Ryan McClelland
241bb057a0 drivers: spi: cdns: remove pm device call
The PM Device callbacks is rather unimplemented. There currently is
no device agnostic clock management api (yet), and the pinctrl isn't
fully implemented in this driver. Remove it all.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-03 21:34:25 -07:00
Ryan McClelland
0d61895385 drivers: spi: cdns: fix missing fifo config
This adds the missing fifo config from the dts which was missed in
the initial revision. This also adds the spi rtio fallback api.

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2025-06-03 21:34:25 -07:00
Tim Pambor
a760ba76b6 net: ip: 6lo: Fix undefined behavior reported by UBSAN
htonl() and htons() take uint32_t/uint16_t as argument. Add the 'u' suffix
to constants to ensure the correct unsigned type is used and to avoid
undefined behavior if these functions are implemented as macros using
bit shifts.

Signed-off-by: Tim Pambor <tim.pambor@codewrights.de>
2025-06-03 21:32:54 -07:00
TOKITA Hiroshi
1e14953480 Revert "modules: hal_rpi_pico: set -std=gnu11 in a toolchain independent way."
This reverts commit 05401b3f44.

Introducing c-std setting with CMake way in the commit,
but the actual command line is below.

```
arm-zephyr-eabi-gcc -DKERNEL ... -std=gnu11 ...  -std=c99 ...
```

The setting `CONFIG_STD_C99` in Kconfig appends the `-std=c99`,
and (At least in gcc,) options are processed last-come-first,
so this setting was meaningless.

This will cause a build error, so we will revert it.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2025-06-03 21:32:02 -07:00
Camille BAUD
1d91c4aecb modules: hal_wch: fix conditional compilation
adds _D8W for CH32V208

Signed-off-by: Camille BAUD <mail@massdriver.space>
2025-06-03 21:30:48 -07:00
Tom Hughes
2c851d998c sw_isr_table: Add braces around subobject
When building with clang, it warns:

subsys/mgmt/ec_host_cmd/backends/ec_host_cmd_backend_shi_npcx.c:1000:2:
error: suggest braces around initialization of subobject
[-Werror,-Wmissing-braces]

IRQ_CONNECT(DT_INST_IRQN(0), DT_INST_IRQ(0, priority), shi_npcx_isr,
            DEVICE_DT_INST_GET(0), 0);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/zephyr/irq.h:49:2: note: expanded from macro 'IRQ_CONNECT'
ARCH_IRQ_CONNECT(irq_p, priority_p, isr_p, isr_param_p, flags_p)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/zephyr/arch/arm/irq.h:124:2: note: expanded from macro
'ARCH_IRQ_CONNECT'
Z_ISR_DECLARE(irq_p, 0, isr_p, isr_param_p); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/zephyr/sw_isr_table.h:227:2: note: expanded from macro
'Z_ISR_DECLARE'
Z_ISR_DECLARE_C(irq, flags, func, param, __COUNTER__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0
to see all)
include/zephyr/sw_isr_table.h:218:16: note: expanded from macro
'_Z_ISR_DECLARE_C'
{irq, flags, _MK_ISR_ELEMENT_SECTION(counter)}
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/zephyr/sw_isr_table.h:197:42: note: expanded from macro
'_MK_ISR_ELEMENT_SECTION'
#define _MK_ISR_ELEMENT_SECTION(counter) _MK_ISR_SECTION_NAME(irq,
                                         __FILE__, counter)
                                         ^~~~~~~~~~~~~~~~~~~~~~~~~
include/zephyr/sw_isr_table.h:195:2: note: expanded from macro
'_MK_ISR_SECTION_NAME'
"." Z_STRINGIFY(prefix) "." file "." Z_STRINGIFY(counter)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Signed-off-by: Tom Hughes <tomhughes@chromium.org>
2025-06-03 20:33:33 +02:00
Ian Morris
e362f14ce0 boards: renesas: ek_ra6m4: added arduino labels
Added arduino_header, arduino_serial, arduino_i2c and arduino_spi node
labels to device tree board definition, allowing compatible shield
boards to be used.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2025-06-03 20:33:05 +02:00
Anas Nashif
67435e394f .github: convert templates to use forms
Convert all templates to use forms.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2025-06-03 20:32:59 +02:00
Nirav Agrawal
550f3bb0b9 boards: shields: update document for nxp_m2_wifi_bt shield
- Update hardware rework details require for Bluetooth HCI UART and
 I2S interfaces to work with M.2 module.
- Update west build command for Wi-Fi shell app with extra config
 overlay file.

Signed-off-by: Nirav Agrawal <nirav.agrawal@nxp.com>
2025-06-03 20:32:42 +02:00
Stephan Gatzka
c4c1d92cee drivers: gpio: Use BIT(n) macro to define GPIO constants
This change would also solve that according to the C11 standard,
section 6.5, paragraph 4, the usage of bitwise operators on
signed integers is implementation defined.

Signed-off-by: Stephan Gatzka <stephan.gatzka@gmail.com>
2025-06-03 20:32:33 +02:00
David Corbeil
068d7ec156 modules/zcbor: Added building of zcbor_print.c to zcbor module
Some utilities function implementations were moved to their own
implementation file in zcbor 0.9.0. This commit is simply to compile
those functions so that users can still have access to them without using
the --output-cmake functionality provided by the zcbor python script

Signed-off-by: David Corbeil <david.corbeil@dynon.com>
2025-06-03 20:31:02 +02:00
Mark Wang
2d4e05afc2 bluetooth: improve the controller address resolution enablement
If the controller resolving list is cleared by HCI_LE_Clear_Resolving_List,
don't need to enable the controller address resolution.

Signed-off-by: Mark Wang <yichang.wang@nxp.com>
2025-06-03 17:09:02 +02:00
Tomasz Bursztyka
c14ee16463 device: Provide de-init device function only if requested
This feature, fixing a specific corner case, is unilateraly growing
all struct device with a pointer that 99% of the time is not used.
Thus uselessly utilizing ROM.

Making the feature Kconfig controlled.

Signed-off-by: Tomasz Bursztyka <tobu@bang-olufsen.dk>
2025-06-03 17:08:50 +02:00
Andrew Davis
2edb6d2517 drivers: timer: ti_dmtimer: Do not require systick_timer node label
This driver currently only supports one instance of this timer and uses
it as the system clock. The instance is selected by being the first one
listed in DT in all places except sys_clock_driver_init() where it uses
the node label "systick_timer".

This driver should be fixed to correctly support multiple instances
of this timer, and the one used for the system timer should be selected
based on a flag or alias, not based on label.

For now simply use the 0th instance like everywhere else which removes
the need to have this node labeled a special way and makes no functional
changes to current users.

Signed-off-by: Andrew Davis <afd@ti.com>
2025-06-03 17:08:37 +02:00
Nhut Nguyen
49f520fcd9 tests: kernel: tickless: Add support for RZ/G3S-SMARC
Add test support for System Timer driver of RZ/G3S-SMARC

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
2025-06-03 17:08:30 +02:00
Nhut Nguyen
1e24a6e354 dts: renesas: Add System Timer support for RZ/G3S
Add System Timer nodes to Rensas RZ/G3S devicetree

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
2025-06-03 17:08:30 +02:00
Nhut Nguyen
a1874b11cc drivers: system timer: Initial support for RZ/G3S
Add System Timer driver support for Renesas RZ/G3S

Signed-off-by: Nhut Nguyen <nhut.nguyen.kc@renesas.com>
Signed-off-by: Hoang Nguyen <hoang.nguyen.jx@bp.renesas.com>
2025-06-03 17:08:30 +02:00
Carles Cufi
0fe59bf1e4 boards: nordic: Add an image for the Thingy:53
Image taken from Nordic's official website.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-03 14:49:20 +01:00
Carles Cufi
50d1ba0368 boards: nordic: Add an image for the nRF9161 DK
Image taken from Nordic's official website.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-03 14:49:20 +01:00
Carles Cufi
afa2b01ab0 boards: nordic: Add an image for the nRF9151 DK
Image taken from Nordic's official website.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-03 14:49:20 +01:00
Carles Cufi
37aa056610 boards: nordic: Add an image for the nRF54H20
Image taken from Nordic's official website. No image available for the
DK, so used the IC instead.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-03 14:49:20 +01:00
Carles Cufi
4d89525742 boards: nordic: Add an image for the nRF52833 DK
Image taken from Nordic's official website.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2025-06-03 14:49:20 +01:00
Arkadiusz Balys
1dbe7fa2b8 openthread: Fix OpenThread independence from Zephyr network.
If CONFIG_OPENTHREAD_SYS_INIT is enabled, OpenThread initialisation
should also consider running OpenThread automatically if
CONFIG_OPENTHREAD_MANUAL_START is disabled.

Removed also dependency on the `net_bytes_from_str` functions from
the openthread.h file. Now, in the OpenThread module, there is an
additional `openthread_utils.c/.h` file that can implement useful
utilities for the OpenThread platform. Currently, it implements
the `bytes_from_str` function to use it instead of
`net_bytes_from_str`.

Signed-off-by: Arkadiusz Balys <arkadiusz.balys@nordicsemi.no>
2025-06-03 14:48:56 +01:00
Johann Fischer
703e2c5d9d usb: device_next: do not list high-speed functions if not used
Do not add functions to the high-speed iterable section when high-speed
support is disabled.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00
Johann Fischer
fe3c001eeb usb: device_next: disable high-speed USB device descriptor if not used
Disable the high-speed USB device descriptor if it is not in use.
Add checks to the code where the high-speed descriptor may be used.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00
Johann Fischer
8457f50278 usb: device_next: use common UDC pool on full-speed devices for CDC ACM
The required buffer is 128 bytes per instance on a full-speed device.
Use common (UDC) buffer, as this results in a smaller footprint.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00
Johann Fischer
81bf9d1102 usb: device_next: disable high-speed descriptors when not in use
Disable high-speed descriptors when they are not in use saves 64 bytes
in flash/RAM. It is unlikely that it will scale well enough to be used
in all class implementations or to support a different speed.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00
Johann Fischer
1c2d692d60 usb: device_next: use system workqueue in CDC ACM by default
Add Kconfig option to use dedicated workqueue in CDC ACM but use the
system work queue in CDC ACM by default.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00
Johann Fischer
6ea06038d9 usb: device_next: allow message callback to be executed from USBD thread
Allowing message callback execution from the USBD thread saves about 800
bytes. For small devices, the option can be useful to reduce flash/RAM
usage, those with enough resources should not bother about it.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00
Johann Fischer
187703c777 usb: device_next: allow vendor request support to be disabled
Disabling it if not needed can save about 100 bytes of flash memory.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00
Johann Fischer
ed4c27bd41 usb: device_next: allow BOS support to be disabled
Disabling it if not needed can save about 400 bytes of flash memory.

Signed-off-by: Johann Fischer <johann.fischer@nordicsemi.no>
2025-06-03 14:48:29 +01:00
Maciej Meijer
3400aaf278 modules: hal_nordic: nrfs: update manifest
Add request to enable/disable dPlus pullup.

Signed-off-by: Maciej Meijer <maciej.meijer@nordicsemi.no>
2025-06-03 14:46:42 +01:00
Mathieu Choplain
8bc3a14c05 doc: board_porting: fix minor typo
Correct a minor typo in the hardware/porting/board_porting documentation
page.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2025-06-03 13:51:46 +02:00
Cla Mattia Galliard
02d2cc519a net: sockets: Enable gethostname even if socket-offloading is selected
Also allow `gethostname` to be compiled in, even when the socket offloading
option is selected.

Signed-off-by: Cla Mattia Galliard <cla-mattia.galliard@zuehlke.com>
2025-06-03 13:51:23 +02:00
Tomasz Moń
2248396873 drivers: udc_dwc2: Execute post enable quirk after enable
Device can be considered enabled only after the Soft Disconnect bit is
cleared. Move the post enable quirk past the SftDiscon bit clear.

Signed-off-by: Tomasz Moń <tomasz.mon@nordicsemi.no>
2025-06-03 13:50:55 +02:00
Krzysztof Chruściński
4cf184773e drivers: serial: nrfx_uarte: Support for low power polling mode
Add support for getting to the lowest power mode when polling is
used with disable-rx property and interrupts are not used for
that UARTE. So far disabling of the UARTE peripheral was done in
the interrupt but in some cases interrupt may not be available
and in that case uart_poll_out shall wait until byte is transferred
and put UARTE into the lowest power state.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2025-06-03 13:50:38 +02:00
Manuel Argüelles
77c2c454f7 drivers: dma: esp32: guard driver's kconfig options
Wrap the driver's options to prevent them from showing up in the global
Kconfig menu.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2025-06-03 09:15:28 +02:00
Benjamin Cabé
b751bc00e2 doc: secure_storage: update Kconfig options formatting
Revised the documentation for PSA Secure Storage API configuration to
use the new :kconfig:option-regex: role for Kconfig options.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-03 09:15:19 +02:00
Benjamin Cabé
cfed396ffa doc: _extensions: kconfig: add :kconfig:option-regex: role
Allow users to create links to Kconfig regex searches.
The new role generates links to the Kconfig search page with the regex
pattern as the search query.

Fixes zephyrproject-rtos/zephyr#90571

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2025-06-03 09:15:19 +02:00
Zongchun Yu
2c2d12f765 boards: nxp: imx91_evk: add GPIO support
Add gpio in board yaml file, gpio2 is enabled by default.
Add btn and led nodes to ensure the button and blinky samples can work.
Add board overlay file for driver test case: gpio_basic_api.

Signed-off-by: Zongchun Yu <zongchun.yu@nxp.com>
2025-06-03 09:15:09 +02:00
Zongchun Yu
29bf4e7548 dts: arm64: nxp: imx91: add GPIO device tree nodes
Add GPIO device tree nodes for imx91.

Signed-off-by: Zongchun Yu <zongchun.yu@nxp.com>
2025-06-03 09:15:09 +02:00
Zongchun Yu
fef4b66280 west.yml: update hal_nxp
update hal_nxp for imx91 pinctrl

Signed-off-by: Zongchun Yu <zongchun.yu@nxp.com>
2025-06-03 09:15:09 +02:00
Joel Guittet
05f71f3874 drivers: counter: fix counter node in esp32 timers
Fix counter device tree node of the esp32 timers in the counter sample
and test app.

Signed-off-by: Joel Guittet <joelguittet@gmail.com>
2025-06-02 22:36:03 -04:00
Alain Volmat
2c2b2268af video: imx335: only include gpio code if needed
Rely on DT_ANY_INST_HAS_PROP_STATUS_OKAY to only build the
gpio handling code for reset pin if this is being used by
one or more instance of the device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 22:35:45 -04:00
Alain Volmat
fc6d5c4871 video: imx335: increase T4 delay post reset
Increase the T4 delay after releasing the reset of the
sensor in order to avoid getting I2C communication issues
at initialization time.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 22:35:45 -04:00
Alain Volmat
4e63863b46 video: ov5640: only include gpio code if needed
Rely on DT_ANY_INST_HAS_PROP_STATUS_OKAY to only build the
gpio handling code for reset and powerdown pins if this is
being used by one or more instance of the device.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 22:35:45 -04:00
Alain Volmat
9f81f4f7ec video: ov5640: allow usage without reset or powerdown gpios
reset and powerdown pins are optionals.

gpio_is_ready_dt should not be called in case of reset or
powerdown are not present.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
2025-06-02 22:35:45 -04:00
Mike J. Chen
e6d38ce11c drivers: clock_control_mcux_syscon: Added get support for I2S FLEXCOMM
Previously, I2S_MCUX_FLEXCOMM was expected to use the external
MCLK only but it's possible for I2S_MCUX_FLEXCOMM to be sourced
from other clocks like the audio_pll_clk, in which case the
driver needs to be able to get the current clock frequency
in order to properly set dividers for requested sample rate.

Signed-off-by: Mike J. Chen <mjchen@google.com>
2025-06-02 22:35:29 -04:00