Skip to content

Commit 0e43dd2

Browse files
dancollinsfabiobaltieri
authored andcommitted
soc: st: adds support for stm32u545xx
This adds support for the stm32u545xx SoC, which extends the stm32u5 family already present in Zephyr. Signed-off-by: Dan Collins <[email protected]>
1 parent 94386e1 commit 0e43dd2

File tree

6 files changed

+84
-0
lines changed

6 files changed

+84
-0
lines changed

dts/arm/st/u5/stm32u545.dtsi

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright (c) 2024 Opito
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <st/u5/stm32u5.dtsi>
8+
9+
10+
/ {
11+
soc {
12+
/* USB-C PD is not available on this part. */
13+
/delete-node/ ucpd@4000dc00;
14+
15+
compatible = "st,stm32u545", "st,stm32u5", "simple-bus";
16+
17+
usb: usb@40006000 {
18+
compatible = "st,stm32-usb";
19+
reg = <0x40006000 0x400>;
20+
interrupts = <73 0>;
21+
interrupt-names = "usb";
22+
num-bidir-endpoints = <8>;
23+
ram-size = <1024>;
24+
status = "disabled";
25+
clocks = <&rcc STM32_CLOCK_BUS_APB2 0x01000000>,
26+
<&rcc STM32_SRC_HSI48 ICKLK_SEL(0)>;
27+
phys = <&usb_fs_phy>;
28+
};
29+
};
30+
31+
usb_fs_phy: usb_fs_phy {
32+
compatible = "usb-nop-xceiv";
33+
#phy-cells = <0>;
34+
};
35+
};

dts/arm/st/u5/stm32u545Xi.dtsi

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright (c) 2024 Opito
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#include <mem.h>
7+
#include <st/u5/stm32u545.dtsi>
8+
9+
/ {
10+
sram0: memory@20000000 {
11+
/* SRAM1 + SRAM2 */
12+
reg = <0x20000000 DT_SIZE_K(256)>;
13+
};
14+
15+
sram1: memory@28000000 {
16+
/* SRAM4, low-power background autonomous mode */
17+
reg = <0x28000000 DT_SIZE_K(16)>;
18+
};
19+
20+
soc {
21+
flash-controller@40022000 {
22+
flash0: flash@8000000 {
23+
reg = <0x08000000 DT_SIZE_K(512)>;
24+
};
25+
};
26+
};
27+
};

soc/st/stm32/soc.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ family:
190190
socs:
191191
- name: stm32u5a5xx
192192
- name: stm32u5a9xx
193+
- name: stm32u545xx
193194
- name: stm32u575xx
194195
- name: stm32u585xx
195196
- name: stm32u595xx
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ST Microelectronics STM32U545XX MCU
2+
3+
# Copyright (c) 2024 Opito
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if SOC_STM32U545XX
7+
8+
config NUM_IRQS
9+
default 126
10+
11+
endif # SOC_STM32U545XX

soc/st/stm32/stm32u5x/Kconfig.soc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ config SOC_SERIES_STM32U5X
1212
config SOC_SERIES
1313
default "stm32u5x" if SOC_SERIES_STM32U5X
1414

15+
config SOC_STM32U545XX
16+
bool
17+
select SOC_SERIES_STM32U5X
18+
1519
config SOC_STM32U575XX
1620
bool
1721
select SOC_SERIES_STM32U5X
@@ -39,6 +43,7 @@ config SOC_STM32U5A9XX
3943
config SOC
4044
default "stm32u5a5xx" if SOC_STM32U5A5XX
4145
default "stm32u5a9xx" if SOC_STM32U5A9XX
46+
default "stm32u545xx" if SOC_STM32U545XX
4247
default "stm32u575xx" if SOC_STM32U575XX
4348
default "stm32u585xx" if SOC_STM32U585XX
4449
default "stm32u595xx" if SOC_STM32U595XX

soc/st/stm32/stm32u5x/soc.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,16 @@ void soc_early_init_hook(void)
4040
/* Enable PWR */
4141
LL_AHB3_GRP1_EnableClock(LL_AHB3_GRP1_PERIPH_PWR);
4242

43+
/* For devices with USB C PD, we can disable the dead battery
44+
* pull-down behaviour.
45+
*/
46+
#if defined(UCPD1)
4347
if (IS_ENABLED(CONFIG_DT_HAS_ST_STM32_UCPD_ENABLED) ||
4448
!IS_ENABLED(CONFIG_USB_DEVICE_DRIVER)) {
4549
/* Disable USB Type-C dead battery pull-down behavior */
4650
LL_PWR_DisableUCPDDeadBattery();
4751
}
52+
#endif
4853

4954
/* Power Configuration */
5055
#if defined(CONFIG_POWER_SUPPLY_DIRECT_SMPS)

0 commit comments

Comments
 (0)