New nrfx release brings change of Low frequency sources symbols
in nrf_clock hal to uppercase. This commit aligns all occurrences.
Signed-off-by: Adam Wojasinski <adam.wojasinski@nordicsemi.no>
Add the "modem" tag, which is already used in other
tests/samples using modems drivers, to ease filtering
of the modem drivers tests if somebody so desires.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Break two busy wait loops with a Z_SPIN_DELAY
(busy_wait() conditionally compiled for the posix arch)
so this test can also be run in the nrf52_bsim.
Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
Add the ability for the flash simulator to store its contents in a
memory region.
This allows filesystems on the flash simulator to survive a reboot.
And allows subsystems (e.g. coredump) to store their info on ram while
using the (existing) flash partition backend.
Add a example (for nucleo_f411re) that shows how to configure the flash
simulator for hardware (cfg discussion #54166).
Signed-off-by: Laczen JMS <laczenjms@gmail.com>
Add support for a generic NTC, `ntc-thermistor-generic`. In this case,
the compensation table is provided via devicetree. Note that DT property
is prefixed with `zephyr,`, because while hardware related, it is linked
to a particular software implementation.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Refactor driver to align a bit more with its Linux counterpart, ie,
ntc_thermistor. This driver did quite a few _unconventional_ things,
like using "zephyr," compatibles, a dedicated node for pre-computed
compensation table (referenced by the actual pseudo-device node), etc.
The comparison helper function should likely be simplified as well (to
avoid the need for custom wrapper for bsearch), but this can be done
later.
In this refactor, each thermistor gets a compatible, e.g. "epcos,xxxx".
Compatibles are known by the driver, so are compensation tables. This
simplifies devicetree files. There's no need to bother about
compensation tables in **every** board file if Zephyr supports a certain
NTC model.
In general we should respect Linux bindings, which in the end influence
how drivers are implemented. In this case, this principle resulted in
simplified, easier to use code.
For future developers, this is how support for a new NTC can be added:
1. Add to the end of the driver:
```c
#undef DT_DRV_COMPAT
#define DT_DRV_COMPAT vnd_model
static __unused const struct ntc_compensation comp_vnd_model[] = {
{ x, y },
...,
};
#define DT_INST_FOREACH_STATUS_OKAY_VARGS(NTC_THERMISTOR_DEV_INIT,
DT_DRV_COMPAT, comp_vnd_model)
```
3. In driver's Kconfig make sure it depends on
DT_HAS_$DT_DRV_COMPAT$_ENABLED
Note: $X$ means _value_ of X.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
It looks like the Zephyr thermistor driver bindings were half-copied
from Linux ntc-thermistor. Zephyr principle is to maintain compatibility
with Linux, when possible, so there's no reason to deviate here. Convert
the connection type from a custom enum to a boolean, as Linux does.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Move the build-only test for the MCP2515 CAN controller driver to the
tests/drivers/build_all/can/ folder.
Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
When attempting to add a new platform and run the suite with
`twister`, it seemed to be resulting in being statically
filtered-out. Likely, the correct filter is `test_dma0`,
assuming that `test_dma*` nodes should be enumerated starting
at 0.
Verified the fix by adding `dma` as `supported` to
`boards/arm64/bcm958402m2_a72/bcm958402m2_a72.yaml` and by
adding the `test_dma0` node to
`chan_blen_transfer/boards/bcm958402m2_a72.overlay`.
Signed-off-by: Chris Friedt <cfriedt@meta.com>
The test does not appear to support 64-bit DMA
* mitigate compiler warning
* support 64-bit addressing mode with `CONFIG_DMA_64BIT`
Signed-off-by: Chris Friedt <cfriedt@meta.com>
The test does not appear to support 64-bit DMA
* mitigate compiler warning
* support 64-bit addressing mode with `CONFIG_DMA_64BIT`
Signed-off-by: Chris Friedt <cfriedt@meta.com>
The test does not appear to support 64-bit DMA
* mitigate compiler warning
* support 64-bit addressing mode with `CONFIG_DMA_64BIT`
Signed-off-by: Chris Friedt <cfriedt@meta.com>
The test does not appear to support 64-bit DMA
* mitigate compiler warning
* support 64-bit addressing mode with `CONFIG_DMA_64BIT`
Signed-off-by: Chris Friedt <cfriedt@meta.com>
Some driver may need this information to implement a proper early
initialization procedure.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Remove all enabling of CONFIG_EMUL_.* in favor of automatically enabling
peripheral emulators based on the compatible string presence in the device
tree and the one true CONFIG_EMUL.
Zephyr has long since moved to a model of enabling drivers based on the
presence of their associated IC's compatible string in the final devicetree
overlay. There is no reason that emulators can't align in just the same
way, and probably ought to to remove superfluous enabling of configs.
Signed-off-by: Aaron Massey <aaronmassey@google.com>
- This includes the driver, test app, and sample app
- Only the boards\arm\cy8cproto_062_4343w board is supported for now
Signed-off-by: Bill Waters <bill.waters@infineon.com>
Add a build-only test for the NXP PCF8523 RTC driver since no in-tree
boards have this chip.
Signed-off-by: Henrik Brix Andersen <henrik@brixandersen.dk>
This patch adds support for the TI INA3221 current monitor.
This is the datasheet used for reference:
https://www.ti.com/lit/gpn/ina3221
Since this device has three channels, there is a custom attribute to
select which channel is to be used when getting a sample.
Measurements are done on all enabled channels.
Signed-off-by: Maximilian Deubel <maximilian.deubel@nordicsemi.no>
This patch modifies the existing loop transfer test to allow testing for
device power state changes when starting and stopping a transfer.
Signed-off-by: Tomasz Leman <tomasz.m.leman@intel.com>
In some cases, it may be desirable to not have thread-safe reference
counting. For example, when CONFIG_MULTITHREADING=n.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Add spi_cs_is_gpio(_dt) helpers to check whether SPI CS is controlled by
GPIO or not. This both improves code readability and isolates SPI
internals.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
As of today it is not possible to use SPI dt-spec macros in C++,
something known and documented. The main reason is because `cs` property
is initialized using a compound literal, something not supported in C++.
This PR takes another approach, that is to not make `cs` a pointer but a
struct member. This way, we can perform a regular initialization, at the
cost of using extra memory for unused delay/pin/flags if `cs` is not
used.
Fixes#56572
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
This file adds the board overlay file for the `efr32xg24_dk2601b` board
to enable the `drivers.adc` test on this board.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
Defines the overlay to Use the stm32 counter-timer in addition
to the rtc (if enabled)
to pass the tests/drivers/counter/counter_basic_api/
Enable all the possible timer nodes on each board.
Signed-off-by: Francois Ramu <francois.ramu@st.com>
This commit adds support for the `drivers.adc` test by adding an overlay
for the `efr32bg22_brd4184a` board.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
tests/drivers/spi/spi_loopback/drivers.spi.loopback on
adafruit_itsybitsy_m4_express fails to build. Fix it by adding
CONFIG_SPI_ASYNC=n.
Signed-off-by: Brandon Del Bel <delbel@umn.edu>
tests/drivers/spi/spi_loopback/drivers.spi.loopback on atsame54_xpro
fails to build. Fix it by adding a CS pin and DMA channels to the board
overlay. Passes on hardware with spi_loopback fixture after change.
Signed-off-by: Brandon Del Bel <delbel@umn.edu>
The fuel gauge tests should *not* have to enable CONFIG_SENSOR in order to
get access to the sbs gauge emulator.
Allow fuel_gauge sbs_gauge direct access to emul_sbs_gauge.c
Signed-off-by: Aaron Massey <aaronmassey@google.com>
The test suite was limited to the native_posix board,
now it is built and run for any board supported by CI.
The native_posix yaml files for both 32 and 64 bit
boards have been expanded to support rtc, allowing CI
to build and test the rtc_api test suite against the
native_posix and native_posix_64 boards.
Signed-off-by: Bjarki Arge Andreasen <baa@trackunit.com>
Remove redefinition of adc0 node in native_posix overlay
since it's now present in the board dts.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Rename adc node to not collide with the default adc
node now present in the native posix dts.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
Remove includes of adc dt-bindings header since these are
now already included in the root .dtsi file that adds an
adc node.
Signed-off-by: Benjamin Björnsson <benjamin.bjornsson@gmail.com>
- Add initial version of Infineon CAT1 i2c driver.
- Add initial version of binding file for Infineon
CAT1 I2C driver
Signed-off-by: Sreeram Tatapudi <sreeram.praveen@infineon.com>