From e4783692e497877c03ffca86ca73a06f6dad65d4 Mon Sep 17 00:00:00 2001 From: Camille BAUD Date: Fri, 21 Mar 2025 19:01:47 +0100 Subject: [PATCH] modules: hal_wch: add CH32V203 support Adds CH32V203 support Signed-off-by: Camille BAUD --- dts/riscv/wch/ch32v203/ch32v203.dtsi | 1 + modules/hal_wch/ch32fun.h | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/dts/riscv/wch/ch32v203/ch32v203.dtsi b/dts/riscv/wch/ch32v203/ch32v203.dtsi index d883895ed44..31c9c7a3b8d 100644 --- a/dts/riscv/wch/ch32v203/ch32v203.dtsi +++ b/dts/riscv/wch/ch32v203/ch32v203.dtsi @@ -69,6 +69,7 @@ reg = <0x40010000 16>; #address-cells = <1>; #size-cells = <1>; + clocks = <&rcc CH32V20X_V30X_CLOCK_AFIO>; gpioa: gpio@40010800 { compatible = "wch,gpio"; diff --git a/modules/hal_wch/ch32fun.h b/modules/hal_wch/ch32fun.h index cbe6126e2ab..3a49c763b50 100644 --- a/modules/hal_wch/ch32fun.h +++ b/modules/hal_wch/ch32fun.h @@ -17,6 +17,11 @@ #include #endif +#if defined(CONFIG_SOC_SERIES_QINGKE_V4B) +#define CH32V20x 1 +#include +#endif + #if defined(CONFIG_SOC_SERIES_QINGKE_V4C) #define CH32V20x 1 #include