Skip to content

Commit ffe4567

Browse files
RtkFPcaiyi_zhong
authored andcommitted
boards: realtek: add rts5817_maa_evb board
Add support for rts5817_maa_evb board Signed-off-by: Darcy Lu <darcy_lu@realsil.com.cn>
1 parent b8270de commit ffe4567

File tree

10 files changed

+217
-0
lines changed

10 files changed

+217
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Realtek Semiconductor, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_RTS5817_MAA_EVB
5+
select SOC_RTS5817
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2024 Realtek Semiconductor, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
set_property(TARGET runners_yaml_props_target PROPERTY bin_file zephyr.rts5817.bin)
4+
5+
board_set_flasher_ifnset(rtsflash)
6+
board_runner_args(rtsflash "--pid=0bda:5817" "--alt=0")
7+
board_finalize_runner_args(rtsflash)
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright (c) 2024 Realtek Semiconductor, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board:
5+
name: rts5817_maa_evb
6+
vendor: realtek
7+
socs:
8+
- name: rts5817
Binary file not shown.
Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
.. zephyr:board:: rts5817_maa_evb
2+
3+
Overview
4+
********
5+
6+
rts5817 is a high-performance MCU based on Realtek Real-M300 ARMv8-M architecture with Cortex-M33 instruction set compatible.
7+
8+
.. figure:: img/rts5817_maa_evb.webp
9+
:width: 400px
10+
:align: center
11+
:alt: rts5817_maa_evb
12+
13+
Hardware
14+
********
15+
16+
- 240MHz single-core 32-bit CPU with I-cache 32KB, D-cache 16KB
17+
- 48KB boot ROM
18+
- 256KB on-chip SRAM
19+
- 1KB PUFrt OTP
20+
- 2MB Flash
21+
- USB2.0 full speed/high speed device
22+
- Up to 11 GPIO
23+
- 2 x UART
24+
- 2 x Timer
25+
- 2 x SPI, one can support slave mode
26+
- Watchdog
27+
- DMA
28+
- Temperature sensor
29+
- Cryptographic hardware acceleration (RNG, SHA, AES)
30+
- Fingerprint mataching hardware acceleration (MAC, popcount, convolution, etc.)
31+
- SWD for debug
32+
33+
Supported Features
34+
==================
35+
36+
.. zephyr:board-supported-hw::
37+
38+
Programming and Debugging
39+
*************************
40+
41+
Building
42+
========
43+
44+
#. Build :zephyr:code-sample:`hello_world` application as you would normally do.
45+
46+
#. The file ``zephyr.rts5817.bin`` will be created if the build system can build successfully.
47+
This binary image can be found under file "build/zephyr/".
48+
49+
Flashing
50+
========
51+
52+
#. Short the two pins of ``J6`` to enter force rom mode (see `RTS5817MAA_EVB_User_Guide`_).
53+
#. Connect the board to your host computer using USB.
54+
#. Use ``west flash`` command to flash the image.
55+
#. Disconnect the two pins of ``J6`` and reboot, The :zephyr:code-sample:`hello_world` application is running.
56+
57+
References
58+
**********
59+
60+
.. target-notes::
61+
62+
.. _RTS5817MAA_EVB_User_Guide:
63+
https://github.com/RtkFP/Doc/blob/main/RTS5817MAA_EVB%20User%20Guide_V1.0.pdf
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright (c) 2024 Realtek Semiconductor, Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/dt-bindings/pinctrl/rts5817_pinctrl.h>
7+
8+
&pinctrl {
9+
uart0_default: uart0_default {
10+
group0 {
11+
pinmux = <P_SCL0_F_UART0_RX>, <P_SDA0_F_UART0_TX>;
12+
};
13+
};
14+
15+
/omit-if-no-ref/ sensor_spi_default: sensor_spi_default {
16+
group0 {
17+
pinmux = <P_SNR_MISO_F_SNR_MISO>, <P_SNR_MOSI_F_SNR_MOSI>,
18+
<P_SNR_CLK_F_SNR_CLK>;
19+
power-source = <IO_POWER_1V8>;
20+
bias-pull-down;
21+
};
22+
23+
group1 {
24+
pinmux = <P_SNR_CS_F_SNR_CS>, <P_SNR_RST_F_SNR_RST>;
25+
power-source = <IO_POWER_1V8>;
26+
bias-pull-up;
27+
};
28+
};
29+
30+
/omit-if-no-ref/ ssi_master_default: ssi_master_default {
31+
group0 {
32+
pinmux = <P_SSI_M_MISO_F_SSI_M_MISO>, <P_SSI_M_MOSI_F_SSI_M_MOSI>,
33+
<P_SSI_M_CS_F_SSI_M_CS>, <P_SSI_M_SCK_F_SSI_M_CLK>;
34+
bias-pull-down;
35+
};
36+
};
37+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) 2024 Realtek Semiconductor, Inc.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
/dts-v1/;
7+
#include <realtek/fingerprint/rts5817/rts5817.dtsi>
8+
#include "rts5817_maa_evb-pinctrl.dtsi"
9+
10+
/ {
11+
model = "Realtek rts5817_maa_evb";
12+
compatible = "realtek,rts5817_maa_evb";
13+
#address-cells = <1>;
14+
#size-cells = <1>;
15+
16+
chosen {
17+
zephyr,console = &uart0;
18+
zephyr,shell-uart = &uart0;
19+
};
20+
};
21+
22+
&clks {
23+
status = "okay";
24+
};
25+
26+
&reset {
27+
status = "okay";
28+
};
29+
30+
&watchdog {
31+
status = "okay";
32+
};
33+
34+
&uart0 {
35+
pinctrl-names = "default";
36+
pinctrl-0 = <&uart0_default>;
37+
current-speed = <57600>;
38+
status = "okay";
39+
};
40+
41+
&uart1 {
42+
status = "disabled";
43+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2024 Realtek Semiconductor, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
identifier: rts5817_maa_evb
5+
name: RTS5817 Platform for fingerprint
6+
type: mcu
7+
arch: arm
8+
ram: 256
9+
flash: 2048
10+
toolchain:
11+
- zephyr
12+
- gnuarmemb
13+
testing:
14+
default: true
15+
vendor: realtek
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright (c) 2024 Realtek Semiconductor, Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Enable clocks
5+
CONFIG_CLOCK_CONTROL=y
6+
7+
# Enable reset
8+
CONFIG_RESET=y
9+
10+
# Enable serial console
11+
CONFIG_SERIAL=y
12+
CONFIG_CONSOLE=y
13+
CONFIG_UART_CONSOLE=y
14+
15+
# Enable watchdog
16+
CONFIG_WATCHDOG=y
17+
CONFIG_WDT_DISABLE_AT_BOOT=y

dts/arm/realtek/fingerprint/rts5817/rts5817_base.dtsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,28 @@
7171
reg = <0x40100048 0x4>;
7272
status = "disabled";
7373
};
74+
75+
uart0: dwapb@40120000 {
76+
compatible = "ns16550";
77+
reg = <0x40120000 0x100>;
78+
reg-shift = <2>;
79+
interrupt-parent = <&nvic>;
80+
interrupts = <IRQ_NUM_UART0 0>;
81+
clocks = <&clks RTS_FP_CLK_UART0>;
82+
resets = <&reset SYS_FORCE_RST_UART0>;
83+
status = "disabled";
84+
};
85+
86+
uart1: dwapb@40128000 {
87+
compatible = "ns16550";
88+
reg = <0x40128000 0x100>;
89+
reg-shift = <2>;
90+
interrupt-parent = <&nvic>;
91+
interrupts = <IRQ_NUM_UART1 0>;
92+
clocks = <&clks RTS_FP_CLK_UART1>;
93+
resets = <&reset SYS_FORCE_RST_UART1>;
94+
status = "disabled";
95+
};
7496
};
7597
};
7698

0 commit comments

Comments
 (0)