Skip to content

Commit 42efd84

Browse files
RomainPelletantkartben
authored andcommitted
boards: xiao_esp32c6: add i2c0 port
- Add i2c0 port support on xiao_esp32c6 Signed-off-by: Romain Pelletant <[email protected]>
1 parent 0d6fe2f commit 42efd84

File tree

5 files changed

+21
-0
lines changed

5 files changed

+21
-0
lines changed

boards/seeed/xiao_esp32c6/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ The Zephyr ``xiao_esp32c6`` board target supports the following hardware feature
3636
+------------+------------+-------------------------------------+
3737
| SPI Master | on-chip | spi |
3838
+------------+------------+-------------------------------------+
39+
| I2C | on-chip | i2c |
40+
+------------+------------+-------------------------------------+
3941
| Watchdog | on-chip | watchdog |
4042
+------------+------------+-------------------------------------+
4143
| LEDC | on-chip | pwm |

boards/seeed/xiao_esp32c6/seeed_xiao_connector.dtsi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,6 @@
2424
};
2525
};
2626

27+
xiao_i2c: &i2c0 {};
2728
xiao_spi: &spi2 {};
2829
xiao_serial: &uart0 {};

boards/seeed/xiao_esp32c6/xiao_esp32c6-pinctrl.dtsi

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,14 @@
3131
output-low;
3232
};
3333
};
34+
35+
i2c0_default: i2c0_default {
36+
group1 {
37+
pinmux = <I2C0_SDA_GPIO22>,
38+
<I2C0_SCL_GPIO23>;
39+
bias-pull-up;
40+
drive-open-drain;
41+
output-high;
42+
};
43+
};
3444
};

boards/seeed/xiao_esp32c6/xiao_esp32c6.dts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
status = "okay";
5656
};
5757

58+
&i2c0 {
59+
status = "okay";
60+
clock-frequency = <I2C_BITRATE_FAST>;
61+
pinctrl-0 = <&i2c0_default>;
62+
pinctrl-names = "default";
63+
};
64+
5865
&spi2 {
5966
#address-cells = <1>;
6067
#size-cells = <0>;

boards/seeed/xiao_esp32c6/xiao_esp32c6.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ supported:
1111
- dma
1212
- spi
1313
- entropy
14+
- i2c
1415
testing:
1516
ignore_tags:
1617
- bluetooth

0 commit comments

Comments
 (0)