Skip to content

Commit c539d47

Browse files
nordic-baminordicjm
authored andcommitted
[nrf fromtree] drivers: i2c: Extend i2c testing on nrf54h20 PPR
Enable all possible i2c tests on CPUPPR Signed-off-by: Bartosz Miller <[email protected]> (cherry picked from commit b60633b)
1 parent 9c01b7e commit c539d47

File tree

14 files changed

+302
-0
lines changed

14 files changed

+302
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_I2C_NRFX_TWIS_BUF_SIZE=256
Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/*
8+
* SDA = P2.8 and P2.9
9+
* SCL = P1.2 and P1.3
10+
*/
11+
12+
/ {
13+
aliases {
14+
i2c-controller = &i2c130;
15+
i2c-controller-target = &i2c131;
16+
};
17+
};
18+
19+
&pinctrl {
20+
i2c130_default: i2c130_default {
21+
group1 {
22+
psels = <NRF_PSEL(TWIM_SDA, 2, 8)>,
23+
<NRF_PSEL(TWIM_SCL, 1, 2)>;
24+
bias-pull-up;
25+
};
26+
};
27+
28+
i2c130_sleep: i2c130_sleep {
29+
group1 {
30+
psels = <NRF_PSEL(TWIM_SDA, 2, 8)>,
31+
<NRF_PSEL(TWIM_SCL, 1, 2)>;
32+
low-power-enable;
33+
};
34+
};
35+
36+
i2c131_default: i2c131_default {
37+
group1 {
38+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
39+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
40+
bias-pull-up;
41+
};
42+
};
43+
44+
i2c131_sleep: i2c131_sleep {
45+
group1 {
46+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
47+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
48+
low-power-enable;
49+
};
50+
};
51+
};
52+
53+
&i2c130 {
54+
clock-frequency = <I2C_BITRATE_STANDARD>;
55+
pinctrl-0 = <&i2c130_default>;
56+
pinctrl-1 = <&i2c130_sleep>;
57+
pinctrl-names = "default", "sleep";
58+
zephyr,concat-buf-size = <256>;
59+
status = "okay";
60+
};
61+
62+
&i2c131 {
63+
compatible = "nordic,nrf-twis";
64+
clock-frequency = <I2C_BITRATE_STANDARD>;
65+
pinctrl-0 = <&i2c131_default>;
66+
pinctrl-1 = <&i2c131_sleep>;
67+
pinctrl-names = "default", "sleep";
68+
status = "okay";
69+
};

samples/drivers/i2c/rtio_loopback/sample.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ tests:
1515
- b_u585i_iot02a
1616
- nrf5340dk/nrf5340/cpuapp
1717
- nrf54h20dk/nrf54h20/cpuapp
18+
- nrf54h20dk/nrf54h20/cpuppr
1819
- nrf54l15dk/nrf54l15/cpuapp
1920
- nrf54lm20dk/nrf54lm20a/cpuapp
2021
- nucleo_f401re
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&i2c130 {
8+
status = "reserved";
9+
interrupt-parent = <&cpuppr_clic>;
10+
};
11+
12+
&i2c131 {
13+
status = "reserved";
14+
interrupt-parent = <&cpuppr_clic>;
15+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
# nothing here
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/*
8+
* SDA = P2.8 and P2.9
9+
* SCL = P1.2 and P1.3
10+
*/
11+
12+
/ {
13+
aliases {
14+
i2c-controller = &i2c130;
15+
i2c-controller-target = &i2c131;
16+
};
17+
};
18+
19+
&pinctrl {
20+
i2c130_default: i2c130_default {
21+
group1 {
22+
psels = <NRF_PSEL(TWIM_SDA, 2, 8)>,
23+
<NRF_PSEL(TWIM_SCL, 1, 2)>;
24+
bias-pull-up;
25+
};
26+
};
27+
28+
i2c130_sleep: i2c130_sleep {
29+
group1 {
30+
psels = <NRF_PSEL(TWIM_SDA, 2, 8)>,
31+
<NRF_PSEL(TWIM_SCL, 1, 2)>;
32+
low-power-enable;
33+
};
34+
};
35+
36+
i2c131_default: i2c131_default {
37+
group1 {
38+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
39+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
40+
bias-pull-up;
41+
};
42+
};
43+
44+
i2c131_sleep: i2c131_sleep {
45+
group1 {
46+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
47+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
48+
low-power-enable;
49+
};
50+
};
51+
};
52+
53+
&i2c130 {
54+
compatible = "nordic,nrf-twim";
55+
clock-frequency = <I2C_BITRATE_STANDARD>;
56+
pinctrl-0 = <&i2c130_default>;
57+
pinctrl-1 = <&i2c130_sleep>;
58+
pinctrl-names = "default", "sleep";
59+
zephyr,concat-buf-size = <256>;
60+
status = "okay";
61+
};
62+
63+
&i2c131 {
64+
compatible = "nordic,nrf-twis";
65+
clock-frequency = <I2C_BITRATE_STANDARD>;
66+
pinctrl-0 = <&i2c131_default>;
67+
pinctrl-1 = <&i2c131_sleep>;
68+
pinctrl-names = "default", "sleep";
69+
status = "okay";
70+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&i2c130 {
8+
status = "reserved";
9+
interrupt-parent = <&cpuppr_clic>;
10+
};
11+
12+
&i2c131 {
13+
status = "reserved";
14+
interrupt-parent = <&cpuppr_clic>;
15+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
# nothing here

tests/drivers/i2c/i2c_nrfx_twim/testcase.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ tests:
1212
platform_allow:
1313
- nrf5340dk/nrf5340/cpuapp
1414
- nrf54h20dk/nrf54h20/cpuapp
15+
- nrf54h20dk/nrf54h20/cpuppr
1516
- nrf54l15dk/nrf54l15/cpuapp
1617
integration_platforms:
1718
- nrf5340dk/nrf5340/cpuapp
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Nordic Semiconductor ASA
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_I2C_NRFX_TWIS_BUF_SIZE=256
5+
CONFIG_GPIO=y

0 commit comments

Comments
 (0)