Skip to content

Commit 64a2d94

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 64a2d94

File tree

5 files changed

+117
-0
lines changed

5 files changed

+117
-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: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
*/
28+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
29+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
30+
bias-pull-up;
31+
};
32+
};
33+
34+
i2c131_sleep_alt: i2c131_sleep_alt {
35+
group1 {
36+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
37+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
38+
low-power-enable;
39+
};
40+
};
41+
};
42+
43+
&i2c130 {
44+
compatible = "nordic,nrf-twim";
45+
status = "okay";
46+
clock-frequency = <I2C_BITRATE_STANDARD>;
47+
pinctrl-0 = <&i2c130_default_alt>;
48+
pinctrl-1 = <&i2c130_sleep_alt>;
49+
pinctrl-names = "default", "sleep";
50+
sensor: sensor@54 {
51+
reg = <0x54>;
52+
};
53+
};
54+
55+
&i2c131 {
56+
compatible = "nordic,nrf-twis";
57+
status = "okay";
58+
clock-frequency = <I2C_BITRATE_STANDARD>;
59+
pinctrl-0 = <&i2c131_default_alt>;
60+
pinctrl-1 = <&i2c131_sleep_alt>;
61+
pinctrl-names = "default", "sleep";
62+
};
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
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+
*/
22+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
23+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
24+
bias-pull-up;
25+
};
26+
};
27+
28+
i2c131_sleep_alt: i2c131_sleep_alt {
29+
group1 {
30+
psels = <NRF_PSEL(TWIM_SDA, 2, 9)>,
31+
<NRF_PSEL(TWIM_SCL, 1, 3)>;
32+
low-power-enable;
33+
};
34+
};
35+
};
36+
37+
&i2c130 {
38+
status = "reserved";
39+
pinctrl-0 = <&i2c130_default_alt>;
40+
pinctrl-1 = <&i2c130_sleep_alt>;
41+
pinctrl-names = "default", "sleep";
42+
interrupt-parent = <&cpuppr_clic>;
43+
};
44+
45+
&i2c131 {
46+
status = "reserved";
47+
pinctrl-0 = <&i2c131_default_alt>;
48+
pinctrl-1 = <&i2c131_sleep_alt>;
49+
pinctrl-names = "default", "sleep";
50+
interrupt-parent = <&cpuppr_clic>;
51+
};
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)