Commit Graph

1082 Commits

Author SHA1 Message Date
Kumar Gala
8ef75576f0 tests: build_all: sensor: Add a few missing sensors
Add some sensors that are currently missing from being built
to the list.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-24 11:03:56 -05:00
Krishna Mohan Dani
f4310dd22c tests/drivers: disco_l475_iot1: Enabling soc-flash support in overlays.
This commit enables soc-flash support in disco_l475_iot1
only for flash test. Using overlays, it adds soc-flash storage
partition and deletes qspi-flash storage parition for
flash test. Both flash test and spi_flash application
has been tested on disco_l475_iot1 platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-06-22 08:21:21 -04:00
Krishna Mohan Dani
cca1f3a45b tests/drivers: stm32f746g_disco: Enabling soc-flash support in overlays
This commit enables soc-flash support in stm32f746g_disco only for
flash test. Using overlays, it adds soc-flash storage partition and
deletes qspi-flash storage partition for flash test. Both flash test and
spi_flash application has been tested on stm32f746g_disco platform.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-06-22 08:20:32 -04:00
Erwan Gouriou
3e1443ccf9 scripts/pylib: expr_parser.py: Review dt_compat_enabled_with_label
Function used for filtering "dt_compat_enabled_with_label" was not
working as expected as it was not taking into account that we're
looking for a children/parent combination:
Provided "compat" with enabled status should be the one of the parent
of the node matching given label.

Function is then reworked to take this into account.
And to make it's usage clear:
- function name is changed to be clearer on the intention
- args order is reversed to be more logical wrt the intention

Users of the function are also updated to take the change into
account.

Fixes #36093

Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-06-21 20:31:49 -04:00
Kumar Gala
6c5ff82fc9 tests: drivers: build_all: sensor: simplify configs
Now that we only build on native_posix, we can build all the sensors
together in one pass.  This makes it easier to manage the conf files
going forward.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-21 10:08:24 -05:00
Kumar Gala
d6baea5034 tests: drivers: build_all: sensor: build only a native_posix
The driver build_all tests only need to build a driver once and
so limit the sensor tests to only build on native_posix.

We tweak CONFIG_SYS_CLOCK_TICKS_PER_SEC as part of this change as
hp206c requires this setting to build.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-21 10:08:24 -05:00
Kumar Gala
a6c7569733 tests: build_all: dac: Add a test to build each DAC driver
Add a tests that builds each DAC driver just once.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-21 07:04:15 -05:00
Kumar Gala
7b6eff0d9a tests: build_all: pwm: Add a test to build each PWM driver
Add a tests that builds each PWM driver just once.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-18 07:56:22 -05:00
Aurelien Jarno
13416c584b tests: build_all: sensor: add I2C version of the MS5607 device
Add the I2C version of the MS5607 (the SPI version was already enabled)
so that it gets compiled tested.

Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
2021-06-18 11:23:07 +02:00
Kumar Gala
082b5b683b tests: build_all: adc: Add a test to build each ADC driver
Add a tests that builds each ADC driver just once.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 17:26:11 -04:00
Kumar Gala
4d7e76ec4c tests: build_all: adc: build all ADC SPI drivers
Enable building the LMP90xxx driver (move devicetree nodes over from the
sensors/spi.dtsi).  Limit to building on a single platform as this
is just making sure the drivers compile.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 17:26:11 -04:00
Kumar Gala
55e1cfebcc tests: drivers: hwinfo: Cleanup testcase.yaml
The testcase.yaml had multiple tests defined but they didn't do anything
different.  Remove the duplication and rename to drivers.hwinfo.api.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-11 16:23:05 -05:00
Hake Huang
622a8e8256 usrt: basic_test: NOSYS return update for cases
NOSYS represent not support, so update case check

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-06-11 17:39:42 +02:00
Krishna Mohan Dani
71192fb821 drivers/dac: stm32: Enabling DAC Loopback tests for stm32f3_disco
This commit enables dac_loopback to build and run on stm32f3_disco
platform.
This has been tested with twister and also as a standalone
dac_loopback test and is working as expected.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-06-10 16:00:04 -05:00
Krishna Mohan Dani
c5fa10d26e drivers/dac: stm32: Enabling DAC tests for stm32f3_disco
This commit enables test_dac to build and run on stm32f3_disco
platform.
This has been tested with twister and also as a standalone test_dac
test and is working as expected.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-06-10 16:00:04 -05:00
Kumar Gala
9fd51225fc tests: drivers: build_all: Remove stale files
Now that we've split out the build_all test there are a few left
over files that aren't needed any more.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
c8205c41ba tests: drivers: build_all: split xlnx pwm/counter test out
Move xlnx pwm/counter tests to their own directories.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
a6b1f6c618 tests: drivers: build_all: split led test out
Move led tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
a4a685b9f8 tests: drivers: build_all: split gpio test out
Move gpio tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
91a2d53e9c tests: drivers: build_all: split ethernet test out
Move ethernet tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
c28b678d24 tests: drivers: build_all: split eeprom test out
Move eeprom tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
89c1ec2028 tests: drivers: build_all: split dac test out
Move dac tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
fcfecd05ed tests: drivers: build_all: split adc test out
Move adc tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
03235bb322 tests: drivers: build_all: split modem test out
Move modem tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
4ed2dc791d tests: drivers: build_all: split sensor test out
Move sensor tests to their own directory.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Kumar Gala
73695fa3c2 tests: drivers: build_all: cleanup test
The clock control & general driver build tests as they don't get
us any additional coverage then from what we get from the build all
test of tests/kernel/common/kernel.common on all platforms.

Additionally, remove drivers.conf as the file isn't used in any tests.

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2021-06-09 09:17:35 -05:00
Arvin Farahmand
98a0ccd5c5 drivers: hwinfo: Add reset cause support
Add `hwinfo_get_reset_cause` and `hwinfo_clear_reset_cause` to retrieve
and to clear cause of system reset on supported platforms.

Different platforms can provide different causes of reset, however
there is a great deal of overlap. `enum reset_cause` can be expanded in
the future to support additional reasons, as additional platforms are
supported.

Signed-off-by: Arvin Farahmand <arvinf@ip-logix.com>
2021-06-08 10:16:17 +02:00
Mulin Chao
cfbd9ea437 board: npcx: add npcx9m6f_evb board.
Introduce the npcx9m6f_evb board driver. NPCX9M6F_EVB board is a
development platform to evaluate the Nuvoton NPCX9 series
microcontrollers. This board needs to be mated with part number
NPCX996F.

It also includes:
 1. Add CONFIG_BOARD_NPCX9M6F_EVB definition for adc test suite.
 2. Add npcx7m6f_evb.overlay file for gpio test suite.

Signed-off-by: Jun Lin <CHLin56@nuvoton.com>
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2021-06-08 00:40:14 -04:00
Alexandre Bourdiol
e53e5448ee tests: drivers: watchdog: Pause during debugging
Enable the option to pause the watchdog if the MCU is halted by a
debugger.

Signed-off-by: Alexandre Bourdiol <alexandre.bourdiol@st.com>
2021-06-07 23:53:03 -04:00
Kieran Mackey
a41fc5165a baords: bl5340_dvk: Add MCP4725 dac to bl5340_dvk_cpuapp dts file
MCP4725 is an I2C dac that was added with PR #33481. This can now be
added to the bl5340_dvk device tree.

Signed-off-by: Kieran Mackey <kieran.mackey@lairdconnect.com>
2021-06-07 09:00:28 -05:00
Krishna Mohan Dani
eb20304c5c drivers/flash: STM32: A generic change and enabling flash support.
This commit makes the flash test generic. The flast test will
look for storage partition in the soc-flash for testing.

Signed-off-by: Krishna Mohan Dani <krishnamohan.d@hcl.com>
2021-06-07 12:03:43 +02:00
Mahesh Mahadevan
a02704bacf tests: i2s_speed: Increase the RX buffer count
The NXP I2S driver queues 2 receive buffers to avoid receive overflows.
Allocate an extra block so we do not see test failures due to allocate
failures

Signed-off-by: Mahesh Mahadevan <mahesh.mahadevan@nxp.com>
2021-06-03 14:14:24 -05:00
Andrzej Głąbek
ea7d95a596 tests: drivers: i2s_api: Fix MPU fault in user mode
Use ZTEST_DMEM macro to place the buffers containing sample values
in the ztest memory partition that can be accessed from userspace.

Signed-off-by: Andrzej Głąbek <andrzej.glabek@nordicsemi.no>
2021-05-25 12:57:38 -05:00
Hake Huang
f6c338d600 test: dma: assign correct LPC dma engine channel for test
LPC dma channel 32/31 is for memory to memory.

Fixing: #34909

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-25 09:57:21 -05:00
Krzysztof Chruscinski
eb949d01d3 tests: drivers: uart: Add test for uart power management
Added test which validates that uart device correctly handles
going to and from low power state.

Signed-off-by: Krzysztof Chruscinski <krzysztof.chruscinski@nordicsemi.no>
2021-05-21 04:53:19 -05:00
Simon Guinot
54d3f136ec tests: drivers: dma: enable tests on nucleo_f070rb
This patch enables the DMA chan_blen_transfer and loop_transfer tests on
the nucleo_f070rb board.

Signed-off-by: Simon Guinot <simon.guinot@seagate.com>
2021-05-20 13:24:18 -05:00
Henrik Brix Andersen
34904e567b boards: arm: lpcxpresso55s16: rename board definition
Rename the NXP LPCXpresso55S16 board definition from
lpcxpresso55s16_ns (non-secure) to lpcxpresso55s16 and remove TF-M
configuration options.

While the LPC55S16 does have Arm TrustZone support, there is no TF-M
support available upstream yet.

Fixes #35100

Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
2021-05-19 08:02:54 -05:00
Sidhdharth Yadav
85a6179f7b tests: drivers: Assign prescaler value to 10000
This commit modifies st prescaler value from 0 to 10000 for
STM32 nucleo_f207zg. So pwm_api test results in successful
execution on nucleo_f207zg board.

Signed-off-by: Sidhdharth Yadav <sidhdharth.yadav@hcl.com>
2021-05-19 07:47:45 -05:00
Bob Recny
8039ab4887 boards: arm: Modify BMD-345-EVAL support
Modify support for u-blox BMD-345-EVAL which uses the nRF52840
and a Skyworks RFX2411 FEM.

These edits follow the naming cnoventions that is used
with the other u-blox EVKs recently added, or in progress

This board is similar to the nRF52840dk_nrf52840 with the
addition of a FEM. Four Arduino GPIO pins have been
reassigned to the PA_LNA control pins.

u-blox would prefer to use this naming convention to match
other BMD-3xx-EVAL and EVK-NINA-Bx boards recently submitted.

Tested with blinky, button, and Bluetooth peripheral_hr
Checking dts files
Updated CODEOWNERS to rename bmd_345_eval to ubx_bmd345eval_nrf52840
Added CMakeLists.txt, updated board.c

Signed-off-by: Bob Recny <bob.recny@u-blox.com>
2021-05-18 11:26:31 -05:00
Hake Huang
437a5b6028 tests: flash: Enable flash driver and file system tests on mimxrt1060_evk
now the XIP feature can work in NXP RT series boards
so enable below cases on mimxrt1060_evk with XIP
tests/kernel/xip
tests/drivers/flash
tests/subsys/fs/littlefs
samples/shell/fs
samples/subsys/fs/littlefs

for tests/subsys/fs/littlefs:
need add --erase to erase the nor flash if you are using below partition
e.g. west flash --runner=pyocd --erase
&is25wp064 {
        partitions {
                compatible = "fixed-partitions";
                #address-cells = <1>;
                #size-cells = <1>;

                partition@310000 {
                        label = "large";
                        reg = <0x00310000 DT_SIZE_M(3)>;
                };
                partition@610000 {
                        label = "image-scratch";
                        reg = <0x00610000 DT_SIZE_K(128)>;
                };
                partition@630000 {
                        label = "small";
                        reg = <0x00630000 DT_SIZE_K(64)>;
                };
                partition@640000 {
                        label = "medium";
                        reg = <0x00640000 DT_SIZE_K(960)>;
                };
        };
};

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-18 11:19:15 -05:00
Hake Huang
53b8706f05 adc_emul: case can not run on native_posix board
we meet hardfault when run on real board.
as the device is a virtual device

I: adc init done

*** Booting Zephyr OS build zephyr-v2.5.0-3761-g730acbd6ed85  ***

Running test suite adc_basic_test

===================================================================

START - test_adc_emul_single_value

E: ***** BUS FAULT *****

E:   Precise data bus error

E:   BFAR Address: 0x20002d00

E:   NXP MPU error, port 3

E:     Mode: User, Data Address: 0x20002d00

E:     Type: Read, Master: 0, Regions: 0x8100

E: r0/a1:  0x20002cfc  r1/a2:  0x00000000  r2/a3:  0x000005dc

E: r3/a4:  0x00000040 r12/ip:  0x0000c67d r14/lr:  0x00001319

E:  xpsr:  0x41000000

E: Faulting instruction address (r15/pc): 0x000045c6

E: >>> ZEPHYR FATAL ERROR 0: CPU exception on CPU 0

E: Current thread: 0x200000e0 (unknown)

E: Halting system

Fixes #35027

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-11 09:23:03 -05:00
Eug Krashtan
05d798e3a9 drivers: sensor: STM32 die temperature driver
STM32 internal temperature sensor driver.
This sensor can be used to measure the temperature of the CPU
and its surroundings.

Signed-off-by: Eug Krashtan <eug.krashtan@gmail.com>
2021-05-08 10:18:09 -05:00
Alexander Wachter
3b2fd1ca0d tests: driver: can: canfd: Add CAN-FD tests
This commit adds tests for CAN-FD frames.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-05-07 12:36:10 -05:00
Alexander Wachter
4b722b0efc tests: driver: can: api: Enhanced tests to check dispatching
This commit enhances the CAN API test. In the send_receive tests,
we are using two filters and frames at the same time to check
if the frame gets dispatched to the correct filter.

Signed-off-by: Alexander Wachter <alexander@wachter.cloud>
2021-05-07 12:36:10 -05:00
Tomasz Michalec
d83647dea6 drivers: adc: add ADC emulator
ADC emulator is designed to be used in tests on native_posix board. It
supports 1-16 bit resolution range and all GAINs from enum adc_gain.
Reference voltages and number of emulated channels are set through dts.
Using special API from drivers/adc/adc_emul.h it is possible to set
constant voltage value returned by given ADC channel or set custom
function which allows to simulate complex output.
Also reference voltages can be changed in runtime using the API.

The CL also includes:
- Add adc definitions of ADC emulator in
  tests/drivers/adc/adc_api/src/test_adc.c for supporting test suites.
- Add test for ADC emulator API in tests/drivers/adc/adc_emul/

Signed-off-by: Tomasz Michalec <tm@semihalf.com>
2021-05-07 15:27:37 +02:00
Hake Huang
c1a17cfd89 test: add adc_dma test application
add adc_dma test application
enable periodic_trigger flag for adc edma

enable for frdm_k64f and frdm_k82f

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
Hake Huang
77f27ac158 test: update adc_api case to support frdm_k82f
add frdm_k82f adc settings

Signed-off-by: Hake Huang <hake.huang@oss.nxp.com>
2021-05-07 08:23:49 -05:00
MORGER Patrick
0e1d16bf03 drivers: sensors: smart-battery with SBS 1.1 compliant fuel gauge
Implementation of a SBS 1.1 compliant fuel gauge driver

Signed-off-by: MORGER Patrick <patrick.morger@leica-geosystems.com>
2021-05-07 07:55:23 -05:00
Erwan Gouriou
125d82a84c tests/drivers: gpio: Add support for stm32l562e_dk
Required for board testing


Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2021-05-06 14:31:13 -04:00
Jamie McCrae
498f964bd2 boards: bl654_sensor_board
Add BL654 Sensor Board files

Signed-off-by: Jamie McCrae <jamie.mccrae@lairdconnect.com>
2021-05-06 18:36:02 +02:00