boards: wch: ch32v003f4p6_dev_board: enable i2c and define i2c pins
enabled i2c for ch32v003f4p6_dev_board added default i2c pins for ch32v003f4p6_dev_board added i2c as supported Signed-off-by: Andrei-Edward Popa <andrei.popa105@yahoo.com>
This commit is contained in:
parent
5e8008c0ab
commit
1335c3fd76
3 changed files with 23 additions and 0 deletions
|
@ -19,4 +19,12 @@
|
||||||
bias-pull-up;
|
bias-pull-up;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
i2c1_default: i2c1_default {
|
||||||
|
group1 {
|
||||||
|
pinmux = <I2C1_SDA_PC1_0>, <I2C1_SCL_PC2_0>;
|
||||||
|
output-high;
|
||||||
|
drive-open-drain;
|
||||||
|
};
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -8,6 +8,9 @@
|
||||||
#include <wch/ch32v0/ch32v003f4p.dtsi>
|
#include <wch/ch32v0/ch32v003f4p.dtsi>
|
||||||
#include "ch32v003f4p6_dev_board-pinctrl.dtsi"
|
#include "ch32v003f4p6_dev_board-pinctrl.dtsi"
|
||||||
|
|
||||||
|
#include <zephyr/dt-bindings/gpio/gpio.h>
|
||||||
|
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "ch32v003f4p6_dev_board";
|
model = "ch32v003f4p6_dev_board";
|
||||||
compatible = "wch,ch32v003";
|
compatible = "wch,ch32v003";
|
||||||
|
@ -46,10 +49,21 @@
|
||||||
clocks = <&pll>;
|
clocks = <&pll>;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&gpioc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
&gpiod {
|
&gpiod {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
&i2c1 {
|
||||||
|
status = "okay";
|
||||||
|
clock-frequency = <I2C_BITRATE_STANDARD>;
|
||||||
|
pinctrl-0 = <&i2c1_default>;
|
||||||
|
pinctrl-names = "default";
|
||||||
|
};
|
||||||
|
|
||||||
&usart1 {
|
&usart1 {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
current-speed = <115200>;
|
current-speed = <115200>;
|
||||||
|
|
|
@ -10,3 +10,4 @@ flash: 16
|
||||||
supported:
|
supported:
|
||||||
- gpio
|
- gpio
|
||||||
- uart
|
- uart
|
||||||
|
- i2c
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue