Commit graph

2971 commits

Author SHA1 Message Date
Alberto Escolar Piedras e6140f5422 tests/drivers uart_mix_fifo_poll: Allow configuring test length
This test is quite heavy and long in simulation,
but its length is meant to find unlikely issues which
may be triggered only very rarely.
Let's provide a kconfig value to chose how long the
test is, and set it to a lower value when running in simulation
(in CI) to save time.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-16 14:55:07 -05:00
Alberto Escolar Piedras 685c88308d tests/drivers uart_mix_fifo_poll: Speed up for nrf52_bsim
Increase the UART speed to 1Mbps for the simulated nrf52
to reduce the amount of time spent busy waiting, and
therefore the real time duration of the test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-16 14:55:07 -05:00
Anas Nashif ead02284f0 tests: uart: filter by CONFIG_SERIAL_HAS_DRIVER
filtering by CONFIG_SERIAL always matches, we need a different filter
and be able to enable the driver if supported.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-16 10:29:39 -05:00
Anas Nashif 54d177a3e7 tests: uart: do not filter if we know which platforms to use
No need for filtering in one of the tests, since we have platform_allow.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-16 10:29:39 -05:00
Amrith Venkat Kesavamoorthi 879e3a42b0 drivers: gpio: PCF857x: Modify PCF8574 driver
Modify existing PCF8574 driver as PCF857x for:
PCF8574 - 8 channel I/O expander
PCF8575 - 16 channel I/O expander

Signed-off-by: Amrith Venkat Kesavamoorthi <amrith@mr-beam.org>
2024-01-16 15:19:14 +00:00
Yuval Peress 2d09f1f566 test: bmi160: rename test directory
Rename the test directory to more accuratly reflect what's being
tested.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Yuval Peress b58b03196b bus: emul: Update i2c/spi emulators with mock transport
Adding a hook for tests to inject a mock transport and migrating the
accel test to test bmi160 specific things. The old version of the test
which checks for read values is now covered by the generic test in
the sensor build_all target.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Yuval Peress 9898b2fc3f bmi160: Make changes to align driver to datasheet
The logic in the driver was not aligned to the datasheet. Also,
temperature reading was not being done in fetch, but in channel_get.
There was also some extra conversions from SI->register->SI when
setting the range, this was causing the register value calculation to
produce an incorrect scale in some cases.

Tests were added to cover these cases.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Yuval Peress be563239c8 sensor: testing: Update sensor emul backend
Update the backend for sensor emulators to include a function for
setting the offset as well as a function to query an attribute's
metadata such as bounds and increment size. Additionally, add
backend support for setting the _xyz channel values.

Make the appropriate test changes to accomodate.

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-16 10:01:00 +01:00
Alberto Escolar Piedras cee40d1d49 tests/drivers/uart/uart*: Allow on nrf52_bsim
Add the nrf52_bsim to the platform_allow list
for tests which had such a filter.

Note that for this test to pass, you need
to connect the uart in loopback, passing the command
line option `-uart0_loopback` to zephyr.exe

Note this tests do not run right now by default in CI
as the fixture is preventing it.
They can be run with:

twister -T tests/drivers/uart/ -v -p nrf52_bsim \
  --fixture gpio_loopback -- -uart0_loopback

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00
Alberto Escolar Piedras f82f6cdeae tests uart/uart_async_api: Improve filter
These tests were filtering by CONFIG_UART_CONSOLE,
but that does not seem a strick requirement.
It seems the requirement would just be CONFIG_SERIAL,
but that is implicit if CONFIG_SERIAL_SUPPORT_ASYNC,
which is required for all these tests, so let's
just remove CONFIG_UART_CONSOLE.

(The simulated nrf5x boards do not set CONFIG_UART_CONSOLE
by default, as by default the console is routed to the
process stdout instead)

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00
Alberto Escolar Piedras 7ef23e1573 tests uart/uart_pm: Fix kconfig warning
The option CONFIG_NATIVE_UART_0_ON_STDINOUT
is only usable for the native_sim/posix(_64) targets,
but this test is only allowed for the nrf52840dk_nrf52840.
Building with this option set causes a kconfig warning.
Let's just remove it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00
Alberto Escolar Piedras 51f9af86e4 tests/drivers uart_pm: Fix for too fast targets
On the async configurations, the first part of the test
(test_uart_pm_in_idle) can interfere with the second part
of the test, if the device has a fast enough CPU.
This is due to the first part of the test ending
as soon as it queues the last byte for transmission.
If the device is fast enough (and the simulated
nrf52 is), the 2nd part of the test will start executing
enabling the UART Rx, which can result in either
the Rx being enabled mid frame, which can result in a frame
error or even before the Tx HW started pushing the byte
in the line (resulting in that byte being received).
Neither of these cases are handled by the 2nd test,
which sees a spurious error or received byte
and fails.

Let's just add a small delay at the end of the first test
to allow the Tx of the last byte to be done.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-12 11:27:23 -06:00
Mahesh Mahadevan 37158ebf15 tests: counter: Add LPC RTC 1KHZ counter
Add counter test support for the RTC 1KHz counter

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2024-01-12 13:34:19 +01:00
Yuval Peress 4efa11ebf7 bbram: Add tests
Add emulation testing for it8xxx2, npcx, and mcp7940n. The test is made
to be generic and uses the backend API in order to verify both read and
write functionality. Additional tests are made for the API's limits when
reading/writing out of bounds.

Fixes #65018

Signed-off-by: Yuval Peress <peress@google.com>
2024-01-12 09:59:31 +01:00
Anisetti Avinash Krishna 62c8b066c0 tests: drivers: uart: uart_async_api: Enable test for adl_crb
Enable uart_async_api test for ADL_CRB

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2024-01-11 15:41:42 -06:00
Henrik Brix Andersen b7854c08be tests: drivers: build_all: adc: add build test for the mcp320x driver
Add build-only test of the mcp320x ADC driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-11 17:32:28 +01:00
Tristan Honscheid 0f95b6fbb0 sensors: Add Bosch BMA4xx-series driver
This is a driver targetting the Bosch BMA 4-series accelerometers. It
has been specifically developed for the BMA422 but should be compatible
with others in that line, excepting the BMA400. Supports key attributes
and async RTIO one-shot operation. I2C operation is supported, with
stubs for a SPI implementation provided for future improvement.

Signed-off-by: Tristan Honscheid <honscheid@google.com>
2024-01-11 09:58:29 -06:00
Lucas Tamborrino 2ca4ed205f tests: pwm: esp32s3: add internal loopback
Add internal loopback for testing purposes

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-11 10:04:34 +01:00
Lucas Tamborrino 76997374c3 tests: pwm: esp32: add internal loopback
Add internal loopback for testing purposes and
change wroom for wrover, which is default board
for testing.

Signed-off-by: Lucas Tamborrino <lucas.tamborrino@espressif.com>
2024-01-11 10:04:34 +01:00
Jun Lin 833495675a test: spi_loopback: add npcx evbs to the spi_loopback test suite
This commits adds the npcx4/npcx9/npcx7 evaluation boards to the
spi_loopback test suite.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
2024-01-11 10:04:21 +01:00
Fabio Baltieri e5974b2aac input: gpio_keys: implement polling mode support
Some MCU have limitations with GPIO interrupts. Add a polling mode to
the gpio-keys driver to support those cases.

This required a bit of a refactoring of the driver data structure to add
a instance wide data, and move the pin specific pointer in the config
structure.

For polling, reuse the button 0 delayed work so we minimize the resource
waste, the two work handler functions are only referenced when used so
at least those are discarded automatically if no instance needs them.

Fix a bug in the PM structure instantiation as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-10 18:21:49 +00:00
Jonathan Hamberg 9c1a45cc00 posix: Fix name collision with __bswap
__bswap_ in zephyr/sys/byteorder.h conflicts with __bswap_ in host's
byteswap.h. byteswap.h from host compiler used in posix_native_64 boards
causes a compilation issue.

This commit renames __bswap_ to BSWAP_ to prevent collision.

Before this commit a compilation error can be created by adding #include
<byteswap.h> to samples/net/sockets/echo/src/socket_echo.c

This does not change external API to byteorder.h, but does change
internal implementation which some other source files depend on.

Replaced manual byteswap operations in devmem_service.c with APIs from
byteorder.h which automatically converts to CPU endianess when necessary.

Fixes #44324

Signed-off-by: Jonathan Hamberg <jonathanhamberg@gmail.com>
2024-01-10 18:13:44 +00:00
Fabio Baltieri bd8cee8683 drivers: input: add an analog-axis driver
Add an input driver to read data from an analog device, such as a
thumbstick, connected to an ADC channel, and report it as an input
device.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-10 15:05:35 +01:00
Alberto Escolar Piedras 892e8ef47a tests/drivers uart_async_*: Provide overlays for nrf52_bsim
For uart_async_api, uart_mix_fifo_poll & uart_pm:
These test can be run fine in the simulated nrf52_bsim board,
just connecting the UART Tx and Rx in loopback,
but we need an overlay just like for the real boards.
Let's provide it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-10 10:01:37 +01:00
Alberto Escolar Piedras c7d179f895 tests/drivers uart_async_api: Fix build error with host gcc
For some reason the host gcc (11 & 12) does not believe
rx_buf_size is constant. Let's work around it by using the
sizeof() expression it is initialized to instead.

This fixes a build error when targetting native targets
which use the host gcc:

tests/drivers/uart/uart_async_api/src/test_uart_async.c:236:34:
error: expression in static assertion is not constant
  236 |         BUILD_ASSERT(rx_buf_size <=
  sizeof(tdata.rx_first_buffer), "Invalid buf size");

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-10 10:01:37 +01:00
Alberto Escolar Piedras 37f26174ea tests/drivers uart_async_rx: Fix for integration_platforms
The test was actually filtered out in the integration platforms
(native_sim) as SERIAL was not enabled in its prj.conf
and that is not enabled by default for this target.
Let's just enable it.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2024-01-10 10:01:37 +01:00
Henrik Brix Andersen 1ebaa293a1 dts: bindings: adc: ti: lmp90xxx: use common io-channel-cells naming
Use the common io-channel-cells name "input" instead of "positive" and
"negative" to make this binding work with the various ADC DT macros.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2024-01-09 10:04:18 +01:00
Anas Nashif afc319e3fa ztest: shell: add shell support
- Support for listing both testcases and testsuites
- Support for running single suites or single test cases
- Support shuffling tests and repeating execution based on command line
  arguments.

For example, build with

west build -p  -b qemu_cortex_m3  tests/kernel/sleep   -t run -- \
-DCONFIG_ZTEST_SHUFFLE=y -DCONFIG_ZTEST_SHELL=y

Following commands are available:

uart:~$ ztest
ztest - Ztest commands
Subcommands:
  run-all          :Run all tests
  shuffle          :Shuffle tests
  list-testsuites  :List all test suites
  list-testcases   :List all test cases
  run-testsuite    :Run test suite
  run-testcase     :Run testcase

shuffle accepts two arguments --suite_iter and --case_iter which allows
repeated exercution of testcases or suites.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2024-01-09 09:58:57 +01:00
Gerard Marull-Paretas 4a0d880350 soc: riscv: ite: reorganize SoC folder
Follow the vendor structure [1]:

- Family: ITE Embedded Controller SoCs
- Series: IT8XXX2
- SoCs: IT81202BX, IT81202CX, etc.

[1]: https://www.ite.com.tw/en/product/category?cid=1

Signed-off-by: Gerard Marull-Paretas <gerard@teslabs.com>
2024-01-09 09:40:07 +01:00
Yong Cong Sin c7ce871a04 tests: exclude renode from tests requiring unsimulated peripherals
Physical boards work on these tests but some of the required
peripherals are not simulated by `renode`, executing the tests
with renode-simulated board in CI will fail.

Exclude `renode` simulation from these tests.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-08 16:17:43 +00:00
Bryan Zhu 6f84f34647 tests: counter: counter_basic_api: Add support for ambiq_counter device
Update counter test to test ambiq_counter devices

Signed-off-by: Bryan Zhu <bzhu@ambiq.com>
2024-01-08 14:16:13 +01:00
Hudson C. Dalpra 410684c7b0 drivers: w1: add zephyr-gpio driver
The zephyr-gpio w1 driver introduced in this commit implements
all routines for the w1 api on top of the zephyr gpio driver.
W1 bit read, write, and reset operations are executed by
bit-banging the selected gpio.

Signed-off-by: Hudson C. Dalpra <hudson@bduncanltd.com>
2024-01-08 12:43:52 +01:00
Yong Cong Sin 8f6be9661e tests: build_all: plic: add test for PLIC_SHELL build
Add a build-only test for the `PLIC_SHELL` configuration.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2024-01-08 12:35:52 +01:00
Manuel Argüelles 7e2600d309 tests: drivers: pwm: add overlays for ucans32k1sic
Enable pwm tests on ucans32k1sic board.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2024-01-05 09:03:00 +01:00
Fabio Baltieri e517af4cff charger: add a driver for bq25180
Add a driver for the TI BQ25180. Implement enable/disable and current
set/get.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2024-01-05 09:00:21 +01:00
Jeremy Bettis 5a727a382a drivers: Add level intrs in gpio_ite_it8xxx2_v2
Implement level based gpio interrupts, by using a worker queue to
repeatedly call the gpio callbacks until the gpio is no longer active.

Update unit test for new interrupts.

Bug #66401

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2024-01-02 10:10:39 +01:00
Jeremy Bettis 6c567d4899 tests: Add unittest for gpio_ite_it8xxx2_v2
Add a unittest for 100% of the lines in gpio_ite_it8xxx2_v2. The test
fakes the registers by overriding the ECREG macro to call a function
provided by the test.

Does not test the code guarded by
CONFIG_SOC_IT8XXX2_GPIO_GROUP_K_L_DEFAULT_PULL_DOWN

Bug #66401

Signed-off-by: Jeremy Bettis <jbettis@google.com>
2024-01-02 10:10:39 +01:00
cyliang tw d00125875c tests: drivers: adc: adc_api: support numaker_pfm_m467
Add support for Nuvoton numaker board numaker_pfm_m467.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2024-01-02 10:10:27 +01:00
Fabio Baltieri 4307882dd1 input: kbd_matrix: add actual key mask runtime control
Add an option to enable a input_kbd_matrix_actual_key_mask_set API to
enable or disable keys dynamically in the mask. This can be useful if
the exact key mask is determined in runtime and the device is using a
single firmware for multiple matrix configurations.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-27 16:50:21 +00:00
Andrei Emeltchenko 5d0ba230b8 tests: samples: watchdog: Add intel_rpl_p_crb overlay
Add overlay to enable watchdog for build test and sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-12-27 16:06:19 +00:00
Bindu S 3974882b42 tests: drivers: spi: spi_loopback: Enabled SPI in RPL-P
Added overlay and conf to enable SPI tests on RPL-P board.

Signed-off-by: Bindu S <bindu.s@intel.com>
2023-12-27 16:06:19 +00:00
Anisetti Avinash Krishna b14feec6c4 boards: x86: rpl_crb: rpl_p_crb: Enabled GPIO in RPL-p
Enabled GPIO basic api test for RPL-P platform

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-12-27 16:06:19 +00:00
Ian Wakely 2a647c81cf board: Fixing ADC API tests for W5500_EVB_PICO.
When duplicating the rpi_pico board, I had missed this test file.

Signed-off-by: Ian Wakely <raveious.irw@gmail.com>
2023-12-27 16:04:26 +00:00
Anas Nashif e86b44751c tests: usb: move bc12 tests under tests/drivers/usb
Move bc12 under usb, this is not a standalone driver subsystem.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-22 09:54:12 +01:00
Anas Nashif f296ea58a3 tests: ieee802154: fix test identifier
Fix test identifier and use correct component.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-12-22 09:54:12 +01:00
Francois Ramu 82bace6e0d tests: drivers: dma test on stm32f7 requires nocache memory
Config the sram0 to be non-cachable to PASS the DMA testcases
chan_blen_transfer and loop_transfer
on the stm32f746zg and stm32f767zi nucleo boards.

The CONFIG_NOCACHE_MEMORY is useless as the memory region
gets the NOCACHE ATTRibutes for stm32H7 or stm32F7 as well.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-12-22 09:53:39 +01:00
Ian Wakely 9835957df0 board: adafruit_qt_py_rp2040: Adding test overlay.
Adding a board overlay for the ADC API driver test.

Signed-off-by: Ian Wakely <raveious.irw@gmail.com>
2023-12-22 09:53:21 +01:00
Fabio Baltieri 8c83185f6e tests: add an kbd_matrix test suite
Add an initial test suite for the keyboard scanning input library.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-21 10:12:33 +00:00
Fabio Baltieri 978b0bb5ea tests: input: add a gpio-kbd-matrix test suite
Add an initial test suite for the gpio-kbd-matrix driver.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-21 10:12:17 +00:00
Sylvio Alves ecda72079e esp32: overlays: remove unused dt-binding headers
All overlay headers are not necessary to be included.

Signed-off-by: Sylvio Alves <sylvio.alves@espressif.com>
2023-12-20 14:17:49 +00:00
Fabio Baltieri f9313b1745 input: add a linux-evdev device
Add a device driver to read events from a Linux evdev device node and
inject them back as Zephyr input events.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-18 12:23:59 +01:00
Richard Wheatley a40a8a5f49 boards: arm: apollo4p_evb add connector to apollo4p_evb
Generic Connector for the apollo4p_evb
Ran tests/drivers/gpio/gpio_basic_api
Ambiq does not support DUAL Edged Interrupts.
Added Connector Usages as defined by the Ambiq BSP.

Signed-off-by: Richard Wheatley <richard.wheatley@ambiq.com>
2023-12-15 14:35:32 +01:00
Armando Visconti 1badec4bfd drivers/sensor: add support to LIS2DU12 accelerometer
The LIS2DU12 is a linear 3-axis accelerometer with advanced digital
functions whose MEMS and ASIC have been expressly designed to build
an outstanding ultralow-power architecture in which the anti-aliasing
filter operates with a current consumption among the lowest in the
market.
This driver is based on stmemsc HAL i/f v2.3

https://www.st.com/en/datasheet/lis2du12.pdf

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-14 09:28:52 +01:00
Maureen Helm 5ff4f46d9e tests: drivers: dma: Refactor tests to use data relocation
Eliminates dma tests' dependency on CONFIG_NOCACHE_MEMORY=y for
configuring dma data linker sections. This allows optionally relocating
dma source and destination data to sram or other custom linker section
on boards that don't support dma access to flash.

Signed-off-by: Maureen Helm <maureen.helm@analog.com>
2023-12-14 09:27:43 +01:00
Evan Perry Grove 6df4576249 tests: drivers: Add nucleo_f722ze board support
Add overlays for the adc_api and counter_basic_api tests. Support
Nucleo F722ZE in the dac_api test.

Signed-off-by: Evan Perry Grove <evan@4grove.com>
2023-12-13 13:57:55 +01:00
Kevin ORourke fbfd36e81e drivers: clock_control: stm32: Add HSE CSS support
Add support for enabling the clock security system, which can detect
failures of the HSE clock.

Includes tests for nucleo_h743zi and nucleo_g474re.

Signed-off-by: Kevin ORourke <kevin.orourke@ferroamp.se>
2023-12-13 13:56:43 +01:00
Armando Visconti 72620baefe tests: drivers: build_all: add die_temp test case
Add test case for all drivers that are supporting the die temperature
feature, and fix right away all the yet undiscovered issues.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-13 09:42:23 +01:00
Ricardo Rivera-Matos 16519a5b3c drivers: charger: Updates drivers to use charge_enable handler
Updates existing drivers to make use of the charge_enable handler.

Signed-off-by: Ricardo Rivera-Matos <ricardo.rivera-matos@cirrus.com>
2023-12-12 10:49:39 -06:00
Henrik Brix Andersen fe74ffe2d5 drivers: can: drop POSIX from the native Linux SocketCAN driver name
Rename the native Linux SocketCAN driver to reflect that it can can now be
used in both native_posix and native_sim (with or without an embedded
C-library).

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-12 14:28:26 +00:00
Benedikt Schmidt 995824ae80 tests: drivers: smbus: enable SMBus
Enable SMBus for the smbus_emul test.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-12-12 10:57:41 +01:00
Joakim Andersson a8e340eb7e tests: flash: Use a flash partition that is known to be nonsecure
With TF-M enabled the storage_partition can be used as memory that is
known to be configured as non-secure flash region.
The slot1_ns_partition partition is only correct when TF-M is built
with BL2 enabled.

Signed-off-by: Joakim Andersson <joakim.andersson@nordicsemi.no>
2023-12-11 09:56:55 +01:00
Henrik Brix Andersen 0bf4efc780 tests: drivers: build_all: can: add build test for native posix linux
Add build-only test for the native POSIX Linux (SocketCAN) driver.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-12-10 09:24:30 +01:00
Ryan McClelland edf32335cb test: drivers: sensor: adltc2990: fix double promotion
Fix double promotion warning

Signed-off-by: Ryan McClelland <ryanmcclelland@meta.com>
2023-12-08 10:26:11 +00:00
Maxmillion McLaughlin 8ab1c75e9b feat: add support for TDK NTCG103JF103FT1 thermistor
Adds compensation table and bindings for NTCG103JF103FT1 thermistor

Signed-off-by: Maxmillion McLaughlin <github@maxmclau.com>
2023-12-08 10:04:12 +00:00
Dmitrii Golovanov 28ff83515d tests: drivers: coredump: Enable code coverage
Enable code coverage for debug.coredump.drivers.api.* test suite
adding custom fatal error handler to dump code coverage data
when the test halts as expected.

Signed-off-by: Dmitrii Golovanov <dmitrii.golovanov@intel.com>
2023-12-07 12:14:32 -05:00
Manuel Argüelles f46a27f20b tests: drivers: spi: enable tests on ucans32k1sic
Add overlays to enable SPI tests on ucans32k1sic board.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-12-06 20:57:42 -06:00
Fabio Baltieri 808c0f1f78 input: kbd_matrix: add actual-key-mask support
Add an optional actual-key-mask property to filter out key combinations
that are not implemented in the actual keyboard matrix.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-06 09:16:45 +00:00
Erwan Gouriou bf652b20a9 tests: drivers: adc: Support nucleo_wba55cg
Enable adc tests on this board.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-05 14:53:39 +00:00
Armando Visconti 3832c67677 tests: drivers: build_all: sensor: fix i3c typo for LPS28DFW
Fix typo in LPS28DFW driver i3c build test.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-12-04 19:08:08 +00:00
Fabio Baltieri 7ce03134f5 tests: build_all: input: add few more gpio-kbd-matrix cases
The driver has some non trivial macro setup, add another two test cases
so those gets build tested as well.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-12-04 16:40:35 +00:00
Christopher Friedt 88425fe3bb tests: drivers: dma: test dma_emul driver on native_posix boards
Add support for testing the `dma_emul` driver which simply uses
software emulation (i.e. asynchronous memcpy in a workqueue) for
performing DMA operations.

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-12-03 19:22:31 -05:00
Jonas Remmert 7a2fcc419e drivers/sensor: add support to LPS28DFW pressure sensor
The LPS28DFW is an ultracompact, piezoresistive, absolute pressure sensor.
Compared to the LPS22DF, the LPS28DFW is waterproof and has a Dual FS
capability and does not have SPI. This commit extends the LPS22DF driver to
be compatible with the LPS28DFW device.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-12-01 12:19:05 -06:00
Erwan Gouriou 17c099872f tests: uart: Enable fifo on nucleo_wba2cg for async tests
This will allow compiling/testing fifo in CI.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-12-01 10:52:49 +00:00
Marc Desvaux be6b12e012 tests: drivers: adc: adc_dma: add nucleo_l476rg
Add nucleo_l476rg in drivers.adc.dma
test case for twister test

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-12-01 10:52:22 +00:00
HaiLong Yang f5e871d5e0 test: flash: add gd32 boards
This add gd32vf103v_eval, gd32a503v_eval and gd32f470i_eval boards to
flash common test.

    Boards       | Flash Type
-------------------------------
 gd32vf103v_eval | gd32 fmc v1
 gd32a503v_eval  | gd32 fmc v2
 gd32f470i_eval  | gd32 fmc v3

Signed-off-by: HaiLong Yang <hailong.yang@brainco.cn>
2023-12-01 10:51:52 +00:00
Manuel Argüelles de93777d14 tests: drivers: gpio: enable tests for ucans32k1sic
Add DT overlays for running GPIO tests on ucans32k1sic board.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-30 11:21:59 -05:00
Alberto Escolar Piedras ff30ad15cd tests/drivers/*: Switch integration platform to native_sim
Swith integration_platforms from native_posix(_64)
to native_sim(_64).

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-30 09:42:25 -05:00
Alberto Escolar Piedras 799cd60745 tests/drivers/charger/sbs_charger: Fix test filter
Fix the test filter, to allow any POSIX arch board,
instead of just native_posix, as this test runs fine
on all of them.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-30 09:42:25 -05:00
Alberto Escolar Piedras 6fce48b028 tests/drivers/flash_simulator: Switch to native_sim
Switch the native overlays to be based on the native_sim one,
and set native_sim as the integration_platform
instead of native_posix

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-30 09:42:25 -05:00
Jakub Michalski 685b45be94 tests: console: add line splitting tests
Add tests for line splitting in console echo and console_getline()

Signed-off-by: Jakub Michalski <jmichalski@internships.antmicro.com>
Signed-off-by: Mateusz Sierszulski <msierszulski@antmicro.com>
2023-11-29 17:16:35 -05:00
Fabio Baltieri 35de07a528 tests: gnss: add some tests for gnss_dump
Add a testsuite for gnss_dump, testing that various values are printed
correctly.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-29 14:30:40 +00:00
Emilio Benavente 617cb789c3 tests: drivers: spi: spi_loopback: added overlay file for mimxrt1170
Added an overlay file for mimxrt1170_evk_cm33 to test rtio
with the spi_loopback test.
Added mimxrt1170_evk_cm7 to the testcase.yml file

Signed-off-by: Emilio Benavente <emilio.benavente@nxp.com>
2023-11-28 12:11:52 -06:00
Fabio Baltieri 0670609bc6 tests: console_switching: drop CONFIG_ZTEST_NEW_API
The option is long gone, PR was sitting for a long time so this got
merged and now it's failing compliance check.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-28 14:55:57 +00:00
Christopher Friedt b13ec704d0 tests: drivers: console: add console_switching test
This testsuite exercises a number of things. Namely

  * `mutable` devices (i.e. those backed in SRAM)
  * `uart_emul` support for interrupt mode (receive only)
  * `devmux` capabilities of multiplexing several uarts
  * switching the system console between several uart backends

Testing Done:
```
west build -p auto -b qemu_riscv64 -t run \
  tests/drivers/console_switching/
...
*** Booting Zephyr OS build zephyr-v3.4.0-3988-gaaefb2d764ea ***
Running TESTSUITE console_switching
================================================================
START - test_read
read "Hello, uart_emul0!" from uart_emul0
read "Hello, uart_emul1!" from uart_emul1
read "Hello, uart_emul0!" from uart_emul0
read "Hello, uart_emul1!" from uart_emul1
 PASS - test_read in 0.005 seconds
================================================================
START - test_write
wrote "Hello, uart_emul0!" to uart_emul0
wrote "Hello, uart_emul1!" to uart_emul1
wrote "Hello, uart_emul0!" to uart_emul0
wrote "Hello, uart_emul1!" to uart_emul1
 PASS - test_write in 0.003 seconds
================================================================
TESTSUITE console_switching succeeded

------ TESTSUITE SUMMARY START ------

SUITE PASS - 100.00% [console_switching]: pass = 2, fail = 0,...
 - PASS - [console_switching.test_read] duration = 0.005 seconds
 - PASS - [console_switching.test_write] duration = 0.003 seconds

------ TESTSUITE SUMMARY END ------

===============================================================
PROJECT EXECUTION SUCCESSFUL
```

Signed-off-by: Christopher Friedt <cfriedt@meta.com>
2023-11-28 15:35:39 +01:00
Fabio Baltieri 407e9a4c74 test: add a gnss build_all test
Add a generic test for GNSS devices.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-28 15:33:28 +01:00
Alberto Escolar Piedras 7b1813e9dc tests/drivers/build_all/*: Switch to native_sim
Enable all these tests which run in native_posix in native_sim,
Switch from native_posix to native_sim as default test platform
And switch native_posix overlays to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras f2283df0ef tests/drivers/clock_control/fixed_clock: Enable for native_sim_64
Switch from native_posix_64 to native_sim_64 as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
Alberto Escolar Piedras e6f6d60cd9 tests/drivers/udc: Switch to native_sim_64
Enable this test which run in native_posix_64 in native_sim_64,
And switch native_posix_64 overlays to native_sim_64.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-27 16:06:42 +00:00
cyliang tw c07156ef3c tests: drivers: i2c: i2c_target_api: support numaker_pfm_m467
Add support for Nuvoton numaker board numaker_pfm_m467.

Signed-off-by: cyliang tw <cyliang@nuvoton.com>
2023-11-27 14:34:15 +00:00
Grant Ramsay 82644a31c2 drivers: ethernet: Fix eth_ivshmem shared memory mapping
This driver assumed the ivshmem-v2 output sections would be mapped
contiguously, which is no longer true.

Modify eth_ivshmem to treat each output section independently

Signed-off-by: Grant Ramsay <gramsay@enphaseenergy.com>
2023-11-27 12:15:43 +00:00
Jonas Remmert 108f7bde83 tests: build_all: sensor: fix i2c duplicate address
Fix address for hs300x driver in dts file for test.

Signed-off-by: Jonas Remmert <j.remmert@phytec.de>
2023-11-24 09:26:58 +01:00
Andrzej Głąbek c949018d36 tests: drivers: flash: Use fixtures for tests requiring external chips
Several scenarios in this test require specific external flash chips
to be connected to the nRF52840 DK. Specify proper fixture for them
so that they are not performed on the board without those required
external components connected.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-11-23 10:02:22 +01:00
Andrzej Głąbek 4a262c3947 tests: drivers: flash: Update nrf52840dk_mx25r_high_perf.overlay
This is a follow-up to commit 7a83724e0f.

This overlay uses an alternative connection (via spi2) for the external
flash present on the nRF52840 DK and it needs to use one of the QSPI
pins as GPIO, to get CS line control in the SPI communication. To make
it possible, that GPIO must be removed from those marked as reserved.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2023-11-23 10:02:22 +01:00
Hein Wessels 82a6a69b81 tests: drivers: adc_dma: add test for nucleo_l476rg
Add test to verify the ADC + DMA functionality works
for the STM32L476 MCU.

Signed-off-by: Hein Wessels <heinwessels93@gmail.com>
2023-11-23 10:00:50 +01:00
Anisetti Avinash Krishna 6de5a1a5d5 tests: drivers: uart: uart_async_api: Enabled tests for rpl_s platform
Enabled tests for intel_rpl_s_crb platform.

Signed-off-by: Anisetti Avinash Krishna <anisetti.avinash.krishna@intel.com>
2023-11-22 17:31:08 +01:00
Alberto Escolar Piedras ec7ed0ea7d tests/drivers smbus_emul: Switch to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:53:20 +01:00
Alberto Escolar Piedras 982425f818 tests/drivers/gpio/*: Switch to native_sim
Switch from native_posix to native_sim as default test platform
And switch overlays to native_sim.

For gpio_enable_disable_interrupt, also filter with
platform_allow to save time, as the dt filter requires cmake
to be run, but only the platforms with overlays provided
by the test can be run.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:53:20 +01:00
Alberto Escolar Piedras 5f61df6569 tests/drivers/bc12: Switch to native_sim
Switch from native_posix to native_sim as default test platform
And switch overlays to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:53:20 +01:00
Alberto Escolar Piedras 5c7eae6745 tests/drivers/bbram: Switch to native_sim
Switch from native_posix to native_sim as default
test platform, switch overlays to native_sim.
For the HW test, filter whole posix arch to speed
up twister run.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:53:20 +01:00
Alberto Escolar Piedras a7ee8b2757 tests/drivers/adc: Switch to native_sim
Switch from native_posix to native_sim as default test platform.
For test with overlays, switch overlays and platform_allow from
native_posix to native_sim.
For tests without overlays, enable also in native_sim, and
set native_sim as integration platform.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:53:20 +01:00
Alberto Escolar Piedras c1fa9f736b tests/drivers kscan_input: Switch to native_sim
Switch from native_posix to native_sim as default test platform
And switch overlays to native_sim.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-22 09:53:20 +01:00
Fabio Baltieri 5e10cd9aee tests: build_all: input: test the 16 bit row option
Add a test case for the 16 bit row size option.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-22 09:52:39 +01:00
Abderrahmane Jarmouni ebf67b2cef test: drivers: adc_api: add overlay for STM32U5A9J
Add overlay for STM32U5A9J board to pass test in CI

Signed-off-by: Abderrahmane Jarmouni <abderrahmane.jarmouni-ext@st.com>
2023-11-21 08:44:34 +00:00
Daniel Leung 9a6e32f87c mm: rename struct mem_drv_bank to sys_mm_drv_bank
Simply to put them into correct namespace as the struct is
part of public API.

Signed-off-by: Daniel Leung <daniel.leung@intel.com>
2023-11-21 08:42:01 +00:00
Benedikt Schmidt 003c132de6 tests: drivers: gpio: add TLE9104 to the build_all tests
Add an instance of the TLE9104 to the build_all tests.

Signed-off-by: Benedikt Schmidt <benedikt.schmidt@embedded-solutions.at>
2023-11-20 10:44:38 +00:00
Fabio Baltieri b6a996d00a tests: build_all: input: drop a device nodelabel
Other entires don't have it, keep it uniform.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-20 10:22:33 +00:00
Fabio Baltieri b0940e6e25 tests: build_all: input: unify the gpio definitions
Clean up few build all device instances to use the test_gpio node and
different gpio numbers. Makes them somewhat more representative of what
an actual instance would look like.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-20 10:22:33 +00:00
Armando Visconti 194ee015f9 dt-bindings: sensor: iis2iclx: add macros for DT property setting
Add macros for setting in a clear way iis2iclx DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti 273475804e dt-bindings: sensor: lis2dh: add macros for DT properties setting
Add macros for setting in a clear way lis2dh DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti 6e09f91fec dt-bindings: sensor: iis2dlpc: add macros for DT properties setting
Add macros for setting in a clear way iis2dlpc DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti 0d68d9e493 dt-bindings: sensor: ism330dhcx: add macros for DT properties setting
Add macros for setting in a clear way ism330dhcx DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti 0b46f387f4 dt-bindings: sensor: lis2dw12: add macros for DT properties setting
Add macros for setting in a clear way lis2dw12 DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti 2fe89c1076 dt-bindings: sensor: lis2ds12: add macros for DT properties setting
Add macros for setting in a clear way lis2ds12 DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti a6cfa0bc15 dt-bindings: sensor: lps22df: add macros for DT properties setting
Add macros for setting in a clear way lps22df DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti b0f22dbafd dt-bindings: sensor: lps22hh: add macros for DT properties setting
Add macros for setting in a clear way lps22hh DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti 1fbd157c61 dt-bindings: sensor: lsm6dso16is: add macros for DT properties setting
Add macros for setting in a clear way lsm6dso16is DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti 0c3057edf4 dt-bindings: sensor: lsm6dso: add macros for DT properties setting
Add macros for setting in a clear way lsm6dso DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Armando Visconti e72baabe91 dt-bindings: sensor: lsm6dsv16x: add macros for DT properties setting
Add macros for setting in a clear way lsm6dsv16x DT properties.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-20 09:24:37 +01:00
Alberto Escolar Piedras ef346c2505 tests input/gpio_keys: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras e13acd2f29 tests fuel_gauge/sbs_gauge: Enable for native_sim
Enable for native_sim

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 3ff73f22a4 tests fuel_gauge/max17048: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras c6f5dbe8a7 tests fuel_gauge/bq27z746: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 64cb9a4540 tests/drivers/regulator/api: Enable for native_sim
Enable for native_sim.
and switch from native_posix to native_sim as default
test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras be8f4e104b tests/drivers espi: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 7d5772d2d6 tests/drivers/pinctrl/api: Enable for native_sim
Enable for native_sim.
and switch from native_posix to native_sim as default
test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras b85aef003c tests/drivers/build_all/sensor: Enable for native_sim
And switch from native_posix to native_sim as default
test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 1846fa6f2c tests/drivers ina237: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 5327ba38e5 tests/drivers ina230: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 75006ad9af tests/drivers akm09918c: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 5dbb71cc6f tests/drivers icm42688: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 3175a81da5 tests/drivers adltc2990: Switch from native_posix to native_sim
Switch from native_posix to native_sim as default test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Alberto Escolar Piedras 95bf611ac6 tests/drivers sbs_gauge: Switch from native_posix to native_sim
Switch from native_posix to native_sim as native test platform

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-20 09:20:59 +01:00
Piotr Wojnarowski 6670dbe834 tests: drivers: intc_plic: Add tests for register index and offset
Add a test to verify that the regression from
ffb8f31bff is fixed.

Signed-off-by: Piotr Wojnarowski <pwojnarowski@antmicro.com>
2023-11-20 09:20:13 +01:00
Andriy Gelman 0d1fa268bb drivers: clock_control: Add PWM clock device
Adds a clock control device for a PWM node, allowing the PWM
to be controlled using the clock control API.

It is a similar idea to the device driver in linux:
linux/Documentation/devicetree/bindings/clock/pwm-clock.yaml

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-20 09:18:44 +01:00
Ian Morris 4c92419546 drivers: sensor: hs300x: Add driver for Renesas HS300x sensors
Adds support for Renesas HS3001 and HS3003 temperature/humidity sensors
connected via an I2C bus.

Signed-off-by: Ian Morris <ian.d.morris@outlook.com>
2023-11-17 10:33:02 -06:00
Anas Nashif f25e2201a4 tests: fix various test identifiers
Fix a few inconsistent test identifiers.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-17 09:27:40 +01:00
Flavio Ceolin eb323be088 tests: smbus: Fix user mode usage
APIs that set callback don't have syscalls and their
tests have to run in supervisor mode.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
2023-11-17 09:22:05 +01:00
Andriy Gelman a34d4d1ce9 drivers: spi: xmc4xxx: Fix potential runtime error
Fixes an unhandled interrupt runtime crash if CONFIG_SPI_XMC4XXX_DMA=y and
CONFIG_SPI_XMC4XXX_INTERRUPT=n.

The unhandled interrupt error is triggered because irq_enable() was called
without calling IRQ_CONNECT() when CONFIG_SPI_XMC4XXX_INTERRUPT=n.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-16 09:26:50 +01:00
Armando Visconti d17b1c8cbb tests: build_all: sensor: fix i2c.dtsi typo
Fix lps22df i2c address in order to be unique.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-16 06:56:31 +00:00
Anas Nashif d94bdafda6 tests: clock_control: cleanup test tags and unify them
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 153e6d9dc7 tests: uart: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 743564e89e tests: dac: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 131aa56900 tests: i2c: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif d9d7e6a2f4 tests: watchdog: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 9ff81c1541 tests: pwm: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Anas Nashif 093f9a9df2 tests: adc: cleanup test tags
Remove platform specific tags and be consistent.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2023-11-15 07:51:08 -05:00
Fabio Baltieri 256bc860cf input: add a gpio based keyboard matrix driver
Add a GPIO based keyboard matrix driver using the generic keyboard
matrix code.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2023-11-15 11:41:25 +01:00
Krzysztof Chruściński 1ec05c4431 tests: drivers: Add dependency to UART runtime configuration
Force enabling of the UART runtime configuration in UART tests.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-15 10:02:18 +01:00
Henrik Brix Andersen c56bfb9d06 tests: drivers: can: shell: add tests for setting raw timing
Add CAN shell tests for the "timing" and "dtiming" subcommands.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-15 10:01:59 +01:00
Emil Gydesen 15cbe0f890 tests: Remove use of CONFIG_ZTEST_NEW_API
The test was enabling CONFIG_ZTEST_NEW_API which
was recently removed.

Signed-off-by: Emil Gydesen <emil.gydesen@nordicsemi.no>
2023-11-14 11:14:10 +01:00
Alberto Escolar Piedras 74d22a4b35 tests/drivers/eeprom: Several fixes and improvements
* Fix app path in documentation
* Move the at24 emulator overlays to be general instead of
  native_posix specific
* Switch default test platform from native_posix to native_sim
* From build only test, exclude platforms which are used
  in the build and run test.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 11:11:53 +01:00
Alberto Escolar Piedras 8d4d5184c6 tests/drivers/accel: Switch from native_posix to native_sim
Switch the overlays and default test platform to native_sim
from native_posix.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-14 11:11:53 +01:00
Jilay Pandya 8ebbd0227d sensors: tests: adi: increase coverage
This commit adds tests for various configurations of adltc2990

Signed-off-by: Jilay Pandya <jilay.pandya@zeiss.com>
2023-11-14 09:23:47 +01:00
Andrei Emeltchenko a3ff8d5b90 tests: samples: Add up_squared_pro_7000 overlay
Add up_squared_pro_7000 overlay for watchdog test and sample.

Signed-off-by: Andrei Emeltchenko <andrei.emeltchenko@intel.com>
2023-11-14 09:23:18 +01:00
Krzysztof Chruściński 8ba4249ef7 tests: drivers: uart: Add test for uart_async_rx
Add test for helper module for handling asynchronous RX.

Signed-off-by: Krzysztof Chruściński <krzysztof.chruscinski@nordicsemi.no>
2023-11-14 09:21:46 +01:00
Marc Desvaux 32e1d06a3c tests: drivers: i2c: i2c_target_api add nucleo_wb55rg
Adds necessary overlay nucleo_wb55rg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 16:54:42 -06:00
Marc Desvaux 3548ffe053 tests: drivers: i2c: i2c_target_api add nucleo_wb55rg
Adds nucleo_wb55rg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 16:54:42 -06:00
Marc Desvaux c1a6cfdf9b tests: drivers: i2c: i2c_target_api add b_u585i_iot02a
Adds necessary overlay b_u585i_iot02a in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 21:31:39 +00:00
Marc Desvaux 619d2fd887 tests: drivers: i2c: i2c_target_api add b_u585i_iot02a
Adds b_u585i_iot02a in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 21:31:39 +00:00
Marc Desvaux c19ba8ffe9 tests: drivers: i2c: i2c_target_api add stm32f3_disco
Adds necessary overlay stm32f3_disco in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 21:29:46 +00:00
Marc Desvaux 56dd8f90cd tests: drivers: i2c: i2c_target_api add stm32f3_disco
Adds stm32f3_disco in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-11-13 21:29:46 +00:00
Jeppe Odgaard a1b16d3151 tests: build_all: sensor: i2c: add explorir_m
Add ExplorIR-M uart node in the build_all tests.

Signed-off-by: Jeppe Odgaard <jeppe.odgaard@prevas.dk>
2023-11-13 12:14:08 -05:00
Lucas Denefle f9d0a4c5cf drivers: modem: add Quectel EG25-G
This commit introduces support for the modem EG25-G from Quectel.

Signed-off-by: Lucas Denefle <lucas.denefle@converge.io>
2023-11-13 10:10:15 -06:00
Armando Visconti f1f7e4712c drivers/sensor: add support to LPS22DF pressure sensor
The LPS22DF is an ultracompact, piezoresistive, absolute pressure sensor
that functions as a digital output barometer. The LPS22DF provides lower
power consumption, achieving lower pressure noise than its predecessor.
This driver is based on stmemsc HAL i/f v2.3

https://www.st.com/en/datasheet/lps22df.pdf

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-13 16:08:46 +00:00
Armando Visconti 0973531c94 tests: drivers: build_all: sensor: add I3C test framework
Add framework to test sensor drivers I3C conditional checkings.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-13 16:08:46 +00:00
Bartosz Bilas 39eb124c81 drivers: add MAX20335 charger driver
Add a MAX20335 MFD subdriver for the built-in
battery charger.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-13 09:48:33 +01:00
Nick Ward 2612aa02ce tests: drivers: build_all: gpio: add ads1145s0x testcase
This fixes multiple CI issues for the ads1145s0x
driver.

Having a special testcase for the driver limits the
CONFIG_ADC=y and CONFIG_ADC_INIT_PRIORITY adjustment
requirements.

Also fixes address not matching warning for pcal6416a@2

Signed-off-by: Nick Ward <nix.ward@gmail.com>
2023-11-13 09:46:48 +01:00
Ethan Duckett da4e3e713b drivers: adc: ltc2451: Add ltc2451 driver
Adds support for the Linear Technologies LTC2451 ADC.

Signed-off-by: Ethan Duckett <ethan.duckett@brillpower.com>
2023-11-13 09:43:05 +01:00
Andriy Gelman 6db785404a tests: drivers: uart_async_api: Be more robust to early buf release
Commit eb44414af9 modified
test_single_read for early rx buf release.

The commit assumed that tdata.last_rx_buf points to either &tdata.rx_buf[0]
if the driver releases the first buffer or at &rx_buf[5] if the first
buffer is not released. However, where tdata.last_rx_buf points to depends
on the timeout given to uart_rx_enable(), making the test flaky.

This commit modifies the test by keeping track how many bytes have been
received in the first and second buffers.
The function tdata_check_recv_buffer() validates that the sent data
matches the received bytes which may have been split between first and
second buffer.

This fixes the uart_async_api test on the xmc45_relax_kit.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-11-13 09:41:49 +01:00
Antoniu Miclaus 1088846e9a tests: build_all: sensor: add adxl367 trigger
Add trigger support for adxl367 build all sensor tests.

Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
2023-11-10 10:44:11 -06:00
Benjamin Deuter 329ef222dd tests: drivers: serial: async: Add support for stm32h735g_disco
On the STM32H735G-DK Discovery kit, when connecting a UART from
pin PF7 to PF6, the test uart_async_api passes now.

Signed-off-by: Benjamin Deuter <benjamin.deuter@gmail.com>
2023-11-10 10:41:23 +01:00
Declan Snyder fef0018cca soc: lpc55xxx: Support, enable, test NXP MRT
Support NXP MRT on LPC55XXX SOC series, enable on
lpcxpresso55s69_cpu0, add test overlay to counter basic api test

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-10 10:40:54 +01:00
Declan Snyder 8257ff8f6a tests: counter: Update for NXP MRT
Update counter test to test NXP MRT devices

Signed-off-by: Declan Snyder <declan.snyder@nxp.com>
2023-11-10 10:40:54 +01:00
Yong Cong Sin efd1073ceb tests: build_all: plic: multi instance
Add PLIC multi-instance build-only test.

Signed-off-by: Yong Cong Sin <ycsin@meta.com>
2023-11-09 18:20:43 +01:00
Bartosz Bilas f409f67db4 tests: drivers: adc: move ad5592-adc node into native_posix.overlay
Remove the `app.overlay` file which has been
wrongly added in ad3c5a2 commit. Instead of that
add the ad5592-adc node into `native_posix.overlay` file.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-09 11:23:14 +01:00
Manuel Argüelles db0ec23ba4 tests: samples: watchdog: add s32z270dc2_r52 rev.D
Twister treats board revisions as separate boards, so s32z270dc2_r52
revision D must be added to the filters.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-11-09 10:20:27 +00:00
Ioannis Karachalios 96a4300c6f tests: drivers: dma: Control testcases via Kconfig
Added Kconfig to control BURST16 and board config for da1469x_dk_pro.

Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
2023-11-09 10:17:29 +00:00
Gustavo Silva b4625d6f13 drivers: sensor: add tsl2561 basic support
Add basic support for ams TSL2561 light sensor. Triggers, attributes
and manual integration time are currently not supported.

Signed-off-by: Gustavo Silva <gustavograzs@gmail.com>
2023-11-09 10:16:51 +00:00
Erwan Gouriou 614df97a49 tests: counter_basic_api: Test subseconds on nucleo_wba52cg
Enable STM32 RTC subsecond test on nucleo_wba52cg.

Signed-off-by: Erwan Gouriou <erwan.gouriou@st.com>
2023-11-08 15:11:27 +00:00
Nazar Palamar 4fd732a738 drivers: wifi: added Infineon AIROC WIFI driver
Added initial version of Infineon AIROC WIFI  driver

Added initial version of binding file for Infineon AIROC WIFI
driver

Rename CONFIG_ABSTRACTION_RTOS_COMPONENT_ZEPHYR to
CONFIG_USE_INFINEON_ABSTRACTION_RTOS

Exclude cy8cproto_062_4343w platform from
drivers.modem.esp_at.build test

Change revision hal_infineon to
69c883d3bd9fac8a18dd8384624b8c472a68d06f

Signed-off-by: Nazar Palamar <nazar.palamar@infineon.com>
2023-11-08 15:07:37 +00:00
Bartosz Bilas 2c09999d24 drivers: dac: add driver for AD5592
Add MFD subdriver for the built-in DAC controller
in AD5592 chip.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-08 10:07:41 +01:00
Bartosz Bilas 0689d3dc11 drivers: gpio: add driver for AD5592
Add MFD subdriver for the built-in GPIO controller
in AD5592 chip.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-08 10:07:41 +01:00
Bartosz Bilas ad3c5a27b4 drivers: adc: add driver for AD5592
Add MFD subdriver for the built-in ADC controller
in AD5592 chip.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-08 10:07:41 +01:00
Bartosz Bilas 00badc243d tests: drivers: gpio: fix cs gpios reg property
Adjust the reg of the CS gpios to fix the warning
about the same value used for all existing nodes.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-07 09:54:38 +01:00
Daniel DeGrasse 0fc49b6290 tests: drivers: sdhc: add test for card insertion interrupt
Add test for card insertion interrupt to SDHC test.

The test will now wait for the card insertion interrupt whenever it is
run without a card in the slot. By inserting a card, the user can verify
that card insertion interrupts work correctly, as this should notify the
test and allow it to proceed.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-06 19:01:08 -05:00
Armando Visconti f39dba5da5 drivers/sensor: lsm6dsv16x: add in DT both INT1 and INT2 pin
Add in DT the possibility to configure both INT1 and INT2
pin. The driver will then assign one of the two (either 1
or 2, according to what value drdy_pin is set) to a gpio
for receiving drdy interrupts.

The other pin may be used in the future to receive event
interrupts.

Signed-off-by: Armando Visconti <armando.visconti@st.com>
2023-11-06 10:13:38 +01:00
Daniel DeGrasse 3cf254434d tests: drivers: spi: improve spi_loopback async test
Add the following improvements to the spi_loopback async test:
- Verify that a set of multiple spi_buf structures can be sent
  successfully
- Check that the contents of the RX and TX buffers match after transfer
  completion

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-11-03 11:46:35 +01:00
Mathieu Choplain 4750cbab1e tests: drivers/adc: Add STM32L4R9I-DISCO overlay
Adds the required overlay for test to build and
pass successfully on STM32L4R9I-DISCO board.

Signed-off-by: Mathieu Choplain <mathieu.choplain@st.com>
2023-11-03 11:44:55 +01:00
Bjarki Arge Andreasen b290ba806d tests: serial: uart: emul: Update isr rx/tx tests
The tests for ISR rx/tx must now be updated to send and
receive bytes in smaller chunks.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-03 11:44:12 +01:00
Bjarki Arge Andreasen d89cef7e19 tests: drivers: serial: emul: Synchronize UART ISR tx/rx
Add synchronization using semaphores for the UART ISR tx/rx
tests, instead of relying on a single k_yield() call to
ensure all UART ISR work can be completed before validating
the result.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-03 11:44:12 +01:00
Bjarki Arge Andreasen 54378c18e0 tests: drivers: serial: emul: Store buffers in fixture
Most tests define a buffer for UART data on the stack,
including the tests testing UART IRQ. Move buffers to
static memory, within the test fixture, which can then
be passed as the user_data to the UART IRQ callback.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-11-03 11:44:12 +01:00
Bartosz Bilas e87fd3165f drivers: regulator: add MAX20335 driver
Add a MAX20335 MFD subdriver to manage the built-in PMIC.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-11-02 20:32:40 +00:00
Alberto Escolar Piedras 90fec53381 tests nrf_rtc_timer: Avoid failures w NRF53_SYNC_RTC enabled
This test assumes it can use all configured
NRF_RTC_TIMER_USER_CHAN_COUNT,
But the sync RTC code uses one while it synchronizes.
Let's just disable it the sync rtc.

This fixes an issue where the test fails for a simulated
nrf5340.

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
2023-11-02 14:35:03 +01:00
Henrik Brix Andersen 043e6ecbf6 drivers: can: add accessor for the CAN bit error counter
Add accessor function for the CAN bit error counter.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-02 09:48:05 +01:00
Jeff Welder 9c51a26844 tests: build_all: modem: Add Telit ME910G1 Test Coverage
Added bindings to build_all test for new Telit ME910G1 Modem.

Signed-off-by: Jeff Welder <Jeff.Welder@ellenbytech.com>
2023-11-02 08:34:50 +00:00
Henrik Brix Andersen 5d5249d85b drivers: can: unify spelling of CAN Flexible Data-rate abbreviation
Unify spelling of CAN Flexible Data-rate abbreviation to "CAN FD" instead
of "CAN-FD". The former aligns with the CAN in Automation (CiA)
recommendation.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
2023-11-01 11:17:17 +00:00
Francois Ramu b432293a9a tests: drivers: flash stm32l4 RDP on internal flash partition
Define the storage_partition in the internal flash
instead of the external NOR qspi flash,
so the testcase can PASS on the disco_l4754_iot1 board.

Signed-off-by: Francois Ramu <francois.ramu@st.com>
2023-11-01 11:16:48 +00:00
Franciszek Zdobylak 0249f15767 tests: drivers: Fix adc labels in sensors test
Fix the labels used in io-channels to be consistent in whole
tests/drivers/build_all/sensor/adc.dtsi file.

Signed-off-by: Franciszek Zdobylak <fzdobylak@antmicro.com>
2023-10-30 12:51:20 -04:00
Bjarki Arge Andreasen d8bb7c87cf drivers: gnss: Add parsing utils for NMEA0183
This commit adds utilites to parse the RMC and GGA
NMEA0183 messages, which contain all data which shall be
published using the struct gnss_data.

It also adds a test suite for the added utilities.

Signed-off-by: Bjarki Arge Andreasen <bjarkix123@gmail.com>
2023-10-30 11:43:19 -04:00