diff --git a/tests/drivers/i2c/i2c_target_api/boards/nrf5340dk_nrf5340_cpuapp.conf b/tests/drivers/i2c/i2c_target_api/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000..935827e4233 --- /dev/null +++ b/tests/drivers/i2c/i2c_target_api/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -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 diff --git a/tests/drivers/i2c/i2c_target_api/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/drivers/i2c/i2c_target_api/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000..42bd62733b3 --- /dev/null +++ b/tests/drivers/i2c/i2c_target_api/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2024 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&pinctrl { + i2c2_default: i2c2_default { + group1 { + psels = , + ; + bias-pull-up; + }; + }; + + i2c2_sleep: i2c2_sleep { + group1 { + psels = , + ; + 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>; + }; +};