Skip to content

Commit 40b6f75

Browse files
[nrf fromlist] tests: boards: nrf: i2c: add support for nRF54H20 cpuppr
i2c_slave tests can now be run on nRF54H20 cpuppr target. Upstream PR #: 82538 Signed-off-by: Michał Stasiak <[email protected]>
1 parent 9548301 commit 40b6f75

File tree

5 files changed

+115
-0
lines changed

5 files changed

+115
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_NRFX_TWIS131=y
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
/ {
2+
aliases {
3+
i2c-slave = &i2c131;
4+
};
5+
};
6+
7+
&pinctrl {
8+
i2c130_default_alt: i2c130_default_alt {
9+
group1 {
10+
psels = <NRF_PSEL(TWIM_SDA, 2, 8)>,
11+
<NRF_PSEL(TWIM_SCL, 1, 2)>;
12+
};
13+
};
14+
15+
i2c130_sleep_alt: i2c130_sleep_alt {
16+
group1 {
17+
psels = <NRF_PSEL(TWIM_SDA, 2, 8)>,
18+
<NRF_PSEL(TWIM_SCL, 1, 2)>;
19+
low-power-enable;
20+
};
21+
};
22+
23+
i2c131_default_alt: i2c131_default_alt {
24+
group1 {
25+
/* Temporary workaround as it is currently not possible
26+
* to configure pins for TWIS with pinctrl. */
27+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
28+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
29+
bias-pull-up;
30+
};
31+
};
32+
33+
i2c131_sleep_alt: i2c131_sleep_alt {
34+
group1 {
35+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
36+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
37+
low-power-enable;
38+
};
39+
};
40+
};
41+
42+
&i2c130 {
43+
compatible = "nordic,nrf-twim";
44+
status = "okay";
45+
clock-frequency = <I2C_BITRATE_STANDARD>;
46+
pinctrl-0 = <&i2c130_default_alt>;
47+
pinctrl-1 = <&i2c130_sleep_alt>;
48+
pinctrl-names = "default", "sleep";
49+
sensor: sensor@54 {
50+
reg = <0x54>;
51+
};
52+
};
53+
54+
&i2c131 {
55+
compatible = "nordic,nrf-twis";
56+
status = "okay";
57+
clock-frequency = <I2C_BITRATE_STANDARD>;
58+
pinctrl-0 = <&i2c131_default_alt>;
59+
pinctrl-1 = <&i2c131_sleep_alt>;
60+
pinctrl-names = "default", "sleep";
61+
};
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
&pinctrl {
2+
i2c130_default_alt: i2c130_default_alt {
3+
group1 {
4+
psels = <NRF_PSEL(TWIM_SDA, 2, 8)>,
5+
<NRF_PSEL(TWIM_SCL, 1, 2)>;
6+
};
7+
};
8+
9+
i2c130_sleep_alt: i2c130_sleep_alt {
10+
group1 {
11+
psels = <NRF_PSEL(TWIM_SDA, 2, 8)>,
12+
<NRF_PSEL(TWIM_SCL, 1, 2)>;
13+
low-power-enable;
14+
};
15+
};
16+
17+
i2c131_default_alt: i2c131_default_alt {
18+
group1 {
19+
/* Temporary workaround as it is currently not possible
20+
* to configure pins for TWIS with pinctrl. */
21+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
22+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
23+
bias-pull-up;
24+
};
25+
};
26+
27+
i2c131_sleep_alt: i2c131_sleep_alt {
28+
group1 {
29+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
30+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
31+
low-power-enable;
32+
};
33+
};
34+
};
35+
36+
&i2c130 {
37+
status = "reserved";
38+
pinctrl-0 = <&i2c130_default_alt>;
39+
pinctrl-1 = <&i2c130_sleep_alt>;
40+
pinctrl-names = "default", "sleep";
41+
interrupt-parent = <&cpuppr_clic>;
42+
};
43+
44+
&i2c131 {
45+
status = "reserved";
46+
pinctrl-0 = <&i2c131_default_alt>;
47+
pinctrl-1 = <&i2c131_sleep_alt>;
48+
pinctrl-names = "default", "sleep";
49+
interrupt-parent = <&cpuppr_clic>;
50+
};
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# nothing here

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,10 @@ tests:
1010
- nrf5340dk/nrf5340/cpuapp
1111
- nrf54l15dk/nrf54l15/cpuapp
1212
- nrf54h20dk/nrf54h20/cpuapp
13+
- nrf54h20dk/nrf54h20/cpuppr
1314
integration_platforms:
1415
- nrf52840dk/nrf52840
1516
- nrf5340dk/nrf5340/cpuapp
1617
- nrf54l15dk/nrf54l15/cpuapp
1718
- nrf54h20dk/nrf54h20/cpuapp
19+
- nrf54h20dk/nrf54h20/cpuppr

0 commit comments

Comments
 (0)