Skip to content

Commit 0a3b086

Browse files
committed
boards: add rtl872xda_evb board
add initial version of rtl872xda_evb board Signed-off-by: zjian zhang <zjian_zhang@realsil.com.cn>
1 parent f3daad2 commit 0a3b086

File tree

10 files changed

+204
-0
lines changed

10 files changed

+204
-0
lines changed

boards/realtek/index.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _boards-realtek:
2+
3+
Realtek
4+
#######
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
:glob:
9+
10+
**/*
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_RTL872XDA_EVB
5+
select SOC_AMEBADPLUS
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-M55" "--speed=4000")
5+
6+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: rtl872xda_evb
3+
vendor: realtek
4+
socs:
5+
- name: amebadplus
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
.. _rtl872xda_evb:
2+
3+
RTL872XDA-EVB
4+
#############
5+
6+
Overview
7+
********
8+
9+
The Realtek RTL8721Dx Series is a Combo SoC that supports dual-band Wi-Fi 4 (2.4GHz + 5GHz) and
10+
BLE 5.0 specifications. With excellent ultra-low power consumption, enhanced encryption strategy
11+
(PSA Level 2), and abundant peripheral resources, it is widely used in smart home appliance,
12+
line controller, smart door lock, battery camera, smart remote controller, Wi-Fi Speaker, Wi-Fi
13+
Full MAC NIC, BLE gateway, and smart POS, etc. For more information, check `RTL872XDA-EVB`_.
14+
15+
The features include the following:
16+
17+
- Dual cores: Real-M300 and Real-M200
18+
- 512KB on-chip SRAM
19+
- 802.11 a/b/g/n 1 x 1, 2.4GHz + 5GHz
20+
- Supports BLE 5.0
21+
- Peripheral Interface:
22+
23+
- Multi-communication interfaces: SPI x 2, UART x 4, I2C x 2
24+
- Hardware Key-Scan interface supports up to 8*8 (64) keys
25+
- Hardware IR transceiver can easily adapt to various IR protocols
26+
- Supports Real-Time Clock timer together with 10 basic timers
27+
- Supports 8 channels of PWM timer and 1 capture timer
28+
- Supports 7 channels of general 12-bit ADC and 1 channel of VBAT
29+
- Supports 4 channels of touch pad
30+
- Supports 8 independent channels of GDMA
31+
- Supports USB 2.0 full-speed device mode
32+
- Supports SDIO device with 1-bit and 4-bit mode
33+
- Embeds a serial LEDC to control the external LED lamps
34+
- Integrated Pixel Processing Engine (PPE) to process pixel data faster
35+
- Integrated OSPI display interface supports screens with OSPI/QSPI/SPI interfaces
36+
- Integrated audio codec supports 2 channels DMIC interface
37+
- I2S x 2: up to 384kHz sampling rate
38+
39+
- Cryptographic hardware acceleration (TRNG, ECC, SHA-2, AES)
40+
41+
.. figure:: rtl872xda_evb.webp
42+
:align: center
43+
:alt: RTL872XDA-EVB
44+
45+
For more information, Get application note and datasheet at `RTL8721Dx Series`_ depending on chip you use.
46+
47+
Supported Features
48+
==================
49+
50+
Currently Zephyr's ``rtl872xda_evb`` board supports the following features:
51+
52+
+------------+------------+-------------------------------------+
53+
| Interface | Controller | Driver/Component |
54+
+============+============+=====================================+
55+
| UART | on-chip | serial |
56+
+------------+------------+-------------------------------------+
57+
| GPIO | on-chip | gpio |
58+
+------------+------------+-------------------------------------+
59+
| PINMUX | on-chip | pinctrl |
60+
+------------+------------+-------------------------------------+
61+
| NVIC | on-chip | nested vector interrupt controller |
62+
+------------+------------+-------------------------------------+
63+
64+
Building
65+
********
66+
67+
Here is an example for building the :zephyr:code-sample:`hello_world` application.
68+
69+
.. zephyr-app-commands::
70+
:zephyr-app: samples/hello_world
71+
:board: rtl872xda_evb
72+
:goals: buil
73+
74+
Flashing
75+
********
76+
77+
When the build finishes, downloading images into flash by `AmebaImageTool`_:
78+
79+
See the ApplicationNote chapter Image Tool from documentation links for more details.
80+
81+
#. Environment Requirements: EX. WinXP, Win 7 or later, Microsoft .NET Framework 4.0.
82+
#. Connect chip and PC with USB wire.
83+
#. Choose the Device profiles according to the chip you use.
84+
#. Select the corresponding serial port and transmission baud rate. The default baud rate is 1500000.
85+
#. 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].
86+
#. 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.
87+
88+
.. note::
89+
90+
For an empty chip, the bootloader and app image shall be downloaded.
91+
92+
Debugging
93+
*********
94+
95+
Using SWD through PA30(SWD_CLK) and PA31(SWD_DAT).
96+
97+
References
98+
**********
99+
100+
.. _`RTL872XDA-EVB`: https://www.realmcu.com/en/Home/Product/add965ea-d661-4a63-9514-d18b6912f8ab#
101+
.. _`RTL8721Dx Series`: https://www.realmcu.com
102+
.. _`AmebaImageTool`: https://github.com/Ameba-AIoT/ameba-rtos/blob/master/tools/ameba/ImageTool/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/amebadplus-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('B', 4, AMEBA_LOG_UART)>, /* RXD */
16+
<AMEBA_PINMUX('B', 5, AMEBA_LOG_UART)>; /* 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/amebadplus/amebadplus.dtsi>
10+
#include "rtl872xda_evb-pinctrl.dtsi"
11+
12+
/ {
13+
model = "RealTek AmebaDplus RTL872XDA EVB";
14+
compatible = "realtek,rtl872xda_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: rtl872xda_evb
5+
name: Realtek rtl872xda 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: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2024 Realtek Semiconductor Corp.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Console
5+
CONFIG_CONSOLE=y
6+
CONFIG_UART_CONSOLE=y
7+
8+
# Enable LogUart
9+
CONFIG_SERIAL=y

0 commit comments

Comments
 (0)