Skip to content

Commit 46f5e7b

Browse files
briclekartben
authored andcommitted
boards: ruiside: art-pi2: add minimum support
- introduced a new vendor ruiside, updated `dts/bindings/vendor-prefixes.txt` - add art-pi2 board basic support Signed-off-by: Shan Pen <[email protected]>
1 parent b469fc1 commit 46f5e7b

File tree

10 files changed

+347
-0
lines changed

10 files changed

+347
-0
lines changed
+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Shan Pen <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_ART_PI2
5+
select SOC_STM32H7R7XX

boards/ruiside/art_pi2/art_pi2.dts

+119
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
/*
2+
* Copyright (c) 2025 Shan Pen <[email protected]>
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include <st/h7rs/stm32h7r7X8.dtsi>
9+
#include <st/h7/stm32h7r7l8hxh-pinctrl.dtsi>
10+
#include <zephyr/dt-bindings/input/input-event-codes.h>
11+
12+
/ {
13+
model = "Ruiside Electronic ART-Pi2 board";
14+
compatible = "ruiside,art-pi2";
15+
16+
chosen {
17+
zephyr,console = &uart4;
18+
zephyr,shell-uart = &uart4;
19+
zephyr,sram = &sram0;
20+
zephyr,flash = &flash0;
21+
};
22+
23+
leds: leds {
24+
compatible = "gpio-leds";
25+
26+
red_led: led_1 {
27+
gpios = <&gpioo 1 GPIO_ACTIVE_HIGH>;
28+
label = "User LED1";
29+
};
30+
31+
blue_led: led_2 {
32+
gpios = <&gpioo 5 GPIO_ACTIVE_LOW>;
33+
label = "User LED2";
34+
};
35+
};
36+
37+
gpio_keys {
38+
compatible = "gpio-keys";
39+
40+
user_button: button_0 {
41+
label = "User";
42+
gpios = <&gpioc 13 GPIO_ACTIVE_LOW>;
43+
zephyr,code = <INPUT_KEY_0>;
44+
};
45+
};
46+
47+
aliases {
48+
led0 = &red_led;
49+
led1 = &blue_led;
50+
sw0 = &user_button;
51+
watchdog0 = &iwdg;
52+
die-temp0 = &die_temp;
53+
volt-sensor0 = &vref;
54+
volt-sensor1 = &vbat;
55+
};
56+
};
57+
58+
&dtcm {
59+
reg = <0x20000000 DT_SIZE_K(64)>;
60+
};
61+
62+
&clk_hsi48 {
63+
status = "okay";
64+
};
65+
66+
&clk_hse {
67+
clock-frequency = <DT_FREQ_M(24)>;
68+
status = "okay";
69+
};
70+
71+
&pll {
72+
div-m = <12>;
73+
mul-n = <250>;
74+
div-p = <2>;
75+
div-q = <2>;
76+
div-r = <2>;
77+
div-s = <2>;
78+
div-t = <2>;
79+
clocks = <&clk_hse>;
80+
status = "okay";
81+
};
82+
83+
&rcc {
84+
clocks = <&pll>;
85+
clock-frequency = <DT_FREQ_M(250)>;
86+
dcpre = <1>;
87+
hpre = <1>;
88+
ppre1 = <2>;
89+
ppre2 = <2>;
90+
ppre4 = <2>;
91+
ppre5 = <2>;
92+
};
93+
94+
&uart4 {
95+
pinctrl-0 = <&uart4_tx_pd1 &uart4_rx_pd0>;
96+
pinctrl-names = "default";
97+
current-speed = <115200>;
98+
status = "okay";
99+
};
100+
101+
&rng {
102+
status = "okay";
103+
};
104+
105+
&iwdg {
106+
status = "okay";
107+
};
108+
109+
&wwdg {
110+
status = "okay";
111+
};
112+
113+
&vref {
114+
status = "okay";
115+
};
116+
117+
&vbat {
118+
status = "okay";
119+
};

boards/ruiside/art_pi2/art_pi2.yaml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
identifier: art_pi2
2+
name: art pi2
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
ram: 640
8+
flash: 64
9+
supported:
10+
- gpio
11+
- uart
12+
- watchdog
13+
- entropy
14+
vendor: ruiside
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Copyright (c) 2025 Shan Pen <[email protected]>
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Enable SMPS
5+
CONFIG_POWER_SUPPLY_DIRECT_SMPS=y
6+
7+
# Enable MPU
8+
CONFIG_ARM_MPU=y
9+
10+
# Enable HW stack protection
11+
CONFIG_HW_STACK_PROTECTION=y
12+
13+
# Enable UART driver
14+
CONFIG_SERIAL=y
15+
# Enable console
16+
CONFIG_CONSOLE=y
17+
CONFIG_UART_CONSOLE=y
18+
19+
# Enable GPIO
20+
CONFIG_GPIO=y

boards/ruiside/art_pi2/board.cmake

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
# keep first
4+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset-mode=hw")
5+
board_runner_args(pyocd "--target=stm32h7r7l8hxh")
6+
7+
# keep first
8+
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)

boards/ruiside/art_pi2/board.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: art_pi2
3+
full_name: ART-Pi2
4+
vendor: ruiside
5+
socs:
6+
- name: stm32h7r7xx
70.3 KB
Binary file not shown.

boards/ruiside/art_pi2/doc/index.rst

+163
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,163 @@
1+
.. zephyr:board:: art_pi2
2+
3+
Overview
4+
********
5+
6+
The ART-Pi2 is an open-source hardware platform designed by the
7+
RT-Thread team specifically for embedded software engineers
8+
and open-source makers, offering extensive expandability for DIY projects.
9+
10+
Key Features
11+
12+
- STM32H7R7L8HxH microcontroller featuring 64 Kbytes of Flash and 620 Kbytes of SRAM in an TFBGA225 package
13+
- On-board ST-LINK/V2.1 debugger/programmer
14+
- SDIO TF Card slot
15+
- SDIO WIFI:CYWL6208
16+
- HDC UART BuleTooth:CYWL6208
17+
- 32-MB HyperRAM
18+
- 64-MB HyperFlash
19+
- One Power LED (blue) for 3.3 V power-on
20+
- Two user LEDs blue and red
21+
- Two ST-LINK LEDs: blue and red
22+
- Two push-buttons (user and reset)
23+
- Board connectors:
24+
25+
- USB OTG with Type-C connector
26+
- RGB888 FPC connector
27+
28+
More information about the board can be found at the `ART-Pi2 website`_.
29+
30+
Hardware
31+
********
32+
33+
ART-Pi2 provides the following hardware components:
34+
35+
The STM32H7R7xx devices are a high-performance microcontrollers family (STM32H7
36+
Series) based on the high-performance Arm |reg| Cortex |reg|-M7 32-bit RISC core.
37+
They operate at a frequency of up to 600 MHz.
38+
39+
More information about STM32H7R7 can be found here:
40+
41+
- `STM32H7R7L8 on www.st.com`_
42+
- `STM32H7Rx reference manual`_
43+
44+
45+
Supported Features
46+
==================
47+
48+
.. zephyr:board-supported-hw::
49+
50+
Default Zephyr Peripheral Mapping:
51+
----------------------------------
52+
53+
The ART-Pi2 board features a On-board ST-LINK/V2.1 debugger/programmer. Board is configured as follows:
54+
55+
- UART4 TX/RX : PD1/PD0 (ST-Link Virtual Port Com)
56+
- LED1 (red) : PO1
57+
- LED2 (blue) : PO5
58+
- USER PUSH-BUTTON : PC13
59+
60+
System Clock
61+
------------
62+
63+
ART-Pi2 System Clock could be driven by an internal or external
64+
oscillator, as well as the main PLL clock. By default, the System clock is
65+
driven by the PLL clock at 250MHz, driven by an 24MHz high-speed external clock.
66+
67+
Serial Port
68+
-----------
69+
70+
ART-Pi2 board has 4 UARTs and 3 USARTs plus one LowPower UART. The Zephyr console
71+
output is assigned to UART4. Default settings are 115200 8N1.
72+
73+
Backup SRAM
74+
-----------
75+
76+
In order to test backup SRAM you may want to disconnect VBAT from VDD. You can
77+
do it by removing ``SB13`` jumper on the back side of the board.
78+
79+
Programming and Debugging
80+
*************************
81+
82+
.. zephyr:board-supported-runners::
83+
84+
ART-Pi2 board includes an ST-LINK/V2.1 embedded debug tool interface.
85+
86+
.. note::
87+
88+
Check if your ST-LINK V2.1 has newest FW version. It can be done with `STM32CubeProgrammer`_
89+
90+
Flashing
91+
========
92+
93+
The board is configured to be flashed using west `STM32CubeProgrammer`_ runner,
94+
so its :ref:`installation <stm32cubeprog-flash-host-tools>` is required.
95+
96+
Flashing an application to ART-Pi2
97+
----------------------------------
98+
99+
First, connect the art_pi2 to your host computer using
100+
the USB port to prepare it for flashing. Then build and flash your application.
101+
102+
Here is an example for the :zephyr:code-sample:`hello_world` application.
103+
104+
Run a serial host program to connect with your art_pi2 board.
105+
106+
.. code-block:: console
107+
108+
$ minicom -b 115200 -D /dev/ttyACM0
109+
110+
or use screen:
111+
112+
.. code-block:: console
113+
114+
$ screen /dev/ttyACM0 115200
115+
116+
Build and flash the application:
117+
118+
.. zephyr-app-commands::
119+
:zephyr-app: samples/hello_world
120+
:board: art_pi2
121+
:goals: build flash
122+
123+
You should see the following message on the console:
124+
125+
.. code-block:: console
126+
127+
*** Booting Zephyr OS build v4.1.0-1907-g415ab379a8af ***
128+
Hello World! art_pi2/stm32h7r7xx
129+
130+
Blinky example can also be used:
131+
132+
.. zephyr-app-commands::
133+
:zephyr-app: samples/basic/blinky
134+
:board: art_pi2
135+
:goals: build flash
136+
137+
Debugging
138+
=========
139+
140+
You can debug an application in the usual way. Here is an example for the
141+
:zephyr:code-sample:`hello_world` application.
142+
143+
.. zephyr-app-commands::
144+
:zephyr-app: samples/hello_world
145+
:board: art_pi2
146+
:maybe-skip-config:
147+
:goals: debug
148+
149+
References
150+
**********
151+
.. target-notes::
152+
153+
.. _ART-Pi2 website:
154+
https://github.com/RT-Thread-Studio/sdk-bsp-stm32h7r-realthread-artpi2
155+
156+
.. _STM32H7R7L8 on www.st.com:
157+
https://www.st.com/en/microcontrollers-microprocessors/stm32h7r7l8.html
158+
159+
.. _STM32H7Rx reference manual:
160+
https://www.st.com/resource/en/reference_manual/rm0477-stm32h7rx7sx-armbased-32bit-mcus-stmicroelectronics.pdf
161+
162+
.. _STM32CubeProgrammer:
163+
https://www.st.com/en/development-tools/stm32cubeprog.html

boards/ruiside/index.rst

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.. _boards-Ruiside:
2+
3+
Ruiside
4+
#######
5+
6+
.. toctree::
7+
:maxdepth: 1
8+
:glob:
9+
10+
**/*

dts/bindings/vendor-prefixes.txt

+1
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,7 @@ ronbo Ronbo Electronics
582582
ronoth Ronoth
583583
roofull Shenzhen Roofull Technology Co, Ltd
584584
roseapplepi RoseapplePi.org
585+
ruiside Shanghai Ruiside Electronic Technology Co., Ltd.
585586
ruuvi Ruuvi Innovations Ltd (Oy)
586587
samsung Samsung Semiconductor
587588
samtec Samtec/Softing company

0 commit comments

Comments
 (0)