Skip to content

Commit

Permalink
tests: drivers: i2c: target api: add nrf5340 cpuapp
Browse files Browse the repository at this point in the history
Extend i2c_target_api test suite with the nrf5340 cpuapp, using the
new TWIS device driver.

Signed-off-by: Bjarki Arge Andreasen <bjarki.andreasen@nordicsemi.no>
  • Loading branch information
bjarki-andreasen authored and kartben committed Dec 20, 2024
1 parent 02bf44d commit 0617bd3
Show file tree
Hide file tree
Showing 2 changed files with 57 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0

CONFIG_I2C_VIRTUAL=n
CONFIG_BOOT_BANNER=n
CONFIG_I2C_NRFX_TWIS_BUF_SIZE=256
CONFIG_I2C_TARGET=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/

&pinctrl {
i2c2_default: i2c2_default {
group1 {
psels = <NRF_PSEL(TWIS_SDA, 0, 26)>,
<NRF_PSEL(TWIS_SCL, 0, 25)>;
bias-pull-up;
};
};

i2c2_sleep: i2c2_sleep {
group1 {
psels = <NRF_PSEL(TWIS_SDA, 0, 26)>,
<NRF_PSEL(TWIS_SCL, 0, 25)>;
low-power-enable;
};
};
};

&i2c2 {
compatible = "nordic,nrf-twis";
pinctrl-0 = <&i2c2_default>;
pinctrl-1 = <&i2c2_sleep>;
pinctrl-names = "default", "sleep";
status = "okay";

eeprom0: eeprom@54 {
compatible = "zephyr,i2c-target-eeprom";
reg = <0x54>;
address-width = <8>;
size = <256>;
};
};

&i2c1 {
zephyr,concat-buf-size = <256>;
status = "okay";

eeprom1: eeprom@56 {
compatible = "zephyr,i2c-target-eeprom";
reg = <0x56>;
address-width = <8>;
size = <256>;
};
};

0 comments on commit 0617bd3

Please sign in to comment.