Skip to content

Commit 8a915ca

Browse files
mstasiaknordicnordic-piks
authored andcommitted
tests: i2c: add nRF54LS05B support
Added support for nRF54LS05B in i2c tests. Signed-off-by: Michał Stasiak <[email protected]>
1 parent 94fc9df commit 8a915ca

File tree

11 files changed

+250
-0
lines changed

11 files changed

+250
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_I2C_NRFX_TWIS_BUF_SIZE=256
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/ {
2+
aliases {
3+
i2c-controller = &i2c21;
4+
i2c-controller-target = &i2c22;
5+
};
6+
};
7+
8+
&pinctrl {
9+
i2c21_default: i2c21_default {
10+
group1 {
11+
psels = <NRF_PSEL(TWIS_SDA, 1, 8)>,
12+
<NRF_PSEL(TWIS_SCL, 1, 14)>;
13+
bias-pull-up;
14+
};
15+
};
16+
17+
i2c21_sleep: i2c21_sleep {
18+
group1 {
19+
psels = <NRF_PSEL(TWIS_SDA, 1, 8)>,
20+
<NRF_PSEL(TWIS_SCL, 1, 14)>;
21+
low-power-enable;
22+
};
23+
};
24+
25+
i2c22_default: i2c22_default {
26+
group1 {
27+
psels = <NRF_PSEL(TWIS_SDA, 1, 9)>,
28+
<NRF_PSEL(TWIS_SCL, 1, 15)>;
29+
bias-pull-up;
30+
};
31+
};
32+
33+
i2c22_sleep: i2c22_sleep {
34+
group1 {
35+
psels = <NRF_PSEL(TWIS_SDA, 1, 9)>,
36+
<NRF_PSEL(TWIS_SCL, 1, 15)>;
37+
low-power-enable;
38+
};
39+
};
40+
};
41+
42+
&i2c21 {
43+
pinctrl-0 = <&i2c21_default>;
44+
pinctrl-1 = <&i2c21_sleep>;
45+
pinctrl-names = "default", "sleep";
46+
zephyr,concat-buf-size = <256>;
47+
status = "okay";
48+
};
49+
50+
&i2c22 {
51+
compatible = "nordic,nrf-twis";
52+
pinctrl-0 = <&i2c22_default>;
53+
pinctrl-1 = <&i2c22_sleep>;
54+
pinctrl-names = "default", "sleep";
55+
status = "okay";
56+
};

samples/zephyr/drivers/i2c/rtio_loopback/sample.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ common:
1515
tests:
1616
nrf.extended.sample.drivers.i2c.rtio_loopback:
1717
platform_allow:
18+
- nrf54ls05dk/nrf54ls05b/cpuapp
19+
- [email protected]/nrf54ls05b/cpuapp
1820
- nrf54lv10dk/nrf54lv10a/cpuapp
1921
- [email protected]/nrf54lv10a/cpuapp
2022
- [email protected]/nrf54lv10a/cpuapp
2123
integration_platforms:
24+
- nrf54ls05dk/nrf54ls05b/cpuapp
2225
- nrf54lv10dk/nrf54lv10a/cpuapp
Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
&pinctrl {
8+
i2c21_default_test: i2c21_default_test {
9+
group1 {
10+
psels = <NRF_PSEL(TWIM_SDA, 1, 8)>,
11+
<NRF_PSEL(TWIM_SCL, 1, 14)>;
12+
};
13+
};
14+
15+
i2c21_sleep_test: i2c21_sleep_test {
16+
group1 {
17+
psels = <NRF_PSEL(TWIM_SDA, 1, 8)>,
18+
<NRF_PSEL(TWIM_SCL, 1, 14)>;
19+
low-power-enable;
20+
};
21+
};
22+
23+
i2c22_default_test: i2c22_default_test {
24+
group1 {
25+
psels = <NRF_PSEL(TWIM_SDA, 1, 9)>,
26+
<NRF_PSEL(TWIM_SCL, 1, 15)>;
27+
bias-pull-up;
28+
};
29+
};
30+
31+
i2c22_sleep_test: i2c22_sleep_test {
32+
group1 {
33+
psels = <NRF_PSEL(TWIM_SDA, 1, 9)>,
34+
<NRF_PSEL(TWIM_SCL, 1, 15)>;
35+
low-power-enable;
36+
};
37+
};
38+
};
39+
40+
/* i2c20 inaccessible due to console on uart20 */
41+
42+
&i2c21 {
43+
compatible = "nordic,nrf-twim";
44+
status = "okay";
45+
pinctrl-0 = <&i2c21_default_test>;
46+
pinctrl-1 = <&i2c21_sleep_test>;
47+
pinctrl-names = "default", "sleep";
48+
};
49+
50+
&i2c22 {
51+
compatible = "nordic,nrf-twim";
52+
status = "okay";
53+
pinctrl-0 = <&i2c22_default_test>;
54+
pinctrl-1 = <&i2c22_sleep_test>;
55+
pinctrl-names = "default", "sleep";
56+
};

tests/drivers/i2c/twim_instances/testcase.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,14 @@ tests:
1111
- nrf54h20dk/nrf54h20/cpuapp
1212
- nrf54l15dk/nrf54l15/cpuapp
1313
- nrf54lm20dk/nrf54lm20a/cpuapp
14+
- [email protected]/nrf54ls05b/cpuapp
15+
- nrf54ls05dk/nrf54ls05b/cpuapp
1416
- nrf54lv10dk/nrf54lv10a/cpuapp
1517
- [email protected]/nrf54lv10a/cpuapp
1618
- [email protected]/nrf54lv10a/cpuapp
1719
integration_platforms:
1820
- nrf54h20dk/nrf54h20/cpuapp
1921
- nrf54l15dk/nrf54l15/cpuapp
2022
- nrf54lm20dk/nrf54lm20a/cpuapp
23+
- nrf54ls05dk/nrf54ls05b/cpuapp
2124
- nrf54lv10dk/nrf54lv10a/cpuapp
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_NRFX_TWIS22=y
Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
/ {
2+
aliases {
3+
i2c-slave = &i2c22;
4+
};
5+
};
6+
7+
&pinctrl {
8+
i2c21_default_alt: i2c21_default_alt {
9+
group1 {
10+
psels = <NRF_PSEL(TWIM_SDA, 1, 8)>,
11+
<NRF_PSEL(TWIM_SCL, 1, 14)>;
12+
};
13+
};
14+
15+
i2c21_sleep_alt: i2c21_sleep_alt {
16+
group1 {
17+
psels = <NRF_PSEL(TWIM_SDA, 1, 8)>,
18+
<NRF_PSEL(TWIM_SCL, 1, 14)>;
19+
low-power-enable;
20+
};
21+
};
22+
23+
i2c22_default_alt: i2c22_default_alt {
24+
group1 {
25+
/* Temporary workaround as it is currently not possible
26+
* to configure pins for TWIS with pinctrl.
27+
*/
28+
psels = <NRF_PSEL(TWIM_SDA, 1, 9)>,
29+
<NRF_PSEL(TWIM_SCL, 1, 15)>;
30+
bias-pull-up;
31+
};
32+
};
33+
34+
i2c22_sleep_alt: i2c22_sleep_alt {
35+
group1 {
36+
psels = <NRF_PSEL(TWIM_SDA, 1, 9)>,
37+
<NRF_PSEL(TWIM_SCL, 1, 15)>;
38+
low-power-enable;
39+
};
40+
};
41+
};
42+
43+
&i2c21 {
44+
compatible = "nordic,nrf-twim";
45+
status = "okay";
46+
pinctrl-0 = <&i2c21_default_alt>;
47+
pinctrl-1 = <&i2c21_sleep_alt>;
48+
pinctrl-names = "default", "sleep";
49+
sensor: sensor@54 {
50+
reg = <0x54>;
51+
};
52+
};
53+
54+
&i2c22 {
55+
compatible = "nordic,nrf-twis";
56+
status = "okay";
57+
pinctrl-0 = <&i2c22_default_alt>;
58+
pinctrl-1 = <&i2c22_sleep_alt>;
59+
pinctrl-names = "default", "sleep";
60+
};

tests/zephyr/boards/nrf/i2c/i2c_slave/testcase.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ tests:
99
harness_config:
1010
fixture: i2c_loopback
1111
platform_allow:
12+
- [email protected]/nrf54ls05b/cpuapp
13+
- nrf54ls05dk/nrf54ls05b/cpuapp
1214
- nrf54lv10dk/nrf54lv10a/cpuapp
1315
- [email protected]/nrf54lv10a/cpuapp
1416
integration_platforms:
17+
- nrf54ls05dk/nrf54ls05b/cpuapp
1518
- nrf54lv10dk/nrf54lv10a/cpuapp
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_I2C_NRFX_TWIS_BUF_SIZE=256
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
&pinctrl {
2+
i2c21_default: i2c21_default {
3+
group1 {
4+
psels = <NRF_PSEL(TWIS_SDA, 1, 8)>,
5+
<NRF_PSEL(TWIS_SCL, 1, 14)>;
6+
bias-pull-up;
7+
};
8+
};
9+
10+
i2c21_sleep: i2c21_sleep {
11+
group1 {
12+
psels = <NRF_PSEL(TWIS_SDA, 1, 8)>,
13+
<NRF_PSEL(TWIS_SCL, 1, 14)>;
14+
low-power-enable;
15+
};
16+
};
17+
18+
i2c22_default: i2c22_default {
19+
group1 {
20+
psels = <NRF_PSEL(TWIS_SDA, 1, 9)>,
21+
<NRF_PSEL(TWIS_SCL, 1, 15)>;
22+
bias-pull-up;
23+
};
24+
};
25+
26+
i2c22_sleep: i2c22_sleep {
27+
group1 {
28+
psels = <NRF_PSEL(TWIS_SDA, 1, 9)>,
29+
<NRF_PSEL(TWIS_SCL, 1, 15)>;
30+
low-power-enable;
31+
};
32+
};
33+
};
34+
35+
&i2c21 {
36+
pinctrl-0 = <&i2c21_default>;
37+
pinctrl-1 = <&i2c21_sleep>;
38+
pinctrl-names = "default", "sleep";
39+
zephyr,concat-buf-size = <256>;
40+
status = "okay";
41+
42+
eeprom1: eeprom@56 {
43+
compatible = "zephyr,i2c-target-eeprom";
44+
reg = <0x56>;
45+
address-width = <8>;
46+
size = <256>;
47+
};
48+
};
49+
50+
&i2c22 {
51+
compatible = "nordic,nrf-twis";
52+
pinctrl-0 = <&i2c22_default>;
53+
pinctrl-1 = <&i2c22_sleep>;
54+
pinctrl-names = "default", "sleep";
55+
status = "okay";
56+
57+
eeprom0: eeprom@54 {
58+
compatible = "zephyr,i2c-target-eeprom";
59+
reg = <0x54>;
60+
address-width = <8>;
61+
size = <256>;
62+
};
63+
};

0 commit comments

Comments
 (0)