Skip to content

Commit 145559b

Browse files
committed
soc: wch: Reorganize Qingke V4 Socs for future
Reorganization for deduplication. Signed-off-by: Camille BAUD <mail@massdriver.space>
1 parent 02b959e commit 145559b

14 files changed

+20
-16
lines changed

drivers/timer/Kconfig.wch_ch32v00x

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,6 @@
33

44
config CH32V00X_SYSTICK
55
bool "CH32V00X systick timer"
6-
depends on SOC_SERIES_QINGKE_V2A || SOC_SERIES_QINGKE_V4C
6+
depends on SOC_SERIES_QINGKE_V2A || SOC_SERIES_QINGKE_V4
77
default y
88
depends on DT_HAS_WCH_SYSTICK_ENABLED

modules/hal_wch/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
if(CONFIG_SOC_SERIES_QINGKE_V2A OR CONFIG_SOC_SERIES_QINGKE_V4C)
1+
if(CONFIG_SOC_FAMILY_CH32V)
22
zephyr_include_directories(${ZEPHYR_HAL_WCH_MODULE_DIR}/ch32v003fun .)
33
endif()

modules/hal_wch/ch32fun.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,9 @@
1212
#include <ch32v003fun.h>
1313
#endif
1414

15-
#if defined(CONFIG_SOC_SERIES_QINGKE_V4C)
15+
#if defined(CONFIG_SOC_CH32V208)
1616
#define CH32V20x 1
17+
#define CH32V20x_D8W 1
1718
#include <ch32v003fun.h>
1819
#endif
1920

soc/wch/ch32v/qingke_v4c/CMakeLists.txt renamed to soc/wch/ch32v/qingke_v4/CMakeLists.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Copyright (c) 2024 Michael Hope
2-
# Copyright (c) 2024 Jianxiong Gu
1+
# Copyright (c) 2025 MASSDRIVER EI
32
# SPDX-License-Identifier: Apache-2.0
43

54
zephyr_sources(

soc/wch/ch32v/qingke_v4/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
rsource "*/Kconfig"

soc/wch/ch32v/qingke_v4c/Kconfig.defconfig renamed to soc/wch/ch32v/qingke_v4/Kconfig.defconfig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
22
# SPDX-License-Identifier: Apache-2.0
33

4-
if SOC_SERIES_QINGKE_V4C
4+
if SOC_SERIES_QINGKE_V4
55

66
config SYS_CLOCK_HW_CYCLES_PER_SEC
77
default $(dt_node_int_prop_int,/cpus/cpu@0,clock-frequency)
@@ -18,6 +18,6 @@ config ISR_STACK_SIZE
1818
config CLOCK_CONTROL
1919
default y
2020

21-
rsource "Kconfig.defconfig.*"
21+
rsource "*/Kconfig.defconfig.*"
2222

23-
endif # SOC_SERIES_QINGKE_V4C
23+
endif # SOC_SERIES_QINGKE_V4
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
22
# SPDX-License-Identifier: Apache-2.0
33

4-
config SOC_SERIES_QINGKE_V4C
4+
config SOC_SERIES_QINGKE_V4
55
bool
66
select SOC_FAMILY_CH32V
77

88
config SOC_SERIES
9-
default "qingke_v4c" if SOC_SERIES_QINGKE_V4C
9+
default "qingke_v4" if SOC_SERIES_QINGKE_V4
1010

11-
rsource "Kconfig.soc.*"
11+
rsource "*/Kconfig.soc.*"

soc/wch/ch32v/qingke_v4c/pinctrl_soc.h renamed to soc/wch/ch32v/qingke_v4/pinctrl_soc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
/**
1111
* @brief Type to hold a pin's pinctrl configuration.
1212
*/
13-
struct ch32v208_pinctrl_soc_pin {
13+
struct qingke_v4_pinctrl_soc_pin {
1414
uint32_t config: 22;
1515
bool bias_pull_up: 1;
1616
bool bias_pull_down: 1;
@@ -21,7 +21,7 @@ struct ch32v208_pinctrl_soc_pin {
2121
uint8_t slew_rate: 2;
2222
};
2323

24-
typedef struct ch32v208_pinctrl_soc_pin pinctrl_soc_pin_t;
24+
typedef struct qingke_v4_pinctrl_soc_pin pinctrl_soc_pin_t;
2525

2626
#define Z_PINCTRL_STATE_PIN_INIT(node_id, prop, idx) \
2727
{ \

soc/wch/ch32v/qingke_v4c/Kconfig renamed to soc/wch/ch32v/qingke_v4/qingke_v4c/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# Copyright (c) 2025 MASSDRIVER EI (massdriver.space)
22
# SPDX-License-Identifier: Apache-2.0
33

4-
config SOC_SERIES_QINGKE_V4C
4+
config SOC_CH32V208
55
select RISCV_ISA_RV32I
66
select RISCV_ISA_EXT_M
77
select RISCV_ISA_EXT_A

soc/wch/ch32v/qingke_v4c/Kconfig.soc.ch32v208 renamed to soc/wch/ch32v/qingke_v4/qingke_v4c/Kconfig.soc.ch32v208

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
config SOC_CH32V208
55
bool
6-
select SOC_SERIES_QINGKE_V4C
6+
select SOC_SERIES_QINGKE_V4
77

88
config SOC
99
default "ch32v208" if SOC_CH32V208
File renamed without changes.

soc/wch/ch32v/soc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ family:
77
- name: qingke-v2a
88
socs:
99
- name: ch32v003
10-
- name: qingke-v4c
10+
- name: qingke-v4
1111
socs:
1212
- name: ch32v208

0 commit comments

Comments
 (0)