Skip to content

Commit 25f7c1e

Browse files
committed
boards: add rtl872xd_evb board
add initial version of rtl872xd_evb board Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
1 parent 2488b94 commit 25f7c1e

File tree

9 files changed

+179
-0
lines changed

9 files changed

+179
-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 Corp.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_RTL872XD_EVB
5+
select SOC_AMEBAD
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2024 Realtek Semiconductor Corp.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=Cortex-M33" "--speed=4000")
5+
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/realtek/rtl872xd_evb/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: rtl872xd_evb
3+
vendor: realtek
4+
socs:
5+
- name: amebad
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
.. zephyr:board:: rtl872xd_evb
2+
3+
Overview
4+
********
5+
6+
The Realtek RTL872xD Series is a Combo SoC that supports dual-band Wi-Fi 4 (2.4GHz + 5GHz) and
7+
BLE 5.0 specifications. With ultra-low power consumption, complete encryption strategy and abundant
8+
peripheral resources, it is widely in various products such as Home appliance control panel,
9+
Smart door, Smart toy, Smart voice, Smart remote control, Bluetooth gateway, Headset, Wi-Fi gamepad,
10+
Smart POS, etc. For more information, check `RTL872XD-EVB`_.
11+
12+
The features include the following:
13+
14+
- Dual cores: Real-M300 and Real-M200
15+
- 512KB + 64KB on-chip SRAM
16+
- 802.11 a/b/g/n 1 x 1, 2.4GHz + 5GHz
17+
- Supports BLE 5.0
18+
- Peripheral Interface:
19+
20+
- Multi-communication interfaces: SPI x 2, UART x 4, I2C x 1
21+
- Hardware Key-scan interface supports up to 36 keys
22+
- Hardware Quad-decoder supports statistical and comparison functions
23+
- Hardware IR transceiver can easily adapt to various IR protocols
24+
- SDIO/USB high speed interface (both host and slave)
25+
- Supports real-time clock together with 18 channels of PWM output
26+
- Supports 5 channels of touch pad and 6 channels of GDMA
27+
- Supports 7 channels of normal 12-bit ADC and 1 channel of VBAT
28+
- Integrated LCDC supports both RGB and I8080 interfaces
29+
- Integrated hardware crypto engine supports AES256/192/128 and SHA256
30+
- Integrated audio codec
31+
32+
For more information, Get application note and datasheet at `RTL872xCS/D Series`_ depending on chip you use.
33+
34+
Supported Features
35+
==================
36+
37+
.. zephyr:board-supported-hw::
38+
39+
Building
40+
********
41+
42+
Here is an example for building the :zephyr:code-sample:`hello_world` application.
43+
44+
.. zephyr-app-commands::
45+
:zephyr-app: samples/hello_world
46+
:board: rtl872xd_evb
47+
:goals: build
48+
49+
Flashing
50+
********
51+
52+
When the build finishes, downloading images into flash by `AmebaImageTool`_:
53+
54+
See the ApplicationNote chapter Image Tool from documentation links for more details.
55+
56+
#. Environment Requirements: EX. WinXP, Win 7 or later, Microsoft .NET Framework 4.0.
57+
#. Connect chip and PC with USB wire.
58+
#. Choose the Device profiles according to the chip you use.
59+
#. Select the corresponding serial port and transmission baud rate. The default baud rate is 1500000.
60+
#. Select the images to be programmed and set the start address and end address according to the flash layout, refer to [ameba_flashcfg.c/Flash_layout].
61+
#. Click the Download button and start. The progress bar will show the download progress of each image and the log window will show the operation status.
62+
63+
.. note::
64+
65+
For an empty chip, the bootloader and app image shall be downloaded.
66+
67+
Debugging
68+
*********
69+
70+
Using SWD through PB3(SWD_CLK) and PA27(SWD_DAT).
71+
72+
References
73+
**********
74+
75+
.. _`RTL872XD-EVB`: https://www.realmcu.com/en/Home/Products/RTL872xCS-RTL872xD-Series#
76+
.. _`RTL872xCS/D Series`: https://www.realmcu.com
77+
.. _`AmebaImageTool`: https://github.com/Ameba-AIoT/ameba-rtos/tree/master/tools/ameba/ImageTool_Legacy/AmebaImageTool.exe
Binary file not shown.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2024 Realtek Semiconductor Corp.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pinctrl/amebad-pinctrl.h>
8+
9+
&pinctrl {
10+
compatible = "realtek,ameba-pinctrl";
11+
12+
/*PA30 is SWD_CLK, PA31 is SWD_DAT(both pull-up internally)*/
13+
loguart_default: loguart_default {
14+
group1 {
15+
pinmux = <AMEBA_PINMUX('A', 8, AMEBA_LOGUART)>, /* RXD */
16+
<AMEBA_PINMUX('A', 7, AMEBA_LOGUART)>; /* TXD */
17+
bias-pull-up;
18+
};
19+
};
20+
};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2024 Realtek Semiconductor Corp.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <realtek/amebad/amebad.dtsi>
10+
#include "rtl872xd_evb-pinctrl.dtsi"
11+
12+
/ {
13+
model = "RealTek AmebaD RTL872XD EVB";
14+
compatible = "realtek,rtl872xd_evb";
15+
16+
chosen {
17+
zephyr,console = &loguart;
18+
zephyr,shell-uart = &loguart;
19+
zephyr,sram = &sram0;
20+
zephyr,flash = &flash0;
21+
};
22+
};
23+
24+
/* 4MB flash */
25+
&flash0 {
26+
reg = <0x0e000020 DT_SIZE_M(4)>;
27+
};
28+
29+
&loguart {
30+
status = "okay";
31+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2024 Realtek Semiconductor Corp.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
identifier: rtl872xd_evb
5+
name: Realtek rtl872xd evaluation board
6+
vendor: realtek
7+
type: mcu
8+
arch: arm
9+
toolchain:
10+
- zephyr
11+
- gnuarmemb
12+
ram: 512
13+
flash: 4096
14+
supported:
15+
- pinctrl
16+
- serial
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Copyright (c) 2024 Realtek Semiconductor Corp.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_RUNTIME_NMI=y
5+
6+
CONFIG_CORTEX_M_SYSTICK=y
7+
8+
# Enable hardware stack protection
9+
CONFIG_HW_STACK_PROTECTION=y
10+
11+
# This board implies building Non-Secure firmware
12+
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
13+
14+
# Console
15+
CONFIG_CONSOLE=y
16+
CONFIG_UART_CONSOLE=y
17+
18+
# Enable LogUart
19+
CONFIG_SERIAL=y

0 commit comments

Comments
 (0)