Skip to content

Commit 800ce8d

Browse files
author
Manuel Aebischer
committed
tests: i2c: i2c_target_api: Add test for read-only eeprom target
This additional test case verifies that an i2c_eeprom_target, which is set as read-only in the device tree cannot be written from the I2C bus. Signed-off-by: Manuel Aebischer <[email protected]>
1 parent c172b4b commit 800ce8d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+372
-0
lines changed

tests/drivers/i2c/i2c_target_api/boards/frdm_ke17z512.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@
1515
reg = <0x54>;
1616
size = <256>;
1717
};
18+
eeprom2: eeprom@58 {
19+
compatible = "zephyr,i2c-target-eeprom";
20+
reg = <0x58>;
21+
size = <4096>;
22+
address-width = <16>;
23+
read-only;
24+
};
1825
};
1926

2027
&lpi2c1 {

tests/drivers/i2c/i2c_target_api/boards/frdm_mcxn236.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
size = <1024>;
4242
address-width = <16>;
4343
};
44+
eeprom2: eeprom@58 {
45+
compatible = "zephyr,i2c-target-eeprom";
46+
reg = <0x58>;
47+
size = <4096>;
48+
address-width = <16>;
49+
read-only;
50+
};
4451
};
4552

4653
&flexcomm5_lpi2c5 {

tests/drivers/i2c/i2c_target_api/boards/frdm_mcxn947_mcxn947_cpu0.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
reg = <0x54>;
4141
size = <256>;
4242
};
43+
eeprom2: eeprom@58 {
44+
compatible = "zephyr,i2c-target-eeprom";
45+
reg = <0x58>;
46+
size = <4096>;
47+
address-width = <16>;
48+
read-only;
49+
};
4350
};
4451

4552
&flexcomm2_lpi2c2 {

tests/drivers/i2c/i2c_target_api/boards/frdm_mcxn947_mcxn947_cpu0_qspi.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,13 @@
4040
reg = <0x54>;
4141
size = <1024>;
4242
};
43+
eeprom2: eeprom@58 {
44+
compatible = "zephyr,i2c-target-eeprom";
45+
reg = <0x58>;
46+
size = <4096>;
47+
address-width = <16>;
48+
read-only;
49+
};
4350
};
4451

4552
&flexcomm2_lpi2c2 {

tests/drivers/i2c/i2c_target_api/boards/it8xxx2_evb.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,11 @@
3030
reg = <0x52>;
3131
size = <256>;
3232
};
33+
eeprom2: eeprom@58 {
34+
compatible = "zephyr,i2c-target-eeprom";
35+
reg = <0x58>;
36+
size = <4096>;
37+
address-width = <16>;
38+
read-only;
39+
};
3340
};

tests/drivers/i2c/i2c_target_api/boards/max32655evkit_max32655_m4.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
address-width = <16>;
1212
size = <1024>;
1313
};
14+
eeprom2: eeprom@58 {
15+
compatible = "zephyr,i2c-target-eeprom";
16+
reg = <0x58>;
17+
size = <4096>;
18+
address-width = <16>;
19+
read-only;
20+
};
1421
};
1522

1623
&i2c1 {

tests/drivers/i2c/i2c_target_api/boards/max32662evkit.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@
1414
reg = <0x54>;
1515
size = <256>;
1616
};
17+
eeprom2: eeprom@58 {
18+
compatible = "zephyr,i2c-target-eeprom";
19+
reg = <0x58>;
20+
size = <4096>;
21+
address-width = <16>;
22+
read-only;
23+
};
1724
};
1825

1926
&i2c1 {

tests/drivers/i2c/i2c_target_api/boards/max32666evkit_max32666_cpu0.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
address-width = <16>;
1212
size = <1024>;
1313
};
14+
eeprom2: eeprom@58 {
15+
compatible = "zephyr,i2c-target-eeprom";
16+
reg = <0x58>;
17+
size = <4096>;
18+
address-width = <16>;
19+
read-only;
20+
};
1421
};
1522

1623
&i2c2 {

tests/drivers/i2c/i2c_target_api/boards/max32670evkit.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
address-width = <16>;
1212
size = <1024>;
1313
};
14+
eeprom2: eeprom@58 {
15+
compatible = "zephyr,i2c-target-eeprom";
16+
reg = <0x58>;
17+
size = <4096>;
18+
address-width = <16>;
19+
read-only;
20+
};
1421
};
1522

1623
&i2c1 {

tests/drivers/i2c/i2c_target_api/boards/max32672evkit.overlay

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,13 @@
1111
address-width = <16>;
1212
size = <1024>;
1313
};
14+
eeprom2: eeprom@58 {
15+
compatible = "zephyr,i2c-target-eeprom";
16+
reg = <0x58>;
17+
size = <4096>;
18+
address-width = <16>;
19+
read-only;
20+
};
1421
};
1522

1623
&i2c1 {

0 commit comments

Comments
 (0)