Commit Graph

142 Commits

Author SHA1 Message Date
Pavlo Havrylyuk
166d89c69e tests: drivers: Added overlays to tests for 063_ble
Fixed pinout in adc overlays to align with board
Allowed adc driver sample
Added overlay for gpio_basic_api test support
Added overlay for i2c_api test support

Signed-off-by: Pavlo Havrylyuk <pavlo.havrylyuk@infineon.com>
2023-09-20 20:23:20 +01:00
Martin Jäger
fe1c341ae2 boards: arm: nucleo_f091rc: enable CAN support
This MCU has a classical CAN controller, which was previously not
enabled.

I2C2 is disabled by default because it uses the same pins as CAN and
there are no other free pins that can be used for CAN.

Signed-off-by: Martin Jäger <martin@libre.solar>
2023-09-11 11:09:26 +02:00
Marc Desvaux
927617a774 tests: drivers: i2c: i2c_target_api add nucleo_l152re
Adds necessary overlay nucleo_l152re in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 18:11:32 +02:00
Marc Desvaux
1cdcca13fe tests: drivers: i2c: i2c_target_api add nucleo_l152re
Adds nucleo_l152re in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 18:11:32 +02:00
Marc Desvaux
e8c9508b10 tests: drivers: i2c: i2c_target_api add nucleo_g474re
Adds necessary overlay nucleo_g474re in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 10:00:38 +02:00
Marc Desvaux
8606ab5df6 tests: drivers: i2c: i2c_target_api add nucleo_g474re
Adds nucleo_g474re in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-08-22 10:00:38 +02:00
Andriy Gelman
636fd6ad07 tests: i2c: i2c_target_api: Add configuration for xmc47_relax_kit
Adds configuration for xmc47_relax_kit board.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-08-16 20:43:50 +02:00
Andriy Gelman
d481ec286d driver: pintcrl: xmc4xxx: Revert recent changes from i2c driver
In commit 541482ff20 the pinctrl alternate
function mask was increased to also include open-drain setting.

Revert this change because open-drain can already be set via property
drive-open-drain.

The commit also added separate pinctrl nodes for the i2c controller and
target modes. However, the alternate function settings
is the same in both modes, so keep only one and remove the mode
label.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-08-16 20:43:50 +02:00
Andriy Gelman
d330d97997 dts: bindings: Rename compatible infineon,xmc4-i2c->infineon,xmc4xxx-i2c
To be consistent with other xmc4xxx drivers.

A few other device tree changes:
- Rename clock signal option as it's handled by DX1.
- Remove clock-frequency option as it's already added in
  i2c-controller.yaml, and interrupts is already defined as array
  in base.yaml.

Signed-off-by: Andriy Gelman <andriy.gelman@gmail.com>
2023-08-16 20:43:50 +02:00
Cong Nguyen Huu
b77d40d1fe tests: drivers: enable tests eeprom and i2c for mr_canhubk3
Enable tests: tests/drivers/eeprom/api,
tests/drivers/i2c/i2c_target_api.

Signed-off-by: Cong Nguyen Huu <cong.nguyenhuu@nxp.com>
2023-07-27 12:32:07 -05:00
Kai Meinhard
25c96b6434 i2c: Added efr32bg22_brd4184a to I2C target tests
Compiling I2C target test for efr32bg22_brd4184a board so
that i2c_gecko.c driver is used in target mode.

Signed-off-by: Kai Meinhard <kaimeinhard@hotmail.de>
2023-07-25 10:44:47 +02:00
Tim Lin
cc5c141fb1 test: drivers: i2c_target_api: Add I2C target mode support for it8xxx2
Add I2C target mode support for it8xxx2 I2C driver. Verified with
i2c_target_api test on it8xxx2_evb.

Signed-off-by: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2023-07-11 15:50:13 +02:00
Aymeric Aillet
1ddc41e7dd drivers: i2c: tca954x: Add build assert avoiding prio issues
In order for TCA954X driver to work well, we know that
mux root must be initialized before channels.
(see #37786).

This commit is:
- Ensuring that this condition is met at build.
- Document needed values for menuconfig to help user.
- Edit these values for TCA954X test sample

Fixes #40833

Signed-off-by: Aymeric Aillet <aymeric.aillet@iot.bzh>
2023-07-11 14:46:23 +02:00
Bill Waters
541482ff20 driver: i2c: infineon: Adding XMC4 I2C driver
- This includes the driver, test app, and sample app
- Only the boards\arm\xmc47_relax_kit board is supported for now

Signed-off-by: Bill Waters <bill.waters@infineon.com>
2023-07-11 09:43:19 +02:00
Daniel DeGrasse
903cfc8f15 boards: arm : mimxrt1170_evkb: add support for I2C
Add support for I2C on RT1170 EVKB, verified using I2C target API test.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-06-29 21:05:56 +02:00
Marc Desvaux
abc5f4cad2 tests: drivers: i2c: i2c_target_api add nucleo_f746zg
Adds necessary overlay nucleo_f746zg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:43 +00:00
Marc Desvaux
bcc737dc2c tests: drivers: i2c: i2c_target_api add nucleo_f746zg
Adds nucleo_f746zg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:43 +00:00
Marc Desvaux
c96b78663c tests: drivers: i2c: i2c_target_api add nucleo_l073rg
Adds necessary overlay nucleo_l073rg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:16 +00:00
Marc Desvaux
74d0ea0eb6 tests: drivers: i2c: i2c_target_api add nucleo_l073rg
Adds nucleo_l073rg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 16:38:16 +00:00
Marc Desvaux
0a71da1e3f tests: drivers: i2c: i2c_target_api add nucleo_wl55jc
Adds necessary overlay nucleo_wl55jc in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 12:11:29 +00:00
Marc Desvaux
c7c6ce4d13 tests: drivers: i2c: i2c_target_api add nucleo_wl55jc
Adds nucleo_wl55jc in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-27 12:11:29 +00:00
Marc Desvaux
eecf1ed84b tests: drivers: i2c: i2c_target_api add nucleo_f429zi
Adds necessary overlay nucleo_f429zi in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-20 09:26:43 +02:00
Marc Desvaux
427f5ef1ee tests: drivers: i2c: i2c_target_api add nucleo_f429zi
Adds nucleo_f429zi in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-20 09:26:43 +02:00
Marc Desvaux
beaa5e98a6 tests: i2c: i2c_slave_api add comment for nucleo_f091rc
Adds comment for overlays for nucleo_f091rc in i2c_slave_api test case.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-20 09:26:43 +02:00
Marc Desvaux
d5123bfe21 tests: drivers: i2c: i2c_target_api add nucleo_f207zg
Adds necessary overlay nucleo_f207zg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-17 07:35:43 -04:00
Marc Desvaux
c3690a7d62 tests: drivers: i2c: i2c_target_api add nucleo_f207zg
Adds nucleo_f207zg in i2c_target_api test case
to enables the board.

Signed-off-by: Marc Desvaux <marc.desvaux-ext@st.com>
2023-06-17 07:35:43 -04:00
Mulin Chao
42a509b812 driver: npcx: i2c: add i2c target mode support for npcx i2c drivers
Add I2C target mode support for NPCX i2c driver. Verified with
i2c_target_api test suite on npcx9m6_evb.

Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
2023-05-25 16:32:07 -04:00
Daniel DeGrasse
d2465dc607 boards: arm: mixmrt1040_evk: enable RT1040 EVK I2C support
Enable support for RT1040 EVK. This support was verified using the I2C
target test.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-05-11 10:35:40 -05:00
Gerard Marull-Paretas
93b63df762 samples, tests: convert string-based twister lists to YAML lists
Twister now supports using YAML lists for all fields that were written
as space-separated lists. Used twister_to_list.py script. Some artifacts
on string length are due to how ruamel dumps content.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2023-05-10 09:52:37 +02:00
Sreeram Tatapudi
185aa1c2c5 drivers: i2c: Add Infineon CAT1 i2c driver
- 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>
2023-04-20 10:44:18 +02:00
Bartosz Bilas
2b4a6e52d5 drivers: i2c: eeprom_target: switch to dedicated driver compatible
Create and use a new `zephyr,i2c-target-eeprom` compatible
within I2C  eeprom target driver that allows to use
that driver along with real atmel at24 EEPROM simultaneously.

Signed-off-by: Bartosz Bilas <b.bilas@grinn-global.com>
2023-02-21 18:03:11 -05:00
Daniel DeGrasse
0c2808e62d tests: drivers: i2c_target_api: enable i2c_target_api test for RT1060
Enable RT1060 target API test for RT1060. The LPI2C does not support
dual controller/target operation, so LPI2C3 is used as the controller
while LPI2C1 implements the target device.

Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
2023-01-19 10:16:13 +01:00
TOKITA Hiroshi
a04f1aafaf tests: drivers: i2c: i2c_target_api: Fix i2c1 configuration for rpi_pico
Add `i2c1` configuration that removed from common settings to overlay file.

Signed-off-by: TOKITA Hiroshi <tokita.hiroshi@fujitsu.com>
2023-01-17 11:30:52 +01:00
Anas Nashif
ba7d730e9b tests/samples: use integration_plaforms in more tests/samples
integration_platforms help us control what get built/executed in CI and
for each PR submitted. They do not filter out platforms, instead they
just minimize the amount of builds/testing for a particular
tests/sample.
Tests still run on all supported platforms when not in integration mode.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2022-11-29 16:03:23 +01:00
Hu Zhenyu
237f317eec tests: Add the test case of GY271 on I2C0 of it8xxx2_evb
Add the alias of GY271 in it8xxx2_evb.overlay. Modify the
testcase.yaml, as the GY271 is magnetic sensor, not accelerometer
and remove the harness.

Signed-off-by: Hu Zhenyu <zhenyu.hu@intel.com>
2022-10-26 12:01:59 +02:00
Thomas Stranger
1c411cc7f0 tests: drviers: remove superfluous source files
During rebase two test main source files, that were removed during the
transition to the new ztest api, were accidetally added again.

First Removed in #49509 and #49554.
This commit removes them again.

Signed-off-by: Thomas Stranger <thomas.stranger@outlook.com>
2022-09-12 10:54:18 +00:00
Michał Barnaś
dae8efa692 ztest: remove the obsolete NULL appended to zassert macros
This commit removes the usage of NULL parameter as message in
zassert_* macros after making it optional

Signed-off-by: Michał Barnaś <mb@semihalf.com>
2022-09-09 07:05:38 -04:00
Gerard Marull-Paretas
79e6b0e0f6 includes: prefer <zephyr/kernel.h> over <zephyr/zephyr.h>
As of today <zephyr/zephyr.h> is 100% equivalent to <zephyr/kernel.h>.
This patch proposes to then include <zephyr/kernel.h> instead of
<zephyr/zephyr.h> since it is more clear that you are including the
Kernel APIs and (probably) nothing else. <zephyr/zephyr.h> sounds like a
catch-all header that may be confusing. Most applications need to
include a bunch of other things to compile, e.g. driver headers or
subsystem headers like BT, logging, etc.

The idea of a catch-all header in Zephyr is probably not feasible
anyway. Reason is that Zephyr is not a library, like it could be for
example `libpython`. Zephyr provides many utilities nowadays: a kernel,
drivers, subsystems, etc and things will likely grow. A catch-all header
would be massive, difficult to keep up-to-date. It is also likely that
an application will only build a small subset. Note that subsystem-level
headers may use a catch-all approach to make things easier, though.

NOTE: This patch is **NOT** removing the header, just removing its usage
in-tree. I'd advocate for its deprecation (add a #warning on it), but I
understand many people will have concerns.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-09-05 16:31:47 +02:00
Enjia Mai
58c032580e tests: drivers: i2c: move the gy271 test to new ztest API
Migrate the testsuite tests/drivers/i2c/i2c_api to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-31 21:54:28 +00:00
Enjia Mai
7ef10a8d90 tests: drivers: i2c: move the tca954x test to new ztest API
Migrate the testsuite tests/drivers/i2c/i2c_tca954x to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-31 21:54:28 +00:00
Enjia Mai
0b4f7463de tests: drivers: i2c: move the eeprom target test to new ztest API
Migrate the testsuite tests/drivers/i2c/i2c_target_api to the new
ztest API.

Signed-off-by: Enjia Mai <enjia.mai@intel.com>
2022-08-31 21:54:28 +00:00
Gerard Marull-Paretas
a202341958 devices: constify device pointers initialized at compile time
Many device pointers are initialized at compile and never changed. This
means that the device pointer can be constified (immutable).

Automated using:

```
perl -i -pe 's/const struct device \*(?!const)(.*)= DEVICE/const struct
device *const $1= DEVICE/g' **/*.c
```

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2022-08-22 17:08:26 +02:00
Fabio Baltieri
def230187b test: fix more legacy #include paths
Add a bunch of missing "zephyr/" prefixes to #include statements in
various test and test framework files.

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
2022-08-02 16:41:41 +01:00
Kumar Gala
4d49ba67b5 i2c: remove defconfig/proj setting of I2C drivers
Now that I2C drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-08-01 18:01:44 +02:00
Kumar Gala
37b16e62ab tests: i2c: Remove label property from devicetree overlays
"label" properties are not required.  Remove them from tests.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-20 09:31:17 -05:00
Tim Lin
361e6e5fec tests: drivers: i2c_api: Convert to use DEVICE_DT_GET
This PR is related to #47464, missing the fix of device_get_binding
in the test_burst_gy271 function.

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: Tim Lin <tim2.lin@ite.corp-partner.google.com>
2022-07-12 09:55:02 +02:00
Kumar Gala
55df2bf08f tests: i2c_target_api: use DEVICE_DT_GET
Convert test to use DEVICE_DT_GET instead of device_get_binding
to help phase out use of DT_LABEL/DT_BUS_LABEL.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:20:39 +02:00
Kumar Gala
b161a013c1 tests: i2c_tca954x: remove dead code
I2C_x_CTRL_DEV_NAME defines are not used, so remove them.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-07 10:05:18 +02:00
Kumar Gala
b20613d650 tests: drivers: i2c_api: Convert 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-07 10:04:00 +02:00
Kumar Gala
2ddf2fa8b8 tests: i2c_target_api: Fix project name
In renaming of I2C terminology this project name in CMakeLists.txt
got missed.  Should be i2c_target_api.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-06-29 21:13:16 -04:00