Skip to content

Commit e3fda63

Browse files
erwangogalak
authored andcommitted
boards: Add support for b_u585i_iot02a
Add basic support for b_u585i_iot02a. Signed-off-by: Erwan Gouriou <[email protected]>
1 parent e7d6080 commit e3fda63

File tree

11 files changed

+534
-0
lines changed

11 files changed

+534
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# B_U585I_IOT02A discovery kit configuration
2+
3+
# Copyright (c) 2021 STMicroelectronics
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_B_U585I_IOT02A
7+
bool "STM32U585I IOT Discovery kit"
8+
depends on SOC_STM32U585XX
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# B_U585I_IOT02A discovery kit board configuration
2+
3+
# Copyright (c) 2021 STMicroelectronics
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_B_U585I_IOT02A
7+
8+
config BOARD
9+
default "b_u585i_iot02a"
10+
11+
endif # BOARD_B_U585I_IOT02A
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2021 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
arduino_header: connector {
9+
compatible = "arduino-header-r3";
10+
#gpio-cells = <2>;
11+
gpio-map-mask = <0xffffffff 0xffffffc0>;
12+
gpio-map-pass-thru = <0 0x3f>;
13+
gpio-map = <0 0 &gpioc 0 0>, /* A0 */
14+
<1 0 &gpioc 2 0>, /* A1 */
15+
<2 0 &gpioc 4 0>, /* A2 */
16+
<3 0 &gpioc 5 0>, /* A3 */
17+
<4 0 &gpioa 7 0>, /* A4 */
18+
<5 0 &gpiob 0 0>, /* A5 */
19+
<6 0 &gpioc 11 0>, /* D0 */
20+
<7 0 &gpioc 10 0>, /* D1 */
21+
<8 0 &gpiod 15 0>, /* D2 */
22+
<9 0 &gpiob 2 0>, /* D3 */
23+
<10 0 &gpioe 7 0>, /* D4 */
24+
<11 0 &gpioe 0 0>, /* D5 */
25+
<12 0 &gpiob 6 0>, /* D6 */
26+
<13 0 &gpiof 13 0>, /* D7 */
27+
<14 0 &gpioc 1 0>, /* D8 */
28+
<15 0 &gpioa 8 0>, /* D9 */
29+
<16 0 &gpioe 12 0>, /* D10 */
30+
<17 0 &gpioe 15 0>, /* D11 */
31+
<18 0 &gpioe 14 0>, /* D12 */
32+
<19 0 &gpioe 13 0>, /* D13 */
33+
<20 0 &gpiob 9 0>, /* D14 */
34+
<21 0 &gpiob 8 0>; /* D15 */
35+
};
36+
};
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
/*
2+
* Copyright (c) 2021 Linaro Limited
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <st/u5/stm32u585Xi.dtsi>
8+
#include <st/u5/stm32u585aiixq-pinctrl.dtsi>
9+
#include "arduino_r3_connector.dtsi"
10+
11+
/ {
12+
leds {
13+
compatible = "gpio-leds";
14+
green_led_1: led_1 {
15+
gpios = <&gpioh 7 GPIO_ACTIVE_HIGH>;
16+
label = "User LD7";
17+
};
18+
red_led_1: led_3 {
19+
gpios = <&gpioh 6 GPIO_ACTIVE_HIGH>;
20+
label = "User LD6";
21+
};
22+
};
23+
24+
gpio_keys {
25+
compatible = "gpio-keys";
26+
user_button: button {
27+
label = "User";
28+
gpios = <&gpioc 13 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
29+
};
30+
};
31+
};
32+
33+
&clk_lse {
34+
status = "okay";
35+
};
36+
37+
&clk_msis {
38+
status = "okay";
39+
msi-range = <4>;
40+
msi-pll-mode;
41+
};
42+
43+
&pll1 {
44+
div-m = <1>;
45+
mul-n = <80>;
46+
div-q = <2>;
47+
div-r = <2>;
48+
clocks = <&clk_msis>;
49+
status = "okay";
50+
};
51+
52+
&rcc {
53+
clocks = <&pll1>;
54+
clock-frequency = <DT_FREQ_M(160)>;
55+
ahb-prescaler = <1>;
56+
apb1-prescaler = <1>;
57+
apb2-prescaler = <1>;
58+
apb3-prescaler = <1>;
59+
};
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
/*
2+
* Copyright (c) 2021 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include "b_u585i_iot02a-common.dtsi"
9+
10+
/ {
11+
model = "STMicroelectronics B-U585I-IOT02A discovery kit";
12+
compatible = "st,b-u585i-iot02a";
13+
14+
chosen {
15+
zephyr,console = &usart1;
16+
zephyr,shell-uart = &usart1;
17+
zephyr,sram = &sram0;
18+
zephyr,flash = &flash0;
19+
};
20+
21+
aliases {
22+
led0 = &green_led_1;
23+
led1 = &red_led_1;
24+
sw0 = &user_button;
25+
};
26+
};
27+
28+
&usart1 {
29+
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
30+
current-speed = <115200>;
31+
status = "okay";
32+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
identifier: b_u585i_iot02a
2+
name: ST B_U585I_IOT02A Discovery kit
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
- gnuarmemb
8+
- xtools
9+
ram: 786
10+
flash: 2048
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
CONFIG_SOC_SERIES_STM32U5X=y
4+
CONFIG_SOC_STM32U585XX=y
5+
6+
# enable uart driver
7+
CONFIG_SERIAL=y
8+
9+
# enable pinmux
10+
CONFIG_PINMUX=y
11+
12+
# enable GPIO
13+
CONFIG_GPIO=y
14+
15+
# Enable Clocks
16+
CONFIG_CLOCK_CONTROL=y
17+
18+
# console
19+
CONFIG_CONSOLE=y
20+
CONFIG_UART_CONSOLE=y
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
board_runner_args(stm32cubeprogrammer "--erase" "--port=swd" "--reset=hw")
4+
board_runner_args(stm32cubeprogrammer "--port=swd" "--reset=hw")
5+
6+
board_runner_args(openocd "--tcl-port=6666")
7+
board_runner_args(openocd --cmd-pre-init "gdb_report_data_abort enable")
8+
board_runner_args(openocd "--no-halt")
9+
10+
include(${ZEPHYR_BASE}/boards/common/stm32cubeprogrammer.board.cmake)
11+
# FIXME: openocd runner requires use of STMicro openocd fork.
12+
# Check board documentation for more details.
13+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
110 KB
Loading

0 commit comments

Comments
 (0)