Skip to content

Commit 8fe6e01

Browse files
cocoeolicarlescufi
authored andcommitted
boards: arm64: provide support for ROC-RK3568-PC
This is support for AArch64 development board. The board uses 4-core Cortex-A55, which are based on the ARMv8.2 architecture. In addition,we support smp support and it can use 4-cores to run basic samples. Signed-off-by: Charlie Xiong <[email protected]>
1 parent 314b72f commit 8fe6e01

20 files changed

+484
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SPDX-License-Identifier: Apache-2.0
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Copyright 2022 HNU-ESNL
2+
# Copyright 2022 openEuler SIG-Zephyr
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config BOARD_ROC_RK3568_PC
6+
bool "Rockchip ROC-RK3568-PC"
7+
depends on SOC_SERIES_RK3568
8+
select ARM64
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Copyright 2022 HNU-ESNL
2+
# Copyright 2022 openEuler SIG-Zephyr
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
if BOARD_ROC_RK3568_PC
6+
7+
config BOARD
8+
default "roc_rk3568_pc"
9+
10+
endif # BOARD_ROC_RK3568_PC
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# SPDX-License-Identifier: Apache-2.0
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
.. _roc_rk3568_pc:
2+
3+
Firefly ROC-RK3568-PC (Quad-core Cortex-A55)
4+
############################################
5+
6+
Overview
7+
********
8+
9+
The ROC-RK3568-PC is a Quad-Core 64-Bit Mini Computer, which supports 4G large RAM. M.2
10+
and SATA3.0 interfaces enables expansion with large hard drives.
11+
Providing dual Gigabit Ethernet ports, it supports WiFi 6 wireless transmission.
12+
Control Port can be connected with RS485/RS232 devices.
13+
14+
RK3568 quad-core 64-bit Cortex-A55 processor, with brand new ARM v8.2-A architecture,
15+
has frequency up to 2.0GHz. Zephyr OS is ported to run on it.
16+
17+
18+
- Board features:
19+
20+
- RAM: 4GB LPDDR4
21+
- Storage:
22+
23+
- 32GB eMMC
24+
- M.2 PCIe 3.0 x 1 (Expand with 2242 / 2280 NVMe SSD)
25+
- TF-Card Slot
26+
- Wireless:
27+
28+
- Supports WiFi 6 (802.11 AX)
29+
- Supports BT5.0
30+
- USB:
31+
32+
- One USB 3.0
33+
- Two USB 2.0
34+
- One Type-C
35+
- Ethernet
36+
- M.2 PCIe3.0 (Expand with NVMe SSD)
37+
- LEDs:
38+
39+
- 1x Power status LED
40+
- Debug
41+
42+
- UART debug ports for board
43+
44+
45+
Supported Features
46+
==================
47+
48+
The Zephyr roc_rk3568_pc board configuration supports the following hardware
49+
features:
50+
51+
+-----------+------------+-------------------------------------+
52+
| Interface | Controller | Driver/Component |
53+
+===========+============+=====================================+
54+
| GIC-v3 | on-chip | interrupt controller |
55+
+-----------+------------+-------------------------------------+
56+
| ARM TIMER | on-chip | system clock |
57+
+-----------+------------+-------------------------------------+
58+
| UART | on-chip | serial port |
59+
+-----------+------------+-------------------------------------+
60+
61+
Devices
62+
========
63+
System Clock
64+
------------
65+
66+
This board configuration uses a system clock frequency of 24 MHz.
67+
Cortex-A55 Core runs up to 2.0 GHz.
68+
69+
Serial Port
70+
-----------
71+
72+
This board configuration uses a single serial communication channel with the
73+
CPU's UART2.
74+
75+
Programming and Debugging
76+
*************************
77+
78+
Use U-Boot to load the zephyr.bin to the memory and kick it:
79+
80+
.. code-block:: console
81+
82+
tftp 0x40000000 zephyr.bin; dcache flush; icache flush; dcache off; icache off; go 0x40000000
83+
84+
Use this configuration to run basic Zephyr applications and kernel tests,
85+
for example, with the :zephyr:code-sample:`synchronization` sample:
86+
87+
.. zephyr-app-commands::
88+
:zephyr-app: samples/synchronization
89+
:host-os: unix
90+
:board: roc_rk3568_pc
91+
:goals: run
92+
93+
This will build an image with the synchronization sample app, boot it and
94+
display the following ram console output:
95+
96+
.. code-block:: console
97+
98+
*** Booting Zephyr OS build bc695c6df5eb ***
99+
thread_a: Hello World from cpu 0 on roc_rk3568_pc!
100+
thread_b: Hello World from cpu 0 on roc_rk3568_pc!
101+
thread_a: Hello World from cpu 0 on roc_rk3568_pc!
102+
thread_b: Hello World from cpu 0 on roc_rk3568_pc!
103+
104+
105+
roc_rk3568_pc_smp support, use this configuration to run Zephyr smp applications and subsys tests,
106+
for example, with the :zephyr:code-sample:`synchronization` sample:
107+
108+
.. zephyr-app-commands::
109+
:zephyr-app: samples/synchronization
110+
:host-os: unix
111+
:board: roc_rk3568_pc_smp
112+
:goals: run
113+
114+
This will build an image with the shell_module sample app, boot it and
115+
display the following ram console output:
116+
117+
.. code-block:: console
118+
119+
*** Booting Zephyr OS build bc695c6df5eb ***
120+
I/TC: Secondary CPU 1 initializing
121+
I/TC: Secondary CPU 1 switching to normal world boot
122+
I/TC: Secondary CPU 2 initializing
123+
I/TC: Secondary CPU 2 switching to normal world boot
124+
I/TC: Secondary CPU 3 initializing
125+
I/TC: Secondary CPU 3 switching to normal world boot
126+
Secondary CPU core 1 (MPID:0x100) is up
127+
Secondary CPU core 2 (MPID:0x200) is up
128+
Secondary CPU core 3 (MPID:0x300) is up
129+
130+
thread_a: Hello World from cpu 0 on roc_rk3568_pc!
131+
thread_b: Hello World from cpu 1 on roc_rk3568_pc!
132+
thread_a: Hello World from cpu 0 on roc_rk3568_pc!
133+
thread_b: Hello World from cpu 1 on roc_rk3568_pc!
134+
135+
References
136+
==========
137+
138+
More information can refer to Firefly official website:
139+
`Firefly website`_.
140+
141+
.. _Firefly website:
142+
https://en.t-firefly.com/product/industry/rocrk3568pc.html?theme=pc
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
/*
2+
* Copyright 2022 HNU-ESNL
3+
* Copyright 2022 openEuler SIG-Zephyr
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <arm64/rockchip/rk3568.dtsi>
10+
#include <common/mem.h>
11+
12+
/ {
13+
model = "Firefly ROC-RK3568-PC";
14+
compatible = "rockchip,rk3568";
15+
16+
chosen {
17+
zephyr,console = &uart2;
18+
zephyr,shell-uart = &uart2;
19+
zephyr,sram = &sram0;
20+
};
21+
22+
sram0: memory@40000000 {
23+
device_type = "memory";
24+
compatible = "mmio-sram";
25+
reg = <0x40000000 DT_SIZE_M(1)>;
26+
};
27+
28+
};
29+
30+
&uart2 {
31+
status = "okay";
32+
current-speed = <1500000>;
33+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
identifier: roc_rk3568_pc
2+
name: Rockchip ROC RK3568 PC
3+
type: mcu
4+
arch: arm64
5+
toolchain:
6+
- zephyr
7+
- cross-compile
8+
ram: 1024
9+
testing:
10+
default: true
11+
ignore_tags:
12+
- net
13+
- bluetooth
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Copyright 2021 HNU-ESNL
2+
# Copyright 2022 openEuler SIG-Zephyr
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
# Platform Configuration
6+
CONFIG_SOC_SERIES_RK3568=y
7+
CONFIG_SOC_RK3568=y
8+
CONFIG_BOARD_ROC_RK3568_PC=y
9+
CONFIG_ARM_ARCH_TIMER=y
10+
11+
# Serial Drivers
12+
CONFIG_SERIAL=y
13+
CONFIG_UART_NS16550=y
14+
CONFIG_UART_INTERRUPT_DRIVEN=y
15+
16+
# Enable console
17+
CONFIG_CONSOLE=y
18+
CONFIG_UART_CONSOLE=y
19+
20+
# ARMv8 NS world with cache management
21+
CONFIG_ARMV8_A_NS=y
22+
CONFIG_CACHE_MANAGEMENT=y
23+
24+
# Clock support
25+
CONFIG_CLOCK_CONTROL=y
26+
CONFIG_TICKLESS_KERNEL=y
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
/*
2+
* Copyright 2022 HNU-ESNL
3+
* Copyright 2022 openEuler SIG-Zephyr
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include "roc_rk3568_pc.dts"
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
identifier: roc_rk3568_pc_smp
2+
name: Rockchip ROC RK3568 PC SMP
3+
type: mcu
4+
arch: arm64
5+
toolchain:
6+
- zephyr
7+
- cross-compile
8+
ram: 1024
9+
supported:
10+
- smp
11+
testing:
12+
default: true
13+
ignore_tags:
14+
- net
15+
- bluetooth

0 commit comments

Comments
 (0)