boards: wch: ch32v003evt: enable i2c and define i2c pins

enabled i2c for ch32v003evt
added default i2c pins for ch32v003evt
added i2c as supported

Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
This commit is contained in:
Andrei-Edward Popa 2025-04-02 22:07:03 +03:00 committed by Benjamin Cabé
commit 5e8008c0ab
3 changed files with 23 additions and 0 deletions

View file

@ -18,4 +18,12 @@
bias-pull-up;
};
};
i2c1_default: i2c1_default {
group1 {
pinmux = <I2C1_SDA_PC1_0>, <I2C1_SCL_PC2_0>;
output-high;
drive-open-drain;
};
};
};

View file

@ -8,6 +8,9 @@
#include <wch/ch32v0/ch32v003f4p.dtsi>
#include "ch32v003evt-pinctrl.dtsi"
#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/i2c/i2c.h>
/ {
model = "ch32v003evt";
compatible = "wch,ch32v003";
@ -53,10 +56,21 @@
clocks = <&pll>;
};
&gpioc {
status = "okay";
};
&gpiod {
status = "okay";
};
&i2c1 {
status = "okay";
clock-frequency = <I2C_BITRATE_STANDARD>;
pinctrl-0 = <&i2c1_default>;
pinctrl-names = "default";
};
&usart1 {
status = "okay";
current-speed = <115200>;

View file

@ -9,3 +9,4 @@ ram: 2
flash: 16
supported:
- gpio
- i2c