Skip to content

Commit d3c4086

Browse files
committed
boards: wch: Bring up WCH CH56(5/9)W-EVT
CH565W-EVT and CH569W-EVT are boards by WCH for the evaluation of CH565W and CH569W chips. Signed-off-by: Chen Xingyu <[email protected]>
1 parent 4ad9fd3 commit d3c4086

File tree

15 files changed

+348
-0
lines changed

15 files changed

+348
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2023-2024 Chen Xingyu <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_CH565W_EVT
5+
select SOC_CH565

boards/wch/ch565w_evt/board.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2023-2024 Chen Xingyu <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
include(${ZEPHYR_BASE}/boards/common/wchisp.board.cmake)

boards/wch/ch565w_evt/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: ch565w_evt
3+
vendor: wch
4+
socs:
5+
- name: ch565
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright (c) 2023-2024 Chen Xingyu <[email protected]>
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/dts-v1/;
7+
8+
#include <zephyr/dt-bindings/gpio/gpio.h>
9+
#include <wch/ch56x/ch565w.dtsi>
10+
#include <wch/ch56x/ch565w-pinctrl.dtsi>
11+
12+
/ {
13+
model = "WCH CH565W-EVT";
14+
compatible = "wch,ch565w-evt";
15+
16+
aliases {
17+
led0 = &led_0;
18+
led1 = &led_1;
19+
led2 = &led_2;
20+
};
21+
22+
chosen {
23+
zephyr,sram = &rams;
24+
zephyr,flash = &flash;
25+
zephyr,console = &uart1;
26+
zephyr,shell-uart = &uart1;
27+
};
28+
29+
leds {
30+
compatible = "gpio-leds";
31+
32+
led_0: led-0 {
33+
gpios = <&gpioa 9 GPIO_ACTIVE_LOW>;
34+
label = "LED0";
35+
};
36+
37+
led_1: led-1 {
38+
gpios = <&gpiob 22 GPIO_ACTIVE_LOW>;
39+
label = "LED1";
40+
};
41+
42+
led_2: led-2 {
43+
gpios = <&gpiob 23 GPIO_ACTIVE_LOW>;
44+
label = "LED2";
45+
};
46+
};
47+
};
48+
49+
&uart1 {
50+
status = "okay";
51+
current-speed = <115200>;
52+
pinctrl-0 = <&uart1_default>;
53+
pinctrl-names = "default";
54+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
identifier: ch565w_evt
2+
name: WCH CH565W-EVT
3+
type: mcu
4+
arch: riscv32
5+
toolchain:
6+
- zephyr
7+
supported:
8+
- clock-control
9+
- gpio
10+
- interrupt-controller
11+
- pinctrl
12+
- serial
13+
- timer
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2023-2024 Chen Xingyu <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_GPIO=y
5+
CONFIG_SERIAL=y
6+
CONFIG_CONSOLE=y
7+
CONFIG_UART_CONSOLE=y
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.. _ch565w_evt:
2+
3+
CH565W-EVT
4+
##########
5+
6+
Overview
7+
********
8+
9+
The CH565W-EVT is a evaluation board for the CH565 chip.
10+
11+
CH565/9 is a member of the QingKe V3A family developed by WCH.
12+
13+
Hardware
14+
********
15+
- QingKe V3A RISC-V RV32IMAC core, running up to 120MHz
16+
- 448KB Flash
17+
- 32/64/96KB + 16KB SRAM
18+
- 49 GPIOs
19+
- 4 UARTs
20+
- 2 SPIs
21+
- 1 DVP
22+
- USB 2.0 High Speed
23+
- USB 3.0 Super Speed
24+
25+
Supported Features
26+
==================
27+
The CH565W-EVT supports the following features:
28+
29+
.. list-table::
30+
:header-rows: 1
31+
32+
* - Peripheral
33+
- Kconfig option
34+
- Devicetree compatible
35+
* - Clock Mux
36+
- N/A
37+
- :dtcompatible:`wch,ch56x-clkmux`
38+
* - GPIO
39+
- :kconfig:option:`CONFIG_GPIO`
40+
- :dtcompatible:`wch,ch56x-gpio`
41+
* - PFIC
42+
- N/A
43+
- :dtcompatible:`wch,ch32v-pfic`
44+
* - PINCTRL
45+
- :kconfig:option:`CONFIG_PINCTRL`
46+
- :dtcompatible:`wch,ch5xx-pinctrl`
47+
* - SYSTICK
48+
- N/A
49+
- :dtcompatible:`wch,ch32v-v3-systick`
50+
* - UART
51+
- :kconfig:option:`CONFIG_SERIAL`
52+
- :dtcompatible:`wch,ch5xx-uart`
53+
54+
Other hardware features have not been enabled yet for this board.
55+
56+
Programming and Debugging
57+
*************************
58+
59+
.. zephyr-app-commands::
60+
:zephyr-app: samples/basic/blinky
61+
:board: ch565w_evt
62+
:goals: build
63+
64+
Flashing
65+
========
66+
67+
The WCH MCUs can be flashed via USB (using WCHISPTool), or via WCH-Link.
68+
69+
WCHISPTool
70+
----------
71+
72+
`WCHISPTool_CMD`_ is required to flash the board. Add it to the ``PATH``
73+
environment variable, and refer to the tool's documentation for generating the
74+
device configuration file.
75+
76+
.. code-block:: sh
77+
78+
west flash --device XXXX --cfg-file /path/to/CH565.ini
79+
80+
.. _WCHISPTool_CMD:
81+
https://wch-ic.com/downloads/WCHISPTool_CMD_ZIP.html
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2023-2024 Chen Xingyu <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_CH569W_EVT
5+
select SOC_CH569

boards/wch/ch569w_evt/board.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2023-2024 Chen Xingyu <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
include(${ZEPHYR_BASE}/boards/common/wchisp.board.cmake)

boards/wch/ch569w_evt/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: ch569w_evt
3+
vendor: wch
4+
socs:
5+
- name: ch569

0 commit comments

Comments
 (0)