Commit graph

107105 commits

Author SHA1 Message Date
Sara Touqan
3b33aa5450 dts: Add I3C configuration for STM32.
This commit adds the main DTS configurations required
to enable I3C support on STM32.

Signed-off-by: Mohammad Badawi <zephyr@exalt.ps>
Signed-off-by: Sara Touqan <zephyr@exalt.ps>
2024-12-12 11:08:12 +01:00
Jeronimo Agullo
b69004c1b4 drivers: video: mt9m114: Add vertical and horizontal flip control
Add set_ctrl function API for vertical and horizontal flip control
modifying the camera read mode

Signed-off-by: Jeronimo Agullo <jeronimoagullo97@gmail.com>
2024-12-12 11:08:00 +01:00
Jeronimo Agullo
ef2b0fc73e drivers: video: mt9m114: update mt9m114_modify_reg to any register length
Update mt9m114_modify_reg to support 8, 16 and 32 bits registers

Signed-off-by: Jeronimo Agullo <jeronimoagullo97@gmail.com>
2024-12-12 11:08:00 +01:00
Jordan Yates
023e266651 net: nsos_sockets: notify pollers on socket close
Raise the poll signal when the socket is being closed to prevent users
of `zsock_poll` blocking after the socket is no more.

Signed-off-by: Jordan Yates <jordan@embeint.com>
2024-12-12 11:07:49 +01:00
Måns Ansgariusson
8934b810cc tests: kernel: Add support for stopping workqueues
This patch adds tests for stopping workqueues.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2024-12-12 11:07:39 +01:00
Måns Ansgariusson
7545e8d582 tracing: kernel: Add support for stopping workqueues
Adds tracing support for stopping workqueues.

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2024-12-12 11:07:39 +01:00
Måns Ansgariusson
82a9bc4589 kernel: Add support for stopping workqueues
This patch adds support for stopping workqueues. This is useful for freeing
resources from workqueues when subsystems/modules is deactivated or
cleaning up the system between tests in ztest to reach a fully normalized
state.

The patch adds a new function k_work_queue_stop() that releases the
workqueues thread and stack when a workqueue is unwanted.
k_work_queue_stop(...) should be viewed as a counterpart to
k_work_queue_start(...).

This would allow to:
k_work_queue_start(...);

k_work_drain(..., true);
k_work_queue_stop(...);

Signed-off-by: Måns Ansgariusson <Mansgariusson@gmail.com>
2024-12-12 11:07:39 +01:00
Flavio Ceolin
2907a961f7 TinyCrypt: Deprecate the library
Now that PSA is supported on Zephyr and the code base has changed to use
that library, TinyCrypt is been deprecate. Reasons for this change can be
found in #43712.

Signed-off-by: Flavio Ceolin <flavio.ceolin@gmail.com>
2024-12-12 11:05:59 +01:00
Jilay Pandya
2174ea0ac0 drivers: sensor: apds9306 fix unchecked return value coverity issue
check the return valeus of i2c_reg_write_byte_dt function and return
appropriate error code

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-12 11:05:49 +01:00
Sebastian Panceac
f7bae12cef bluetooth: smp: Fix build warnings for central with OOB legacy only
Currently, there are build warnings that are triggered when building
for BT central and legacy OOB pairing only:
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY=y
CONFIG_BT_CENTRAL=y

There was a PR that handled this issue in the past https://github.com/zephyrproject-rtos/zephyr/pull/74400.
Unfortunately, this PR even though it fixed the warnings it also
broke the BT peripheral and legacy OOB pairing only build:
CONFIG_BT_SMP_OOB_LEGACY_PAIR_ONLY=y
CONFIG_BT_PERIPHERAL=y

https://github.com/zephyrproject-rtos/zephyr/pull/82552 was merged in
order to fix the issue with the peripheral build configuration.
Unfortunately, this PR reintroduced the warnings for BT central and
legacy OOB pairing.

This commit brings changes to make sure that both the BT central and
peripheral builds with OOB legacy pairing are buildable and
warnings free.

Also in this commit, a new build test case is added for the BT central
and legacy OOB pairing along the existing BT peripheral test case

Signed-off-by: Sebastian Panceac <sebastian.panceac@ext.grandcentrix.net>
2024-12-12 11:05:38 +01:00
Hake Huang
19155bdb26 samples: magic_addr: add pytest check for magic_addr
use pytest script to check result

fixes: #82759

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2024-12-12 11:05:14 +01:00
Fengming Ye
d77fb49ac3 samples: wifi: nxp: separate wifi example user config file
Separate wifi example user config file to wifi network configurations
and hostap configurations.
User can set EXTRA_CONF_FILE as overlay-hostap.conf file to get
external hostap support.
Without overlay-hostap.conf, we will have embedded hostap.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Fengming Ye
b9d7ce7c1c drivers: wifi: nxp: add split entity network for soft AP
Fix wifi connect and wifi ap start mix wifi network issue.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Fengming Ye
f193b5f9e3 drivers: wifi: nxp: support embedded supplicant
Fix uAP network issues when co-working with STA network.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Fengming Ye
002d3ad88c drivers: wifi: nxp: disable 80211R on embedded supplicant
Currently not support 11R on embedded supplicant.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-12 11:05:02 +01:00
Alexandre Bailon
bf8cfa7e7c pinctrl: Fix usage of PINCTRL_DT_DEFINE with C++
Using PINCTRL_DT_DEFINE from a C++ file cause a
"designator order field" error.
This updates Z_PINCTRL_STATE_INIT to respect the same order as
defined in struct pinctrl_state.

Signed-off-by: Alexandre Bailon <abailon@baylibre.com>
2024-12-12 11:04:53 +01:00
Valerio Setti
7c4abb1eb9 samples: sockets: exclude nrf5340dk with TF-M from http_server
When the sample is built for this platform a build error is generated
due to ROM being overflowed.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
6a7449da15 Revert "drivers: entropy: enable ENTROPY_GENERATOR if "zephyr,entropy" is set in DT"
This reverts commit 5c9689628c2a663d1a275d07db2ead789432edf1.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
c79991fd29 Revert "boards: remove ENTROPY_GENERATOR selection if BT"
This reverts commit 9789d4d5f8cd7fe59dff700f23758857605745fc.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
a4b9ef69c3 Revert "samples/tests: bluetooth: remove ENTROPY_GENERATOR selection"
This reverts commit 30f6dc43bab8ae1f26497eb000ff1ab4fb379c00.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
eaa200bdec Revert "drivers: entropy: mcux_rnga: add "depends on SYS_CLOCK_EXISTS""
This reverts commit 2131b8ba2201ba193345fdf7837682bb48704444.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
4705a451d3 Revert "drivers: entropy: nrf5: add "depends on MULTITHREADING""
This reverts commit a071257c9b5c394f161e7d4a8ff36f9114b5ef2c.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
e5ebd9bc28 Revert "samples: mcumgr: smp_svr: disable "zephyr,entropy" in mcuboot"
This reverts commit 6f4326ace0febed1f01f935dbcc3761173d79ca1.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
1e146ed53d Revert "test: misc|shell: disable "zephyr,entropy" chosen property"
This reverts commit 40e5b8ae77e5ebf16c3f6c7298c85e21f3233685.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
522b1f2bba Revert "tests: disable NRF5 entropy driver on some bsim/qemu tests"
This reverts commit e0fcb8552428fb45164ea2b4271b3b0206695b7f.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Valerio Setti
dbbdd212f1 Revert "doc: updates concerning ENTROPY_GENRATOR auto-enabling"
This reverts commit a43cae0b3e40681def6f4a3385fe27e5c0e7ea6c.

Signed-off-by: Valerio Setti <vsetti@baylibre.com>
2024-12-12 00:15:39 +00:00
Lukasz Stepnicki
7fa8bf1756 modules: hal_nordic: dvfs: refactor
This is follow up to commit:
modules: hal_nordic: dvfs: added callback when scaling done
Used get and set timer user data functions.
Added missing help text in KConfig.

Signed-off-by: Lukasz Stepnicki <lukasz.stepnicki@nordicsemi.no>
2024-12-11 21:36:31 +01:00
Fengming Ye
4ad05aaec2 drivers: wifi: nxp: fix soft AP auto start
Fix soft AP net iface auto up after init.
Set dormant off/on when soft AP start/stop, to align with STA.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-11 21:36:19 +01:00
Fengming Ye
9f9325bd96 drivers: wifi: nxp: add cancel action wait ops
Add cancel action wait ops to cancel remain on channel after TX on
specific channel, in case we need to remain on another channel later.

Signed-off-by: Fengming Ye <frank.ye@nxp.com>
2024-12-11 21:36:19 +01:00
Jeff Daly
371ca13c6d drivers: adc: microchip: Different channels per package type
LJ packages have 16 ADC channels vs 8 for SZ packages.  Enhance
devicetree to account for this as well as conditional defines/code.

Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
2024-12-11 21:35:49 +01:00
Sercan Erat
662d9c75d0 soc: ambiq: apollo3x: Flash-controller reconfigured for mcuboot
Due to Apollo3's internal bootloader, zephyr build is not able
to create correct flash address on linker.cmd while using
mcuboot. The PR configures flash-controller start address
to solve this problem.

Test board: rakwireless/rak11720
Test project: samples/subsys/mgmt/mcumgr/smp_svr

Signed-off-by: Sercan Erat <sercanerat@gmail.com>
2024-12-11 21:35:18 +01:00
Tomasz Leman
9edca5e1f5 drivers: gpdma: Refactor power management initialization
This patch refactors the power management initialization for the Intel
ADSP GPDMA driver. The changes include:

1. Replacing the conditional initialization of power management state
   with a call to `pm_device_driver_init` in the `intel_adsp_gpdma_init`
   function.
2. Ensuring that the GPDMA driver is initialized with the appropriate
   power management state and that runtime power management is
   automatically enabled based on the device tree configuration.

These changes streamline the power management initialization process and
ensure consistency with other drivers.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-12-11 21:34:57 +01:00
Tomasz Leman
fe2861b5cd dai: intel: ssp: Refactor power management initialization
This patch refactors the power management initialization for the SSP
driver across ACE15, ACE20, and ACE30 generations to align with the
recommended practices outlined in the documentation. The changes
include:

1. Replacing the conditional initialization of power management state
   with a call to `pm_device_driver_init` in the `ssp_init` function.
2. Adding the `zephyr,pm-device-runtime-auto` property to the SSP nodes
   in the device tree files for ACE15, ACE20, and ACE30.
3. Moving the power domain assignment for the SSP device in the device
   tree. The previous configuration resulted in the device not being under
   any power domain and being initialized as always ON.

These changes ensure that the SSP driver is initialized with the
appropriate power management state and that runtime power management is
automatically enabled based on the device tree configuration. The
functionality of the power management state remains unchanged, ensuring
consistent behavior.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-12-11 21:34:57 +01:00
Tomasz Leman
618e83e721 dai: intel: dmic: Refactor power management initialization
This patch refactors the power management initialization for the DMIC
driver across ACE15, ACE20, and ACE30 generations to align with the
recommended practices outlined in the documentation. The changes
include:

1. Replacing the conditional initialization of power management state
   with a call to `pm_device_driver_init` in the
   `dai_dmic_initialize_device` function.
2. Adding the `zephyr,pm-device-runtime-auto` property to the DMIC nodes
   in the device tree files for ACE15, ACE20, and ACE30.

These changes ensure that the DMIC driver is initialized with the
appropriate power management state and that runtime power management is
automatically enabled based on the device tree configuration. The
functionality of the power management state remains unchanged, ensuring
consistent behavior.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-12-11 21:34:57 +01:00
Tomasz Leman
fa4a9db7a3 dma: intel_adsp_hda: Fix invalid init sequence and register use
This patch addresses the issue of invalid initialization sequence and
the use of registers in `dma_config` before the device is fully
initialized in the Intel ADSP HDA DMA driver.

Changes include:
1. Moving the `intel_adsp_hda_channels_init` call to the
   `intel_adsp_hda_dma_init` function to ensure that channels are
   initialized during device initialization.
2. Removing the redundant call to `intel_adsp_hda_channels_init` from
   the `PM_DEVICE_ACTION_RESUME` case in the
   `intel_adsp_hda_dma_pm_action` function.

These changes ensure that the device and its channels are properly
initialized before any DMA configuration is performed, preventing access
to hardware registers before the device is ready.

**Note:** This is a proposed solution, and a different approach should
be considered. Currently, we are accessing registers before the device
and power domain are fully powered up. This solution likely works
because the DMA is used to load firmware during the boot process, and
the necessary power domains are already powered up. Further
investigation and a more robust solution are recommended to ensure
proper initialization and power management.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-12-11 21:34:35 +01:00
Tomasz Leman
329675ab7c dma: intel_adsp_hda: Refactor power management and correct power domains
This patch addresses several issues with the Intel ADSP HDA DMA driver:

1. Refactors the HDA DMA power management initialization. The previous
   use of `pm_device_runtime_enable` was incorrect. The updated approach
   relies on enabling runtime power management through the device tree
   using the `zephyr,pm-device-runtime-auto` property. Additionally, the
   patch removes redundant device initialization steps as these are already
   handled by `pm_device_driver_init` when the device is under a power
   domain.

2. Corrects the power domain assignment for the HDA link. The HDA link
   was previously assigned to the io0 power domain based on a
   misinterpretation of the documentation. The correct power domain
   assignment is now based on updated documentation for LNL, ensuring that
   the HDA link is associated with the appropriate power domain.

These changes ensure that the HDA DMA driver properly manages power
states, reducing power consumption and improving system stability, while
ensuring the correct power domains are used.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-12-11 21:34:35 +01:00
Tomasz Leman
fd4a4bf702 dai: intel: hda: Add power management
This patch addresses the following issues with the Intel HDA DAI driver:

1. Adds power management support for the HDA DAI driver by implementing
   the `hda_pm_action` function and integrating it with the Zephyr power
   management framework.
2. Ensures balanced calls to `pm_device_runtime_get` and
   `pm_device_runtime_put` by modifying the `probe` and `remove`
   functions to use these power management calls.
3. Ensures that the io0 power domain is active when the HD Audio is in
   use by assigning the correct power domain to the HDA DAI devices in
   the device tree files for various Intel ADSP platforms (ace15_mtpm,
   ace20_lnl, ace30, ace30_ptl).
4. Enables runtime power management for the HDA DAI devices by adding
   the `zephyr,pm-device-runtime-auto` property in the device tree.

These changes ensure that the HDA DAI driver properly manages power
states, reducing power consumption and improving system stability, while
ensuring the io0 power domain is active when required.

Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
2024-12-11 21:34:35 +01:00
Gaofeng Zhang
ecf35f39eb hostap: wps: Enable PIN expiry timeout
Enable WPS PIN expire timeout parameter, this helps us in cleanup of
the Authorized MAC IE in the beacon in case no peer is connected
within the timeout.
Without this parameter the  IE is not removed from the beacon.

Signed-off-by: Gaofeng Zhang <gaofeng.zhang@nxp.com>
2024-12-11 21:34:11 +01:00
Peter Mitsis
909ff45f0c kernel: arch: move arch_swap() declaration
Moves the arch_swap() declaration out of kernel_arch_interface.h
and into the various architectures' kernel_arch_func.h. This
permits the arch_swap() to be inlined on ARM, but extern'd on
the other architectures that still implement arch_swap().

Inlining this function on ARM has shown at least a +5% performance
boost according to the thread_metric benchmark on the disco_l475_iot1
board.

Signed-off-by: Peter Mitsis <peter.mitsis@intel.com>
2024-12-11 21:33:49 +01:00
Dane Wagner
fd1e9f7445 doc: cache: Create caching overview
Expands the caching documentation to include a high-level overview
of caching strategies and the features available in Zephyr.

Signed-off-by: Dane Wagner <dane.wagner@gmail.com>
2024-12-11 21:33:29 +01:00
TOKITA Hiroshi
9ecc64835f tests: drivers: build_all: sensors: Test handling plural "compatible"s
Add device definitions in dt to test drivers that handle
multiple "compatible"s by a single driver.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-11 21:33:14 +01:00
TOKITA Hiroshi
0e978fb1e6 drivers: sensor: scd4x: Fix to allow the use of multiple models
Compilation will fail if multiple models are used at the same time.
Changing to define different unique names for the symbols
to avoid conflicts.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-11 21:33:14 +01:00
TOKITA Hiroshi
f41195f922 drivers: sensor: lsm6dso: Fix issue lsm6dso32 cannot enabled
The lsm6dso driver does not correctly reflect the status of
the node in dt. So the driver didn't compile even if
`st,lsm6dso32` node exists.

I fixed it to correctly go through ithe compile.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-11 21:33:14 +01:00
Chris Friedt
95896bf17c kernel: dynamic: simplify dynamic stack allocation
Merge the functions z_thread_stack_alloc_dyn() and
stack_alloc_dyn(), simplifying the flow for dynamic thread stack
allocation.

Signed-off-by: Chris Friedt <cfriedt@tenstorrent.com>
2024-12-11 21:33:00 +01:00
Emil Gydesen
2b93e6b40e tests: Bluetooth: tester: Improve BAP adv intervals
Modify the extended and periodic interval to be values that
are more suited for audio as they are multiple
of the expected resulting ISO interval.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-11 21:32:45 +01:00
Jukka Rissanen
228b271f01 net: Remove deprecated CONFIG_NET_PKT_BUF_DATA_POOL_SIZE
This removes the deprecated CONFIG_NET_PKT_BUF_DATA_POOL_SIZE.
User should either use CONFIG_NET_PKT_BUF_RX_DATA_POOL_SIZE or
CONFIG_NET_PKT_BUF_TX_DATA_POOL_SIZE depending of net packet type.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-11 21:32:29 +01:00
Jukka Rissanen
0e48ce20c5 net: Remove deprecated CONFIG_NET_TCP_ACK_TIMEOUT option
Use CONFIG_NET_TCP_INIT_RETRANSMISSION_TIMEOUT and
CONFIG_NET_TCP_RETRY_COUNT to control the total timeout at the TCP
level.

Signed-off-by: Jukka Rissanen <jukka.rissanen@nordicsemi.no>
2024-12-11 21:32:02 +01:00
Krzysztof Chruściński
ca557d8140 doc: shell: Add section about PuTTY RTT configuration
Add section which explains how to configure PuTTY to use RTT
shell there with all shell features. There is an alternative
approach which also works but it does not allow to use all
shell features.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-11 21:30:19 +01:00
Krzysztof Chruściński
c7f400c9aa shell: backends: Do not use RTT backend with immediate logging
RTT backend can only be called from thread context and immediate
logging might lead to interrupt context use. Previously this limitation
was implied in different way and commit (c88a9ef27) got reverted.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-11 21:30:19 +01:00
Krzysztof Chruściński
ca4f2d94f8 Revert "segger: rtt: disable unsupported shell/log features"
This reverts commit c88a9ef272.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2024-12-11 21:30:19 +01:00