From 99fbef14c215562cd4d62103e46f0a2f394f629e Mon Sep 17 00:00:00 2001 From: Michael Hope Date: Sun, 25 May 2025 09:40:23 +0000 Subject: [PATCH] boards: wch: update the bord test definitions to match the new drivers The CH32V series now has GPIO, watchdog, I2C, and PWM drivers. Enable Twister for these drivers by updating the board definitions to match. On the larger chips, also enable the watchdog in Devicetree so it's usable by the sample. Note that the 203 and 303 do not yet have the appropriate iwdg Devicetree node. Signed-off-by: Michael Hope --- boards/wch/ch32v003evt/ch32v003evt.yaml | 3 +++ .../ch32v003f4p6_dev_board.yaml | 4 +++- boards/wch/ch32v006evt/ch32v006evt.dts | 5 +++++ boards/wch/ch32v006evt/ch32v006evt.yaml | 1 + boards/wch/ch32v303vct6_evt/ch32v303vct6_evt.yaml | 14 ++++++++++++++ boards/wch/linkw/linkw.dts | 5 +++++ boards/wch/linkw/linkw.yaml | 4 ++++ .../bluepillplus_ch32v203.yaml | 3 +++ 8 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 boards/wch/ch32v303vct6_evt/ch32v303vct6_evt.yaml diff --git a/boards/wch/ch32v003evt/ch32v003evt.yaml b/boards/wch/ch32v003evt/ch32v003evt.yaml index 5e768fd1f4a..af6e3fa0dfe 100644 --- a/boards/wch/ch32v003evt/ch32v003evt.yaml +++ b/boards/wch/ch32v003evt/ch32v003evt.yaml @@ -11,3 +11,6 @@ supported: - dma - gpio - i2c + - pwm + - uart + - watchdog diff --git a/boards/wch/ch32v003f4p6_dev_board/ch32v003f4p6_dev_board.yaml b/boards/wch/ch32v003f4p6_dev_board/ch32v003f4p6_dev_board.yaml index e4823b08a3a..683ba85c03f 100644 --- a/boards/wch/ch32v003f4p6_dev_board/ch32v003f4p6_dev_board.yaml +++ b/boards/wch/ch32v003f4p6_dev_board/ch32v003f4p6_dev_board.yaml @@ -9,5 +9,7 @@ ram: 2 flash: 16 supported: - gpio - - uart - i2c + - pwm + - uart + - watchdog diff --git a/boards/wch/ch32v006evt/ch32v006evt.dts b/boards/wch/ch32v006evt/ch32v006evt.dts index 2cd0e20abeb..a450a24c716 100644 --- a/boards/wch/ch32v006evt/ch32v006evt.dts +++ b/boards/wch/ch32v006evt/ch32v006evt.dts @@ -57,6 +57,7 @@ led0 = &blue_led1; led1 = &blue_led2; pwm-led0 = &blue_pwm2; + watchdog0 = &iwdg; }; }; @@ -88,3 +89,7 @@ pinctrl-0 = <&usart1_default>; pinctrl-names = "default"; }; + +&iwdg { + status = "okay"; +}; diff --git a/boards/wch/ch32v006evt/ch32v006evt.yaml b/boards/wch/ch32v006evt/ch32v006evt.yaml index e3d97db9f1f..08bd8b523f9 100644 --- a/boards/wch/ch32v006evt/ch32v006evt.yaml +++ b/boards/wch/ch32v006evt/ch32v006evt.yaml @@ -12,5 +12,6 @@ supported: - gpio - i2c - pwm + - uart - watchdog vendor: wch diff --git a/boards/wch/ch32v303vct6_evt/ch32v303vct6_evt.yaml b/boards/wch/ch32v303vct6_evt/ch32v303vct6_evt.yaml new file mode 100644 index 00000000000..2f362b68b57 --- /dev/null +++ b/boards/wch/ch32v303vct6_evt/ch32v303vct6_evt.yaml @@ -0,0 +1,14 @@ +identifier: ch32v303vct6_evt +name: WCH CH32V303VCT6-EVT Evaluation Board +type: mcu +arch: riscv +toolchain: + - cross-compile + - zephyr +ram: 32 +flash: 480 +supported: + - gpio + - i2c + - pwm + - uart diff --git a/boards/wch/linkw/linkw.dts b/boards/wch/linkw/linkw.dts index 50f749ef28c..b362cc51266 100644 --- a/boards/wch/linkw/linkw.dts +++ b/boards/wch/linkw/linkw.dts @@ -51,6 +51,7 @@ aliases { led0 = &blue_led; sw0 = &mode; + watchdog0 = &iwdg; }; }; @@ -82,3 +83,7 @@ pinctrl-0 = <&usart2_default>; pinctrl-names = "default"; }; + +&iwdg { + status = "okay"; +}; diff --git a/boards/wch/linkw/linkw.yaml b/boards/wch/linkw/linkw.yaml index fb0db29bc12..d59a5d3730c 100644 --- a/boards/wch/linkw/linkw.yaml +++ b/boards/wch/linkw/linkw.yaml @@ -10,3 +10,7 @@ flash: 128 supported: - dma - gpio + - i2c + - pwm + - uart + - watchdog diff --git a/boards/weact/bluepillplus_ch32v203/bluepillplus_ch32v203.yaml b/boards/weact/bluepillplus_ch32v203/bluepillplus_ch32v203.yaml index e1a2745db98..00b1f3fbd00 100644 --- a/boards/weact/bluepillplus_ch32v203/bluepillplus_ch32v203.yaml +++ b/boards/weact/bluepillplus_ch32v203/bluepillplus_ch32v203.yaml @@ -9,3 +9,6 @@ ram: 20 flash: 224 supported: - gpio + - i2c + - pwm + - uart