-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: riscv: 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]>
- Loading branch information
Showing
15 changed files
with
306 additions
and
0 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_CH565W_EVT | ||
bool "WCH CH565W-EVT" | ||
depends on SOC_CH565 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_CH565W_EVT | ||
|
||
config BOARD | ||
default "ch565w_evt" | ||
|
||
endif # BOARD_CH565W_EVT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
include(${ZEPHYR_BASE}/boards/common/wchisp.board.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
#include <wch/ch565w.dtsi> | ||
|
||
/ { | ||
model = "WCH CH565W-EVT"; | ||
compatible = "wch,ch565w-evt"; | ||
|
||
aliases { | ||
led0 = &led_0; | ||
led1 = &led_1; | ||
led2 = &led_2; | ||
}; | ||
|
||
chosen { | ||
zephyr,sram = &rams; | ||
zephyr,flash = &flash; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
led_0: led-0 { | ||
gpios = <&gpioa 9 GPIO_ACTIVE_LOW>; | ||
label = "LED0"; | ||
}; | ||
|
||
led_1: led-1 { | ||
gpios = <&gpiob 22 GPIO_ACTIVE_LOW>; | ||
label = "LED1"; | ||
}; | ||
|
||
led_2: led-2 { | ||
gpios = <&gpiob 23 GPIO_ACTIVE_LOW>; | ||
label = "LED2"; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
identifier: ch565w_evt | ||
name: WCH CH565W-EVT | ||
type: mcu | ||
arch: riscv32 | ||
toolchain: | ||
- zephyr | ||
supported: | ||
- clock | ||
- gpio | ||
- interrupt-controller | ||
- timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_SOC_SERIES_CH56X=y | ||
CONFIG_SOC_CH565=y | ||
CONFIG_BOARD_CH565W_EVT=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.. _ch565w_evt: | ||
|
||
CH565W-EVT | ||
########## | ||
|
||
Overview | ||
******** | ||
|
||
The CH565W-EVT is a evaluation board for the CH565 chip. | ||
|
||
CH565/9 is a member of the QingKe V3A family developed by WCH. | ||
|
||
Hardware | ||
******** | ||
- QingKe V3A RISC-V RV32IMAC core, running up to 120MHz | ||
- 448KB Flash | ||
- 32/64/96KB + 16KB SRAM | ||
- 49 GPIOs | ||
- 4 UARTs | ||
- 2 SPIs | ||
- 1 DVP | ||
- USB 2.0 High Speed | ||
- USB 3.0 Super Speed | ||
|
||
Supported Features | ||
================== | ||
The CH565W-EVT supports the following features: | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
|
||
* - Peripheral | ||
- Kconfig option | ||
- Devicetree compatible | ||
* - GPIO | ||
- N/A | ||
- :dtcompatible:`wch,ch56x-gpio` | ||
* - HCLK | ||
- N/A | ||
- :dtcompatible:`wch,ch56x-hclk` | ||
* - PFIC | ||
- N/A | ||
- :dtcompatible:`wch,qingke-pfic` | ||
* - SYSTICK | ||
- N/A | ||
- :dtcompatible:`wch,qingke-v3-systick` | ||
|
||
Other hardware features have not been enabled yet for this board. | ||
|
||
Programming and Debugging | ||
************************* | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/basic/blinky | ||
:board: ch565w_evt | ||
:goals: build flash | ||
|
||
Flashing | ||
======== | ||
|
||
The WCH MCUs can be flashed via USB (using WCHISPTool), or via WCH-Link. | ||
|
||
WCHISPTool | ||
---------- | ||
|
||
`WCHISPTool_CMD <https://wch-ic.com/downloads/WCHISPTool_CMD_ZIP.html>`_ is required | ||
to flash the board. Add it to the `PATH` environment variable, and refer to the | ||
tool's documentation for generating the device configuration file. | ||
|
||
.. code-block:: console | ||
west flash --device XXXX --cfg-file /path/to/CH565.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config BOARD_CH569W_EVT | ||
bool "WCH CH569W-EVT" | ||
depends on SOC_CH569 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
if BOARD_CH569W_EVT | ||
|
||
config BOARD | ||
default "ch569w_evt" | ||
|
||
endif # BOARD_CH569W_EVT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
include(${ZEPHYR_BASE}/boards/common/wchisp.board.cmake) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/* | ||
* Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
/dts-v1/; | ||
|
||
#include <zephyr/dt-bindings/gpio/gpio.h> | ||
#include <wch/ch569w.dtsi> | ||
|
||
/ { | ||
model = "WCH CH569W-EVT"; | ||
compatible = "wch,ch569w-evt"; | ||
|
||
aliases { | ||
led0 = &led_0; | ||
led1 = &led_1; | ||
led2 = &led_2; | ||
}; | ||
|
||
chosen { | ||
zephyr,sram = &rams; | ||
zephyr,flash = &flash; | ||
}; | ||
|
||
leds { | ||
compatible = "gpio-leds"; | ||
|
||
led_0: led-0 { | ||
gpios = <&gpiob 24 GPIO_ACTIVE_LOW>; | ||
label = "LED0"; | ||
}; | ||
|
||
led_1: led-1 { | ||
gpios = <&gpiob 22 GPIO_ACTIVE_LOW>; | ||
label = "LED1"; | ||
}; | ||
|
||
led_2: led-2 { | ||
gpios = <&gpiob 23 GPIO_ACTIVE_LOW>; | ||
label = "LED2"; | ||
}; | ||
}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
identifier: ch569w_evt | ||
name: WCH CH569W-EVT | ||
type: mcu | ||
arch: riscv32 | ||
toolchain: | ||
- zephyr | ||
supported: | ||
- clock | ||
- gpio | ||
- interrupt-controller | ||
- timer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Copyright (c) 2023 Chen Xingyu <[email protected]> | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
CONFIG_SOC_SERIES_CH56X=y | ||
CONFIG_SOC_CH569=y | ||
CONFIG_BOARD_CH569W_EVT=y |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.. _ch569w_evt: | ||
|
||
CH569W-EVT | ||
########## | ||
|
||
Overview | ||
******** | ||
|
||
The CH569W-EVT is a evaluation board for the CH569 chip. | ||
|
||
CH569/9 is a member of the QingKe V3A family developed by WCH. | ||
|
||
Hardware | ||
******** | ||
- QingKe V3A RISC-V RV32IMAC core, running up to 120MHz | ||
- 448KB Flash | ||
- 32/64/96KB + 16KB SRAM | ||
- 49 GPIOs | ||
- 4 UARTs | ||
- 2 SPIs | ||
- 1 HSPI | ||
- USB 2.0 High Speed | ||
- USB 3.0 Super Speed | ||
|
||
Supported Features | ||
================== | ||
The CH569W-EVT supports the following features: | ||
|
||
.. list-table:: | ||
:header-rows: 1 | ||
|
||
* - Peripheral | ||
- Kconfig option | ||
- Devicetree compatible | ||
* - GPIO | ||
- N/A | ||
- :dtcompatible:`wch,ch56x-gpio` | ||
* - HCLK | ||
- N/A | ||
- :dtcompatible:`wch,ch56x-hclk` | ||
* - PFIC | ||
- N/A | ||
- :dtcompatible:`wch,qingke-pfic` | ||
* - SYSTICK | ||
- N/A | ||
- :dtcompatible:`wch,qingke-v3-systick` | ||
|
||
Other hardware features have not been enabled yet for this board. | ||
|
||
Programming and Debugging | ||
************************* | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/basic/blinky | ||
:board: ch569w_evt | ||
:goals: build flash | ||
|
||
Flashing | ||
======== | ||
|
||
The WCH MCUs can be flashed via USB (using WCHISPTool), or via WCH-Link. | ||
|
||
WCHISPTool | ||
---------- | ||
|
||
`WCHISPTool_CMD <https://wch-ic.com/downloads/WCHISPTool_CMD_ZIP.html>`_ is required | ||
to flash the board. Add it to the `PATH` environment variable, and refer to the | ||
tool's documentation for generating the device configuration file. | ||
|
||
.. code-block:: console | ||
west flash --device XXXX --cfg-file /path/to/CH569.ini |