Skip to content

Commit de42b49

Browse files
str4t0mfabiobaltieri
authored andcommitted
dts: arm: st: stm32c0: add stm32c051
Add dts for stm32c051. STM32C051 is just an STM32c071 w/o USB and different memory configuration. Therefore STM32C091 can directly include STM32C051 and no longer needs to delete the usb nodes. Signed-off-by: Thomas Stranger <[email protected]>
1 parent 0414683 commit de42b49

File tree

5 files changed

+115
-69
lines changed

5 files changed

+115
-69
lines changed

dts/arm/st/c0/stm32c051.dtsi

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
/*
2+
* Copyright (c) 2024 STMicroelectronics
3+
* Copyright (c) 2025 Thomas Stranger
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
#include <st/c0/stm32c031.dtsi>
9+
10+
/ {
11+
soc {
12+
compatible = "st,stm32c051", "st,stm32c0", "simple-bus";
13+
14+
timers2: timers@40000000 {
15+
compatible = "st,stm32-timers";
16+
reg = <0x40000000 0x400>;
17+
clocks = <&rcc STM32_CLOCK(APB1, 0)>,
18+
<&rcc STM32_SRC_TIMPCLK1 NO_SEL>;
19+
resets = <&rctl STM32_RESET(APB1L, 0)>;
20+
interrupts = <15 0>;
21+
interrupt-names = "global";
22+
st,prescaler = <0>;
23+
status = "disabled";
24+
25+
pwm {
26+
compatible = "st,stm32-pwm";
27+
status = "disabled";
28+
#pwm-cells = <3>;
29+
};
30+
31+
counter {
32+
compatible = "st,stm32-counter";
33+
status = "disabled";
34+
};
35+
};
36+
37+
i2c2: i2c@40005800 {
38+
compatible = "st,stm32-i2c-v2";
39+
clock-frequency = <I2C_BITRATE_STANDARD>;
40+
#address-cells = <1>;
41+
#size-cells = <0>;
42+
reg = <0x40005800 0x400>;
43+
clocks = <&rcc STM32_CLOCK(APB1, 22)>;
44+
interrupts = <24 0>;
45+
interrupt-names = "global";
46+
status = "disabled";
47+
};
48+
49+
spi2: spi@40003800 {
50+
compatible = "st,stm32-spi-fifo", "st,stm32-spi";
51+
#address-cells = <1>;
52+
#size-cells = <0>;
53+
reg = <0x40003800 0x400>;
54+
clocks = <&rcc STM32_CLOCK(APB1, 14)>;
55+
interrupts = <26 0>;
56+
interrupt-names = "global";
57+
status = "disabled";
58+
};
59+
60+
dma1: dma@40020000 {
61+
interrupts = <9 0 10 0 10 0 11 0 11 0>;
62+
dma-requests = <5>;
63+
};
64+
65+
dmamux1: dmamux@40020800 {
66+
dma-channels = <5>;
67+
};
68+
};
69+
};

dts/arm/st/c0/stm32c051X6.dtsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2025 Thomas Stranger
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <st/c0/stm32c051.dtsi>
9+
10+
/ {
11+
sram0: memory@20000000 {
12+
reg = <0x20000000 DT_SIZE_K(12)>;
13+
};
14+
15+
soc {
16+
flash-controller@40022000 {
17+
flash0: flash@8000000 {
18+
reg = <0x08000000 DT_SIZE_K(32)>;
19+
};
20+
};
21+
};
22+
};

dts/arm/st/c0/stm32c051X8.dtsi

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2025 Thomas Stranger
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <mem.h>
8+
#include <st/c0/stm32c051.dtsi>
9+
10+
/ {
11+
sram0: memory@20000000 {
12+
reg = <0x20000000 DT_SIZE_K(12)>;
13+
};
14+
15+
soc {
16+
flash-controller@40022000 {
17+
flash0: flash@8000000 {
18+
reg = <0x08000000 DT_SIZE_K(64)>;
19+
};
20+
};
21+
};
22+
};

dts/arm/st/c0/stm32c071.dtsi

Lines changed: 1 addition & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#include <st/c0/stm32c031.dtsi>
7+
#include <st/c0/stm32c051.dtsi>
88

99
/ {
1010
clocks {
@@ -20,41 +20,6 @@
2020
soc {
2121
compatible = "st,stm32c071", "st,stm32c0", "simple-bus";
2222

23-
timers2: timers@40000000 {
24-
compatible = "st,stm32-timers";
25-
reg = <0x40000000 0x400>;
26-
clocks = <&rcc STM32_CLOCK(APB1, 0)>,
27-
<&rcc STM32_SRC_TIMPCLK1 NO_SEL>;
28-
resets = <&rctl STM32_RESET(APB1L, 0U)>;
29-
interrupts = <15 0>;
30-
interrupt-names = "global";
31-
st,prescaler = <0>;
32-
status = "disabled";
33-
34-
pwm {
35-
compatible = "st,stm32-pwm";
36-
status = "disabled";
37-
#pwm-cells = <3>;
38-
};
39-
40-
counter {
41-
compatible = "st,stm32-counter";
42-
status = "disabled";
43-
};
44-
};
45-
46-
i2c2: i2c@40005800 {
47-
compatible = "st,stm32-i2c-v2";
48-
clock-frequency = <I2C_BITRATE_STANDARD>;
49-
#address-cells = <1>;
50-
#size-cells = <0>;
51-
reg = <0x40005800 0x400>;
52-
clocks = <&rcc STM32_CLOCK(APB1, 22)>;
53-
interrupts = <24 0>;
54-
interrupt-names = "global";
55-
status = "disabled";
56-
};
57-
5823
usb: usb@40005c00 {
5924
compatible = "st,stm32-usb";
6025
reg = <0x40005c00 0x400>;
@@ -68,26 +33,6 @@
6833
<&rcc STM32_SRC_HSE USB_SEL(1)>;
6934
status = "disabled";
7035
};
71-
72-
spi2: spi@40003800 {
73-
compatible = "st,stm32-spi-fifo", "st,stm32-spi";
74-
#address-cells = <1>;
75-
#size-cells = <0>;
76-
reg = <0x40003800 0x400>;
77-
clocks = <&rcc STM32_CLOCK(APB1, 14)>;
78-
interrupts = <26 0>;
79-
interrupt-names = "global";
80-
status = "disabled";
81-
};
82-
83-
dma1: dma@40020000 {
84-
interrupts = <9 0 10 0 10 0 11 0 11 0>;
85-
dma-requests = <5>;
86-
};
87-
88-
dmamux1: dmamux@40020800 {
89-
dma-channels = <5>;
90-
};
9136
};
9237

9338
usb_fs_phy: usbphy {

dts/arm/st/c0/stm32c091.dtsi

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,7 @@
44
* SPDX-License-Identifier: Apache-2.0
55
*/
66

7-
#include <st/c0/stm32c071.dtsi>
8-
9-
/* STM32C091 is a superset of the C071 with the exception of USB support.
10-
* Since C071 provides the same set of peripheral as the C051,
11-
* along with the addition of USB, once the C051 is introduced,
12-
* it can be included instead, and the delete-node can be removed.
13-
*/
14-
/delete-node/ &usb;
15-
/delete-node/ &usb_fs_phy;
7+
#include <st/c0/stm32c051.dtsi>
168

179
/ {
1810
soc {
@@ -69,7 +61,3 @@
6961
};
7062
};
7163
};
72-
73-
&exti {
74-
num-lines = <32>;
75-
};

0 commit comments

Comments
 (0)