Skip to content

Commit 0617bd3

Browse files
bjarki-andreasenkartben
authored andcommitted
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 <[email protected]>
1 parent 02bf44d commit 0617bd3

File tree

2 files changed

+57
-0
lines changed

2 files changed

+57
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2024 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_I2C_VIRTUAL=n
5+
CONFIG_BOOT_BANNER=n
6+
CONFIG_I2C_NRFX_TWIS_BUF_SIZE=256
7+
CONFIG_I2C_TARGET=y
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
i2c2_default: i2c2_default {
9+
group1 {
10+
psels = <NRF_PSEL(TWIS_SDA, 0, 26)>,
11+
<NRF_PSEL(TWIS_SCL, 0, 25)>;
12+
bias-pull-up;
13+
};
14+
};
15+
16+
i2c2_sleep: i2c2_sleep {
17+
group1 {
18+
psels = <NRF_PSEL(TWIS_SDA, 0, 26)>,
19+
<NRF_PSEL(TWIS_SCL, 0, 25)>;
20+
low-power-enable;
21+
};
22+
};
23+
};
24+
25+
&i2c2 {
26+
compatible = "nordic,nrf-twis";
27+
pinctrl-0 = <&i2c2_default>;
28+
pinctrl-1 = <&i2c2_sleep>;
29+
pinctrl-names = "default", "sleep";
30+
status = "okay";
31+
32+
eeprom0: eeprom@54 {
33+
compatible = "zephyr,i2c-target-eeprom";
34+
reg = <0x54>;
35+
address-width = <8>;
36+
size = <256>;
37+
};
38+
};
39+
40+
&i2c1 {
41+
zephyr,concat-buf-size = <256>;
42+
status = "okay";
43+
44+
eeprom1: eeprom@56 {
45+
compatible = "zephyr,i2c-target-eeprom";
46+
reg = <0x56>;
47+
address-width = <8>;
48+
size = <256>;
49+
};
50+
};

0 commit comments

Comments
 (0)