Skip to content

Commit ce720dc

Browse files
committed
dts: arm: st: add stm32h523Xe support
Provide support for STM32H523XE. Signed-off-by: Filip Stojanovic <[email protected]>
1 parent 5e63a5a commit ce720dc

File tree

9 files changed

+86
-25
lines changed

9 files changed

+86
-25
lines changed

boards/weact/blackpill_h523ce/Kconfig.blackpill_h523ce

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
# SPDX-License-Identifier: Apache-2.0
33

44
config BOARD_BLACKPILL_H523CE
5-
select SOC_STM32H533XX
5+
select SOC_STM32H523XX

boards/weact/blackpill_h523ce/blackpill_h523ce.dts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949

5050
&timers3 {
5151
status = "okay";
52-
st, prescaler = <1000>;
52+
st,prescaler = <24>;
5353

5454
pwm3: pwm {
5555
status = "okay";
@@ -93,7 +93,7 @@ zephyr_udc0: &usb {
9393
clocks = <&rcc STM32_CLOCK_BUS_AHB2 0x00000400>, <&rcc STM32_SRC_HCLK ADCDAC_SEL(0)>;
9494
pinctrl-0 = <&adc1_inp1_pa1>;
9595
pinctrl-names = "default";
96-
st,adc-clock - source = "ASYNC";
96+
st,adc-clock-source = "ASYNC";
9797
st,adc-prescaler = <8>;
9898
status = "okay";
9999
};

boards/weact/blackpill_h523ce/board.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@ board:
33
full_name: Black Pill STM32H523
44
vendor: weact
55
socs:
6-
- name: stm32h533xx
6+
- name: stm32h523xx

dts/arm/st/h5/stm32h523.dtsi

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
* Copyright (c) 2025 Filip Stojanovic
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
#include <st/h5/stm32h5.dtsi>
8+
9+
/ {
10+
soc {
11+
compatible = "st,stm32h533", "st,stm32h5", "simple-bus";
12+
13+
gpiof: gpio@42021400 {
14+
compatible = "st,stm32-gpio";
15+
gpio-controller;
16+
#gpio-cells = <2>;
17+
reg = <0x42021400 0x400>;
18+
clocks = <&rcc STM32_CLOCK(AHB2, 7U)>;
19+
};
20+
21+
fmc: memory-controller@47000400 {
22+
compatible = "st,stm32-fmc";
23+
reg = <0x47000400 0x400>;
24+
clocks = <&rcc STM32_CLOCK(AHB4, 16U)>;
25+
status = "disabled";
26+
};
27+
};
28+
};

dts/arm/st/h5/stm32h523Xe.dtsi

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
* Copyright (c) 2025 Filip Stojanovic
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
#include <mem.h>
8+
#include <st/h5/stm32h523.dtsi>
9+
10+
/ {
11+
sram1: memory@20000000 {
12+
compatible = "zephyr,memory-region", "mmio-sram";
13+
reg = <0x20000000 DT_SIZE_K(128)>;
14+
zephyr,memory-region = "SRAM1";
15+
};
16+
17+
sram2: memory@20040000 {
18+
compatible = "zephyr,memory-region", "mmio-sram";
19+
reg = <0x20040000 DT_SIZE_K(80)>;
20+
zephyr,memory-region = "SRAM2";
21+
};
22+
23+
sram3: memory@20050000 {
24+
compatible = "zephyr,memory-region", "mmio-sram";
25+
reg = <0x20050000 DT_SIZE_K(64)>;
26+
zephyr,memory-region = "SRAM3";
27+
};
28+
29+
soc {
30+
flash-controller@40022000 {
31+
flash0: flash@8000000 {
32+
reg = <0x08000000 DT_SIZE_K(512)>;
33+
};
34+
};
35+
};
36+
};

dts/arm/st/h5/stm32h533.dtsi

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,5 @@
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
6-
#include <st/h5/stm32h5.dtsi>
76

8-
/ {
9-
soc {
10-
compatible = "st,stm32h533", "st,stm32h5", "simple-bus";
11-
12-
gpiof: gpio@42021400 {
13-
compatible = "st,stm32-gpio";
14-
gpio-controller;
15-
#gpio-cells = <2>;
16-
reg = <0x42021400 0x400>;
17-
clocks = <&rcc STM32_CLOCK(AHB2, 7U)>;
18-
};
19-
20-
fmc: memory-controller@47000400 {
21-
compatible = "st,stm32-fmc";
22-
reg = <0x47000400 0x400>;
23-
clocks = <&rcc STM32_CLOCK(AHB4, 16U)>;
24-
status = "disabled";
25-
};
26-
};
27-
};
7+
#include <st/h5/stm32h523.dtsi>

soc/st/stm32/soc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ family:
102102
- name: stm32h5x
103103
socs:
104104
- name: stm32h503xx
105+
- name: stm32h523xx
105106
- name: stm32h533xx
106107
- name: stm32h562xx
107108
- name: stm32h563xx
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# STMicroelectronics STM32H523XX MCU
2+
3+
# Copyright (c) 2024 STMicroelectronics
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_STM32H523XX
7+
8+
config NUM_IRQS
9+
default 133
10+
11+
endif # SOC_STM32H523XX

soc/st/stm32/stm32h5x/Kconfig.soc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ config SOC_STM32H503XX
1414
bool
1515
select SOC_SERIES_STM32H5X
1616

17+
config SOC_STM32H523XX
18+
bool
19+
select SOC_SERIES_STM32H5X
20+
1721
config SOC_STM32H533XX
1822
bool
1923
select SOC_SERIES_STM32H5X
@@ -32,6 +36,7 @@ config SOC_STM32H573XX
3236

3337
config SOC
3438
default "stm32h503xx" if SOC_STM32H503XX
39+
default "stm32h523xx" if SOC_STM32H523XX
3540
default "stm32h533xx" if SOC_STM32H533XX
3641
default "stm32h562xx" if SOC_STM32H562XX
3742
default "stm32h563xx" if SOC_STM32H563XX

0 commit comments

Comments
 (0)