Skip to content

Commit 17388fb

Browse files
committed
boards: b_u585i_iot02a: Enable i2c and hts221 mems sensors
Enable i2c1 and i2c2 nodes on b_u585i_iot02a. i2c1 is used as Arduino I2C i2c2 is used as bus for HTS221 MEMS device. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent 009b3e4 commit 17388fb

File tree

4 files changed

+25
-1
lines changed

4 files changed

+25
-1
lines changed

boards/arm/b_u585i_iot02a/arduino_r3_connector.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,4 @@
3636
};
3737

3838
arduino_spi: &spi1 {};
39+
arduino_i2c: &i2c1 {};

boards/arm/b_u585i_iot02a/b_u585i_iot02a.dts

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,3 +36,21 @@
3636
&spi1_miso_pe14 &spi1_mosi_pe15>;
3737
status = "okay";
3838
};
39+
40+
&i2c1 {
41+
pinctrl-0 = <&i2c1_scl_pb8 &i2c1_sda_pb9>;
42+
status = "okay";
43+
clock-frequency = <I2C_BITRATE_FAST>;
44+
};
45+
46+
&i2c2 {
47+
pinctrl-0 = <&i2c2_scl_ph4 &i2c2_sda_ph5>;
48+
status = "okay";
49+
clock-frequency = <I2C_BITRATE_FAST>;
50+
51+
hts221@5f {
52+
compatible = "st,hts221";
53+
reg = <0x5f>;
54+
label = "HTS221";
55+
};
56+
};

boards/arm/b_u585i_iot02a/b_u585i_iot02a.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,7 @@ toolchain:
99
ram: 786
1010
flash: 2048
1111
supported:
12+
- arduino_i2c
1213
- arduino_spi
14+
- hts221
1315
- spi

boards/arm/b_u585i_iot02a/doc/index.rst

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,10 +175,11 @@ The Zephyr b_u585i_iot02a board configuration supports the following hardware fe
175175
+-----------+------------+-------------------------------------+
176176
| GPIO | on-chip | gpio |
177177
+-----------+------------+-------------------------------------+
178+
| I2C | on-chip | i2c |
179+
+-----------+------------+-------------------------------------+
178180
| SPI | on-chip | spi |
179181
+-----------+------------+-------------------------------------+
180182

181-
182183
The default configuration can be found in the defconfig file:
183184

184185
``boards/arm/b_u585i_iot02a/b_u585i_iot02a_defconfig``
@@ -200,6 +201,8 @@ Default Zephyr Peripheral Mapping:
200201
- LD2 : PH6
201202
- user button : PC13
202203
- SPI1 NSS/SCK/MISO/MOSI : PE12/P13/P14/P15 (Arduino SPI)
204+
- I2C_1 SDA/SDL : PB9/PB8 (Arduino I2C)
205+
- I2C_2 SDA/SDL : PH5/PH4
203206

204207
System Clock
205208
------------

0 commit comments

Comments
 (0)