Commit graph

107854 commits

Author SHA1 Message Date
Carles Cufi
3c420a4828 checkpatch: Adapt the braces check to Zephyr
scripts/checkpatch.pl was written originally for the Linux kernel, and
its code reflects the kernel's coding style. In particular, it has
checks for unneeded braces around single-statement if/else/for/while
conditions. In Zephyr however, braces are always required, and so the
checks needed modifying to verify the opposite condition.

In order to enable the now-compatible checks, we also remove the
--ignore BRACES statement in .checkpatch.conf.

Limitations: the current code works well if there are not conditional
statements (e.g. #if, #ifdef or #endif) next to the if/else/for/while
conditions. This is rarely the case, but triggers with the Bluetooth
controller in code like this:

```
 #if defined(CONFIG_BT_PERIPHERAL)
        if (!lll->is_hdcd)
 #endif /* CONFIG_BT_PERIPHERAL */
        {
```

```
        } else
 #endif /* CONFIG_BT_CTLR_PRIVACY */
        {

```

```
 #if defined(CONFIG_BT_CTLR_DF_ADV_CTE_TX)
        if (lll->cte_started) {
                radio_switch_complete(phy_s, 0, phy_s, 0);
        } else
 #endif /* CONFIG_BT_CTLR_DF_ADV_CTE_TX */
        {
```

```
 #ifdef DUAL_BANK
        while ((FLASH_STM32_REGS(dev)->SR1 & FLASH_SR_QW) ||
               (FLASH_STM32_REGS(dev)->SR2 & FLASH_SR_QW))
 #else
        while (FLASH_STM32_REGS(dev)->SR1 & FLASH_SR_QW)
 #endif
        {
```

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2024-12-30 21:46:47 +01:00
Yishai Jaffe
0f948fdb1c soc: silabs: efr32xg23: add DMA support
Added DMA support to efr32xg23 socs and boards containing them.

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-30 19:47:19 +01:00
Martin Jäger
9d3d67d3d1 drivers: ieee802154: b91: fix status variable type in RX ISR
The status variable stores the return value of `net_recv_data`, which
is an `int` and may be negative.

Signed-off-by: Martin Jäger <martin@libre.solar>
2024-12-30 19:47:05 +01:00
Simone Orru
354a47cfcf tracing: sysview: Clang-format tracing_sysview_ids.h
Run clang-format over the tracing_sysview_ids.h.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2024-12-30 17:32:03 +01:00
Simone Orru
2bd101132e kernel: Add tests for k_heap_calloc
Add tests for the k_heap_calloc function.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2024-12-30 17:32:03 +01:00
Simone Orru
f53aa42b8b tracing: Add calloc
Add the calloc tracing functions.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2024-12-30 17:32:03 +01:00
Simone Orru
37fd711a45 kernel: Add k_heap_calloc
Add the k_heap_calloc function. The
equivalent of the standard calloc for
the Zephyr kernel.

Signed-off-by: Simone Orru <simone.orru@secomind.com>
2024-12-30 17:32:03 +01:00
Rex Chen
dabeb9c95c net: wifi: shell: wifi status support all sae pwe types
Add support for wifi status show sae HNP,H2E and AUTO exactly.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-12-30 13:49:50 +01:00
Rex Chen
2dc288cf85 net: wifi: shell: add sae pwe support for sap
Add sae pwe H2E and AUTO support for sap.

Signed-off-by: Rex Chen <rex.chen_1@nxp.com>
2024-12-30 13:49:50 +01:00
Jan Kiszka
fa66a9be57 arch: arm: cortex_r/a: Fix multiple use of ARCH_EXCEPT in same scope
Pull the register variable into the private scope that ARCH_EXCEPT
creates so that the macro can be used multiple times in the same caller
scope. This can happen via k_panic(), e.g. in subsys/fs/ext2/ext2_impl.c.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
2024-12-30 11:44:10 +01:00
Daniel Fuchs
da91dbdd52 doc: silabs: fix J-Link firmware update instructions
J-Link firmware images for silabs boards are not distributed by
SEGGER, fw update should be done with Simplicity Studio instead.

Signed-off-by: Daniel Fuchs <software@sagacioussuricata.com>
2024-12-30 08:43:12 +01:00
Daniel Fuchs
32e39c164c boards: silabs: add EK2703A support
Based on board files for DK2601B. The EFR32xG24 Explorer Kit
(xG24-EK2703A) is similar to the DK2601B but does not have any
sensors onboard.

Signed-off-by: Daniel Fuchs <software@sagacioussuricata.com>
2024-12-30 08:43:12 +01:00
Daniel Fuchs
f0fee215ab soc: introduce the EFR32MG24B210F1536IM48
The EFR32MG24B210F1536IM48 has 4 more GPIOs than the
EFR32MG24B310F1536IM48, and does not support the high accuracy
mode for the IADC.

Signed-off-by: Daniel Fuchs <software@sagacioussuricata.com>
2024-12-30 08:43:12 +01:00
Jamie McCrae
1b70bfa14e tests: boot: mcuboot_recovery_retention: Fix testcase
Fixes an issue with the expected output of this test having
changed slightly

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-29 05:59:37 +01:00
Jilay Pandya
0ab69fb19e drivers: crypto: crypto_ataes132a fix buffer overrun issue
fix buffer overrun issue by assigning more bytes to the param buf

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-29 05:51:51 +01:00
Guennadi Liakhovetski
6d0c23be31 soc: intel_adsp: add support for .cold* sections
Add support for .cold and .coldrodata sections, used to implement
a cold module. Assigning code and read-only data to those sections
makes them suitable for use in a cold module, stored and executed in
slow memory.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-12-29 05:50:25 +01:00
Guennadi Liakhovetski
09cdc1f4b8 soc: intel_adsp: add a "cold" module manifest
Add a manifest for a "cold" module, that will be executed in DRAM
without copying it to SRAM for the whole duration of the firmware
life-time.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-12-29 05:50:25 +01:00
Guennadi Liakhovetski
de4003c07b soc: intel_adsp: check module address before copying to SRAM
Before copying modules to SRAM, check whether they're built for it,
skip modules, that aren't.

Signed-off-by: Guennadi Liakhovetski <guennadi.liakhovetski@linux.intel.com>
2024-12-29 05:50:25 +01:00
Xudong Zheng
002b4ca818 doc: release: 4.1: add CONFIG_FILE_SYSTEM_SHELL_MOUNT_COMMAND
This allows the mount shell subcommand to be optionally disabled.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-12-29 05:49:58 +01:00
Xudong Zheng
6231a9ee19 fs: shell: Add configuration option for mount subcommand
The mount subcommand requires the heap to be present. Excluding it reduces
flash and RAM usage.

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
2024-12-29 05:49:58 +01:00
Vinayak Kariappa Chettimada
fdf0ec2e5f tests: Bluetooth: BAP: Fix test wrt stream args to broadcast_source
Due to adding subgroup count and streams per subgroup
arguments to the broadcast_source test, fix the sink
test that was not ported due to being merged for change
in a different PR.

Relates to commit 01e8d0e3e0 ("tests: Bluetooth: BAP:
Add subgroup and stream args to broadcast_source").

Fixes commit 303d0b786f ("tests: Bluetooth: BAP: Add
test to test invalid bcode").

Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
2024-12-28 11:05:27 +00:00
Fabian Blatz
4966d620d3 tests: drivers: build_all: stepper: Adjust tmc2209 device instance
Adds the counter property to the tmc2209 node to ensure counter dependant
step-dir code is build by CI.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-28 04:37:05 +01:00
Fabian Blatz
d5ec783a88 drivers: stepper: tmc2209: Allow counter dts property
Enables use of the counter dts property which allows to configure a counter
device as the timing source for the stepping.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-28 04:37:05 +01:00
Fabian Blatz
0b124a2ff6 drivers: stepper: Add timing source for step dir stepper
Adds a timing source api which is used by the step-dir stepper common code.
This allows the reusable common code to configure different timing sources,
since the initial delayable work implementation was inacurate for higher
maximum velocities.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-28 04:37:05 +01:00
Fabian Blatz
fc2567939b drivers: stepper: shell: Use shell_device_filter
Use the shell_device_filter utils method and leverage the new api classing
to only suggest stepper devices via tab-complete within the shell.

Signed-off-by: Fabian Blatz <fabianblatz@gmail.com>
2024-12-27 21:18:04 +01:00
Armando Visconti
02fa47f70e samples/shields: x-nucleo-iks4a1: Add lis2dux12 accel and temp test
Add sample display for lis2duxs12 accel and temp sensors.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Armando Visconti
e4628ac60f boards/shields: x-nucleo-iks4a1: add support to LIS2DUXS12
Add 3-axis linear accelerometer LIS2DUXS12.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Armando Visconti
f9eceaebf9 drivers/sensor: lis2dux12: add lis2duxs12 support
The LIS2DUXS12 is a smart, digital, 3-axis linear accelerometer whose
MEMS and ASIC have been expressly designed to combine the lowest current
consumption possible with features such as always-on antialiasing
filtering, a finite state machine (FSM) and machine learning core (MLC)
with adaptive self-configuration (ASC), and an analog hub / Qvar sensing
channel.

(https://www.st.com/en/mems-and-sensors/lis2duxs12.html)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Armando Visconti
0f76a4e519 drivers/sensor: lis2dux12: re-working to be DUX generic
Prepare the driver to be able to handle other DUX software compatible
devices. Currently the driver handles the st_lis2dux12 compatible only.

Do following major changes:

1. Introduce the lis2dux12_chip_api structure filled with device specific
   APIs. At the moment define following callback:

    - api_lis2dux12_set_odr_raw()
    - api_lis2dux12_set_range()
    - api_lis2dux12_sample_fetch_accel()
    - api_lis2dux12_sample_fetch_temp()
    - api_lis2dux12_handle_interrupt()
    - api_lis2dux12_init_interrupt()

2. Prepare specific APIs for st_lis2dux12 device.

3. Make DT instantiation on inst + name basis, and not only by inst. This
   commit only use "name = DT_DRV_COMPAT = st_lis2dux12".

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2024-12-27 19:34:46 +01:00
Yishai Jaffe
99a503e661 boards: silabs: xg23_rb4210a: added more supported hardware
Added more supported hardware to xg23_rb4210a.yaml

Signed-off-by: Yishai Jaffe <yishai1999@gmail.com>
2024-12-27 15:42:54 +01:00
Jilay Pandya
8db97b5bf6 drivers: wifi: esp_at: fix null pointer dereference issue
fix null pointer dereference issue by checking if *sock is null or not

Signed-off-by: Jilay Pandya <jilay.pandya@outlook.com>
2024-12-27 15:42:41 +01:00
Fabio Baltieri
5a8671e7ed usb: device_next: cdc_acm: set the thread name after initializing it
The cdc-acm workqueue thread name is set before initializing it right
now, which results in an empty thread name as apparently it gets cleared
by k_work_queue_init. Fix it by moving the thread name setting after the
workqueu is initialized and started.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-12-27 14:10:05 +01:00
Emil Gydesen
fb1fcec983 tests: Bluetooth: Tester: More logging and verification for ISO RX
Add additional data to the logs and only send the event once we have
receive a successful SDU.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 14:09:29 +01:00
Emil Gydesen
8c38d1b9a3 Bluetooth: TMAP: Add role validation for bt_tmap_register
Add validation that the device supports the role
set by bt_tmap_register.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 14:09:13 +01:00
Emil Gydesen
abe2e0df57 Bluetooth: BAP: BA: Add validation of add/mod src
The functions did not verify the provided parameters before
sending it as a control point operation.

This also fixes a bug where BT_BAP_BIS_SYNC_NO_PREF was not
allowed when pa_sync=0.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 14:08:57 +01:00
Emil Gydesen
38a32b768a tests: Bluetooth: BAP: Add broadcast tests with multiple subgroups
Add 4 new tests for BAP broadcast:
1) One subgroup with one stream per subgroup
2) One subgroup with two streams per subgroup
3) Two subgroups with one stream per subgroup
4) Two subgroup with two streams per subgroup

To support these, the number of broadcast streams and data paths
was updated to be up to 4.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 12:36:40 +01:00
Emil Gydesen
2b197aff02 Bluetooth: BAP: Modify range of BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT
The range of BT_BAP_BROADCAST_SNK_SUBGROUP_COUNT should be relative to
BT_BAP_BASS_MAX_SUBGROUPS. The broadcast sink depends on the scan
delegator, and thus it does not make sense for the broadcast sink
to support more subgroups than what the scan delegator supports.

Since this no longer relates to the number of streams, there
may be new runtime errors if applications attempt
to sync to more subgroups than the number of ISO channels
supported.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 12:36:40 +01:00
Emil Gydesen
01e8d0e3e0 tests: Bluetooth: BAP: Add subgroup and stream args to broadcast_source
Add subgroup count and streams per subgroup arguments to the
broadcast_source test. This will allow us to run multiple
test setups using the same build and test case.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 12:36:40 +01:00
Emil Gydesen
0d933f4e46 tests: Bluetooth: BAP: Split bap_broadcast_audio.sh
Split the file into 2 so that each test script only runs a single test.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2024-12-27 12:36:40 +01:00
Mariusz Skamra
3f7fbb4a8d modules: liblc3: Bump to 1.1.1
Bump up liblc3 to the 1.1.1.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2024-12-27 12:36:13 +01:00
Jamie McCrae
aed59d4431 sysbuild: cmake: modules: kconfig: Fix changed CMake API
Fixes a bug which was caused by the CMake function API having
changed in commit 4e29a35b22

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-27 10:51:56 +01:00
Irfan Ahmad
cf2ce9d322 drivers: display: Fix typos in multiple display drivers
Found multiple similar typos in various display drivers - fixed them.

Signed-off-by: Irfan Ahmad <irfan.ahmad@siemens.com>
2024-12-27 07:18:28 +01:00
Jamie McCrae
5442687488 tests: cmake: snippets: Exclude sysbuild
Prevents sysbuild from being used as this adds a local snippet root
which should only be used (and tested) by application

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-27 07:18:13 +01:00
Jamie McCrae
fed62cd2f3 doc: build: snippets: Add sysbuild usage
Adds an example on how to use a snippet with sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-27 07:18:13 +01:00
Jamie McCrae
06fd7389bd tests: cmake: Add sysbuild snippets test
Adds a new test that ensures sysbuild snippets work and are
applied correctly

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-27 07:18:13 +01:00
Jamie McCrae
0711f42e3a sysbuild: Add support for snippets
Adds support for sysbuild loading snippets, these can be included
by using e.g.: cmake ... -DSB_SNIPPET=blah for sysbuild
directly or can be used with an application and sysbuild using
-DSNIPPET. Snippets for sysbuild can use SB_EXTRA_CONF_FILE in the
snippet file to specify an extra Kconfig fragment for sysbuild

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2024-12-27 07:18:13 +01:00
TOKITA Hiroshi
1207ccfb7e drivers: i2c: dw: Fix the "resets" property exists check logic
Regardless of the argument specified, it always references the
property of the 0th, so it was corrected to reference the instance
specified by the argument.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@gmail.com>
2024-12-26 19:43:54 +01:00
Florijan Plohl
8c9ac5ac58 boards: octopus_io_board: Update product page link
Update product page link in Octopus IO-Board documentation.

Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
2024-12-26 19:43:41 +01:00
Florijan Plohl
956739c49c boards: octopus_som update product page link
Update product page link in Octopus SoM documentation.

Signed-off-by: Florijan Plohl <florijan.plohl@norik.com>
2024-12-26 19:43:41 +01:00
Aurelie Fontaine
c267925e90 modules: hal_tdk: Update icm42x7x drivers version
Update icm42x7x driver version to the latest realeased 3.0.0.

Signed-off-by: Aurelie Fontaine <aurelie.fontaine@tdk.com>
2024-12-26 19:43:29 +01:00