Commit graph

66378 commits

Author SHA1 Message Date
Tristan Honscheid
be19051248 ztest API Migration: bluetooth/gatt
Migrate the unit tests at `bluetooth/gatt` to use
the new ztest API.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2022-07-06 12:44:59 +02:00
Carlo Caione
b87a51b438 tests: arm64_high_addresses: Rework and move to new ztest API
Rework and migrate the test to the new ztest API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-06 10:00:34 +00:00
Carlo Caione
8ada5b38c4 tests: arm64_gicv3_its: Move to new ztest API
Migrate the test to the new ztest API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-06 10:00:34 +00:00
Carlo Caione
3a303498b4 tests: arm64_psci: Move to new ztest API
Migrate the test to the new ztest API.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
2022-07-06 10:00:34 +00:00
Juha Heiskanen
d4bf2ad6cc net: lwm2m: Fix socket offload and native TLS conflict
Removed auto select from LWM2M_DTLS_SUPPORT
* TLS_CREDENTIALS
* NET_SOCKETS_SOCKOPT_TLS
* NET_SOCKETS_ENABLE_DTLS

LwM2M stack shouldn't enforce these options as they
are not needed with socket offloading.

Signed-off-by: Juha Heiskanen <juha.heiskanen@nordicsemi.no>
2022-07-06 11:28:19 +02:00
Kumar Gala
17871969d2 tests: bluetooth: mesh: Convert to use gpio_dt_spec
Move test to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:23:00 +02:00
Kumar Gala
7761b5c4e2 samples: bluetooth: iso_receive: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:22:04 +02:00
Alexandre Bourdiol
2b54f0fcf4 samples: drivers: led_ws2812: add fixture to sample.yaml
This sample should be executed only when connecting external
hardware (Led strip). Thus it is necessary to add fixture to avoid
execution when no hardware is connected.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-06 11:19:13 +02:00
Alexandre Bourdiol
bef533187e dts: arm: st: stm32h743.dtsi: fix USB clock enable bit
Fix STM32H743 DTS USB clock enable bit

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2022-07-06 11:17:34 +02:00
li biao
ddaee674e3 tests: lib: move json to new ztest API
Move test json to use new ztest API.

Signed-off-by: li biao <biao1x.li@intel.com>
2022-07-06 11:15:11 +02:00
Andreas Sandberg
f5932657dd drivers: ssd16xx: Fix CS glitch
The SSD16xx uses a separate pin to indicate if an SPI transfer is a
command or data. This means that driver needs to split most SPI
transactions into two distinct transactions, one for commands and one
for data. The driver currently doesn't request SPI_HOLD_ON_CS which
means that the chip select will be released momentarily between the
command and data phase.

Update the driver to request SPI_HOLD_ON_CS and SPI_LOCK_ON to lock
the bus and complete both phases of a command in one atomic operation.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-06 11:14:49 +02:00
Andreas Sandberg
f922a580f7 drivers: ssd16xx: Remove unused include
Remove the unused zephyr/display/cfb.h include.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-06 11:14:49 +02:00
Kumar Gala
a204d16bfb ec_host_cmd: Convert to DEVICE_DT_GET
We are working on phasing out use of the devicetree 'label'
property.  We can use DEVICE_DT_GET and drop use of DT_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:12:32 +02:00
Maciej Perkowski
a83cec9f8b samples: drivers: flash: Add missing fixture requirement
This sample can only be tested if the DUT has external memory
connected. This commit aligns the yaml description, so the test
is not picked up on setups without required fixture.

Signed-off-by: Maciej Perkowski <Maciej.Perkowski@nordicsemi.no>
2022-07-06 11:12:04 +02:00
Xiao Song
1f4db6fc90 tests: net: arp: move to new ztest API
Move tests/net/arp/ to use new ztest API.

Signed-off-by: Xiao Song <songx.xiao@intel.com>
2022-07-06 11:11:47 +02:00
Kumar Gala
1ee23437ee samples: nrf: mesh: onoff-app: Convert to use gpio_dt_spec
Move sample to use gpio_dt_spec for GPIO access.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:11:31 +02:00
Andreas Sandberg
a05e8dcc5e drivers: spi: spi-bitbang: Fix CS glitch in transceive
spi_context_cs_configure_all() is currently called from
spi_bitbang_transceive(). This causes a glitch when combined with
SPI_HOLD_ON_CS is used.

Move the initialization to spi_bitbang_init which is what the other
SPI drivers seem to do.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-06 11:11:14 +02:00
Andreas Sandberg
65252ffd95 drivers: spi: spi-bitbang: Initialize CS GPIOs
The SPI bitbang driver doesn't correctly initialize the list of CS
GPIOs. As a consequence, SPI buses using the bitbang driver won't
drive CS low. Add the missing initialization.

Signed-off-by: Andreas Sandberg <andreas@sandberg.uk>
2022-07-06 11:11:14 +02:00
Kumar Gala
18ede6e681 samples: alarm: Convert sample to use DEVICE_DT_GET
Move to use DEVICE_DT_GET instead of device_get_binding as we
work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 11:11:00 +02:00
Aurelien Jarno
869c60e208 drivers: sensor: stm32_vbat: get vref-mv through the ADC API
Get the vref-mv through the ADC API instead of the device tree. This
saves 8 bytes of SRAM and will be future proof in case, one day, support
for a variable vref is added.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-07-06 11:10:42 +02:00
Aurelien Jarno
fd8042d88f drivers: adc: stm32: remove vref_mv from adc_stm32_cfg
The value is unused in this structure is unused and can be accessed
through the adc_ref_internal() function.

This saves 4 bytes of SRAM.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-07-06 11:10:42 +02:00
Aurelien Jarno
ef05063e62 drivers: adc: stm32: enable battery voltage input without CONFIG_STM32_VBAT
Allow the battery voltage to be read through the ADC even if the
CONFIG_STM32_VBAT driver is not enabled.

I guessed this part of code is conditionally compiled depending on
CONFIG_STM32_VBAT because this feature, and hence the
LL_ADC_CHANNEL_VBAT constant is not available on all families. As the
feature is already checked at runtime (as the same driver supports
multiple instances), we can conditionally compile it depending on
LL_ADC_CHANNEL_VBAT instead.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2022-07-06 11:10:42 +02:00
Richard Yim
1b4e5b8d35 ITE drivers/pwm: fix target frequency below 324Hz on it8xxx2
after the second times will not operating in correct output frequency.

Signed-off-by: Richard Yim <yimjiajun@icloud.com>
2022-07-06 11:04:02 +02:00
Emil Gydesen
504feb77c4 Bluetooth: Audio: Updated samples and shell to use seq_num
Update the samples and the shell to use the sequence number
and timestamp when sending.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-06 11:03:27 +02:00
Emil Gydesen
aabe7f4835 Bluetooth: Audio: Add seq_num and ts to bt_audio_stream_send
Added sequence number and timestamp to the bt_audio_stream_send
function. This allows an application to better
control the audio transmission, as it can schedule
one or more audio streams to send a buffer in a specific
SDU interval (ensuring that e.g. left and right is sent in
the same SDU interval).

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-06 11:03:27 +02:00
Aleksandar Radovanovic
69690e3505 ipc_service: static_vrings: Fix TX virtqueue alignment
This patch fixes an issues where the TX virtqueue is misaligned by
2 bytes due to the way the virtqueue start address is calculated.
It is currently set to immediatelly follow the RX virtqueue:

    vr->tx_addr = vr->rx_addr + vring_size(num_desc, VRING_ALIGNMENT);

but the RX virtqueue does not end on an aligned boundary (last field,
avail_event is uint16_t). The resulting misaligned virtqueue causes
alignment faults on architectures that do not support unaligned
accesses (and is suboptimal otherwise)

The fix is to realign tx_addr to requested VRING_ALIGNMENT.

Signed-off-by: Aleksandar Radovanovic <aleksandar.radovanovic@amd.com>
2022-07-06 11:03:04 +02:00
Marcin Niestroj
d32d4af935 boards: arm: add Seeed XIAO BLE board
The Seeed XIAO BLE is a tiny (21 mm x 17.5 mm) Nordic Semiconductor
nRF52840 ARM Cortex-M4F development board with onboard LEDs, USB port,
QSPI flash, battery charger, and range of I/O broken out into 14 pins.

Co-authored-by: Peter Johanson <peter@peterjohanson.com>
Signed-off-by: Marcin Niestroj <m.niestroj@emb.dev>
2022-07-06 10:58:37 +02:00
Emil Gydesen
2fd3fcedcd Bluetooth: Audio: Remove CSIS minimum set size requirement
The requirement was removed by
https://www.bluetooth.org/errata/errata_view.cfm?errata_id=17007
and the implementation has been updated.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2022-07-06 10:58:08 +02:00
Jamie McCrae
db469784ae samples: drivers: watchdog: Add support for Raspberry Pi Pico
This adds support for running the watchdog driver sample on a Raspberry
Pi Pico board.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-07-06 10:52:29 +02:00
Jamie McCrae
e8d8ad51e8 boards: rpi_pico: Added Watchdog timer to supported feature list
Adds Watchdog timer (WDT) to the list of supported features for the
Raspberry Pi Pico board.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-07-06 10:52:29 +02:00
Jamie McCrae
fd501733d0 doc: guides: release notes: Add Raspberry Pi Pico watchdog support
The Raspberry Pi Pico watchdog is now supported, this adds a note to
the release notes with this information.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-07-06 10:52:29 +02:00
Jamie McCrae
f113b1f718 tests: drivers: watchdog: Add RPI Pico support
Adds support for running the wdt test on the Raspberry Pi Pico by
increasing the window size and disabling timeouts.

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-07-06 10:52:29 +02:00
Jamie McCrae
a20eb66742 drivers: watchdog: Add Raspberry Pi Pico watchdog driver
This adds basic support for the watchdog timer on the RP2040 MCU and
Raspberry Pi Pico development board

Signed-off-by: Jamie McCrae <spam@helper3000.net>
2022-07-06 10:52:29 +02:00
Kumar Gala
927d6b620d video: ov2640: cleanup unused struct fields
When we moved to gpio_dt_spec forgot to remove the older
fields used for gpio related access.  Remove them as they
are used by the driver anymore.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:50:01 +02:00
Kumar Gala
b2ad545887 samples: x_nucleo_iks02a1: microphone: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
d10fc848f0 samples: x_nucleo_iks02a1: sensorhub: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
e263876065 samples: x_nucleo_iks02a1: standard: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
775907aaee samples: x_nucleo_iks01a2: sensorhub: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
76f2d82bf8 samples: x_nucleo_iks01a2: standard: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
9d038c93da samples: x_nucleo_iks01a3: standard: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
c4b98aa3c8 samples: x_nucleo_iks01a3: sensorhub: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Kumar Gala
aa7e23c949 samples: x_nucleo_iks01a1: Convert to use DEVICE_DT_GET_ONE
Move to use DEVICE_DT_GET_ONE instead of device_get_binding as
we work on phasing out use of DTS 'label' property.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-06 10:48:09 +02:00
Shaoan Li
8b346c984a tests: arch: arm: move test arm_tz_wrap_func to new ztest API
Migrate the testsuite tests/arch/arm/arm_tz_wrap_func to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-06 10:47:23 +02:00
Shaoan Li
52efe9eaa2 tests: arch: arm: move test arm_sw_vector_relay to new ztest API
Migrate the testsuite tests/arch/arm/arm_sw_vector_relay to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-06 10:47:17 +02:00
Shaoan Li
78a893ab0c tests: arch: arm: move test arm_runtime_nmi to new ztest API
Migrate the testsuite tests/arch/arm/arm_runtime_nmi to the new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-06 10:47:11 +02:00
Shaoan Li
b70a137396 tests: arch: arm: move test arm_ramfunc to new ztest API
Migrate the testsuite tests/arch/arm/arm_ramfunc to the new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-06 10:46:56 +02:00
Shaoan Li
80f62389ac tests: arch: arm: move test arm_irq_zero_latency_levels to new ztest API
Migrate the testsuite tests/arch/arm/arm_irq_zero_latency_levels to the
new ztest API.

Signed-off-by: Shaoan Li <shaoanx.li@intel.com>
2022-07-06 10:46:49 +02:00
Stephanos Ioannidis
8e6322a21a tests: cpp: cxx: Add qemu_cortex_a53 as integration platform
This commit adds the `qemu_cortex_a53`, which is an MMU-based platform,
as an integration platform for the C++ subsystem tests.

This ensures that the `test_global_static_ctor_dynmem` test, which
verifies that the dynamic memory allocation service is functional
during the global static object constructor invocation, is tested on
an MMU-based platform, which may have a different libc heap
initialisation path.

In addition to the above, this increases the overall test coverage
ensuring that the C++ subsystem is functional on an MMU-based platform
in general.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-07-06 10:46:39 +02:00
Stephanos Ioannidis
03f0693125 tests: cpp: cxx: Test with various types of libc
This commit changes the C++ subsystem test, which previously was only
being run with the minimal libc, to be run with all the mainstream C
libraries (minimal libc, newlib, newlib-nano, picolibc).

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-07-06 10:46:39 +02:00
Stephanos Ioannidis
dc4895b876 tests: cpp: cxx: Add dynamic memory availability test for static init
This commit adds a test to verify that the dynamic memory allocation
service (the `new` operator) is available and functional when the C++
static global object constructors are invoked called during the system
initialisation.

Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
2022-07-06 10:46:39 +02:00