Commit graph

81442 commits

Author SHA1 Message Date
Mariusz Skamra
03d296d546 Bluetooth: audio: ascs: Remove unused variable
The `ops` variable is unused, thus can be removed.

Signed-off-by: Mariusz Skamra <mariusz.skamra@codecoup.pl>
2023-07-18 11:05:03 +00:00
Carlo Caione
1fcb929108 ipc_service: open-amp: Add __ASSERTs on cache alignment
Add some asserts to warn the user about unaligned VDEV status area,
VRINGs and buffers.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-18 11:04:46 +00:00
Carlo Caione
9752cbe045 ipc_service: open-amp: Align VRINGs
This patchset is doing three things:

1. It is fixing the bogus algorithm to find the optimal number of
   descriptors for a given memory size.

2. It is changing values for VDEV_STATUS_SIZE and
   IPC_SERVICE_STATIC_VRINGS_ALIGNMENT to better align to a usual cache
   line size.

3. RX/TX VRINGs are now correctly aligned to MEM_ALIGNMENT (and cache
   line alignment).

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-18 11:04:46 +00:00
Emil Gydesen
bdd83e7239 Bluetooth: CAP: Shell: Add support for specific audio configs
Add CAP shell commands for starting specific audio configurations
based on the BAP specification.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-18 11:04:25 +00:00
Emil Gydesen
b140b70a17 tests: CAP: Add testing of all audio configs
Add test cases to test all audio configurations with
all presets.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-18 11:04:03 +00:00
Markus Fuchs
84df635384 tests: lib: json: Add tests for parsing inputs with extra fields
Add tests for both extra objects and extra arrays nested in JSON objects.
Fields in extra nested objects should be ignored and also not manipulate
subsequent fields with the same name.

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-07-18 11:03:21 +00:00
Markus Fuchs
c0d7218ef2 json: Skip unknown fields on parsing
Skip child objects and arrays that are not specified in the given object
descriptor when parsing a JSON input string.
This patch adds support for extra child arrays which previously were not
supported by the parser as opposed to additional child objects.

Fixes #47988

Signed-off-by: Markus Fuchs <markus.fuchs@ch.sauter-bc.com>
2023-07-18 11:03:21 +00:00
Fabio Baltieri
15a2cb5a2f drivers: intel: ssp: delay initialization after dma
The SSP driver depends on DMA as there are references in the devicetree,
but it currently initialize before the DMA driver itself. This is
exposed by the build time priority checking
(CONFIG_CHECK_INIT_PRIORITIES=y) and shows up as:

ERROR: /soc/ssp@77a00 POST_KERNEL 32 < /soc/dma@7c000 POST_KERNEL 40
ERROR: /soc/ssp@77800 POST_KERNEL 32 < /soc/dma@7c000 POST_KERNEL 40
ERROR: /soc/ssp@77600 POST_KERNEL 32 < /soc/dma@7c000 POST_KERNEL 40
...

Bumping up the SSP priority so the initialization is in sync with the
devicetree node hirearchy.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-07-18 10:45:37 +00:00
Simon Guinot
8b5ebc010b dts: bindings: pwm-leds: add description for pwms property
This patch adds a description section for the pwms property of the PWM
LED child node. This intends to explain how the period field is used by
the led_pwm driver and to help with its configuration.

Reported-by: Scott Worley <scott.worley@microchip.com>
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2023-07-18 10:45:05 +00:00
Simon Guinot
a4645908ee drivers: led_pwm: fix overflow in set_brightness
The set_brightness function of the led_pwm driver uses a default PWM
period (defined in the pwms DT property) to compute a pulse passed to
the pwm_set_pulse_dt function. If this default period is greater than
2^32/100 nanoseconds (about 43 milliseconds) then the calculation may
overflow.

This patch prevents this overflow by running the pulse computation under
a cast with a larger type (uint64_t).

Reported-by: Scott Worley <scott.worley@microchip.com>
Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2023-07-18 10:45:05 +00:00
Benjamin Cabé
64ec7e18c8 fs: nvs: doc: fix Doxygen comments
Properly document nvs_fs struct

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-18 06:41:43 -04:00
Erwan Gouriou
97ed2b9c88 west.yml: hal stm32: Update STM32Cube packages
Update STM32Cube packages:

update stm32c0 to cube version V1.1.0
update stm32f2 to cube version V1.9.4
update stm32h5 to cube version V1.1.0
update stm32l1 to cube version V1.10.4
update stm32u5 to cube version V1.3.0
update stm32wb to cube version V1.17.0
update stm32wba to cube version V1.1.0

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-07-18 09:56:24 +00:00
Armando Visconti
a29261c5f4 drivers/sensor: check xyz_mem_bank_set() ret value
Check xyz_mem_bank_set() API return value to catch and report as soon
as possible the error condition. Impacted stmemsc API:

  - lsm6dso_mem_bank_set()
  - lsm6dso16is_mem_bank_set()
  - lsm6dsv16x_mem_bank_set()

Fix:

  Coverity-CID: 316212 (issue #58579)
  Coverity-CID: 316224 (issue #58580)
  Coverity-CID: 316307 (issue #58586)

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-07-18 09:54:44 +00:00
Raoul Rubien
6f74f53efc drivers: sensors: ilps22qs: added item in kconfig
The ILPS22QS sensor cannot be enabled unless USE_STDC_ILPS22QS is defined.
This PR fixes #57825 add adds the missing item in Kconfig.st file.

Signed-off-by: Raoul Rubien <rubienr@sbox.tugraz.at>
2023-07-18 09:53:40 +00:00
Anas Nashif
e7acd7199e MAINTAINERS: fix path for native_simulator
Fix syntax of path for native_simulator.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-07-18 09:32:20 +02:00
Kyra Lengfeld
c607179cc4 Bluetooth: Controller: Add missing nRF53x Tx Power Kconfig
This commit adds missing tx power config options for nRF53x SoCs, as
well as the missing Radio defines for nRF53x SoCs.

Signed-off-by: Kyra Lengfeld <kyra.lengfeld@nordicsemi.no>
2023-07-17 21:41:08 +00:00
Robert Lubos
87ee12ae72 samples: net: echo_client: Fix build with UDP disabled
In case UDP is disabled, init_udp() is not compiled and the build
fails. Fix this, by providing dummy implementations for UDP functions,
in case UDP is disabled.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-17 17:21:33 -04:00
Robert Lubos
1f1f550ad6 samples: net: echo_client/server: Fix mbed TLS dependency
All application level TLS operations should be guarded with
"#if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS)" and not mbed TLS configs
only. Otherwise, in case mbed TLS is enabled, but the sample is not
configured to use TLS (hence TLS credential library is not available
for example), the build may fail or produce spurious warnings.

Signed-off-by: Robert Lubos <robert.lubos@nordicsemi.no>
2023-07-17 17:21:33 -04:00
Flavio Ceolin
2b1106a407 kernel: userspace: Use only list for dynamic objs
Since the rbtree is using as list because we no longer
can assume that the object pointer is the address of the
data field in the dynamic object struct, lets just use
the already existent dlist for tracking dynamic kernel
objects.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-17 16:56:01 -04:00
Flavio Ceolin
4feb182f12 kernel: dynamic: Fix stack allocation logic
Fix the preference allocation logic. If pool is preferred but POOL_SIZE
is 0 or pool allocation fails, it fallbacks to heap allocation if it
is enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-17 16:56:01 -04:00
Flavio Ceolin
3b7e0b672e kernel: userspace: Dynamic thread stack object
Add support for dynamic thread stack objects. A new container
for this kernel object was added to avoid its alignment constraint
to all dynamic objects.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-17 16:56:01 -04:00
Flavio Ceolin
fc6d9eeb3e kernel: dynamic: Support usermode thread stack
Allocate kernel object for userspace thread stack.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-17 16:56:01 -04:00
Flavio Ceolin
67e66e4807 kernel: userspace: Add k_object_alloc_size
Add a new API to dynamically allocate kernel objects that allow
passing an arbitrary size. This new API allows to allocate dynamic
thread stack.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-17 16:56:01 -04:00
Flavio Ceolin
d58c9a1ca4 tests: kernel: threads: stack: Enable USERSPACE
Test that automatic thread stack allocation works for
both user and kernel threads.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-07-17 16:56:01 -04:00
Nerijus Bendžiūnas
397ed142ad doc: fix :zephyr-app: paths
During testing I've found one bad path and looked if
there is more.

I've used this oneliner to find more:

```
rg :zephyr-app: | awk '{ print $3 }' | while read dir
do
    test -d $dir || echo $dir
done | grep '^samples' | grep -v '<' | sort | uniq

```

Signed-off-by: Nerijus Bendžiūnas <nerijus.bendziunas@gmail.com>
2023-07-17 16:51:16 -04:00
Daniel Leung
e55fb88bcb soc: intel_adsp/ace: update clock rate
The clock rates for ACE series of Intel Audio DSP have changed.
The values come from the SOF project in their board configs.

CONFIG_XTENSA_CCOUNT_HZ is also set so the arch timing test
can pass.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-07-17 16:27:08 -04:00
Grzegorz Chwierut
57c27cd736 twister: pytest: Added fixture for mcumgr with unittests
Added mcumgr fixture to pytest-twister-harness. Added unittests for
new fixture.

Signed-off-by: Grzegorz Chwierut <grzegorz.chwierut@nordicsemi.no>
2023-07-17 16:23:59 -04:00
Dmitrii Golovanov
7afeefd7dd twister: Fix flashing timeout command line options check
Fix `--device-flash-with-test` command line options check logic
to be effective with `--device-testing`.

Remove `--device-flash-timeout` check for `--device-testing`
presence as marginal.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-07-17 15:57:03 -04:00
Andrei Emeltchenko
39928ae4a7 tests: smbus: Rename smbus api test
Rename test to drivers.smbus.api.access.io to indicate access type.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-07-17 15:13:38 -04:00
Andrei Emeltchenko
20a7552868 boards: qemu_x86_64: Add smbus to supported list
Add smbus to supported list to run tests on qemu_x86_64 Q35 which
supports ICH SMBus controller.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-07-17 15:13:38 -04:00
Andrei Emeltchenko
f41dffd735 tests: smbus: Use depends_on instead of platform_allow
Using depends_on instead of platform_allow helps to add new boards and
makes test description more clean.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-07-17 15:13:38 -04:00
Benjamin Cabé
c544926b37 gpio: doc: fix Doxygen doc
A couple of trivial Doxygen fixes.

Signed-off-by: Benjamin Cabé <benjamin@zephyrproject.org>
2023-07-17 14:56:29 -04:00
Randy Palamar
0683060dc0 boards: arm: seeeduino_xiao: support onboard DAC
this allows you to use the onboard DAC on the Seeed Xiao

Signed-off-by: Randy Palamar <palamar@ualberta.ca>
2023-07-17 13:43:53 -05:00
Declan Snyder
9e855347be tests: dma loop_transfer: Ex of LPC DMA Kconfig
Show an example of the LPC DMA Kconfig to reduce RAM based on the number
of DMA channels expected to be used. In this test, only one DMA channel
is needed, so we can show an example of how to reduce RAM usage of the
driver by configuring this value appropriately.

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-07-17 13:06:01 -05:00
Declan Snyder
191ad08154 drivers: dma_mcux_lpc: Add Kconfig to reduce data
Add a Kconfig to have the ability to fine tune the amount of RAM that
the driver uses based on the number of channels expected to be used.

Most of the code is already there but just need this Kconfig to get the
benefit of it by reducing the size of the statically created arrays.

Also change the number of channels field in the configuration to a byte
instead of a 32 bit integer because that should be sufficient to
describe the number of DMA channels.

Rename LPC DMA Driver Kconfigs with namespace to MCUX_LPC

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-07-17 13:06:01 -05:00
Emilio Benavente
c6e3bac4f2 soc: arm: lpc55xxx: Updated clock init
Updated the clock init to reflect the sdk also
updated the clock frequencies to reflect the
respective soc clock values, this file originally
contained unexpected clock values, updated comments
to reflect changes and got rid of doxygen style
comments

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-07-17 13:05:44 -05:00
Ryan McClelland
9603c0ce75 samples: sensor: lsm6dso: fix double promotion warning
fix double promotion warning when compiling with
-Wdouble-promotion

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-07-17 13:02:46 -05:00
Przemyslaw Bida
96893e84ce net: openthread: Refactor openthread entropy otPlatEntropyGet.
This commit replaces direct entropy device driver class with
`sys_csrand_get`, which is recommended way of getting crypto
secure random buffer.

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-07-17 13:22:16 +00:00
Chaitanya Tata
7a6288a871 net: l2: wifi: Fix printing of TWT parameters
Use the macro to print to handle for cases where shell context is NULL,
this is possible because in this net management event handler shell
context is not passed.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-07-17 13:21:39 +00:00
Emil Gydesen
8fdb0fb1ca footprint: Add BT TMAP samples
Add the BT Telephony and Media Audio Profile samples.
These reflect devices that control telephone and media audio
of LE Audio.

The central is typically a more resourceful device, and the
peripheral a resource-constrained device.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-07-17 13:20:54 +00:00
Wei-Tai Lee
5f6ceefb8e drivers: hwinfo: andes: Improve hwinfo_andes driver
Check the driver's readiness at boot and in each
function that depends on the syscon driver.

Signed-off-by: Wei-Tai Lee <wtlee@andestech.com>
2023-07-17 13:19:37 +00:00
Girisha Dengi
9ca543d7ae drivers: reset: kconfig: Change default init priority to 35 from 40
Setting higher priority to reset controller to initialize it before
other dependent drivers running at CONFIG_KERNEL_INIT_PRIORITY_DEFAULT
priority which is 40.

Signed-off-by: Girisha Dengi <girisha.dengi@intel.com>
2023-07-17 10:47:11 +00:00
Jamie McCrae
0001e23e52 tests: mgmt: mcumgr: all_options: Fix missing Kconfig
Fixes a missing Kconfig enabling MCUboot, which causes the test to
now fail to build.

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
2023-07-17 10:40:24 +00:00
Nick Ward
2bf091f8af drivers: usb-c: fix - check if adc_channel is ready before use
This will protect a user of this driver against driver initialisation
order misconfiguration.

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-07-17 10:16:22 +00:00
Nick Ward
371f0f2503 drivers: adc: use adc_is_ready_dt helper function
Update  `struct adc_dt_spec` use with adc_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-07-17 10:16:22 +00:00
Nick Ward
0f645b445c drivers: adc: add adc_is_ready_dt helper function
Add adc_is_ready_dt()

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-07-17 10:16:22 +00:00
Chaitanya Tata
94e0e10193 wifi: Fix doxygen comments
Fix TWT comment to conform to doxygen style.

Signed-off-by: Chaitanya Tata <Chaitanya.Tata@nordicsemi.no>
2023-07-17 10:14:57 +00:00
Carlo Caione
5b2d716e76 arm64: Keep the frame pointer in leaf functions
It helps with debugging and usually on ARM64 we don't care about a small
increase in code size.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2023-07-17 10:14:18 +00:00
Przemyslaw Bida
54c991b8f2 net: openthread: regular openthread upmerge to f7690fe
Adding new kconfig option: CONFIG_OPENTHREAD_TX_QUEUE_STATISTICS

Signed-off-by: Przemyslaw Bida <przemyslaw.bida@nordicsemi.no>
2023-07-17 10:13:49 +00:00
Kevin Townsend
f68cee9405 kconfig: Set BOOTLOADER_SRAM_SIZE default to 0
The current default value for `BOOTLOADER_SRAM_SIZE` is set to an
arbitrary-seeming value of `16`, which feels like a random magic
number.

Given that adding an offset in SRAM for a bootloader should always be
a conscious choice for a specific platform, this PR sets the default
to `0`. An appropriate value can be set at the SoC or board level,
overriding this default.

Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
2023-07-17 10:13:33 +00:00