Skip to content

Commit 21f71df

Browse files
nordic-bamikartben
authored andcommitted
tests: boards: i2c: Add testing with different i2c speeds
Test with all available speeds on the given device. Signed-off-by: Bartosz Miller <[email protected]>
1 parent a5d3612 commit 21f71df

12 files changed

+71
-22
lines changed

MAINTAINERS.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4026,6 +4026,7 @@ nRF Platforms:
40264026
- dts/bindings/*/nordic,*
40274027
- tests/drivers/*/*nrf*/
40284028
- snippets/nordic*/
4029+
- tests/boards/nrf/
40294030
labels:
40304031
- "platform: nRF"
40314032

tests/boards/nrf/i2c/i2c_slave/boards/bl54l15_dvk_nrf54l15_cpuapp.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
};
4747
};
4848

49-
&i2c21 {
49+
dut_twim: &i2c21 {
5050
compatible = "nordic,nrf-twim";
5151
status = "okay";
5252
pinctrl-0 = <&i2c21_default_alt>;
5353
pinctrl-1 = <&i2c21_sleep_alt>;
5454
pinctrl-names = "default", "sleep";
55-
55+
clock-frequency = <I2C_BITRATE_STANDARD>;
5656
sensor: sensor@54 {
5757
reg = <0x54>;
5858
};

tests/boards/nrf/i2c/i2c_slave/boards/bl54l15u_dvk_nrf54l15_cpuapp.overlay

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,13 +46,13 @@
4646
};
4747
};
4848

49-
&i2c21 {
49+
dut_twim: &i2c21 {
5050
compatible = "nordic,nrf-twim";
5151
status = "okay";
5252
pinctrl-0 = <&i2c21_default_alt>;
5353
pinctrl-1 = <&i2c21_sleep_alt>;
5454
pinctrl-names = "default", "sleep";
55-
55+
clock-frequency = <I2C_BITRATE_STANDARD>;
5656
sensor: sensor@54 {
5757
reg = <0x54>;
5858
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&dut_twim {
7+
clock-frequency = <I2C_BITRATE_FAST>;
8+
};
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright 2025 Nordic Semiconductor ASA
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&dut_twim {
7+
clock-frequency = <I2C_BITRATE_FAST_PLUS>;
8+
};

tests/boards/nrf/i2c/i2c_slave/boards/nrf52840dk_nrf52840.overlay

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,24 @@
3939
};
4040
};
4141

42-
&i2c0 {
42+
dut_twim: &i2c0 {
4343
compatible = "nordic,nrf-twim";
4444
status = "okay";
4545
pinctrl-0 = <&i2c0_default_alt>;
4646
pinctrl-1 = <&i2c0_sleep_alt>;
4747
pinctrl-names = "default", "sleep";
48+
clock-frequency = <I2C_BITRATE_STANDARD>;
4849
sensor: sensor@54 {
4950
reg = <0x54>;
5051
};
5152
};
5253

5354

54-
&i2c1 {
55+
dut_twis: &i2c1 {
5556
compatible = "nordic,nrf-twis";
5657
status = "okay";
5758
pinctrl-0 = <&i2c1_default_alt>;
5859
pinctrl-1 = <&i2c1_sleep_alt>;
5960
pinctrl-names = "default", "sleep";
61+
clock-frequency = <I2C_BITRATE_STANDARD>;
6062
};

tests/boards/nrf/i2c/i2c_slave/boards/nrf5340dk_nrf5340_cpuapp.overlay

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,13 @@
3939
};
4040
};
4141

42-
&i2c1 {
42+
dut_twim: &i2c1 {
4343
compatible = "nordic,nrf-twim";
4444
status = "okay";
4545
pinctrl-0 = <&i2c1_default_alt>;
4646
pinctrl-1 = <&i2c1_sleep_alt>;
4747
pinctrl-names = "default", "sleep";
48+
clock-frequency = <I2C_BITRATE_STANDARD>;
4849
sensor: sensor@54 {
4950
reg = <0x54>;
5051
};

tests/boards/nrf/i2c/i2c_slave/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@
3939
};
4040
};
4141

42-
&i2c130 {
42+
dut_twim: &i2c130 {
4343
compatible = "nordic,nrf-twim";
4444
status = "okay";
45-
clock-frequency = <I2C_BITRATE_STANDARD>;
4645
pinctrl-0 = <&i2c130_default_alt>;
4746
pinctrl-1 = <&i2c130_sleep_alt>;
4847
pinctrl-names = "default", "sleep";
48+
clock-frequency = <I2C_BITRATE_STANDARD>;
4949
memory-regions = <&cpuapp_dma_region>;
5050
sensor: sensor@54 {
5151
reg = <0x54>;
@@ -55,7 +55,6 @@
5555
&i2c131 {
5656
compatible = "nordic,nrf-twis";
5757
status = "okay";
58-
clock-frequency = <I2C_BITRATE_STANDARD>;
5958
pinctrl-0 = <&i2c131_default_alt>;
6059
pinctrl-1 = <&i2c131_sleep_alt>;
6160
pinctrl-names = "default", "sleep";

tests/boards/nrf/i2c/i2c_slave/boards/nrf54h20dk_nrf54h20_cpuppr.overlay

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,13 @@
4040
};
4141
};
4242

43-
&i2c130 {
43+
dut_twim: &i2c130 {
4444
compatible = "nordic,nrf-twim";
4545
status = "okay";
46-
clock-frequency = <I2C_BITRATE_STANDARD>;
4746
pinctrl-0 = <&i2c130_default_alt>;
4847
pinctrl-1 = <&i2c130_sleep_alt>;
4948
pinctrl-names = "default", "sleep";
49+
clock-frequency = <I2C_BITRATE_STANDARD>;
5050
sensor: sensor@54 {
5151
reg = <0x54>;
5252
};
@@ -55,7 +55,6 @@
5555
&i2c131 {
5656
compatible = "nordic,nrf-twis";
5757
status = "okay";
58-
clock-frequency = <I2C_BITRATE_STANDARD>;
5958
pinctrl-0 = <&i2c131_default_alt>;
6059
pinctrl-1 = <&i2c131_sleep_alt>;
6160
pinctrl-names = "default", "sleep";

tests/boards/nrf/i2c/i2c_slave/boards/nrf54l15dk_nrf54l15_cpuapp.overlay

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@
4040
};
4141
};
4242

43-
&i2c21 {
43+
dut_twim: &i2c21 {
4444
compatible = "nordic,nrf-twim";
4545
status = "okay";
4646
pinctrl-0 = <&i2c21_default_alt>;
4747
pinctrl-1 = <&i2c21_sleep_alt>;
4848
pinctrl-names = "default", "sleep";
49+
clock-frequency = <I2C_BITRATE_STANDARD>;
4950
sensor: sensor@54 {
5051
reg = <0x54>;
5152
};

0 commit comments

Comments
 (0)