-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: drivers: i2c: target api: add nrf5340 cpuapp
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
1 parent
02bf44d
commit 0617bd3
Showing
2 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
tests/drivers/i2c/i2c_target_api/boards/nrf5340dk_nrf5340_cpuapp.conf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
50 changes: 50 additions & 0 deletions
50
tests/drivers/i2c/i2c_target_api/boards/nrf5340dk_nrf5340_cpuapp.overlay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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>; | ||
}; | ||
}; |